Keyboard shortcuts are broken on FreeBSD
This is GNOME Shell 3.34.0-119-g3e58af10 and Mutter 3.34.0-14-g0e69fe078 on FreeBSD 12.0.
Keyboard shortcuts, such as Print Screen and Ctrl-Alt-Shift-R, no longer work after !618 (merged). Pressing these keys does nothing and shows a warning on the terminal:
(gnome-shell:7154): Gjs-WARNING **: 00:50:29.192: JS ERROR: Error: Argument 'string' (type utf8) may not be null
_packVariant@resource:///org/gnome/gjs/modules/overrides/GLib.js:104:16
_init/this.Variant._new_internal@resource:///org/gnome/gjs/modules/overrides/GLib.js:284:23
_init/this.Variant.new@resource:///org/gnome/gjs/modules/overrides/GLib.js:293:16
_emitAcceleratorActivated@resource:///org/gnome/shell/ui/shellDBus.js:154:39
GnomeShell</<@resource:///org/gnome/shell/ui/shellDBus.js:30:17
It can be worked around by commenting out the line which adds device-node
to params
:
151 let connection = this._dbusImpl.get_connection();
152 let info = this._dbusImpl.get_info();
153 let params = { 'device-id': GLib.Variant.new('u', device.get_device_id()),
154 //'device-node': GLib.Variant.new('s', device.get_device_node()),
155 'timestamp': GLib.Variant.new('u', timestamp),
156 'action-mode': GLib.Variant.new('u', Main.actionMode) };
I know mutter!678 (merged) attempted to fix it, but it is still broken because clutter_input_device_get_device_node
just returns NULL
. It seems the reason of returning NULL
is that the keyboard device kbdmux
doesn't have Device Node
property. Keyboard and mouse use xf86-input-keyboard
and xf86-input-mouse
drivers, respectively.
$ xinput list
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ sysmouse id=7 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ kbdmux id=6 [slave keyboard (3)]
$ xinput list-props sysmouse
Device 'sysmouse':
Device Enabled (134): 1
Coordinate Transformation Matrix (135): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (248): 0
Device Accel Constant Deceleration (249): 1.000000
Device Accel Adaptive Deceleration (250): 1.000000
Device Accel Velocity Scaling (251): 10.000000
Device Node (252): "/dev/sysmouse"
Button Labels (253): "Button Left" (137), "Button Middle" (138), "Button Right" (139), "Button Wheel Up" (140), "Button Wheel Down" (141)
Mouse Middle Button Emulation (254): 1
Mouse Middle Button Timeout (255): 50
$ xinput list-props kbdmux
Device 'kbdmux':
Device Enabled (134): 1
Coordinate Transformation Matrix (135): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000