Python Kivy: hide virtual keyboard in text input field
I am using the python kivy framework to develop a GUI which will then most likely be used on a desktop PC with (hardware) mouse and keyboard. My problem is that when using the Text Input class, it automatically creates a virtual keyboard if the Text Input field becomes focused. Among other things, I tried to set the option
keyboard_mode = 'managed'
implemented in my main form:
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 in the field .... I can't find any solution on google. Do you have any ideas?
source to share
@Yoav was close enough in his answer.
You need to set keyboard_mode=system
to kivy config, not TextInput
. If you always want to use the system keyboard, you can make this change to ~/.kivy/config.ini
.
Check out Kivy config for additional options like setting this variable per application, etc.
source to share