Get emacs to respect control keys under tmux and putty

This commit is contained in:
John Doty 2014-06-04 06:13:24 -07:00
parent 0225d656f3
commit bc05b7d525
2 changed files with 12 additions and 1 deletions

View file

@ -215,6 +215,14 @@
(global-set-key (read-kbd-macro "C-x f") 'font-lock-fontify-buffer)
;; In addition, make sure various things are working properly with xterm-keys
;; on under tmux. (This has been the most reliable way to get putty to send
;; the right keystrokes into emacs.)
(if (getenv "TMUX")
(let ((map (copy-keymap xterm-function-map)))
(set-keymap-parent map (keymap-parent input-decode-map))
(set-keymap-parent input-decode-map map)))
;; =================================================================
;; Random Goo.
;; Drunken men who don't know where they are, and no longer care.

View file

@ -6,7 +6,7 @@ bind-key C-b last-window
set -g base-index 1
# Allows for faster key repetition
set -s escape-time 0
#set -s escape-time 0
# Set status bar
set -g status-bg black
@ -23,6 +23,9 @@ setw -g aggressive-resize on
# another TMUX session
bind-key a send-prefix
# Fix control keys through putty
set -g xterm-keys on
# Activity monitoring
#setw -g monitor-activity on
#set -g visual-activity on