[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-<digit> key bindings not working on console
From: |
Javier |
Subject: |
Re: C-<digit> key bindings not working on console |
Date: |
Mon, 27 Jan 2014 08:59:44 +0000 (UTC) |
User-agent: |
tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/3.9.8-1-ARCH (x86_64)) |
You can edit us.kmap.gz (or whatever country keymap you are using).
Below is what I have in mine:
Then rename the file to personal.kmap.gz and load it with
loadkeys personal.kmap.gz
Then in .emacs write:
(define-key function-key-map "\eO5A" '[C-up])
(define-key function-key-map "\eO5B" '[C-down])
(define-key function-key-map "\eO5C" '[C-right])
(define-key function-key-map "\eO5D" '[C-left])
(define-key function-key-map "\eO3A" '[M-up])
(define-key function-key-map "\eO3B" '[M-down])
(define-key function-key-map "\eO3C" '[M-right])
(define-key function-key-map "\eO3D" '[M-left])
(define-key function-key-map "\eO2A" '[S-up])
(define-key function-key-map "\eO2B" '[S-down])
(define-key function-key-map "\eO2C" '[S-right])
(define-key function-key-map "\eO2D" '[S-left])
You can see the characters a key compination produces with
cat > /dev/null
^[O5D
^[O5C
^[O5A^[O5B
and Control-D to finish. If you see nothing,
then you need to change the keymap. C-0, C-1 give nothing in Linux console.
It is a bit painful, but at the end it works.
---------------------------------------------------
keycode 103 = Up
Alt keycode 103 = F49
Shift keycode 103 = F53
Control keycode 103 = F57
keycode 108 = Down
Alt keycode 108 = F50
Shift keycode 108 = F54
Control keycode 108 = F58
keycode 106 = Right
alt keycode 106 = Incr_Console
Shift keycode 106 = F55
Control keycode 106 = F59
keycode 105 = Left
alt keycode 105 = Decr_Console
Shift keycode 105 = F56
Control keycode 105 = F60
string F49 = "\033O3A"
string F50 = "\033O3B"
string F53 = "\033O2A"
string F54 = "\033O2B"
string F55 = "\033O2C"
string F56 = "\033O2D"
string F57 = "\033O5A"
string F58 = "\033O5B"
string F59 = "\033O5C"
string F60 = "\033O5D"
string F80 = "\033O2E"
- Re: C-<digit> key bindings not working on console, (continued)
Re: C-<digit> key bindings not working on console, Stefan Monnier, 2014/01/23
Message not available
Re: C-<digit> key bindings not working on console,
Javier <=