Kivy pyJnius access to system keys

337 Views Asked by At

I try to make Python app for android using kivy and pyJnius where necessary to listen events from HW System Keys such as VolumeUp/down. I try to make function which catch key pressDown and return the keyID of the pressed key. '''

from jnius import autoclass
event=autoclass(android.view.KeyEvent)
while True:
 code=event.getKeyCode()
 action=event.getAction()
 print(code, actions)

''' but no one method from that class working, return 0 allways. Unfortunately can not find any exemple for that, please advise or link for get keyID with kivy.

0

There are 0 best solutions below