Ubuntu: Using the Euro and Dollar Special Keys

What’s the problem

The Danish version of Acer Travelmate 5515 (5510 series) has the following keyboard layout:

acer 5510 keyboard layout (danish)

Ignore that it is a Danish keyboard layout and in stead focus on the € and $ keys above the arrow keys.

acer arrow keys, € and $ group of keys

The € and the $ keys above the left and right arrow key respectively are dead with the standard install of ubuntu 12.04 (with standard Danish keyboard layout).
I wanted to have [page up] where the € is and [page down] where the $ is. Like this:

keyboard layout with page up above the left arrow and page down above right arrow

This is a fairly common layout (this is from a Fujitsu Celsius H710 laptop) and I think it makes perfect sense to have all the navigation keys close to each other.


To remap your the € and $ keys to [page up] and [page down] on acer add the lines:

setkeycodes 0xB3 104

setkeycodes 0xB4 109

to the ` /etc/rc.local ` file (before the exit 0 line) Step I did:

  1. open a terminal window.
  2. execute the command sudo nano /etc/rc.local - I like the nano editor, but use what you like.
  3. Add the mentioned lines ( setkeycodes 0xB3 104 setkeycodes 0xB4 109 ) and save and exit ` ctrl-x -> y ` (for yes to saving) -> enter (to save as /etc/rc.local)

    screenshot of adding setkeycodes to rc.local

  4. reboot
  5. Enjoy the new keybindings

What’s behind the Magic?

The setkeycodes command maps scancodes to keycodes.

So setkeycodes 0xB3 104 maps scancode hex B3 (the € key) to keycode decimal 104 (which is [page up])

But how did I know want scancode and keycode to use. Good question. The short answer is:

Further reading: