Emacs, Linux and international keyboard layouts

后端 未结 5 1343
太阳男子
太阳男子 2020-12-25 14:32

Is there an easy way to use Emacs key-bindings when you are using a not-English (Russian) keyboard layout?

Whenever an international layout is on, all keystrokes are

5条回答
  •  独厮守ぢ
    2020-12-25 14:44

    Not sure, where did sabof got 150 billion. I ran this code (thanks to Yuri Khan, taken from EmacsWiki):

    (loop
     for from across "йцукенгшщзхъфывапролджэячсмитьбюЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖ\ЭЯЧСМИТЬБЮ№"
     for to   across "qwertyuiop[]asdfghjkl;'zxcvbnm,.QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>#"
     do
     (eval `(define-key key-translation-map (kbd ,(concat "C-" (string from))) (kbd ,(concat     "C-" (string to)))))
     (eval `(define-key key-translation-map (kbd ,(concat "M-" (string from))) (kbd ,(concat     "M-" (string to))))))
    

    It's only 128 combinations. Unfortunately, combinations with single letters like C-x b don't work. I'm still trying to find a better solution.

提交回复
热议问题