Ubuntu – Google Chrome ignores XmodMap key mapping

google-chromekeyboardxmodmap

My laptop Down arrow key is stuck on, so I have used Xmodmap to remove the mapping of that key with the following command:

xmodmap .Xmodmap

The contents of my .Xmodmap file is just the single line:

keycode 116 =

All programs in Ubuntu (such as gnome-terminal, xterm, Firefox, gedit) respect this mapping.

However, Google Chrome ignores this mapping, resulting in the page continually scrolling down or the volume being decreased when a full screen video is playing.

Looked at:

Both of which had no available solution.

The solution from https://github.com/dnschneid/crouton/wiki/Keyboard to disable the keyboard layout management with:

gsettings set org.gnome.settings-daemon.plugins.keyboard active false

is not suitable for me as I need to enter Japanese characters so I need the IME to be available to swap between English and Japanese.

Best Answer

In issue 394552, one of the user notes that if you set the keymap to be a key that Chromium understands (such as a letter key), it respects the keymap.

Hence, going from the recommendation here, I set the down arrow key to map to the F18 key (which as far I can see, would never be pressed :P). So the contents of my .Xmodmap file is now:

keycode 116 = F18 F18 F18

I have tested with this new keymap and Chrome now seems to be behaving itself, like the other programs.

Related Question