Bug 69862 - winkey not assigned modifier although xmodmap says so
Summary: winkey not assigned modifier although xmodmap says so
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmkeys (show other bugs)
Version: 2.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Ellis Whitehead
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-12-08 16:41 UTC by Robert
Modified: 2018-09-04 18:07 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert 2003-12-08 16:41:47 UTC
Version:           2.0 (using KDE KDE 3.1.4)
Installed from:    Gentoo Packages
Compiler:          gcc 3.2.3 20030422 
OS:          Linux

I can't assign shortcuts to my (left and only) windows key in kcontrol. It simply ignores the key, as though I wasn't even pressing it.

I've played around with setting "Keyboard Layout" (this is a german laptop keyboard with the "<>|" key to the right of the right shift key, so I chose "German 105 Intl"). I also tried disabling keyboard layouts completely. I use xfree 4.3.99.901 and have no custom xmodmap-mapping.

In kcontrol "Regional & Accessibility"->"Keyboard Shortcuts" the "X Modifier Mapping" reports the following:

shift       Shift_L     Shift_R
lock        Caps_Lock
control     Control_L   Control_R
mod1        Alt_L
mod2        Num_Lock
mod3      
mod4       
mod5        Mode_switch  ISO_Level3_Shift

But xmodmap tells me something different:

shift       Shift_L (0x32),  Shift_R (0x3e)
lock        Caps_Lock (0x42)
control     Control_L (0x25),  Control_R (0x6d)
mod1        Alt_L (0x40),  Alt_L (0x7d),  Meta_L (0x9c)
mod2        Num_Lock (0x4d)
mod3      
mod4        Super_L (0x7f),  Hyper_L (0x80)
mod5        Mode_switch (0x5d),  ISO_Level3_Shift (0x7c)


Obvously, mod4 is assigned. It is recognized in windowmaker as mod4 as well, and I can use it in kde as well when I use xbindkeys to assign keyboard shortcuts.


xbindkeys -k says:

    m:0x40 + c:115
    Mod4 + Super_L


xev says:

KeyPress event, serial 29, synthetic NO, window 0x2400001,
    root 0x3e, subw 0x0, time 1302699, (-520,443), root:(698,472),
    state 0x0, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 29, synthetic NO, window 0x2400001,
    root 0x3e, subw 0x0, time 1302753, (-520,443), root:(698,472),
    state 0x40, keycode 115 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes:


For completeness: keyboard section from xf86config:

Section "InputDevice"
  Driver       "Keyboard"
  Identifier   "Keyboard[0]"
  Option       "MapName" "Standard Keyboard [ pc105 ]"
  Option       "Protocol" "Standard"
  Option       "XkbLayout" "de"
  Option       "XkbModel" "pc105"
  Option       "XkbRules" "xfree86"
  Option       "XkbVariant" "nodeadkeys"
EndSection
Comment 1 Robert 2003-12-10 20:01:23 UTC
After installing kde 3.1.94 (3.2 beta 2), I managed to get my win key to work after setting the following:

"use keyboard layouts" (turned it on)
"xkb options" "Alt/Win key behavior" -> "Meta is mapped to the left Win-key"

If I set these things to anything else it will either completely ignore my win key, or not let me assign any shortcuts to win+<somekey>. It will recognize "win+" in the assignment window, but when I press some other key, just drop the win key in the assignment (as though I could not press the win key together with other keys).

Even though it works with the above settings, "keyboard shortcuts"->"modifier keys"->"x modifier mapping" tells me something different than xmodmap. Why this discrepancy?
Comment 2 Vasilis 2004-03-27 00:05:18 UTC
I am running KDE 3.2.1. 
I have a Logitech internet keyboard. In the X modifier modifier, the line for mod4 is empty, although xmodmap gives 

mod4        Super_L (0x7f),  Hyper_L (0x80)

In the Xf86config I have the line Option "XkbModel" "pc105". I have not tried the trick that Robert suggested and I am facing with the same problem that Robert was. Is his trick the only solution or is this a bug?
Comment 3 Vasilis 2004-03-27 20:36:39 UTC
Robert's solution has one flaw. Meta is not anymore Alt and you have problem with the shortcuts that Emacs uses.
Comment 4 Robert 2004-05-14 18:50:06 UTC
I don't seem to have any problems with this anymore as of kde 3.2.2. I don't know about Meta/Alt/Emacs, though.
Comment 5 Vincent 2004-10-20 18:57:15 UTC
In KDE 3.3.1

When I do in kcontrol:
"xkb options" "Alt/Win key behavior" -> "Meta is mapped to the left Win-key" 

And then I try to use the Meta key in emacs, it doesn't work...
If I ask emacs to describe the key I press (using C-H k) it answers
H-M-s-x instead of M-x, which means I guess Hyper-Meta-Super-x???

xmodmap is answering:
mod4        Meta_L (0x73),  Super_L (0x7f),  Hyper_L (0x80),  Meta_L (0x9c)

I guess that is too much for my little window key...

If I do
xmodmap -e "clear Mod4"
xmodmap -e "add Mod4 = Meta_L"

then xmodmap is answering
mod4        Meta_L (0x73),  Meta_L (0x9c)

and it works with emacs...
But I can't manage to solve the problem with kcontrol...


Comment 6 Martin Bergtholdt 2006-05-15 16:36:33 UTC
I just updated my KDE from 3.5 to 3.5.2 with the effect that I can not assign new shortcuts involving the Win-key. The behaviour is strange and completely counter intuitive: first all my already assigned shortcuts with win-key work, e.g. I use Win+1 to switch to desktop 1 and so on. If I try to define a new shortcut, e.g., Win+9 to switch to desktop 9 in the configure shortcut dialog, first 'Win+' appears when I start holding down the win-key and when now pressing 9 only the win+ gets deleted and I get this message

In order to use the '9' key as a shortcut, it must be combined with the Win, Alt, Ctrl, and/or Shift keys.

Haha, that's what I try to do. To make things even stranger, in the "Modifier Keys" Tab, I get this:

KDE Modifiers
Modifier           X11-Mod
Shift              shift
Ctrl               control
Alt                mod1
Win                <None>

X Modifier Mapping
X11-Mod   Key 1     Key 2
shift     Shift_L   Shift_R
lock      Caps_Lock
control   Control_L Control_R
mod1      Alt_L     Alt_R
mod2      Num_Lock
mod3
mod4      Super_L   Super_R
mod5

This seems fine except for Win <None>. Now I want to mention that I didn't change anything on my X-setup when switching versions, so I should be KDE-Problem not an X issue. Moreover if I select from the available Schemes "KDE Default for 4 Modifier Keys" I get this warning:

This scheme requires the "Win" modifier key, which is not available on your keyboard layout. Do you wish to view it anyway?

Ok, so win is not recognized as a modifier. Why? Super_L/Super_R is mapped to the Win-Keys with Kxkb: setxkbmap -option -option altwin:meta_super. I have also tried a tip I googled adding Super_L to mod3 without any changes, well except that my current shortcuts with the Win-key didn't work anymore. Again, all my previous short-cuts work with the win-key, I can even edit the .kksrc file with a text-editor and put in new combinations involving the win-key that work. I just can't use the dialog. And it doesn't give any clues why win isn't assigned as a modifier, which it obviously is!


Comment 7 Andrew Crouthamel 2018-09-04 18:07:28 UTC
Hello! Sorry to be the bearer of bad news, but this project has been unmaintained for many years so I am closing this bug. Kcontrol has been replaced by System Settings in Plasma. Please give the latest version of that a try, and open a new bug in "systemsettings" if you continue to have an issue. Thank you!