I\'m writing an app using Kivy framework and I stumbled upon a minor but annoying problem: I don\'t know how to handle Tab/Enter/Arrow keys in text fields so that press
[Insufficient points to just comment, so adding this here...]
It's crucial to note that the keyboard NEXT behavior only works easily if the next field is managed by the same keyboard layout. However, an advanced app will have:
So the approaches above really doesn't work out.
In the kv file:
MyTextInput:
next: idTheNextFieldBelowThis
In your MyTextInput class:
def insert_text(self, value, from_undo=False):
#
# Unfortunately the TextInput write_tab behavior only works if the next field is the same exact keyboard
# type.
#
if not value[-1:] == ' ':
return super(MyTextInput, self).insert_text(value, from_undo=from_undo)
r = super(MyTextInput, self).insert_text(value[:-1], from_undo=from_undo)
if self.next is not None:
self.next.focus = True
return r