Author Topic: Remapping Super_L and Super_R (win keys) like FN  (Read 2639 times)

0 Members and 1 Guest are viewing this topic.

Offline Barbastruzzolo

  • Thread Starter
  • Posts: 36
  • Location: Italy
  • No money to buy a Topre
Remapping Super_L and Super_R (win keys) like FN
« 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

Filco FKBN88M/UKB2 || Cherry G80-3000LSCIT-2 || Cherry G80-3000 LPCEU-2 || Apple Extended Keyboard II (QZERTY) || Filco MINILA FFKB68MRL/UKB

Offline Pro XKB

  • Posts: 25
Re: Remapping Super_L and Super_R (win keys) like FN
« Reply #1 on: Tue, 07 January 2014, 14:00:43 »
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.

Offline Barbastruzzolo

  • Thread Starter
  • Posts: 36
  • Location: Italy
  • No money to buy a Topre
Re: Remapping Super_L and Super_R (win keys) like FN
« Reply #2 on: Wed, 08 January 2014, 02:11:43 »
Thank you very much Pro XKB!
 It works!

I'm going to look forward for other layout customizations  :)
Filco FKBN88M/UKB2 || Cherry G80-3000LSCIT-2 || Cherry G80-3000 LPCEU-2 || Apple Extended Keyboard II (QZERTY) || Filco MINILA FFKB68MRL/UKB