(using KDE 4.14.2) I couldn't use an alt+7 shortcut in an application. I discovered KDE was intercepting it and modified the output. I thought it was a shortcut already used in the KDE system, but couldn't find anything relevant in the shortcut settings. Reproducible: Always Steps to Reproduce: 1. launch xev 2. test alt+6 3. test alt+7 Actual Results: xev returns this for alt+6: KeyPress event, serial 42, synthetic NO, window 0x5a00001, root 0x28f, subw 0x0, time 323174779, (-206,579), root:(2110,608), state 0x18, keycode 15 (keysym 0x36, 6), same_screen YES, XLookupString gives 1 bytes: (36) "6" XmbLookupString gives 1 bytes: (36) "6" XFilterEvent returns: False and for alt+7: KeymapNotify event, serial 42, synthetic NO, window 0x0, keys: 2 0 1 0 0 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 42, synthetic NO, window 0x5a00001, root 0x28f, subw 0x0, time 323178411, (-206,579), root:(2110,608), state 0x18, keycode 16 (keysym 0x37, 7), same_screen YES, XLookupString gives 1 bytes: (37) "7" XFilterEvent returns: False Expected Results: this part shouldn't be there: KeymapNotify event, serial 42, synthetic NO, window 0x0, keys: 2 0 1 0 0 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 I've encountered this on two different computers running linux mint 17.3 and KDE. It doesn't happen with the xfce desktop for example.
just a precision: I'm generally using an azerty keyboard. In the application I need alt+7, so I remapped my keyboard with "setxkbmap us" to be able to use the correct keys (it does the same if I use "setxkbmap de" for example). When in qwerty mode, alt+shift+7 is working correctly btw.
Try to kill and restart kglobalacceld after altering the layout, the event is probably still being sucked by Qt. (KWin doesn't do shortcuts)
I don't understand where the KeymapNotify event comes from and doubt that KGlobalacceld has anything to do with it.
I can confirm that killing kglobalaccel solves the problem. But if I start it again, the problem comes again, as if there was a shortcut assigned to this key combination. I can live without the shortcuts system so killing kglobalaccel is a good solution for my case. I couldn't find any shortcut related to alt+7, and since there are several programs in the "configuration of keybindings" it's quite tedious to check them all. Which I did, but maybe not correctly. Yet, I tried to assign alt+7 to a random command, and the system didn't complain it was already assigned. Then I deleted the shortcut. And the problem is still present, so I suppose there is a bug somewhere. Why only alt+7 and not the other keys?
could you please attach your ~/.config/kglobalshortcutsrc? It should contain the offending key.
Created attachment 100041 [details] kglobalshortcutsrc here it is. I've renamed it so it won't be used, but it's the same (but maybe it need to log out and in again).
I've also an installation of KDE on a different system, PC-BSD, under a virtual machine. I've logged out of KDE on my linux system, and logged in xfce instead (I don't have the alt+7 bug there). I've launched the PC-BSD machine, switched to US keyboard, and with xev I got the same extra data sent by the alt+7 combination: KeymapNotify event, serial 42, synthetic NO, window 0x0, keys: 2 0 1 0 0 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 (and only with this alt+7 combination, alt+1 to 6 are correct, alt+8, 9 and 0 too).
I don't think that this is related to global shortcuts. Might it be that your keymap has a layout switch on alt+7?
I don't know but the keymap is working correctly with other desktop manager (such as xfce). Don't you get those extra "KeymapNotify event..." with alt+7 on your computer as well?
I've been poking at this in my spare time. It seems Alt+7 (and Alt+1 as well, I'm using Croatian layout), gets intercepted by KGlobalAccelImpl::nativeEventFilter(), while the others do not. I've added some debug prints to KGlobalAccelImpl::nativeEventFilter() and get this when I hit Alt+7: responseType: 2 Got XKeyPress event keyQt= "8000037" (this is Qt::AltModifier | Qt::Key_7) For others I only get "responseType: 85" when I hit the Alt key. Any clues how I can chase this down further?
It seems the 'grave' keysym (mapped to the 3rd level of the '7' key on Croatian layout) has something to do with this. Similarly, the 'asciitilde' keysym prevents Alt+1 from working. If I remove or replace the keysyms, or move them to the 1st or 2nd level, the shortcuts start working. I.e., for key 7 (AE07): symbols[Group1]= [ 7, slash, grave, dead_grave ] # default, doesn't work symbols[Group1]= [ 7, slash, dead_grave, grave ] # doesn't work symbols[Group1]= [ 7, grave, slash, dead_grave ] # works symbols[Group1]= [ 7, slash, 7, dead_grave ] # works symbols[Group1]= [ 7, slash ] # works Can also be reproduced with the German layout: setxkbmap de # dump the layout xkbcomp $DISPLAY de.xkb # edit the entry for the 7 key in de.xkb, e.g.: # - symbols[Group1]= [ 7, slash, braceleft, seveneighths ] # + symbols[Group1]= [ 7, slash, grave, seveneighths ] # set the modified layout xkbcomp de.xkb $DISPLAY Alt+7 is busted now. Also, it seems bugs #310881 and #398069 are the same as this one.