Skip to content

Are the keycodes limited to str(ints) as a requirement? #2

@marcidy

Description

@marcidy

Note to self:

    if ev.code == evdev.ecodes.KEY_ENTER:
      yield "".join(map(str, keys))
      keys = []
    else:
      log(f"Appending keycode: {c.keycode}, {c.keycode[4:]}")
      try:
        keys.append(int(c.keycode[4:]))
      except ValueError:
        pass

this implies that only keys which can be converted to an int are stored, e.g. KEY_[0-9]. Is that a requirement?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions