Skip to content

Instantly share code, notes, and snippets.

@kule
Last active August 1, 2023 11:12
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kule/997d104b859fc6b518b2306406824c66 to your computer and use it in GitHub Desktop.
Save kule/997d104b859fc6b518b2306406824c66 to your computer and use it in GitHub Desktop.
uk-mac-xkb-symbols-config
<!-- Amend the uk mac variants in /usr/share/X11/xkb/rules/evdev.xml -->
...
<variant>
<configItem>
<name>mac</name>
<description>English (UK, Macintosh)</description>
</configItem>
</variant>
<!-- START OF ADDITION -->
<variant>
<configItem>
<name>macfixed</name>
<description>English (UK, Macintosh, Fixed)</description>
</configItem>
</variant>
<!-- END OF ADDITION -->
<variant>
<configItem>
<name>mac_intl</name>
<description>English (UK, intl., Macintosh)</description>
</configItem>
</variant>
...
// Add this to /usr/share/X11/xkb/symbols/gb
partial alphanumeric_keys
xkb_symbols "macfixed" {
// Describes the differences between a very simple en_US
// keyboard and a very simple U.K. keyboard layout
include "latin"
name[Group1]= "English (UK, Macintosh, Fixed)";
key <AE02> { [ 2, at, EuroSign ] };
key <AE03> { [ 3, numbersign ] };
key <LSGT> { [ sterling, plusminus ] };
key <TLDE> { [ grave, asciitilde ] };
include "level3(ralt_switch)"
include "level3(enter_switch)"
};
@kule
Copy link
Author

kule commented Jun 14, 2020

In Gnome Settings, you can then choose English (United Kingdom), English (UK, Macintosh, Fixed). (You may need to reboot / restart X11 to get things working correctly)

This will then give you the usual UK mac layout albeit:

  • Shift+3 is # (as I commonly need this when programming)
  • Ensures ~/` are mapped to the correct key (for some reason the UK Macintosh layout always ends up swapped with §/± for me)
  • This also replaces § (section) with £ (as I have no use for § but occasional use for £)

@SeanAkersGitHub
Copy link

Thanks for this. Still getting the § sign rather than the pound sterling sign with this setup though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment