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

Adjust get_action_key() function for physical keys #11

Merged
merged 2 commits into from
Dec 19, 2022

Conversation

Exerionius
Copy link
Contributor

In the old implementation event.as_text() returns Q (Physical) if a physical binding is used and just Q if a regular binding is used.

For regular bindings this new implementation works the same as the old one (returns Q).

For physical bindings this implementation returns a correct key name depending on the user's current keyboard layout (for AZERTY keyboards returns A, for DVORAK keyboards returns D, etc), without the additional '(Physical)' word.

Exerionius added 2 commits November 7, 2022 16:16
In the old implementation `event.as_text()` returns `Q (Physical)` if a physical binding is used and just `Q` if a regular binding is used.

For regular bindings this new implementation works the same as the old one (returns `Q`).

For physical bindings this implementation returns a correct key name depending on the user's current keyboard layout (for AZERTY keyboards returns `A`, for DVORAK keyboards returns `D`, etc), without the additional '(Physical)' word.
@nathanhoad nathanhoad merged commit 434ea9a into nathanhoad:v2.x Dec 19, 2022
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