1

I've tried remapping a key thats not on my current keyboard but I cant get it to work on Ubuntu 17.04.

I edited the file

/usr/share/X11/xkb/symbols/pc

The key that I im missing on my keyboard is the below key LSGT (to the right of the shift key)

key <LSGT> {    [ less, greater, bar, brokenbar ] };

So I want to replace below section § key (left of numeric 1 key), with the key above. Because I don't ever thing i've used this key

So I run

xev -event keyboard

to get the key info. But I dont see the key number I should use?

KeyPress event, serial 28, synthetic NO, window 0x3400001,
    root 0xdd, subw 0x0, time 18369362, (-451,244), root:(348,296),
    state 0x0, keycode 49 (keysym 0xa7, section), same_screen YES,
    XLookupString gives 2 bytes: (c2 a7) "§"
    XmbLookupString gives 2 bytes: (c2 a7) "§"
    XFilterEvent returns: False

When I was testing this out I had a key just to test with so I took the below key

key <AD12> { [ U0328,  dead_circumflex,  dead_tilde,  dead_caron ] };

And changed that to.

key <AD12> {    [ less, greater, bar, brokenbar ] };

And after this I runned the following command to clear the cache

sudo dpkg-reconfigure xkb-data

After this I signed out and back in again. But the keys stays the same and nothing happends?

What am i doing wrong?

Cadoiz
  • 278
wspoon
  • 21

1 Answers1

1

With some help from Gunnars comment I found the answer.

When I viewed

/etc/default/keyboard

To see my current locale keyboard setting in XKBLAYOUT.

So I got back to.

/usr/share/X11/xkb/symbols/

And changed both pc and my locale file that I found in above XKBLAYOUT setting.

From

key <LSGT>  { [      less,     greater,         bar,    brokenbar ] };

To

key <TLDE>  { [      less,     greater,         bar,    brokenbar ] };

Did a

sudo dpkg-reconfigure xkb-data

Singed out and back in and now its working. And the key is remapped. (Not really sure why I had to change both pc and locale file, I tought pc file would have precedence over the locale file)

wspoon
  • 21