0

I'm trying to change xkb settings in this file: /usr/share/X11/xkb/keycodes/evdev. Specifically, I tried this:

    // <AB08> = 59;
    // <AB09> = 60;
    // <HOME> = 110;
    // <END> = 115;

    <HOME> = 59;
    <END> = 60;

    <AB08> = 59;
    <AB09> = 60;

(I tried all three combinations, i.e. map all of them to 110/115 or map home=59, end=60, comma=110, end=115). In neither case I can get both . to print dot and End to print dot.

The commented combination is the original values.

I'll admit, I don't understand how this mapping works. I thought I did, but now it doesn't make any sense any more.


In case, what I'm asking for wasn't clear: I don't need Home and End (I'm using Emacs, and the functionality of these keys is implemented differently), but on my keyboard these keys are in the premium space, so I would really like to use them for something I use a lot: comma and dot (which on my keyboard are difficult to press).

ctrl-alt-delor
  • 27,473
  • 9
  • 58
  • 102
wvxvw
  • 619
  • 2
  • 6
  • 14
  • Did you edit a file in `/usr/lib/X11/xkb`? Then you may try to edit `/usr/share/X11/xkb/symbols/pc` also. `key {[ comma, less, horizconnector, multiply]};` – Andra Feb 12 '19 at 18:08
  • @Andra hm, I'll try. I'd still like to know why the straight-forward approach didn't work. – wvxvw Feb 13 '19 at 10:33
  • As fas as I understand, you shouldn't edit those files but, instead, load your `hidden partial alphanumeric_keys xkb_symbols` remapping. I can't help further. – Andra Feb 13 '19 at 12:40
  • For myself, I would do it using `xmodmap`. – Andra Feb 13 '19 at 12:40
  • @Andra a bit of caution about xmodmap: it's terribly slow on Arch. I.e. I need to hold the remapped keys for ~5 seconds until it takes effect. Have no idea why. – wvxvw Feb 13 '19 at 12:51
  • OK, I did remapping according to [https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the-left-shift-and-left-control](https://unix.stackexchange.com/questions/65507/use-setxkbmap-to-swap-the-left-shift-and-left-control), and it did indeed work (home → comma, end → dot). To get key codes and definitions I needed `/usr/share/X11/xkb/symbols/pc` and `/usr/share/X11/xkb/symbols/lv` (lv is my layout). – Andra Feb 13 '19 at 17:04
  • @Andra that's the thing: swapping works, but I need duplication, not swapping. – wvxvw Feb 14 '19 at 12:15
  • no, why _swapping_? You can write your own remapping. – Andra Feb 14 '19 at 12:25

0 Answers0