change key handling to avoid delays

This commit is contained in:
chrys 2016-07-26 00:06:18 +02:00
parent a9b3326fc8
commit f0ad59712d
2 changed files with 4 additions and 4 deletions

View File

@ -10,7 +10,7 @@
1-KEY_KP1=prev_char
1-KEY_KP3=next_char
1-KEY_KPDOT=exit_review
2-KEY_KP0,1-KEY_F2=toggle_braille_enable
2-KEY_KP0,1-KEY_F3=toggle_sound_enable
2-KEY_KP0,1-KEY_F4=toggle_speech_enable
1-KEY_KP0,1-KEY_F2=toggle_braille_enable
1-KEY_KP0,1-KEY_F3=toggle_sound_enable
1-KEY_KP0,1-KEY_F4=toggle_speech_enable
#=toggle_output_enable

View File

@ -21,7 +21,7 @@ class inputManager():
for event in self.devices[fd].read():
if event.type == evdev.ecodes.EV_KEY:
if event.value != 0:
environment['input']['currShortcut'][str(event.code)] = event.value
environment['input']['currShortcut'][str(event.code)] = 1 #event.value
else:
try:
del(environment['input']['currShortcut'][str(event.code)])