I use Linux on a Macbook with a UK/GB keyboard and I customize the keymap to solve some problems Apple's weird keyboard layout causes. I use xmodmap to do this. I'd like to try Wayland, but xmodmap doesn't work in that. How can I achieve a similar result in Wayland? The .Xmodmap file I use contains the following:keycode  12 = 3 numbersign 3 sterling sterling sterling threesuperior sterlingclear Controlclear Mod4add Control = Control_L Super_Radd Mod4 = Super_Lkeysym Caps_Lock = NoSymbol Caps_LockLine 1: On UK keyboards Shift-3 is , so # usually has its own key near Return. But on the Mac # is obtained with Altgr-3. As a programmer I use # far more than  so this line swaps them over. Selecting US layout also achieves this, but doing that in Linux also swaps some other commonly used keys, whereas in OS X those other keys are unaffected by US/UK.Lines 2-5: Make the right Cmd key act as Right-Ctrl, because this keyboard has no physical right Ctrl key.Line 6: Makes CapsLock only work if you press it with Shift. Not Mac-specific, this should be a standard option for all OSs and keyboards.
How to customise keyboard mappings with Wayland
keyboard shortcuts;wayland