all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Stefan Monnier <foo@acm.com>" <monnier+gnu.emacs.help/news/@flint.cs.yale.edu>
Subject: Re: S-up and emacs -nw?
Date: 21 Oct 2002 09:22:28 -0400	[thread overview]
Message-ID: <5lr8ek9baj.fsf@rum.cs.yale.edu> (raw)
In-Reply-To: uvg3yvasg.fsf@terrapin.northbound-train.com

>>>>> "Joe" == Joe Casadonte <jcasadonte@northbound-train.com> writes:
> 2) What's the relationship between terminal type, loadkey/keymap,
>    and termcap/terminfo?

The terminfo data tells the application what code to send to display
what it wants (i.e. how to clear the screen, how to advance by one char,
...) as well as what the terminal sends for some special keys.
This second part only covers a few "standard" keys but not all.
So the terminal might be able to generate some key-codes which the
application will not understand (at least not by looking at terminfo).
In the case of Emacs, you can tell it what those codes mean via
function-key-map which is initialized based on the terminfo database.

>    change the keymap and expect whatever program is running to
>    suddenly be able to generate those sequences?

The program does not generate those sequences, it only receives them
and has to interpret them.  You hit a key -> the terminal
emulator (in your case it's mostly all in the Linux kernel) notices it
-> looks up the keymap you've defined via loadkeys to know which
byte-sequence to use for it -> and sends to the application the
corresponding byte-sequence.

I.e. you need to invent unused byte-sequences for each new key you want to
handle, and then tell loadkeys how to map the key to the byte-sequence and
tell Emacs's function-key-map how to map the byte-sequence back to the key.


        Stefan

  parent reply	other threads:[~2002-10-21 13:22 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-10-13 20:39 S-up and emacs -nw? Joe Casadonte
2002-10-13 21:09 ` Stefan Monnier <foo@acm.com>
2002-10-14  2:18   ` Joe Casadonte
2002-10-14  4:09     ` Stefan Monnier <foo@acm.com>
2002-10-14  5:49       ` Fredrik Staxeng
2002-10-14 13:45       ` Joe Casadonte
2002-10-14 15:08         ` Ehud Karni
2002-10-14 15:34         ` Stefan Monnier <foo@acm.com>
2002-10-14 18:56         ` Fredrik Staxeng
2002-10-14 20:00         ` Alan Mackenzie
     [not found]         ` <mailman.1034608215.19174.help-gnu-emacs@gnu.org>
2002-10-19 13:05           ` Joe Casadonte
2002-10-19 16:44             ` Fredrik Staxeng
2002-10-19 21:03               ` Joe Casadonte
2002-10-20 12:33                 ` Fredrik Staxeng
2002-10-20 15:08                   ` ken
2002-10-20 16:01                   ` Joe Casadonte
2002-10-20 17:10                     ` Fredrik Staxeng
2002-10-21  0:24                       ` Joe Casadonte
2002-10-21 22:01                       ` Alan Mackenzie
2002-10-22  7:12                         ` Fredrik Staxeng
2002-10-22 18:58                           ` Alan Mackenzie
2002-10-21 13:22             ` Stefan Monnier <foo@acm.com> [this message]
2002-10-14 18:47     ` Alex Schroeder

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5lr8ek9baj.fsf@rum.cs.yale.edu \
    --to=monnier+gnu.emacs.help/news/@flint.cs.yale.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.