Emacs: Caps lock as M-x

| emacs

Inspired by Lennart Borgman’s recent post on help.gnu.emacs about binding Caps Lock to M-x on Microsoft Windows, I set my system up with the Linux equivalent.

To make Caps Lock a shortcut for M-x, add the following lines to your ~/.emacs:

(if (eq window-system 'x)
    (shell-command "xmodmap -e 'clear Lock' -e 'keycode 66 = F13'"))
(global-set-key [f13] 'execute-extended-command)
You can view 1 comment or e-mail me at sacha@sachachua.com.

1 comment

Paul Gaskin

2008-08-04T20:18:24Z

I went ahead and added that key-binding to my .emacs and it seems like an ergonomically useful addition.