Swap cmd and alt keys in Terminal
C Objective-C Lua
Pull request Compare This branch is 53 commits behind frobware:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lua-5.1.4
.gitignore
BUGS
CMakeLists.txt
INSTALL
LICENSE
Lindent
Makefile
README
TODO
cmd-key-happy-restart.sh
cmd-key-happy.c
cmd-key-happy.m
com.frobware.cmd-key-happy.plist
example-rcfile.lua

README

Swap cmd and alt (or command and option) keys in Mac OS X.

This program allows you to swap the command and alt (or option) keys
in any application, but in particular Terminal.app.  This can be
extremely handy when ssh'ing into other UN*X boxes and running "emacs
-nw".  It also allows you to have the traditional readline navigation
work properly when using Bash (i.e., alt-backspace, alt-f, alt-b, etc)
in the Terminal.

The decision to swap the keys is based on a customizable
script (Lua). This script allows you to exclude certain key
combinations per application, or globally.  For example, "cmd-tab" is
an exclusion in my Lua script regardless of which application is
running, as I still want this key combination to cycle the active set
of applications.  I have "cmd-c" and "cmd-v" as exclusions when the
front most application is the Terminal -- these combinations are so
universal that I find it easier to leave them as they are -- but all
other key combinations involving the cmd key get swapped with alt.

The motivation for this program was the many years of hitting
alt-<something> in Linux only to find that it does not generate the
same behaviour in Terminal.app.  Having the ability to run "emacs -nw"
from within Terminal.app is now useable!