emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Physical keyboard events


From: Juri Linkov
Subject: Re: Physical keyboard events
Date: Wed, 30 Oct 2024 21:36:18 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

> 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"))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]