From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Cecilio Pardo Newsgroups: gmane.emacs.bugs Subject: bug#74423: Low level key events Date: Wed, 4 Dec 2024 22:25:32 +0100 Message-ID: <162dada7-ad54-4ca5-8f11-d55dd6dccb3c@imayhem.com> References: <31bdc55d-8c13-4de0-9cef-bd6cc4fb033f@imayhem.com> <705fabb8-1ea0-4894-8c32-05097ab822c9@imayhem.com> <868qsvz07i.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="14798"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird Cc: luangruo@yahoo.com, 74423@debbugs.gnu.org, monnier@iro.umontreal.ca To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Wed Dec 04 22:26:23 2024 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tIwt4-0003gf-QN for geb-bug-gnu-emacs@m.gmane-mx.org; Wed, 04 Dec 2024 22:26:22 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1tIwsm-00019n-S0; Wed, 04 Dec 2024 16:26:05 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tIwsk-00018d-Ev for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 16:26:02 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1tIwsk-0006tH-5f for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 16:26:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=debbugs.gnu.org; s=debbugs-gnu-org; h=In-Reply-To:From:References:MIME-Version:Date:To:Subject; bh=nDxNoHEjq0rLonDp3AIqDupyZCQ+Wnqu1lij8y0WiGY=; b=pwlUMTotFwwsiLVNBNmq1+X9k5PevGvkcJUbTzTmHVrTddX0O0pHO06IeR+9pIkyDNFoK2QEil6eoEdu/LT27vRYSIw85SXJqzONvF3QU2BlQRmy1f6BhfBQq03mmxnCl3i5b4xkhDyGPQEmDysUtrFXjRF4PrjuDY6QyDdyisUr/0KL1LXig8uqF7RnBqKNkCh1wXzNKLS6YiI/4BKzLMTOPWJQTZ5qugy9KW0WjUsrDwm/c+WnacZsIBXgZl1Cc5y/pjNkMnb25w8mFBcbTeVuFN1Mbb5UWUMJ7+nvqHQjebIqDbMOStTVkvQ/iywH67ZrOkClaOExyCsLeCNETw==; Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1tIwsj-0000RO-M0 for bug-gnu-emacs@gnu.org; Wed, 04 Dec 2024 16:26:01 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Cecilio Pardo Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 04 Dec 2024 21:26:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 74423 X-GNU-PR-Package: emacs Original-Received: via spool by 74423-submit@debbugs.gnu.org id=B74423.17333475411655 (code B ref 74423); Wed, 04 Dec 2024 21:26:01 +0000 Original-Received: (at 74423) by debbugs.gnu.org; 4 Dec 2024 21:25:41 +0000 Original-Received: from localhost ([127.0.0.1]:37083 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIwsO-0000Qb-IQ for submit@debbugs.gnu.org; Wed, 04 Dec 2024 16:25:40 -0500 Original-Received: from mail.imayhem.com ([82.223.54.191]:42839 helo=zealous-pike.82-223-54-191.plesk.page) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tIwsL-0000QJ-Hq for 74423@debbugs.gnu.org; Wed, 04 Dec 2024 16:25:38 -0500 Original-Received: from [192.168.68.104] (111.red-88-21-7.staticip.rima-tde.net [88.21.7.111]) by zealous-pike.82-223-54-191.plesk.page (Postfix) with ESMTPSA id BFD0780108; Wed, 4 Dec 2024 21:25:31 +0000 (UTC) Authentication-Results: zealous-pike.82-223-54-191.plesk.page; spf=pass (sender IP is 88.21.7.111) smtp.mailfrom=cpardo@imayhem.com smtp.helo=[192.168.68.104] Received-SPF: pass (zealous-pike.82-223-54-191.plesk.page: connection is authenticated) Content-Language: es-ES In-Reply-To: <868qsvz07i.fsf@gnu.org> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:296435 Archived-At: On 04/12/2024 21:01, Eli Zaretskii wrote: >> + DEFVAR_LISP ("enable-low-level-key-events", Venable_low_level_key_events, >> + doc: /* If non-nil, reception of low-level key events is enabled. >> + >> +The value configures the set of keys that are handled: >> + >> +If t, send events for all keys. >> + >> +If a number, send events for the corresponding keysym. When calling >> +'llk-init', a set of variables with the xk- prefix is initialized with >> +the numeric values for keysyms. This numbers are platform dependent. > > This seems to say that it is impossible to make the value do the same > on all platforms? If so, I think it's less useful than it could be, > because Emacs generally tries to abstract platform-specific issues as > much as possible, to facilitate platform-independent Lisp programs > that work the same on all supported systems. > > Also, there's no information here where to find the list of these xk- > numbers. Those are variables, like xk-shift-l, xk-a, xk-f1. There is also llk-keysyms, that has a list of all xk-* symbols and their numeric values. llk-init initializes all of these variables, using numbers that are platform dependent (XK_* constant KeySyms for X, VK_* "virtual keys" for windows. GDK keys match X keys. Numbers are different, but users should use the variables, not the numbers, for binding and comparing to event values. I can translate the Windows numbers to the X equivalents, so that they are equal on both platforms. In any case, I will document this better, with a manual change proposal.