I am using terminal Emacs (emacs -nw). Gnome terminal doesn't behave well with it (key bindings break), and KDE's Konsole is even worse. Surprisingly, when I ssh from a windows machine the behavior is much better.

Which terminal apps work out of the box without any tweaking for keybindings and mouse support?


No terminal emulator will default to supporting all of the key sequences you're asking about, because they are emulating terminals which did not support those sequences.

Furthermore, the only emulator I'm aware of which is even capable of supporting all the key sequences Emacs recognises is Thomas Dickey's xterm, and configuration is very much non-trivial (I've failed to get it working on the occasions I've tried).

(You can, however, get a subset of the extended sequences with a fairly minimal config; see the links below.)

If anyone does have a working configuration for the fully-extended sequences, I would love to know the details!

Here are a couple of related answers:

Edit: Gilles' answer in the thread Dan has linked to discusses some more recent developments, and looks extremely interesting at first glance.


If you're willing to install an Emacs package and configure your terminal, I wrote an Emacs package which can teach Emacs and terminals how to properly recognize all PC keyboard keys and modifier key combinations:


Currently, the list of terminal emulators that can be configured with term-keys is xterm, urxvt (rxvt-unicode), Konsole/Yakuake, the Linux console, and st.

  • Would you consider contributing this work back to Emacs? Assuming it works as advertised, this seems like invaluable functionality to have included by default. – phils Dec 10 '17 at 8:45
  • Ah, I hadn't thought about it before your comment. I don't see why not! The license allows it. The package is still very young, though. – Vladimir Panteleev Dec 10 '17 at 8:54

I used suckless' st and rxvt-unicode in the past with emacs -nw, both worked well with no issue.

They are both light on resources. St is customizable through its config.h (requiring compilation at every edit, though). Rxvt is customizable through ~/.Xresources.

  • Thanks! However, now selection with Ctrl-Shift-Arrow doesn't function (Other bindings do function, e.g. ctrl-arrow). It behaves like Shift-Arrow. Any idea how to fix this with rxvt-u? – Yuval Atzmon Nov 11 '15 at 13:41
  • No idea. I use C-SPC M-f for that purpose. Sorry. – Manuel Uberti Nov 11 '15 at 13:46

xterm works great (actually I use uxterm), but I don't usually run emacs inside of it. If you're sshing into another machine to run emacs and edit files there you might consider running emacs locally and using TRAMP mode instead. You can then run emacs as a normal X application rather than with -nw, and not have to worry about the terminal.

  • I can't use TRAMP in my case, since I run long matlab runs on that machine from emacs and I want to keep the session alive while I disconnect my local machine from the remote machine. – Yuval Atzmon Nov 12 '15 at 0:43
  • Ah, a fair point. You could try using nohup, I suppose. Either way it looks like you've found the info you need. – db48x Nov 12 '15 at 6:35

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.