6

I'd like to remap some key behaviors globally.

For example:

Control + m -> Enter

Control + [ -> Esc

Is there any tool equivalent to Keyremap4Macbook ? Or is it possible to remap by using Xmodmap?

I've tried AutoHotkey, but it didn't work well with Guake. Any suggestions would be appreciated.

Kevin Bowen
  • 19,615
  • 55
  • 79
  • 83
abr
  • 61
  • possible duplicate of http://askubuntu.com/questions/254424/how-can-i-change-what-keys-on-my-keyboard-do-how-can-i-create-custom-keyboard/257497#257497 – Kevin Bowen Jun 04 '13 at 12:04

1 Answers1

5

Remapping keys with the control modifier using xmodmap is possible, but unreliable. For example:

xmodmap -e "keycode 58 Shift_L Control_L = m M Return"

is a legal key mapping, and it will work in the terminal, and in a handful of GUI applications (those using Xt), but not in Gtk or Qt apps, which generally intercept the control key directly, bypassing the mapping.


If you're willing to install and run AutoKey, you can configure it to do what you want. Install the autokey-gtk package and configure a phrase like this:

Phrase=Enter, Paste=Keyboard, Hotkey=Ctrl-M

cscarney
  • 18,963