From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43830: keyboard layout handling incompatible with rest of the OS Date: Sun, 01 Nov 2020 19:24:52 +0200 Message-ID: <83blghf0rf.fsf@gnu.org> References: <87h7r78a5y.fsf@mail.linkov.net> <87imbn2iwm.fsf@mail.linkov.net> <87y2kisawy.fsf@mail.linkov.net> <83362qa073.fsf@gnu.org> <87blhdrhww.fsf@mail.linkov.net> <83362p85l3.fsf@gnu.org> <83y2jqcrvn.fsf@gnu.org> <87blghbjpn.fsf@mail.linkov.net> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="6813"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43830@debbugs.gnu.org, juri@linkov.net To: Paul Pogonyshev Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 01 18:26:10 2020 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 1kZH7J-0001dX-GJ for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 18:26:09 +0100 Original-Received: from localhost ([::1]:51460 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZH7I-0005yc-FT for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 01 Nov 2020 12:26:08 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:49224) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kZH7C-0005yJ-KN for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 12:26:02 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:55057) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kZH7C-00042s-BM for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 12:26:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kZH7C-0002ho-8e for bug-gnu-emacs@gnu.org; Sun, 01 Nov 2020 12:26:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 01 Nov 2020 17:26:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43830 X-GNU-PR-Package: emacs Original-Received: via spool by 43830-submit@debbugs.gnu.org id=B43830.160425151610344 (code B ref 43830); Sun, 01 Nov 2020 17:26:02 +0000 Original-Received: (at 43830) by debbugs.gnu.org; 1 Nov 2020 17:25:16 +0000 Original-Received: from localhost ([127.0.0.1]:38370 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZH6R-0002gm-Oa for submit@debbugs.gnu.org; Sun, 01 Nov 2020 12:25:15 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:49002) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kZH6Q-0002gX-1i for 43830@debbugs.gnu.org; Sun, 01 Nov 2020 12:25:14 -0500 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:57903) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kZH6J-0003lT-Gr; Sun, 01 Nov 2020 12:25:07 -0500 Original-Received: from [176.228.60.248] (port=2408 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kZH6H-0003us-CG; Sun, 01 Nov 2020 12:25:07 -0500 In-Reply-To: (message from Paul Pogonyshev on Sun, 1 Nov 2020 17:51:00 +0100) 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" Xref: news.gmane.io gmane.emacs.bugs:192418 Archived-At: > From: Paul Pogonyshev > Date: Sun, 1 Nov 2020 17:51:00 +0100 > Cc: Eli Zaretskii , 43830@debbugs.gnu.org > > > > What about functions like `read-event'? It returns integers if I press > > > M-[letter] or C-[letter]. > > > > read-event is also implemented in C. But maybe I don't understand > > your question. > > I mean, what about the cases where it is called from Elisp? It is > implemented in C, but also is publicly available. > > I have come up with two ideas: > > 1. `read-event' and its internal C implementation grow an optional > parameter that says whether to return character as if being typed (as > now) or for keybinding use (i.e. from physical keys). > > 2. Alternatively, if this cannot be determined in advance (i.e. before > calling `read-event' etc.), these functions could set variable named sth. > like `last-keybinding-keycode'. Then the caller would use either the > return value (as now) or, if it wants, the value of the variable instead. What I had in mind was 0. read-event will figure out by itself whether it should return the ASCII character or a non-ASCII character, and return that.