Hacker News new | ask | show | jobs
by xenophonf 3133 days ago
If possible, swap Caps Lock with Left Control like it was on the old Sun and Apple keyboards. Having Control on the home row makes it much more comfortable typing common left-hand-only keyboard shortcuts like C-x, C-w, C-a, C-q, C-s, C-e, C-v, and C-z, as well as chords such as M-C-v, M-C-c, or M-C-d. On Windows you can edit the scan code map in the registry to swap the mappings, although this sometimes breaks laptop buttons that are implemented as USB HIDs (e.g., secure attention keys on tablets that work by sending the Control, Alt, and Del scan codes like a real keyboard would). On Macs I also swap Option and Command, since Option usually gets mapped to Left Alt in terminals and in Emacs.

On FreeBSD the syscons driver lets you edit the keyboard maps in a text file. I don't know how to do it in newcons. I forget how to do it in Linux. If all you care about is X, you can also use xmodmap (IIRC).

1 comments

in OSX, how did you swap opt and cmd? i went through hoops to do that and finally managed to do it without replacing opt/cmd os-wide using cmdkeyhappy.
Before OS-X would let you do that, I took my PowerBook's keyboard out, cut the trace and redrew the traces to connect the CapsLock key to the Control traces. :-)

Now it's done by simply going to System-Preferences=>Keyboard=>Modifier Keys

System Preferences -> Keyboard -> Modifier Keys...