Closed rrthomas closed 9 years ago
The code for this was taken from quassel irc. I've updated the code. Any improvement?
Rebuilt with current master HEAD, exactly the same result.
No surprise. How have you mapped CapsLock to Control? (and why???)
I mapped CapsLock to control using the standard X option which is described in GNOME Tweak Tool as "Make Caps Lock an additional Ctrl", by X.org as the XkbOptions setting "ctrl:nocaps" (in /etc/X/xorg.conf).
I did it because CapsLock is an abomination, and that's the standard position for Ctrl, but I admit not everyone has that view; however, everything else in X (that I'm aware of) sees the key as Ctrl, including Cantata itself when processing keystrokes, and pretty obviously I expect apps to see the keys as I've chosen to map them, and not as they happen to be labelled (in fact, my keyboard has no labels either).
On 9 July 2015 at 19:57, CraigD notifications@github.com wrote:
No surprise. How have you mapped CapsLock to Control? (and why???)
— Reply to this email directly or view it on GitHub https://github.com/CDrummond/cantata/issues/695#issuecomment-120107873.
Hmmm... Using dconf-editor:
select org.gnome > desktop > input-sources
Change xkb-options to ['ctrl:nocaps'](or add it to any existing options)
Now my CapsLock -> Ctrl. But this works before for short-cuts, AND in the settings page to assign a short-cut (Ctrl appears)
Something subtle is going on here. Looking at dconf myself, I find the setting I actually have is caps:ctrl_modifier. This is documented as: "Make Caps Lock an additional Control but keep the Caps_Lock keysym".
So I can see the potential for confusion.
However, I'm loth to fix it manually, because I didn't set it manually in the first place, but through GNOME's Tweak Tool, which presumably thinks there's a reason to use this setting. I can get "ctrl:nocaps" by changing the behavior of Ctrl.
It seems therefore that one can't rely on the keysym: it requires one to find out that the key is in this case a modifier.
Closing this, as the same 'issue' affects Clementine and KDE short-cut dialog. I have neither the time nor will to look into it further - patches welcome. However, 'ctrl:nocaps' seems to work...
When I press my CapsLock key, which is mapped as a Ctrl key, the shortcuts editor thinks I want "CapsLock" as a shortcut. It should detect the keycode of the pressed key, surely, not the actual key? (When I use the CapsLock key as part of a Ctrl+Foo combination in Cantata, it is correctly recognised, just as in every other program.)