[prev in list] [next in list] [prev in thread] [next in thread]
List: freedesktop-xorg
Subject: Re: Config XKB to map a key combination to another
From: wettstae () gmail ! com
Date: 2018-06-04 16:21:49
Message-ID: 87po16a5eq.fsf () 509 ! ch
[Download RAW message or body]
> I'm trying to create a bunch of mappings like this:
> `Hyper+Shift+C` -> `Ctrl+Shift+C`
> `Hyper+Left` -> `Alt+Left`
> `Alt+Left` -> `Ctrl+Left`
> `Super+Left` -> `Home`
> How can I do it in xkb config files?
You can change the modifiers with Redirect actions. For example, for
the LEFT key, use something similar to this (untested, assuming Alt =
Mod1, Super = Mod4, and Hyper = Mod2):
key <LEFT> {
type = "ALT_SUPER_HYPER",
symbols = [ Left, Left, Left, Left, Left, Left, Left, Left ],
actions = [ NoAction(), RedirectKey(key=<LEFT>, clearMods=Mod1, mods=Control),
RedirectKey(key=<HOME>, clearMods=Mod4), NoAction(),
RedirectKey(key=<LEFT>, clearMods=Mod2, mods=Mod1), NoAction(),
NoAction(), NoAction() ]
}
The type ALT_SUPER_HYPER above you must provide as well; I assumed that
it is a eight level key with Alt as level 2 shift, and Super and Hyper
as Level 3 and Level 5 shift, respectively. If you have a look in
directory xkb/types, you certainly will figure out how that works. The
only thing special is that you should use `preserve` for all modifier
combinations; you can see preserve in action in file xkb/types/level5.
Andreas
_______________________________________________
xorg@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Your subscription address: %(user_address)s
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic