7

I am using the python kivy framework to develop a GUI which will then be most probably used on a desktop PC with (hardware) mouse and keyboard. My problem now is that when using the Text Input class, it automatically creates a virtual keyboard if the Text Input field gets focused. Among other things I tried to set the option

keyboard_mode = 'managed'

implemented in my main the following way:

textinputfield = TextInput(text="some initial text here", text_size=self.size, keyboard_mode='managed')

which actually hides the keyboard but unfortunately also prevents the user from entering any data into the field.... I can't find any solution on google. Do you have any ideas?

2 Answers 2

3

@Yoav was close enough in his answer.

You need to set keyboard_mode=system in your kivy configuration, and not in the TextInput. If you always want to use the system keyboard, you can make this change in ~/.kivy/config.ini.

Check Kivy config for more options, like setting this variable on a per-app basis etc.

Sign up to request clarification or add additional context in comments.

1 Comment

perfect. that solved my problem. yes you are right, then Yoav was very close. I didn't know about that kivy config file. many thanks ;-)
2

You should try:

keyboard_mode = 'system'

It will use the real keyboard

2 Comments

keyboard_mode only allows options 'auto' or 'managed'. Are you sure about that?
I edited my post. you can check if the implementation is correct.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.