From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: Physical keyboard events Date: Thu, 31 Oct 2024 13:13:04 +0700 Message-ID: References: <86r07z58or.fsf@gnu.org> <86froe6eq3.fsf@gnu.org> <864j4u6bug.fsf@gnu.org> <86sesd4nmy.fsf@gnu.org> <86frod4hl9.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="28820"; mail-complaints-to="usenet@ciao.gmane.io" Cc: manikulin@gmail.com, emacs-devel@gnu.org To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Thu Oct 31 07:14:05 2024 Return-path: Envelope-to: ged-emacs-devel@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 1t6ORX-0007Mm-AI for ged-emacs-devel@m.gmane-mx.org; Thu, 31 Oct 2024 07:14:03 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6OQt-00014N-7S; Thu, 31 Oct 2024 02:13:23 -0400 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 1t6OQq-000127-96 for emacs-devel@gnu.org; Thu, 31 Oct 2024 02:13:20 -0400 Original-Received: from mail-ua1-x92a.google.com ([2607:f8b0:4864:20::92a]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1t6OQo-00025c-81; Thu, 31 Oct 2024 02:13:19 -0400 Original-Received: by mail-ua1-x92a.google.com with SMTP id a1e0cc1a2514c-84fdb038aaaso133142241.3; Wed, 30 Oct 2024 23:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1730355196; x=1730959996; darn=gnu.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=0Dsv0t7ho1mKq3eb6bSkgaVBYAb6QJ4JQp2UxBBOGqg=; b=hZL77wQBPrJdh+BUnaef/30fQ7O5aIwVNbyUlsfpWf6fNJSwnhg/f7KURrIOw6I1uG HgFRy3XxR/wBip5gA0FIuDivuPKBh8BUPp4/TDkzm8JHnJOipfa5hBRCrFED45oNGSjw MrdStF/DeAVmJfMKidAmYZ6tQXG1kbeUwn8hU/1NOiXQ8oTh2y6xwpsMATLSUFVyP1th +vwTfeGtCBJnYIlfOQoN8GnL9EI2qbqbcA/+mjc0dM59WZXdbBp1xAEtiX9S+x05TRaD 94HKjhRyecdg1KhuHWzDUUIZhRYoYzqdgmeEMajGyix+pTSIJm3+uBxLwbyYon3GsTa0 la2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730355196; x=1730959996; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=0Dsv0t7ho1mKq3eb6bSkgaVBYAb6QJ4JQp2UxBBOGqg=; b=jaN4W6KsxUNbaLN2G7whV2ig+aIa2F42zKsinGBhNJuMsptBLc5p0cL5PTzxiYIxmr JP0whRGXe8kzCBvD+SbnyiItxX2WJdgdwe0w7sARz461neyoeT+U0wm8R7Xv82W4kE8O hsvWx0ny/PaDSWKN89YsxoN0qHyK1j62Veo0IllzUgsXXA5Mkz0rNG7Hf5Gwc35Fqvos MgZrvqCrMmH1qxG9wlhMcskUBzNKwsNn8VnWbgEbGFb9Ue+DyiRFbehxCm+cfA2tc25P l5qEgyUaI04yq9A1oZ2X9iulDFxjwEGQ4FQP1AnxjkHnIlRdsDlveJ+rY7rCbwI4G1XP MlSg== X-Forwarded-Encrypted: i=1; AJvYcCUcoZBHSw2v3Dwi6ACSsolDfUiwq+2r6ro9qaXdjFjGsB2MjB3S3vGvlvmbHE2SsQCIWqrYZtEOgn5LUw==@gnu.org X-Gm-Message-State: AOJu0YyBmUBncEwkcN6XThbQpfBe8VYdPAo6hpyNYVv0hHPRHX934Dxw IRABgnIpiefHxWwO7rJlK1bGlTtAPgRP/fZxh8BFv/L549declFJZWw87XGl49kqbWGE5qd09p9 zKojl1/oZYSv49M8n8s4YfWO+DUUxhVNj X-Google-Smtp-Source: AGHT+IE+lW2HWJEEzXK5vWAjJVV//fzFdpJtp2yd88FCdQ6BeFSGly/5X/dBpGUOl3LqGDkFptMIMqF93z4JB2CtJw4= X-Received: by 2002:a05:6102:6d6:b0:4a3:c0f1:1583 with SMTP id ada2fe7eead31-4a8cfb48fc3mr18702708137.7.1730355196254; Wed, 30 Oct 2024 23:13:16 -0700 (PDT) In-Reply-To: <86frod4hl9.fsf@gnu.org> Received-SPF: pass client-ip=2607:f8b0:4864:20::92a; envelope-from=yurivkhan@gmail.com; helo=mail-ua1-x92a.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.devel:324955 Archived-At: On Thu, 31 Oct 2024 at 00:37, Eli Zaretskii wrote: > > * Look up the active modifiers + active group keysym. > > * If this yields =E2=80=98self-insert-command=E2=80=99 or another com= mand > > specifically whitelisted, return that. > > * Look up the active modifiers + keysym from the Latin-based group. Ret= urn that. > > How do you know which keymap to look up and for which character, > before you decide which character to produce? What seems to be the difficulty with the description above? The first lookup happens the same way as it currently does. For the second lookup, pretend the user remembered to switch to their preferred Latin-based layout before hitting the keys. > > Test case: If a mode keymap binds both =E2=80=98/=E2=80=99 and =E2=80= =98.=E2=80=99, and a key produces > > =E2=80=98/=E2=80=99 in the Latin layout and =E2=80=98.=E2=80=99 in Cyri= llic layout, then the =E2=80=98/=E2=80=99 > > command shall be executed regardless of whether Latin or Cyrillic > > layout is active. > > What if '/' is bound to self-insert-command, but '.' to something > else: what do you return then? What kind of mode would allow self-insertion for some characters but use others for commands? Like maybe Calc, where =E2=80=98.=E2=80=99 is the = decimal point but =E2=80=98/=E2=80=99 is the division command? In this case I think using =E2=80=98.=E2=80=99 for entering the decimal poi= nt wins, and the division command has to be invoked by either the kp-divide key or the {/ \} key. That is, calc-divide has to be whitelisted as invocable with the national layout.