From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: [mega@hotpop.com: Re: x-backspace-delete-keys-p] Date: Sat, 5 Feb 2005 19:08:14 +0100 Message-ID: <7883d812b65fe2b1bbddbc18cf272ece@swipnet.se> References: <42028965.2060902@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v619.2) Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1107626958 11497 80.91.229.2 (5 Feb 2005 18:09:18 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 5 Feb 2005 18:09:18 +0000 (UTC) Cc: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Feb 05 19:09:18 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1CxUMq-0001fK-N8 for ged-emacs-devel@m.gmane.org; Sat, 05 Feb 2005 19:09:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxUac-0004fP-CN for ged-emacs-devel@m.gmane.org; Sat, 05 Feb 2005 13:23:26 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CxUaJ-0004af-85 for emacs-devel@gnu.org; Sat, 05 Feb 2005 13:23:07 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CxUaH-0004ZY-Hr for emacs-devel@gnu.org; Sat, 05 Feb 2005 13:23:05 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CxUaH-0004Z5-D7 for emacs-devel@gnu.org; Sat, 05 Feb 2005 13:23:05 -0500 Original-Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CxUM3-0002kk-Ov; Sat, 05 Feb 2005 13:08:24 -0500 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep01.bredband.com with ESMTP id <20050205180821.ZJFX23903.mxfep01.bredband.com@coolsville.localdomain>; Sat, 5 Feb 2005 19:08:21 +0100 In-Reply-To: Original-To: rms@gnu.org X-Mailer: Apple Mail (2.619.2) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:32917 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:32917 > 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.