unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@iro.umontreal.ca>
To: emacs-devel@gnu.org
Subject: Of keyboards and terminals
Date: Sat, 23 Feb 2008 20:30:56 -0500	[thread overview]
Message-ID: <jwv3arjkw4h.fsf-monnier+emacs@gnu.org> (raw)


We currently have a slightly odd situation:

In 99% of the cases, each keyboard object has a single terminal object
and each terminal has a single keyboard.  But in some rare cases,
several terminals can share a single keyboard.  See the same_x_server
function in xterm.c.

This can be the case when you have different connections to the same
X server.  This can happen if you make a frame on unix:0 and then
another frame on localhost:0 and yet another on <myhostname>:0.  This is
not very common, tho.

A more significant situation is when you have a multi-screen setup such
that you can make a frame on :0.0 and another on :0.1 and yet another
on :0.2.  These *require* separate terminal objects (and separate
X connections).

So in those particular cases, Emacs shares a single keyboard object
between those different terminal objects.  The intent of sharing
a single keyboard has mostly to do with the fact that once a command is
started, Emacs is put into "single-keyboard" mode so that all the input
coming from other keyboards is temporarily delayed.

As far as I can tell, this is the only benefit.

The problem is that variables like function-key-map are not
terminal-local (as people often think) but keyboard-local instead.
OTOH they're initialized per-terminal, and there is generally some
confusion between pr-keyboard and per-terminal objects and actions.

So I'm thinking of eliminating the special case that shares the keyboard
among different X11 connections to the same underlying server: the
sharing does make sense, but its benefit doesn't seem to justify the
resulting complexity.


        Stefan




             reply	other threads:[~2008-02-24  1:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-24  1:30 Stefan Monnier [this message]
2008-02-24 22:30 ` Of keyboards and terminals Richard Stallman

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=jwv3arjkw4h.fsf-monnier+emacs@gnu.org \
    --to=monnier@iro.umontreal.ca \
    --cc=emacs-devel@gnu.org \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).