This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Kwin: Mapping Ctrl+Alt+Å

Tags: None
(comma "," separated)
davvs
Registered Member
Posts
4
Karma
0

Kwin: Mapping Ctrl+Alt+Å

Thu Jan 02, 2014 7:39 pm
Hi,

I use Swedish QWERTY keyboard layout which has a Å-key next to P.
I'm trying to map this key combination, "Ctrl+Alt+Å" to "Quick Tile window to the Top Right".

I can manage to map it using the System settings, Global Keyboard Shortcuts (See image), but it does not work when I try to press the key combinations.
Image

I also tried to map Ctrl+Alt+P to "Quick Tile window to the Top Left" and that works as expected.
Using xev to find out what this key is detected as in X I see that
Å has keycode 34 (keysym 0xe5, aring)
Ä has keycode 48 (keysym 0xe4, adiaeresis)
Ö has keycode 47 (keysym 0xf6, odiaeresis)
whereas the regular P has keycode 33 (keysym 0x70, p)

Does anyone know how to get Ctrl+Alt+Å to work?
luebking
Karma
0

Re: Kwin: Mapping Ctrl+Alt+Å

Thu Jan 02, 2014 8:44 pm
What code does ctrl+alt+Å create?
Do you have Alt+Gr or is ctrl+alt pot. used as 3rd level shift? (so eg. ctrl+alt+q might generate @)
davvs
Registered Member
Posts
4
Karma
0

Re: Kwin: Mapping Ctrl+Alt+Å

Thu Jan 02, 2014 9:01 pm
It's regular (Left) Ctrl+ (Left) Alt. I don't think it's used as a 3rd level shift, and It does not seem to be any other code than the three codes for the keys, Ctrl, Alt and Å.
What do you mean by Ctrl+Alt pot?

I do have Alt Gr on my keyboard, but that's not what I'm trying to use here.
When I press these buttons in the System Settings when trying to map the command, it's detected as "Ctrl+Alt+Å".

If I use xev to try to see what's going on I see that when pressing the following keys:
1. Left Ctrl (And hold)
2. Left Alt (And hold)
3. Å. (When pushing this button I get 3 events, FocusOut FocusIn KeymapNotify, see below print)
4 then release all of the three keys.

I get this print from xev:
Code: Select all
KeyPress event, serial 40, synthetic NO, window 0x6000001,
    root 0x173, subw 0x0, time 7823768, (93,-11), root:(108,45),
    state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 40, synthetic NO, window 0x6000001,
    root 0x173, subw 0x0, time 7824169, (93,-11), root:(108,45),
    state 0x4, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

FocusOut event, serial 40, synthetic NO, window 0x6000001,
    mode NotifyGrab, detail NotifyAncestor

FocusIn event, serial 40, synthetic NO, window 0x6000001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 40, synthetic NO, window 0x0,
    keys:  2   0   0   0   36  0   0   0   1   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

KeyRelease event, serial 40, synthetic NO, window 0x6000001,
    root 0x173, subw 0x0, time 7824712, (93,-11), root:(108,45),
    state 0xc, keycode 34 (keysym 0xe5, aring), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6000001,
    root 0x173, subw 0x0, time 7825657, (93,-11), root:(108,45),
    state 0xc, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 40, synthetic NO, window 0x6000001,
    root 0x173, subw 0x0, time 7825657, (93,-11), root:(108,45),
    state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False
luebking
Karma
0

Re: Kwin: Mapping Ctrl+Alt+Å

Thu Jan 02, 2014 9:11 pm
The key event for Å isn't read by xev, likely because kglobalacceld still holds a grab on it (the configured shortcut)

"pot." = "potentially"

On keyboards w/o AltGr, Ctrl+Atl often serves as 3rd level shift - resulting in a different symbol, such incompatibility between Qt (kcmshell4 keys) and X11 (kglobalacceld) is known and only worked around for eg. Alt+****+Tab (creating Alt+Backtab) - thus the question.

I assume you won't be able to bind Ctrl+Alt+Å to any other global shotrcut, would you?
luebking
Karma
0

Re: Kwin: Mapping Ctrl+Alt+Å

Thu Jan 02, 2014 9:12 pm
Alt+****+Tab was supposed to be Alt+Shift+Tab, but apparently i missed the "f" =)
davvs
Registered Member
Posts
4
Karma
0

Re: Kwin: Mapping Ctrl+Alt+Å

Fri Jan 03, 2014 2:46 pm
The key event for Å isn't read by xev, likely because kglobalacceld still holds a grab on it (the configured shortcut)

Yea, you were right, when unassigning Ctl+Alt+Å I got the Å KeyPress event in xev.

I do get @ when i press AltGr+q and Ω when i press AltGt+Shift+q. So it seems that AltGr serves as the 3rd level shift in this case. Using Ctrl+Alt + q, nothing happens.

I assume you won't be able to bind Ctrl+Alt+Å to any other global shotrcut, would you?

No, I tried to map it to a few different commands, but still no luck. It seems unable to be mapped.

Do you know if there's any work around for mapping Ctrl+Alt+Å for this incompatibility between Qt (kcmshell4 keys) and X11 (kglobalacceld)?
luebking
Karma
0

Re: Kwin: Mapping Ctrl+Alt+Å

Fri Jan 03, 2014 4:00 pm
Does it generate "å" or "Å"?

You could edit ~/.kde/share/config/kglobalshortcutsrc by hand and try
Ctrl+Alt+å - i somehow suspect that the reading of the config file fails in mapping Å to the actual keycode to listen to and it waits for Ctrl+Alt+Shift+å (which will fail as well as the Shift key is not supposed to be pressed)
-> can you bind Ctrl+Alt+Shift+Å
davvs
Registered Member
Posts
4
Karma
0

Re: Kwin: Mapping Ctrl+Alt+Å

Sat Jan 04, 2014 10:30 am
luebking wrote:Does it generate "å" or "Å"?

When clicking my key combination in the GUI It generates "Ctrl+Alt+Å". Holding down shift as well generates Ctrl+Alt+Shift+Å

luebking wrote:You could edit ~/.kde/share/config/kglobalshortcutsrc by hand and try
Ctrl+Alt+å - i somehow suspect that the reading of the config file fails in mapping Å to the actual keycode to listen to and it waits for Ctrl+Alt+Shift+å (which will fail as well as the Shift key is not supposed to be pressed)

When I log out, change kglobalshortcutsrc to Ctrl+Alt+å by hand and then log in it still does not work. When checking the kglobalshortcutsrc file again after, Kwin (Or something) has changed it back to Ctrl+Alt+Å

luebking wrote:-> can you bind Ctrl+Alt+Shift+Å

I tried to map Ctrl+Alt+Shift+Å and that works as expeced.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar