Fast, Easy, Cheap: Pick One

Just some other blog about computers and programming

Making the Alt Key Work in X11 on OS X

It seems something is broken about the default keyboard map in X11 on OS X. I discovered this while trying to use an X-forwarded version of Eclipse from our cluster and couldn’t get any of the shortcuts that use the Alt key to work. Fortunately I found a niceĀ fix in the Inkscape forum.

In short:

  1. Enable “Use the system keyboard layout” in your X11 preferences.

  2. Open an xterm. Run xmodmap -pke > ~/.Xmodmap[/code]

  3. Edit the file. Find the lines that say:

    keycode 66 = Mode_switch keycode 69 = Mode_switch

    and change them to:

    keycode 66 = Meta_L keycode 69 = Meta_R

  4. Disable “Use system keyboard layout” and “Emulate three button mouse” in your X11 preferences

  5. Restart X11

Now your alt key should work fine in your X11 apps.