0

Running Ubuntu 16.04. I got a compact keyboard without a Menu key. They included a bunch of fluff keys, so I want to make the "web" (XF86HomePage) key be my Menu key. (One can run xev | grep keycode to find key names and codes by pressing the keys.)

I can:

  • Execute xmodmap -e "keycode 180 = Menu" in a terminal. This works fine for the rest of the session.
  • Save a file ~/.Xmodmap with the content keycode 180 = Menu and execute xmodmap ~/.Xmodmap. This also works fine for the rest of the session.

But I have not been able to get this to happen without my intervention at startup, which is what I want. I've tried adding a script to "Startup Applications" but no joy and I've also gone so far as to edit my /usr/share/X11/xkb/symbols/pc file to include:

key <XF86HomePage> {[ Menu ]};

but all that did was make my keyboard not work at all after rebooting, and I had to come back and undo the change with a rescue disc.

Advice and insight, as always, much appreciated.

1 Answers1

0

The thing to do, per this answer, is to edit /usr/share/X11/xkb/keycodes/evdev and reboot. I made <COMP> = 180 (<MENU> is an alias for <COMP>) and commented out the line where <I180> = 180. Downside is that if I plug in a different keyboard, the real Menu key won't work, but the compact keyboard I'm using doesn't have one at all and it's not an absolutely necessary key anyway (if you have a mouse) so I'm good with this.