alols / xcape

Linux utility to configure modifier keys to act as other keys when pressed and released on their own.
GNU General Public License v3.0
2.1k stars 115 forks source link

How to map space+hjkl to arrows #111

Open kuator opened 5 years ago

kuator commented 5 years ago

Sorry, I am noob. I'm trying to map space+hjkl to arrows, but have no idea how to do it. What I understand is that I need to make space modifier key. https://unix.stackexchange.com/questions/326904/make-an-ordinary-key-act-as-modifier-with-xcape-and-xkb I found how to do it with xkb. Now I don't know what next should I do. Should I map HPR to ISO_LEVEL_3_SHIFT? And if yes how?

As I understand these will only work with level3shift. (taken from documentation)

   key <AC06> {        [         h, H, Left            ]       };
    key <AC07> {        [         j, J, Down            ]       };
    key <AC08> {        [         k, K, Up              ]       };
    key <AC09> {        [         l, L, Right           ]       };

Again, I'm sorry, but xkb's documentation is pretty hard for newbies like me.

khuedoan commented 5 years ago

I use a similar set up with Right Alt remapped to AltGr and AltGr + H/J/K/L for arrow keys (xcape is for another purpose)

Haven't tested yet but you can remap your Space to AltGr (maybe in /usr/share/X11/xkb/symbols/pc? ) and edit the layout in /usr/share/X11/xkb/symbols/us

    key <AC06> {    [     h,    H,      Left,      Left ] };
    key <AC07> {    [     j,    J,      Down,      Down ] };
    key <AC08> {    [     k,    K,        Up,        Up ] };
    key <AC09> {    [     l,    L,     Right,     Right ] };

Then use xcape for Space when tapping AltGr.