hanschen / ksuperkey

Linux utility that allows you to use the Super key both to open the start menu and as a modifier key in keyboard shortcuts
GNU General Public License v3.0
347 stars 31 forks source link

Adding Super_R support? #10

Closed Fincer closed 8 years ago

Fincer commented 8 years ago

Some keyboards have Super_R ḱey in addition to Super_L key. Yesterday I helped a friend of mine to set up this program for his KDE installation. However, he still can't use his Super_R key since there are no support for it provided by this program.

Have you considered on adding proper Super_R support (like alt+F2 key combination) to ksuperkey? It would be very helpful to some KDE users. I first though I could patch the program myself but figured out that official/native support would be better in all scales for many users.

If it's any help for possible implementation of this feature, xmodmap output for Super_R is as follows:

[fincer@fincer-laptop ~]$ xmodmap
xmodmap:  up to 4 keys per modifier, (keycodes in parentheses):

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x69)
mod1        Alt_L (0x40),  Meta_L (0xcd)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x85),  Super_R (0x86),  Super_L (0xce),  Hyper_L (0xcf)
mod5        ISO_Level3_Shift (0x5c),  Mode_switch (0xcb)
hanschen commented 8 years ago

Super_R is already supported, if you want it to trigger Alt+F2 you can simply run ksuperkey like this:

ksuperkey -e 'Super_L=Alt_L|F1;Super_R=Alt_L|F2'

I don't intend to add any default behavior for Super_R.

Hope that helps!

Fincer commented 8 years ago

Thanks a lot hanschen for your helpful response! The code you provided truly improves the KDE usability and leads more flexible usage of the system for users who have Super_R key on their keyboard. Small changes like this are not meaningless.