geekhack
geekhack Community => Keyboards => Topic started by: Barbastruzzolo on Tue, 07 January 2014, 04:19:17
-
I want to remap my left and right Super keys to behave similarly to the FN key on my Ducky Mini ISO.
At work I use a DK9087S (ISO UK) on Debian Linux (XFCE). I never really understood xmodmap usage...
I would like to create shortcuts like this:
Super_R + W = Up
Super_R + A = Left
Super_R + S = Down
Super_R + D = Right
Super_L + . = End
Super_L + ; = Home
How can I do that?
Do I need to install additional software or what?
I already remapped my CAPS LOCK as backspace using xmodmap...
Thank you
-
You cannot do this with xmodmap, but you can use xkbcomp, which you should
already have.
1. Dump you current layout:
xkbcomp :0 mylayout.xkb
2. Edit mylayout.xkb. In section xkb_types, add a type definition like this.
type "SHIFT+SUPER" {
modifiers= Shift+Super;
map[Shift]= Level2;
map[Super]= Level3;
map[Shift+Super]= Level3;
preserve[Shift+Super]= Shift;
level_name[Level1]= "Base";
level_name[Level2]= "Shift";
level_name[Level3]= "Super";
};
and in section xkb_symbols, change the definition of key <AD02> to:
key <AD02> {
type= "SHIFT+SUPER",
symbols[Group1]= [ w, W, NoSymbol ],
actions[Group1]= [ NoAction(), NoAction(), RedirectKey(key=<UP>, clearMods=Super) ]
};
and similarly with the other keys you want to remap.
3. Upload your modified layout to the Xserver:
xkbcomp mylayout.xkb :0
You can keep mylayout.xkb, and maybe put the last command above in whatever
startup file Xfce might use.
-
Thank you very much Pro XKB!
It works!
I'm going to look forward for other layout customizations :)