Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Keycode type consistently for representing keycode #1536

Merged
merged 1 commit into from
Sep 18, 2024

Conversation

ids1024
Copy link
Member

@ids1024 ids1024 commented Sep 17, 2024

It seems good to use a dedicated type for keycodes, particularly given there's two conventions for keycodes, offset by 8. So there's ambiguity about what the numberic value of the keycode actually represents.

We might prefer to use the Wayland value rather than the X11 version like xkeysym::KeyCode uses. But it would complicate things to have two different keycode types, and the code that calls kbd.key already is converting from Keycode.

It seems good to use a dedicated type for keycodes, particularly given
there's two conventions for keycodes, offset by 8. So there's ambiguity
about what the numberic value of the keycode actually represents.

We might prefer to use the Wayland value rather than the X11 version
like `xkeysym::KeyCode` uses. But it would complicate things to have two
different keycode types, and the code that calls `kbd.key` already is
converting from `Keycode`.
Copy link
Member

@Drakulix Drakulix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a sensible idea. 👍

@Drakulix Drakulix merged commit 566e176 into Smithay:master Sep 18, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants