So I have a Mac, and rather than boot debian/XFCE directly and have to configure hardware drivers I'm using VirtualBox.

This means that my multitouch trackpad works well, and I can jump in and out of the VM very easily. I have correctly configured my keyboard mapping, including those pesky alt shortcuts, and everything.

The problem comes from the lack of home/end keys.

In OS X, I've got used to using Ctrl+A for home and Ctrl+E for end, which works everywhere (Terminal, obviously, plus TextMate, and even in forms in Chrome).

However, in XFCE this only works inside a terminal by default. I'd like to extend that shortcut (or, indeed, something like Ctrl+Left/Ctrl+right, since Ctrl+E seems to actually be used in applications like eclipse) to map to home/end as global keyboard shortcuts.

However, the two places where we can configure shortcuts in XFCE (Settings -> Keyboard -> Application Shortcuts, and Settings -> Window Manager -> Keyboard) the first wants a "command" to run on a particular shortcut, and the second doesn't allow you to add custom actions.

Do I want to do this in a lower level configuration, like Xorg or something, or is there a way to configure global shortcuts like this in XFCE?

1 Answer 1


Whoops, didn't mean for this to be an "answer your own question", but have just discovered how this works.

the Mac's fn key, which is needed to access the function keys even in Linux, maps fn+left and fn+right keys to home and end for you - on Mac OS this does that annoying "scroll to the top/bottom" thing, but in Linux they work like a regular home/end keys.

problem solved!


Switching between the two "modes" of entry was driving me crazy (remember, fn+arrows doesn't work in OS X), so I've worked out how to get left cmd+arrows working in both OSs (it works by default in OS X - where ctrl+a/e actually do strange things in multiline inputs like stackoverflow boxes...).

It's a ~/.Xmodmap entry, and it requires that you map the right cmd to the VirtualBox "host" key first.

keycode  133 = Mode_switch Meta_L Alt_L Meta_L
keycode 113 = Left NoSymbol Home
keycode 114 = Right NoSymbol End

(you can run xmodmap ~/.Xmodmap to apply the settings without a restart).

In Linux, this works in terminals, eclipse, everything (presumably only when X is running.)

If you're having trouble getting this to work with a particular non-locking modifier key, take a look at the output of xev when you press it, and try swapping the keycode out for 133 above (although you may need to swap out NoSymbol too, I don't know.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.