forked from https://github.com/Evidlo/remarkable_mouse | patches include cool mapping mode that actually does proper aspect ratio conversion and fixing it for smartcard ssh setups
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
545 B
24 lines
545 B
#!/usr/bin/env python |
|
|
|
# Generate file of evdev codes from libevdev that is importable on OSX/Windows. |
|
# Only runs on Linux. |
|
|
|
import libevdev |
|
import pprint |
|
pp = pprint.PrettyPrinter() |
|
|
|
types = {} |
|
codes = {} |
|
|
|
for t in libevdev.types: |
|
types[t.value] = t.name |
|
codes[t.value] = {} |
|
for c in t.codes: |
|
codes[t.value][c.value] = c.name |
|
|
|
with open('codes.py', 'w') as f: |
|
f.write('# generated by generate_codes.py\n') |
|
f.write('\ntypes= ') |
|
f.write(pp.pformat(types)) |
|
f.write('\ncodes = ') |
|
f.write(pp.pformat(codes))
|
|
|