all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* How does the Meta/Alt-Key work behind the scenes?
@ 2012-10-31  8:44 Thorsten Jolitz
  0 siblings, 0 replies; 7+ messages in thread
From: Thorsten Jolitz @ 2012-10-31  8:44 UTC (permalink / raw
  To: help-gnu-emacs


Hi List, 

I'm trying to emulate the (most basic) Emacs keybindings for the
commandline of another Lisp dialect. Most of the functionality is
already there, I only have to adopt the keybindings. This works fine
with the 'Control' prefix, e.g. 'C-f' or 'C-b' (I can write them down as
^f and ^b). I can even emulate key-chords by waiting for the second key,
e.g. 'C-x', wait 500, if next key is 'u' -> undo (C-x u).

But I would like to have 'M-f', 'M-b', 'M-d' etc. as well, and maybe
even 'C-M-f' and 'C-M-b'. 

Now, I'm writing this in Emacs/GNUS in a TMUX managed console session, and I
can use my ALT keys for all the 'M-<x>' keybindings given in the last
paragraph, and of course it works in an X11 session too. Even bindings
like 'M-S-5' ('M-%') work on the console. 

However, I was told to hardcode the Meta/Alt-Keybindings as ESC-key
sequences, e.g. '^[', wait 500, then 'f', so that they can either be
used as 'ALT-f' or as 'ESC f'. But only the latter (very uncomfortable)
option works for me, and any keybindings that include the SHIFT key
don't work at all.

How did they do it in Emacs to make the 'M' and 'S' bindings work even
on the console? My keyboard seems to send the right signals, how would
Emacs recognize the keys otherwise - but why do 'M' and 'S' seem to be
dead in my own implementation?

Thanks for any hints. 

-- 
cheers,
Thorsten





^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <mailman.12043.1351673061.855.help-gnu-emacs@gnu.org>]

end of thread, other threads:[~2012-10-31 19:32 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-31  8:44 How does the Meta/Alt-Key work behind the scenes? Thorsten Jolitz
     [not found] <mailman.12043.1351673061.855.help-gnu-emacs@gnu.org>
2012-10-31 15:02 ` Stefan Monnier
2012-10-31 16:24   ` Thorsten Jolitz
     [not found]   ` <mailman.12074.1351700673.855.help-gnu-emacs@gnu.org>
2012-10-31 16:51     ` William Gardella
2012-10-31 17:43       ` Thorsten Jolitz
2012-10-31 18:00     ` Stefan Monnier
2012-10-31 19:32       ` Thorsten Jolitz

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.