Skip to content

Instantly share code, notes, and snippets.

@n1kk
Created March 10, 2019 23:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save n1kk/dcda3cf451151d98625ca9cca49c2e67 to your computer and use it in GitHub Desktop.
Save n1kk/dcda3cf451151d98625ca9cca49c2e67 to your computer and use it in GitHub Desktop.
Script to swap tilde (`/~) and paragraph (§/±) keys on UK layout keyboards in MacOS
#! /bin/bash
# this script should be run on login
# this swapps `/~ and §/± key on uk layout
hidutil property --set '{"UserKeyMapping":[{"HIDKeyboardModifierMappingSrc":0x700000064,"HIDKeyboardModifierMappingDst":0x700000035},{"HIDKeyboardModifierMappingSrc":0x700000035,"HIDKeyboardModifierMappingDst":0x700000064}]}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment