diff --git a/.emacs.d/core.el b/.emacs.d/core.el index 4433376..5d6bc12 100644 --- a/.emacs.d/core.el +++ b/.emacs.d/core.el @@ -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. diff --git a/.tmux.conf b/.tmux.conf index a9784df..f8e154c 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -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