Closed
Description
kivy version: git master (and latest stable)
p4a version: develop branch (and latest stable)
backend: sdl2
i have added keyboard hook for hardware button as suggested in p4a documentation:
class YourApp(App):
def build(self):
Window.bind(on_keyboard=self.key_input)
return Widget() # your root widget here as normal
def key_input(self, window, key, scancode, codepoint, modifier):
if key == 27:
print('back pressed')
else: # the key now does nothing
return False
The hook does not receive any hardware backbutton input until i click any kivy TextInput. After i click any TextInput, android keyboard appears, then i can close it, and from now on hardware back button works just fine everywhere in the app (key 27 input is received). Another quirk: it stops working again if app is paused and resumed.
It happens only on some android devices: namely ZTE nubia z11 mini (android 5.1) and samsung galaxy S5. On some other devices it works fine.
Metadata
Metadata
Assignees
Labels
No labels