0

I have the following line in my .emacs.d/init.el file

(global-set-key [(control tab)]  'other-window)
;; remap f1 to undo
(global-set-key (kbd "<f1>") 'undo)

When I use the full X-window GUI version of emacs, the commands works fine. When I start using the -nw options to use Emacs in a terminal, they don't work at all.

What am I doing wrong?

Dan
  • 32,584
  • 6
  • 98
  • 168
mikemtnbikes
  • 223
  • 2
  • 9
  • 2
    Possibly relevant: [Problems with keybindings when using terminal](http://emacs.stackexchange.com/questions/1020/problems-with-keybindings-when-using-terminal). – Dan Oct 03 '16 at 19:38
  • If that other post resolved the problem, we can close this one as a duplicate, which will redirect people to the first post. – Dan Oct 05 '16 at 15:03
  • Please leave it open. I haven't been able to fix it fully with the information from that post. I was planning on updating my answer when I do. – mikemtnbikes Oct 05 '16 at 18:31

1 Answers1

1

The problem is that the Ctl-Tab (and other escape sequences) aren't natively passed from the terminal to the application (emacs). Luckily, Xterm and emacs can be reconfigured to allow the passage of these sequences. Check out gilles's excellent overview here

mikemtnbikes
  • 223
  • 2
  • 9