1

I haven't found the correct keyboard layout for my macbook pro yet. I've found one that looks like it though (in .xinitrc):

setxkbmap -layout us -variant mac

yet this has one difference: the (',~) key and the (§,±) keys are switched. I've always managed this by editing the corresponding file in §/etc/share/X11/xkbbut it is a drag to have to do this everytimX11` updgrades.

Can it be done from a local file e.g. .xinitrc?

1 Answer 1

2

The file you want is .xmodmap Have a look at man xmodmap for details on how to set it up.

xmodmap uses the physical keycodes to make the change. You can get those from xev. Launch it, then tap the appropriate keys and see what keycode number pops up.

You should only need two lines in your .xmodmap, both of them looking something like

keycode 49 = grave asciicircum
keycode 15 = <whichever keys are activated in first-level> section plusminus

Those two keycodes, by the way, are wild guesses and probably wrong.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.