hotkeys do not work when xkbmap uses a regional layout instead of en_US, gnome input source is ignored

Bug #1738859 reported by Dmitrii Shcherbakov
10
This bug affects 2 people
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_DESKTOP
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.desktop.input-sources mru-sources
[('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/inkscape/keys/default.xml
...
  <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_shift_toggle,grp_led:scroll

After changing that to 'us' via setxkbmap shortcuts immediately started to work (without inkscape restart):

➜ ~ sudo setxkbmap -option grp:alt_shift_toggle us
➜ ~ setxkbmap -query

rules: evdev
model: pc105
layout: us
options: grp:alt_shift_toggle,grp_led:scroll

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/gdm3/gdm-x-session[8236]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Dec 18 21:42:34 blade /usr/lib/gdm3/gdm-x-session[8236]: > Error: Can't find file "<D0><D1>" for symbols include
Dec 18 21:42:34 blade /usr/lib/gdm3/gdm-x-session[8236]: > Exiting
Dec 18 21:42:34 blade /usr/lib/gdm3/gdm-x-session[8236]: > Abandoning symbols file "default"
Dec 18 21:42:34 blade /usr/lib/gdm3/gdm-x-session[8236]: Errors from xkbcomp are not fatal to the X server
Dec 18 21:42:34 blade /usr/lib/gdm3/gdm-x-session[8236]: (EE) Error loading keymap /tmp/server-1.xkm
Dec 18 21:42:37 blade /usr/lib/gdm3/gdm-x-session[8236]: The XKEYBOARD keymap compiler (xkbcomp) reports:
Dec 18 21:42:37 blade /usr/lib/gdm3/gdm-x-session[8236]: > Error: Can't find file "<D0><D1>" for symbols include
Dec 18 21:42:37 blade /usr/lib/gdm3/gdm-x-session[8236]: > Exiting
Dec 18 21:42:37 blade /usr/lib/gdm3/gdm-x-session[8236]: > Abandoning symbols file "default"
Dec 18 21:42:37 blade /usr/lib/gdm3/gdm-x-session[8236]: Errors from xkbcomp are not fatal to the X server
Dec 18 21:42:37 blade /usr/lib/gdm3/gdm-x-session[8236]: (EE) Error loading keymap /tmp/server-1.xkm

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: inkscape 0.92.2-1build1
ProcVersionSignature: Ubuntu 4.13.0-19.22-generic 4.13.13
Uname: Linux 4.13.0-19-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
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)

Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :
Revision history for this message
Dmitrii Shcherbakov (dmitriis) wrote :

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
model: pc105
layout: us,ru
options: grp:alt_shift_toggle,grp_led:scroll

With "us,ru" layout both switching in gnome works AND shortcuts in inkscape.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in inkscape (Ubuntu):
status: New → Confirmed
Revision history for this message
Jean- (jean-helou) wrote :

I think I may have a similar issue:

> setxkbmap -query
rules: evdev
model: pc105
layout: fr,us,gb
variant: ,altgr-intl,
options: compose:caps

but gnome input selector only has fr and en Eng intl with alt dead keys en
when using the en input in gnome, some applications see keyboard shortcuts in azerty (vscode, intellij) while others receive them as qwerty (chrome, firefox)

using
sudo setxkbmap -option compose:caps -variant ,altgr-intl fr,us

I was able to fix the issue. I had only ever touched the settings through gnome interface so it seems there is a way to corrupt xkbmap settings by clicking in the gnome settings.

thanks dmitrii for your very helpful comment, thanks to that I was able to fix my setup !

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.