You are not logged in.

#1 2020-08-14 18:05:48

in0ni
Member
Registered: 2017-10-27
Posts: 13

[SOLVED] Is it possible to remap the "fn" key (on wayland)?

Why do I want to do this?
I just purchased a natural keyboard and the super (win) key is not in it's usual location (to the left of the alt key)... instead the fn key is there, which drives me crazy cause I've been using the super key for my most used shortcuts for years. Instead of returning, and purchasing another keyboard... I figure I can just hack it, and I'll just swap the physical keys on the keyboard (same size) and presto! tongue

I want to make the following change to the layout, but only on this keyboard (not laptop keyboard):

SUPER - FN - ALT ==> FN - SUPER - ALT

What I have found

  • I've been searching for remapping keys w/ xkb (using sway) but have come across the mention (numerous times) that the "fn" key cannot be remapped since it sends no code.

  • Tried using showkeys, wev, and can confirm that no codes are sent.

  • I have tried to take a look and grep the files in /usr/share/X11/xkb to see if I can find something, but it's a little overwhelming.

  • Also tried to make sense of this example, which also mentions the lack of codes sent by the "fn" key... but again a bit over my head

  • Was hoping to implement it using the following approach, not sure if this is the best way to go about it.

Am I just wasting my time?

If this is possible, a point in the right direction would be hugely appreciated!

Last edited by in0ni (2020-08-16 04:17:36)

Offline

#2 2020-08-14 19:09:55

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,739

Re: [SOLVED] Is it possible to remap the "fn" key (on wayland)?

Most likely not.
Run "sudo libinput debug-events", press the Fn key and see whether that generates any output.

Online

#3 2020-08-14 21:20:22

in0ni
Member
Registered: 2017-10-27
Posts: 13

Re: [SOLVED] Is it possible to remap the "fn" key (on wayland)?

seth wrote:

Most likely not.
Run "sudo libinput debug-events", press the Fn key and see whether that generates any output.

Nilch sad

Thank you Seth -- Interestingly enough "Fn" key on laptop does generate output, but the one on the keyboard does not. You think I might have any other options here? Or pretty much case closed?

Offline

#4 2020-08-15 06:46:25

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 77,739

Re: [SOLVED] Is it possible to remap the "fn" key (on wayland)?

Re-wire the keyboard…
Is the keyboard programmable and allows for program/firmware upload?
The Fn key is likely an entirely internal feature that doesn't generate any signal on the bus but just modulates the signal.
If this is a Logitech keyboard, there's https://aur.archlinux.org/packages/solaar-git/ which suggests "Only some keys on some devices can be remapped" but doesn't specify which (and the feature status looks incomplete)

Online

#5 2020-08-16 04:14:20

in0ni
Member
Registered: 2017-10-27
Posts: 13

Re: [SOLVED] Is it possible to remap the "fn" key (on wayland)?

seth wrote:

Re-wire the keyboard…
Is the keyboard programmable and allows for program/firmware upload?
The Fn key is likely an entirely internal feature that doesn't generate any signal on the bus but just modulates the signal.
If this is a Logitech keyboard, there's https://aur.archlinux.org/packages/solaar-git/ which suggests "Only some keys on some devices can be remapped" but doesn't specify which (and the feature status looks incomplete)

Yeah, was thinking it's prob easier to just open it up and cut/solder to switch the keys. It's not a Logitech keyboard -- Perixx, never used them before. Was looking to purchase an ergonomic keyboard again as I'm spending more time in front of a computer. Used to have the MS ergonomic 4000 a while back and figured I'd give this brand a shot. After some hours of use, not too fond of the feel of the keyboard either way so I have  MS sculpt on the way. So less pressing now, but still think I'm going to give it a shot.

Thanks.

Offline

Board footer

Powered by FluxBB