Added many new X.org keysyms#401
Conversation
ISO keysyms, meta and hyper modifiers, compose/multi_key, various media controls, fixes to AltGr and the numpad
| iso_emphasize = KeyCode._from_ISO('Emphasize') | ||
| iso_center_object = KeyCode._from_ISO('Center_Object') | ||
|
|
||
| brightness_up = KeyCode._from_symbol('XF86_MonBrightnessUp') |
There was a problem hiding this comment.
I appreciate that you have added these media and brightness codes, but I will not be able to merge this until matching codes have been added to the remaining backends. I do not mind looking them up though.
There was a problem hiding this comment.
By "remaining backends", do you mean recognizingbrightness_up keys on other operating systems as well, like Windows?
| KEYPAD_KEYS['KP_Add']: KeyCode.from_char('+'), | ||
| KEYPAD_KEYS['KP_Decimal']: KeyCode.from_char(','), | ||
| KEYPAD_KEYS['KP_Begin']: KeyCode.from_char('Begin'), | ||
| KEYPAD_KEYS['KP_Decimal']: KeyCode.from_char('.'), |
There was a problem hiding this comment.
This change highlights an issue with this definition: this depends on the decimal marker used for the input language; on my system, the current definition is correct and this change breaks the library, but I suppose that the current definitions breaks the library for most other systems.
|
Thank you very much for your contribution, and I apologise for the long wait! I have added a few comments to start a discussion. |
|
What's the status of this PR? |
|
Sorry for this late response. I have reviewed the changes and now maintain the PR branch locally with minor changes. My only remaining question is the selection of new keys: what is the purpose of keys such as ISO_Discontinuous_Underline? My initial though is that some of the added keycodes are perhaps a bit too niche. |
|
A Unicode symbol perhaps? |
|
It's true that keycodes ranging from |
|
Update: python-xlib/python-xlib#205 was merged on Apr 24! |
|
So can we get this merged? |
Additions:
This PR solves a problem of the same kind as #335 and #387.
As I've explained in the comment of another PR (#91 (comment)), I changed the keysym linked to
Key.alt_grtoISO_Level3_Shift.Key.mic_muterelies on python-xlib/python-xlib#205 getting merged. Otherwise, it simply doesn't do anything so it doesn't hurt to have itUpdate: python-xlib/python-xlib#205 is now merged!
I've also added X.org's
metaandhypermodifiers to the list of special keysyms but I'm not sure if there are changes in modifier code that have to be done as well.❯ xmodmap -pke | grep Meta keycode 64 = Alt_L Meta_L Alt_L Meta_L Alt_L Meta_L keycode 205 = NoSymbol Meta_L NoSymbol Meta_L NoSymbol Meta_LShift+LAlt produces the
Meta_Lkeysym so this new meta modifier should thus probably be somehow added in pieces of code related to managing the Alt modifier.