-
Notifications
You must be signed in to change notification settings - Fork 251
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
Added many new X.org keysyms #401
base: master
Are you sure you want to change the base?
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
By "remaining backends", do you mean recognizingbrightness_up
keys on other operating systems as well, like Windows?
@@ -513,7 +574,8 @@ class Listener(ListenerMixin, _base.Listener): | |||
KEYPAD_KEYS['KP_8']: KeyCode.from_char('8'), | |||
KEYPAD_KEYS['KP_9']: KeyCode.from_char('9'), | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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_gr
toISO_Level3_Shift
.Key.mic_mute
relies 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
meta
andhyper
modifiers 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_L
Shift+LAlt produces the
Meta_L
keysym so this new meta modifier should thus probably be somehow added in pieces of code related to managing the Alt modifier.