You are not logged in.

#1 2020-03-14 21:27:32

T3STY
Member
Registered: 2020-01-29
Posts: 15

Remap PC keyboard to match Apple style modifiers

At work I am using mostly a Mac, and I got very used to the modifier keys as specified in the Apple keyboard layout.
So much used, that I now can't use my PC laptop anymore and I constantly glitch on Alt+[Z/X/C/V/S/A] while trying to press the Cmd+[Z/X/C/V/S/A] combos.
Also, I find it much more ergonomic than the PC-style CTRL+[key] combos, much easier to press.

Does anyone know how to remap the keyboard modifier keys to match the Apple ones?

My PC is a Sony Vaio laptop, running the latest Arch and Gnome packages.
I am mostly interested into the left-side modifiers, but right side ones would be welcome as well.

Offline

#2 2020-03-14 21:31:41

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 30,456
Website

Re: Remap PC keyboard to match Apple style modifiers


"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman

Offline

#3 2020-03-14 22:11:46

T3STY
Member
Registered: 2020-01-29
Posts: 15

Re: Remap PC keyboard to match Apple style modifiers

Thank you for the link, but xmodmap is meant for Xorg based environments.
In Gnome, the graphical environment uses Wayland where device input is handled by libinput, not Xorg. making changes to Xorg config files will not have effect in Wayland.

Offline

#4 2020-03-14 22:15:34

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 74,311

Re: Remap PC keyboard to match Apple style modifiers

You could also use the xkb "ctrl:swap_lalt_lctl" option.

There'd more options,

grep ctrl /usr/share/X11/xkb/rules/base.lst | grep alt

Online

#5 2020-03-14 22:40:46

T3STY
Member
Registered: 2020-01-29
Posts: 15

Re: Remap PC keyboard to match Apple style modifiers

Thanks, seth! While looking about xkb I have found out that gnome-tweaks has just this! In this tool, go to: Keyboard & Mouse > Additional Layout Options. This presents a lot of configurations for remapping modifiers. What worked for me was under the section "Ctrl position", the option "Left Alt as Ctrl, Left Ctrl as Win, Left Win as Alt".
Also, typing the grep command above lists an entry:

ctrl:swap_lalt_lctl_lwin Left Alt as Ctrl, Left Ctrl as Win, Left Win as Left Alt

which seems just what I did under gnome-tweaks.

I am still trying to figure out how to remap right side modifiers, to swap Ctrl and Alt. gnome-tweaks doesn't seem to have just that, and other options are limited to a single swap...

Offline

Board footer

Powered by FluxBB