Summary: | Pressing Alt-Return (and other key combinations with Alt) enter unexpected characters, too | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Bodo Eggert <7eggert> |
Component: | keyboard | Assignee: | Konsole Developer <konsole-devel> |
Status: | REPORTED --- | ||
Severity: | normal | CC: | ninjalj |
Priority: | NOR | ||
Version: | 22.08.1 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Bodo Eggert
2022-10-19 06:17:30 UTC
Per bug #96282 and commit https://invent.kde.org/utilities/konsole/-/commit/5ba344714b8da55dfcc84823abac6f059a288386: 18 40 73 corresponds to the Super Key, which is Qt::MetaModifier, which per https://doc.qt.io/qt-5/qt.html#KeyboardModifier-enum on Windows Keyboards corresponds to the Windows key. Pressing Alt+Return I get 1B 0A. Pressing Win+Return I get 18 40 73 0A. Pressing Win+Alt+Return I get 18 40 73 1B 0A. What kind of keyboard are you using? Are you using some special keyboard layout? Any customization via xmodmap or similar? TLDR at the bottom, here is some life debugging: I changed the keys using the KDE menu, German layout, then I did change CAPS to an additional Super. keycode 21 = apostrophe grave equal plus cedilla cedilla endash keycode 51 = numbersign acute backslash bar rightsinglequotemark grave U05BB keycode 78 = dead_greek keycode 66 = Meta_L The output of xmodmap is shift Shift_L (0x32), Shift_R (0x3e) lock control Control_L (0x25), Control_R (0x69) mod1 Alt_L (0x40), Alt_L (0xcc), Meta_L (0xcd) mod2 Num_Lock (0x4d) mod3 ISO_Level5_Shift (0xcb) mod4 Meta_L (0x42), Super_R (0x86), Super_L (0xce), Hyper_L (0xcf) mod5 ISO_Level3_Shift (0x5c) This should not affect the ALT key but obviously it did. So I NOW added to my .xmodmap: remove mod1 = Meta_L which did fix the issue for me but this is not a fix in general. Also I need to run the command every few secons because KDE is fighting to not let me change the keys accordingly. I just now tested an unconfigured account on OpenSuse Tumbleweed (recently updated) and there is also the same issue with mod1 being both, but it's not confusing konsole. On the accounts not having the issue, mod4 is only Super_L Hyper_L, NOT Meta_L. There I set the compse key to the Menu key which doesn't exist on my laptop, thete it's AltGr-Ctrl. So my educated guess is that both modifiers get merged into one because of that: mod41 = Super_L, Hyper_L, Meta_L ; and any key contained will activate everything. TLDR: I map Caps to be Meta_L despite selecting it to be Super (I didn't do that on the other accounts, my script differs) Alt is mapped to both Alt and Meta (not my doing) Due to the Win key being Meta Hyper Super, and the Alt key being Alt Meta, Alt also becomes Win. My knowledge of XKB is quite limited. Anyway: What is the reason for changing CAPS to an additional Super? Is it just to get rid of unwanted CAPS functionality before applying your xmodmap configuration? Note that capslock(super) (in /usr/share/X11/xkb/symbols/capslock) does: hidden partial modifier_keys xkb_symbols "super" { key <CAPS> { [ Super_L ] }; modifier_map Mod4 { <CAPS> }; }; which adds CAPS to mod4 modifier. Instead changing CAPS to e.g. an additional backspace would do: hidden partial modifier_keys xkb_symbols "backspace" { key <CAPS> { [ BackSpace ] }; }; which doesn't do that. So, for your use case, it seems that enabling "Make Caps Lock an additional Backspace" instead of "Make Caps Lock an additional Super" would work. Of course, the "clean" way to do this without xmodmap hackery would be to add an option in /usr/share/X11/xkb/symbols/capslock to make Caps Lock an additional Meta, add it to /usr/share/X11/xkb/rules/evdev and /usr/share/X11/xkb/rules/base (and the corresponding description for GUI programs to use in evdev.xml, evdev.lst, base.xml and base.lst) and maybe send a merge request to https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/ |