forked from purcell/emacs.d
-
Notifications
You must be signed in to change notification settings - Fork 0
/
init-xterm.el
24 lines (21 loc) · 850 Bytes
/
init-xterm.el
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
(require 'init-frame-hooks)
(defun fix-up-xterm-control-arrows ()
(let ((map (if (boundp 'input-decode-map)
input-decode-map
function-key-map)))
(define-key map "\e[1;5A" [C-up])
(define-key map "\e[1;5B" [C-down])
(define-key map "\e[1;5C" [C-right])
(define-key map "\e[1;5D" [C-left])
(define-key map "\e[5A" [C-up])
(define-key map "\e[5B" [C-down])
(define-key map "\e[5C" [C-right])
(define-key map "\e[5D" [C-left])))
(add-hook 'after-make-console-frame-hooks
(lambda ()
(when (< emacs-major-version 23)
(fix-up-xterm-control-arrows))
(xterm-mouse-mode 1) ; Mouse in a terminal (Use shift to paste with middle button)
(when (fboundp 'mwheel-install)
(mwheel-install))))
(provide 'init-xterm)