From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Max Nikulin Newsgroups: gmane.emacs.devel Subject: Re: Keybindings and changing keyboard layout [was: Writting Greek in Emacs] Date: Tue, 24 Sep 2024 11:22:12 +0700 Message-ID: References: <87frpvk8l9.fsf@thanosapollo.org> <87zfo1khkd.fsf@thanosapollo.org> <86o74ggbak.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7944"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mozilla Thunderbird To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Tue Sep 24 13:10:03 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 1st3Qh-0001vc-C6 for ged-emacs-devel@m.gmane-mx.org; Tue, 24 Sep 2024 13:10:03 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1st3Q0-00034k-HX; Tue, 24 Sep 2024 07:09:20 -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 1ssx4D-0001jd-2K for emacs-devel@gnu.org; Tue, 24 Sep 2024 00:22:25 -0400 Original-Received: from ciao.gmane.io ([116.202.254.214]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ssx4B-0002o6-7s for emacs-devel@gnu.org; Tue, 24 Sep 2024 00:22:24 -0400 Original-Received: from list by ciao.gmane.io with local (Exim 4.92) (envelope-from ) id 1ssx48-0001W4-Bv for emacs-devel@gnu.org; Tue, 24 Sep 2024 06:22:20 +0200 X-Injected-Via-Gmane: http://gmane.org/ Content-Language: en-US, ru-RU In-Reply-To: Received-SPF: pass client-ip=116.202.254.214; envelope-from=ged-emacs-devel@m.gmane-mx.org; helo=ciao.gmane.io X-Spam_score_int: 26 X-Spam_score: 2.6 X-Spam_bar: ++ X-Spam_report: (2.6 / 5.0 requ) BAYES_00=-1.9, DKIM_ADSP_CUSTOM_MED=0.001, FORGED_GMAIL_RCVD=1, FORGED_MUA_MOZILLA=2.309, FREEMAIL_FORGED_FROMDOMAIN=0.001, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.237, NML_ADSP_CUSTOM_MED=0.9, RCVD_IN_VALIDITY_CERTIFIED_BLOCKED=0.001, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Tue, 24 Sep 2024 07:09:18 -0400 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:324014 Archived-At: On 23/09/2024 12:54, tomas@tuxteam.de wrote: > I haven't yet found the time to read into bug#43830, on the road ATM. "wish: right alt/meta to switch keyboard layout while pressed" linked from this bug is a more detailed discussion. Earlier I was aware only of "Keybindings in non-Latin layout" Another thread from 2021 for completeness: "not quite understanding input methods" > On Sun, Sep 22, 2024 at 06:29:17PM +0700, Max Nikulin wrote: >> As a workaround, I have a tiny tool that is invoked in response to >> ISO__Group as global shortcuts and if the active >> window is Emacs then it forces "us" layout and sends another unique key (to >> switch Emacs input method) using XTest extension. > Ugh. They all don't feel pretty. I'm tempted to just put that into my muscle > memory and just switch keyboard layout when necessary. It's just one keystroke > more, and people with some vi experience have a "mode switch" place in their > brains anyway :-) A similar problem exists in Vim as well. It has its own "keyboard layout" switch C-^ (:set keymap), :set langmap to alleviate the issue with alternative layout active at the XKB layer, and various tricks to change XKB layout on switch from insert to normal mode My perception is that heavy usage of modifiers and multikey bindings in Emacs outweighs necessity to escape from insert mode in Vim, so switching keyboard for any command is more annoying. On 21/09/2024 12:40, tomas@tuxteam.de wrote: > Surprisingly, some applications seem to magically "cope" in some way. In > Firefox, CTRL-τ opens a new tab (as CTRL-t would do under a Latin layout). > But this doesn't really count: Firefox has just a few useful keybindings > and the whole model actually discourages using them, while Emacs has > a very rich set of bindings which is at the core of its user interaction. Most of applications, including Firefox, use Alt+something to access menus and accelerator keys for selecting menu items. It requires switching keyboard layout to match application locale and it is pain. Only some hotkeys work with both keyboard layouts.