;;; -*- lexical-binding: t -*- ;; ;; this file: ;; https://dataswamp.org/~incal/emacs-init/console-keys.el ;; ;; Edit this file to get additional shortcuts in a tty Emacs. ;; ;; tutorial: ;; https://dataswamp.org/~incal/tty-emacs-keys.txt ;; M-S-RET - this is a demo (keymap-set input-decode-map (char-to-string ?\u1000) "M-S-") (keymap-global-set "M-S-" (lambda () (interactive) (message "hit M-S-"))) ;; C- (keymap-set input-decode-map (char-to-string ?\u0114) "C-") (keymap-set input-decode-map (char-to-string ?\u0115) "C-") (keymap-set input-decode-map (char-to-string ?\u011E) "C-") (keymap-set input-decode-map (char-to-string ?\u1002) "C-") ;; don't use these directly, use rewrites: ;; C-; = ^[ = 27 = ESC ;; C-[ = ^[ = 27 = ESC ;; C-i = ^I = 09 = TAB ;; C-m = ^M = 13 = RET (keymap-set input-decode-map (char-to-string ?\u010F) "C-") (keymap-set input-decode-map (char-to-string ?\u1005) "C-") (keymap-set input-decode-map (char-to-string ?\u1001) "C-") (keymap-set input-decode-map (char-to-string ?\u0110) "C-") ;; C-M- (keymap-set input-decode-map (char-to-string ?\u1006) "C-M-") ;; TAB ;; don't use M-TAB (keymap-set input-decode-map (char-to-string ?\u010E) "") (keymap-set input-decode-map (char-to-string ?\u011D) "C-") (keymap-set input-decode-map (char-to-string ?\u1003) "M-") ;; CAPS (keymap-set input-decode-map (char-to-string ?\u00E2) "M-") (keymap-set input-decode-map (char-to-string ?\u0113) "") (keymap-set input-decode-map (char-to-string ?\u0116) "S-") (provide 'console-keys)