Ask Your Question
2

Any way to remap keys in Wayland?

asked 2015-07-08 16:07:34 -0500

jsadusk gravatar image

I'm trying out the Wayland version of Gnome in F22, and there's a lot of stuff that works much better, notably multiple monitors with different DPIs. But I haven't figured out how to remap keys to the level of xmodmap or xkb. Ideally I'd like a way to have different keymaps for different connected keyboards (I remap things differently for an external keyboard vs my laptop's built in), but being able to run a remap command like xmodmap when I'm changing keyboards would be enough to get by. Is anything like this functionality in Wayland yet?

edit retag flag offensive close merge delete

Comments

Try changing keys in the window manager. There may exist a keyboard configuration tool.

NuuN gravatar imageNuuN ( 2015-07-10 12:16:59 -0500 )edit
1

XKB “should work” on Wayland; but I can't confirm at the moment… is running setxkbmap not working?

BRPocock gravatar imageBRPocock ( 2015-07-10 12:52:47 -0500 )edit

There is a frontend to that frontend (setxkbmap) called localectl :D.

NuuN gravatar imageNuuN ( 2015-07-10 13:13:48 -0500 )edit

I think localectl lacks the ability to map different keyboards to different layouts, though, which I (at least) use often. eg, setxkbmap -device $(xinput -list | grep 'USB Keyboard' | head -1| cut -d= -f2 | cut -f 1) spacey; setxkbmap -device $(xinput -list | grep 'AT Translated Set 2 keyboard' | head -1| cut -d= -f2 | cut -f 1) us. Unfortunately, Gnome Settings (et al) lack the ability to do so automatically.

BRPocock gravatar imageBRPocock ( 2015-07-13 12:20:06 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2017-12-29 17:16:12 -0500

wallyk gravatar image

updated 2018-01-03 02:07:27 -0500

Many of the key substitutions one might want (like moving the Ctrl key,) are available in the Gnome Tweaks tool. image description

Under the Additional Layout Options are these (from Fedora 27): image description

Unfortunately, for me, there doesn't appear to be a method to re-establish the F1 through F12 keys (which require the Fn key to be pressed to enable them on my Lenovo Flex 5; instead they are various system functions (no sound, volume down, volume up, no microphone, refresh, display monitor control, airplane mode, camera off, lock, multi-monitor control, brightness down, brightness up).

There is a BIOS setup feature which does exactly the right thing. Entering the BIOS setup by pressing F2 during boot up for Lenovo Flex 5.

edit flag offensive delete link more

Comments

1

Fn key application can be changed in the BIOS as far as I know. At least in HP, that's how it works.

OldIndianMonk gravatar imageOldIndianMonk ( 2017-12-29 21:58:54 -0500 )edit

@OldIndianMonk: Indeed, it works that way in the Lenovo's BIOS. It took me until now to figure out how to enter the BIOS setup: A raw, naked F2 during bootup.

wallyk gravatar imagewallyk ( 2018-01-03 02:04:51 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2015-07-08 16:07:34 -0500

Seen: 3,035 times

Last updated: Jan 03 '18