all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: "Jan D." <jan.h.d@swipnet.se>
Cc: emacs-devel@gnu.org
Subject: Re: [mega@hotpop.com: Re: x-backspace-delete-keys-p]
Date: Sat, 5 Feb 2005 19:08:14 +0100	[thread overview]
Message-ID: <7883d812b65fe2b1bbddbc18cf272ece@swipnet.se> (raw)
In-Reply-To: <E1CxTsv-0001O9-9w@fencepost.gnu.org>

>     The code could be modified to check for different keysyms for 
> delete and
>     backspace, but I'm not sure what problem it is trying to solve.  
> Doesn't
>     the current code work?
>
> He had a case where it did not work.
> Here is the report.
>


Note that the XKeysymToKeycode function does not take any modifiers 
(Shift, Control, Mode Switch etc) in to account, so if I have XK_Delete 
mapped to Shift-Control-Mod1-d, XKeysymToKeycode will return the key 
for d.  So the question is rather what
x-backspace-delete-keys-p is supposed to test.  Here is the doc:

  doc: /* Check if both Backspace and Delete keys are on the keyboard of 
FRAME.
FRAME nil means use the selected frame.
Value is t if we know that both keys are present, and are mapped to the
usual X keysyms.  */

Currently it checks if the keyboard physically has a backspace and 
delete key and that they generate backspace and delete respectively.
The patch suggested would instead check that both backspace and delete 
can be generated by any key combination.  This is not what the doc: 
says today.

I have no objection to such a change, it would probably not make any 
difference in the majority of cases.

	Jan D.


> I have a funky keyboard layout (mimicking a lisp machine keyboard) 
> where
> backspace is mapped onto the caps lock key and nothing is on the 
> backspace
> key. With this layout the x-backspace-delete-keys-p function (in 
> xfns.c)
> returns false which causes normal-erase-is-backspace-mode not to be 
> turned
> on by default.
>
> Looking at the code, it seems that x-backspace-delete-keys-p checks 
> whether
> the keyboard has a delete and backspace key and XK_Delete/XK_Backspace 
> is
> mapped onto them. I don't know much about other keyboards but checking 
> only
> whether XK_Delete/XK_Backspace is mapped to a keycode that belongs to 
> _any_
> key in the current keyboard sounds enough. In other words, checking for
> DELE/BKSP keys is unnecessary.

  reply	other threads:[~2005-02-05 18:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-03 19:14 [mega@hotpop.com: Re: x-backspace-delete-keys-p] Richard Stallman
2005-02-03 20:28 ` Jan D.
2005-02-03 20:35   ` Jan D.
2005-02-05 17:38   ` Richard Stallman
2005-02-05 18:08     ` Jan D. [this message]
2005-02-06 12:42       ` Richard Stallman
2005-02-06 14:27         ` Jan D.
2005-02-07  9:18           ` Richard Stallman
2005-02-07 12:50             ` Jan D.

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=7883d812b65fe2b1bbddbc18cf272ece@swipnet.se \
    --to=jan.h.d@swipnet.se \
    --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 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.