Skip to content

Commit

Permalink
uinput.py: Fix wrongly named enums
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j committed Sep 21, 2024
1 parent abc998c commit 7a2b86d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions scc/uinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,19 +57,19 @@ class KeysOnly(IntEnum):
"""Keys enum contains all keys and button from linux/uinput.h (KEY_* BTN_*)."""

#locals().update({i: CHEAD[i] for i in CHEAD if i.startswith("KEY_")})
KeysOnly = IntEnum("Keys", {i: CHEAD[i] for i in CHEAD.keys() if (i.startswith("KEY_"))})
KeysOnly = IntEnum("KeysOnly", {i: CHEAD[i] for i in CHEAD.keys() if (i.startswith("KEY_"))})

class Axes(IntEnum):
"""Axes enum contains all axes from linux/uinput.h (ABS_*)."""

#locals().update({i: CHEAD[i] for i in CHEAD if i.startswith("ABS_")})
Axes = IntEnum("Keys", {i: CHEAD[i] for i in CHEAD.keys() if (i.startswith("ABS_"))})
Axes = IntEnum("Axes", {i: CHEAD[i] for i in CHEAD.keys() if (i.startswith("ABS_"))})

class Rels(IntEnum):
"""Rels enum contains all rels from linux/uinput.h (REL_*)."""

#locals().update({i: CHEAD[i] for i in CHEAD if i.startswith("REL_")})
Rels = IntEnum("Keys", {i: CHEAD[i] for i in CHEAD.keys() if (i.startswith("REL_"))})
Rels = IntEnum("Rels", {i: CHEAD[i] for i in CHEAD.keys() if (i.startswith("REL_"))})

# Scan codes for each keys (taken from a logitech keyboard)
Scans = {
Expand Down

0 comments on commit 7a2b86d

Please sign in to comment.