From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Juri Linkov Newsgroups: gmane.emacs.devel Subject: Re: Physical keyboard events Date: Wed, 30 Oct 2024 21:36:18 +0200 Organization: LINKOV.NET Message-ID: <86frodqt71.fsf@mail.linkov.net> 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: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="2018"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu) Cc: Eli Zaretskii , Yuri Khan , manikulin@gmail.com, emacs-devel@gnu.org To: Dov Grobgeld Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Wed Oct 30 20:38:16 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 1t6EWG-0000LO-O4 for ged-emacs-devel@m.gmane-mx.org; Wed, 30 Oct 2024 20:38:16 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1t6EVX-0000Kv-Gt; Wed, 30 Oct 2024 15:37:31 -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 1t6EVV-0000KW-Or for emacs-devel@gnu.org; Wed, 30 Oct 2024 15:37:29 -0400 Original-Received: from relay9-d.mail.gandi.net ([2001:4b98:dc4:8::229]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1t6EVT-0003IE-H4; Wed, 30 Oct 2024 15:37:29 -0400 Original-Received: by mail.gandi.net (Postfix) with ESMTPSA id BA508FF805; Wed, 30 Oct 2024 19:37:21 +0000 (UTC) In-Reply-To: (Dov Grobgeld's message of "Wed, 30 Oct 2024 21:26:21 +0200") X-GND-Sasl: juri@linkov.net Received-SPF: pass client-ip=2001:4b98:dc4:8::229; envelope-from=juri@linkov.net; helo=relay9-d.mail.gandi.net X-Spam_score_int: -25 X-Spam_score: -2.6 X-Spam_bar: -- X-Spam_report: (-2.6 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-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:324950 Archived-At: > Switching to a different keyboard language causes all navigation > keyboard shortcuts to fail by default. This is why I found myself > adding the following to my .emacs file. I agree it would be nice if > there was some automatic way of creating this mapping, but using > keycodes, does not seem to be a correct way to do it. > > ;; some motion bindings in Hebrew mode that reflect key > ;; positions for Dvorak. > (global-set-key [(control ?ש)] 'move-beginning-of-line) > (global-set-key [(control ?ג)] 'move-end-of-line) > (global-set-key [(control ?ר)] 'previous-line) > (global-set-key [(control ?ך)] 'next-line) > (global-set-key [(control ?ה)] 'kill-line) > (global-set-key [(control ?ף)] 'isearch-forward) > (global-set-key [(control ?ם)] 'isearch-backward) > (global-set-key [(control ?ץ)] 'scroll-up-command) > (global-set-key [(meta ?ץ)] 'scroll-down-command) > (global-set-key [(meta ?ט)] 'forward-word) > (global-set-key [(control ?ט)] 'forward-char) > (global-set-key [(meta ?מ)] 'backward-word) > (global-set-key [(control ?מ)] 'backward-char) > (define-key isearch-mode-map [(control ?ף)] 'isearch-repeat-forward) > (define-key isearch-mode-map [(control ?ם)] 'isearch-repeat-backward) > (global-set-key [(control ?נ) (control ?ף)] 'save-buffer) There is the automatic way of creating such mapping by using the package https://github.com/a13/reverse-im.el Then you can customize it to any input method, e.g.: (reverse-im-input-methods '("hebrew"))