Skip to content

Commit

Permalink
#117 fixed assigning of KEY_KP keys which are not translated by curre…
Browse files Browse the repository at this point in the history
…nt used layout
  • Loading branch information
ldrahnik committed Jun 26, 2023
1 parent fc78b5c commit 4207a46
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions asus_touchpad.py
Original file line number Diff line number Diff line change
Expand Up @@ -946,13 +946,11 @@ def get_events_for_unicode_char(char):

try:
if hex_digit.isnumeric():
key_code = getattr(EV_KEY, 'KEY_KP%s' % hex_digit)
key = EV_KEY.codes[int(key_code)]
key = getattr(EV_KEY, 'KEY_KP%s' % hex_digit)
else:
key = get_keycode_which_reflects_current_layout(hex_digit)
except:
key_code = getattr(EV_KEY, 'KEY_KP%s' % hex_digit)
key = EV_KEY.codes[int(key_code)]
key = getattr(EV_KEY, 'KEY_KP%s' % hex_digit)

key_event_press = InputEvent(key, 1)
key_event_unpress = InputEvent(key, 0)
Expand Down

0 comments on commit 4207a46

Please sign in to comment.