Skip to main content
edited tags
Link
nohillside
  • 104.5k
  • 42
  • 222
  • 275
Source Link
Jack N
  • 101
  • 2

How to remap Mac keyboard with Xmodmap

I was trying to remap my Mac's keyboard with Xmodmap, but it was only somewhat successful. The remapping works when I look for the keycodes with the event tester, but when I actually type the keyboard is not remapped. The code I'm using is
nano .Xmodmap

keycode 10 = e
keycode 11 = t
keycode 12 = y
keycode 49 = h
keycode 39 = o
keycode 48 = i
keycode 46 = n
keycode 22 = d
keycode 23 = f
keycode 25 = k
keycode 24 = j
keycode 42 = r
keycode 39 = l
keycode 53 = p
keycode 43 = semicolon
keycode 45 = o
keycode 65 = BackSpace
clear lock

xmodmap .Xmodmap

A similar program (with different keycodes) works on my raspberry pi, so I'm wondering if there's any additional steps needed to be taken on a Mac in order to have the xmodmap keyboard be the one to actually send the keypresses.