hotkeys do not work when xkbmap uses a regional layout instead of en_US, gnome input source is ignored
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Inkscape |
New
|
Undecided
|
Unassigned | ||
inkscape (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Symptom: hotkeys do not work at all. It seems to only affect letters themselves while Ctrl, Shift or Alt are interpreted (as shown in a bar at the bottom of the UI).
➜ ~ echo $XDG_SESSION_
ubuntu-xorg
I do have two keyboard layouts enabled, however, I used en_US in Gnome while trying to trigger any hotkey actions.
# the first one is the one used currently as this is an MRU list
➜ ~ gsettings get org.gnome.
[('xkb', 'us'), ('xkb', 'ru')]
The default Inkscape hotkey file is used, so, for example, undo should work just fine but it doesn't:
/usr/share/
...
<bind key="z" modifiers="Ctrl" action="EditUndo" display="true" />
<bind key="Z" modifiers="Ctrl" action="EditUndo" />
I sniffed around little bit and found out that XKB layout was set to 'ru':
➜ ~ setxkbmap -query
rules: evdev
model: pc105
layout: ru,us,us
variant: ,,
options: grp:alt_
After changing that to 'us' via setxkbmap shortcuts immediately started to work (without inkscape restart):
➜ ~ sudo setxkbmap -option grp:alt_
➜ ~ setxkbmap -query
rules: evdev
model: pc105
layout: us
options: grp:alt_
Doing this via CLI, however, somehow breaks switching language in gnome itself (changes are present in the MRU list but input is localized and is not switched).
The only suspicious message I found in syslog after that was this:
Dec 18 21:42:34 blade /usr/lib/
Dec 18 21:42:34 blade /usr/lib/
Dec 18 21:42:34 blade /usr/lib/
Dec 18 21:42:34 blade /usr/lib/
Dec 18 21:42:34 blade /usr/lib/
Dec 18 21:42:34 blade /usr/lib/
Dec 18 21:42:37 blade /usr/lib/
Dec 18 21:42:37 blade /usr/lib/
Dec 18 21:42:37 blade /usr/lib/
Dec 18 21:42:37 blade /usr/lib/
Dec 18 21:42:37 blade /usr/lib/
Dec 18 21:42:37 blade /usr/lib/
ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: inkscape 0.92.2-1build1
ProcVersionSign
Uname: Linux 4.13.0-19-generic x86_64
NonfreeKernelMo
ApportVersion: 2.20.7-0ubuntu3.6
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Dec 18 21:24:39 2017
InstallationDate: Installed on 2017-02-27 (294 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Alpha amd64 (20170227)
SourcePackage: inkscape
UpgradeStatus: Upgraded to artful on 2017-09-13 (95 days ago)
Alright, it seems that the problem was in "layout: ru,us,us". When I switched to "layout: us" my gnome settings stopped affecting input so I switched it to the following:
➜ ~ sudo setxkbmap -option grp:alt_ shift_toggle us,ru
➜ ~ setxkbmap -query
rules: evdev shift_toggle, grp_led: scroll
model: pc105
layout: us,ru
options: grp:alt_
With "us,ru" layout both switching in gnome works AND shortcuts in inkscape.