help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: C-<digit> key bindings not working on console


From: Emanuel Berg
Subject: Re: C-<digit> key bindings not working on console
Date: Mon, 27 Jan 2014 17:50:07 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

Thorsten Jolitz <tjolitz@gmail.com> writes:

> One annoying thing is that M-<arrow-keys>
> (i.e. Alt-<arrow-keys>) are at least partly
> (left-arrow, right-arrow) occupied by the system, in
> my case Archlinux, for switching between tty's.

You can change that as well. I think the arrow keys
suck because then you have to move your right hand back
and forth from typing position (not as bad as reaching
for the mouse, but bad enough for me to never use those
keys, just as I never use the function keys or the
numpad) - so I setup Alt/M-j and -l to iterate
consoles, and Alt/M-u to go to X. (Then, in urxvt in X,
I have the same shortcut to go to Emacs in tty1.)
[Really I should say Alt because I run Emacs in tty1,
and in the ttys, including tty1, the "tty global"
keymap keystrokes take precedence.]

If you want to drop the tty use of the arrow keys, find
out what keycodes they are with 'showkey', then set it
all up anew. Here is how I did it, or sort of that,
anyway:

## Linux VTs
# J - Emacs to the leftmost (in tty1)...
alt keycode 36       = Decr_Console
ctrll alt keycode 36 = Decr_Console
# L - ... tmux/zsh to the right (tty2-tty6)
alt keycode 38       = Incr_Console
ctrll alt keycode 38 = Incr_Console
## M-u - X (tty7)
alt keycode 22        = Console_7
ctrll alt keycode 22  = Console_7

The double entries are to make it work with caps. But,
I dropped that key, so perhaps that's redundant for
me. Ah, let's keep it.

> That is convenient, but for an Org-mode user these
> key-combos are much more important inside Org-mode
> than for tty-navigation.

If you are able to drop them in the keymap, they should
work in Emacs without any setup. Try to keycode them to
themselves: keycode 105 = 105 (and ditto 106) - that
might work.

-- 
underground experts united:
http://user.it.uu.se/~embe8573


reply via email to

[Prev in Thread] Current Thread [Next in Thread]