1

How can I map left Ctrl to behave as hyper (left hyper) using xkb? Look at this in keycodes/evdev:

// Fake keycodes for virtual keys
<LVL3> =   92;
<MDSW> =   203;
<ALT>  =   204;
<META> =   205;
<SUPR> =   206;
<HYPR> =   37;

Why these are fake? I set <HYPR> to 37 to do the mapping but now left Ctrl keysym (using xev) is keysym 0x0, NoSymbol. I guess it's related to the comment above these lines. Any ideas? (I can do it with xmodmap, but I want it with xkb.)

graham
  • 10,436
Sassan
  • 161
  • Do you really mean hyper, not super? AFAIK hyper has no functionality in Ubuntu. You can read this answer if you aren't sure which key you want to map. – danzel May 29 '18 at 13:22
  • I mean hyper not super, shift, control, alt and super aren't enough for my usecase. I need another modifier to achieve what I need. I'm able to get what I want with xmodmap but it's really unstable and I have this feeling that it even consumes cpu (when I disable my xmodmap modifications gnome works much smoother.) so I wanna do it with xkb. I have other modifications in xkb layer and it works stable. – Sassan May 29 '18 at 13:51

1 Answers1

0

This is how I did so: Edited evdev to:

...
<CAPS> = 37;
...
<LCTL> = 66;
...

<LCTL> = 66 was already there as I wanted caps to be left control. I just made left control produce caps with <CAPS> = 37 and then edited symbols/pc to:

...
key <CAPS> {    [ Hyper_L       ]   };
...

Now I wonder if I can do these changes in a dotfile in my home directory.

Sassan
  • 161