Configure an insert key for Linux on a Macbook Pro

I am using Ubuntu 10.10 within a Virtualbox VM, and one of the annoying things is having to right click and selecting paste to get copied text into the terminal. I finally found the solution to the “macs don’t have insert keys” issue. Using xev and xmodmap I was able to convert the F12 key on the keyboard to be the insert key, which allows me to paste copied text via shift+insert (now shift+F12) in gnome’s terminal.

The process involved launching xev and hitting they F12 key, which I wanted to remap. Among the sea of text that is blasted to the terminal, I found:

KeyRelease event, serial 35, synthetic NO, window 0x6600001,
root 0x109, subw 0x0, time 36168750, (155,-15), root:(160,39),
state 0x11, keycode 96 (keysym 0xff63, Insert), same_screen YES,
XKeysymToKeycode returns keycode: 23
XLookupString gives 0 bytes:
XFilterEvent returns: False

Then using xmodmap I remapped the key like so:

xmodmap -e "keycode 96 = Insert"



1 thought on “Configure an insert key for Linux on a Macbook Pro”

  1. This has stopped working as of the latest xorg release. The reason is that “keycode 96 = Insert” now only maps F12 to Insert, but Shift + F12 is unmapped by default.

    You have to provide the mapping of the caps-altered key explicitly: “keycode 96 = Insert Insert”.

    HTH, I’ve been looking for a fix for this during 2 annoying weeks.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s