sphinx-doc / alabaster

Lightweight, configurable Sphinx theme

Home Page:http://alabaster.readthedocs.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Alt Gr recognized as a character

bigi111 opened this issue · comments

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.