### /etc/console-setup/remap.inc ## ## this file: http://user.it.uu.se/~embe8573/conf/remap.inc ## ## All (?) VT files: http://user.it.uu.se/~embe8573/conf/vt ## ## * Edit this file to get additional shortcuts in ## a tty Emacs (Linux VT) instance. HOWTO tutorial: ## ## ~/public_html/tty-emacs-keys.txt ## http://user.it.uu.se/~embe8573/tty-emacs-keys.txt ## ## * also: /etc/default/keyboard - the X and VT keyboard ## /etc/default/console-setup - VT font, charmap, etc ## ## * "ctrll" below makes it work even when caps-locked ## Update: I got rid of caps altogether since I wrote this, ## but it looks like this: ## ## ctrll alt keycode 36 = Decr_Console ## alt keycode 36 = Decr_Console ## ## that is, both lines should be provided. ## ## * get the keycode with showkey(1) [1] ## ## * on-the-fly update: ## loadkeys -c -s KEYFILE ## # or invoke 'lkeys', defined in ~/.zprofile line ~10 ## # http://user.it.uu.se/~embe8573/conf/.zprofile ## ## * get the new shortcuts available in Emacs: ## ## ~/.emacs.d/emacs-init/console-keys.el ## http://user.it.uu.se/~embe8573/conf/emacs-init/console-keys.el ## ## ~/.emacs.d/emacs-init/global-keys.el ## http://user.it.uu.se/~embe8573/conf/emacs-init/global-keys.el ## ### # string show off stuff string F2 = "Word on the street, Staffan is gay" # Linux VTs (ttys; and, X - start X in ~/.zprofile) alt keycode 38 = Incr_Console # M-l - cycle right alt keycode 36 = Decr_Console # M-j - cycle left alt keycode 18 = Console_1 # M-e - tty/Emacs control alt keycode 39 = Console_5 # C-M-; - tty/play-music alt keycode 22 = Console_6 # M-u - X/xterm/tmux/zsh # Shortcuts in ~/.xbindkeysrc - # http://user.it.uu.se/~embe8573/conf/.xbindkeysrc - # make it possible to go from X back to tty1 # and tty5 with the same keys as above. # # From X to tty1 - M-e # tty5 - M-j # # (Also, in tty1, M-j is tty7, i.e. X.) # disable right-side prefix keys # so not touched accidentally keycode 100 = nul # Meta keycode 126 = nul # Ctrl # make M-S-RET work alt shift keycode 28 = U+1000 # TAB alt keycode 15 = U+1003 # M-TAB control keycode 15 = U+011D # C-TAB shift keycode 15 = U+010E # backtab # C control keycode 11 = U+1002 # C-0 control keycode 13 = U+011E # C-= control keycode 23 = U+1001 # C-i control keycode 26 = U+1005 # C-[ control keycode 39 = U+010F # C-; control keycode 50 = U+0110 # C-m (prevent RET on C-m) control keycode 51 = U+0111 # C-. control keycode 52 = U+0115 # C-, control keycode 53 = U+0114 # C-/ # CAPS (NOTE: Don't change the order of these three!) keycode 58 = U+0113 # CAPS (ē) shift keycode 58 = U+0116 # S-CAPS alt keycode 58 = U+00E2 # M-CAPS (â) # SPC control alt keycode 57 = U+1006 ### compose key ## ## To get the compose up, enable it in ## /etc/default/keyboard - ## http://user.it.uu.se/~embe8573/conf/keyboard - ## if that doesn't work, use showkey(1) to get ## the keycode of the desired key, and: keycode 125 = Compose ## Output current state: 'dumpkeys --compose-only' [1] ## ## Now setup the combinations one by one! ## S compose '/' 'S' to U+015A # Ś - acute compose '/' 's' to U+015B # ś ## Æ compose 'A' 'E' to U+00C6 # Æ compose 'a' 'e' to U+00E6 # æ ## Å compose '0' 'A' to U+00C5 # Å - ring compose '0' 'a' to U+00E5 # å compose 'o' 'A' to U+00C5 # Å compose 'o' 'a' to U+00E5 # å ## Ä compose '"' 'A' to U+00C4 # Ä - diaeresis compose '"' 'a' to U+00E4 # ä ## Ö compose '"' 'O' to U+00D6 # Ö - diaeresis compose '"' 'o' to U+00F6 # ö ## U compose '"' 'U' to U+00DC # Ü - diaeresis compose '"' 'u' to U+00FC # ü compose '/' 'U' to U+00DA # Ú - acute compose '/' 'u' to U+00FA # ú ## more As compose '/' 'A' to U+00C1 # Á - acute compose '/' 'a' to U+00E1 # á compose '\\' 'A' to U+00C0 # À - grave compose '\\' 'a' to U+00E0 # à ## C compose '.' 'C' to U+00C7 # Ç - cedilla compose '.' 'c' to U+00E7 # ç compose '/' 'C' to U+0106 # Ć - acute compose '/' 'c' to U+0107 # ć ## E compose '/' 'E' to U+00C9 # É compose '/' 'e' to U+00E9 # é - acute compose '\\' 'E' to U+00C8 # È - grave compose '\\' 'e' to U+00E8 # è ## I ## Note: Linux VT + I/i + grave = DNC compose '/' 'I' to U+00CD # Í - acute compose '/' 'i' to U+00ED # í ## O compose '-' 'O' to U+00D8 # Ø - stroke (slash) compose '-' 'o' to U+00F8 # ø compose '/' 'O' to U+00D3 # Ó - acute compose '/' 'o' to U+00F3 # ó compose 'i' 'O' to U+00D8 # Ø - stroke (old: slash) compose 'i' 'o' to U+00F8 # ø ## N compose '/' 'N' to U+0143 # Ń - acute compose '/' 'n' to U+0144 # ń compose '~' 'N' to U+00D1 # Ñ - tilde compose '~' 'n' to U+00F1 # ñ ## [1] For it to work in a tmux session: ## $ sudo chmod +s /usr/bin/showkey /bin/dumpkeys