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

Alt Gr recognized as a character #180

Open
bigi111 opened this issue May 14, 2021 · 0 comments
Open

Alt Gr recognized as a character #180

bigi111 opened this issue May 14, 2021 · 0 comments

Comments

@bigi111
Copy link

bigi111 commented May 14, 2021

In a function on_press(key), if the pressed key is the "Alt Gr" key, then :
type(key) == keyboard._xorg.KeyCode instead of type(key) == keyboard.Key
Thus testing : if (key == keyboard.Key.alt_gr): print("Alt_Gr pressed") # doesn't work.
A work around is testing :
if (str(key) == "<65027>"): print("Alt_Gr pressed")
This works for me, but is not natural
All other keys I tested where OK.

Thank you a lot for this useful work.

P.S.
It would be nice to be able to test the state of the Shift, Ctrl, Alt, Super, Alt Gr keys, at any moment, without having to wait for an event. It would be useful for me in the management of the buttons of a graphic tablet.

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

No branches or pull requests

1 participant