关于emacs按键重映射

网络上看到的,请问用这个能不能代替autohoktey的功能,不是很懂

;;(global-set-key (kbd “”) (lambda () (interactive) (insert “→”)))

(define-key key-translation-map (kbd “”) (kbd “•”))

(define-key key-translation-map (kbd " u ") (kbd “↓”))

(define-key key-translation-map (kbd " u ") (kbd “←”))

(define-key key-translation-map (kbd " u ") (kbd “→”))

(define-key key-translation-map (kbd " u ") (kbd “↑”))

原地址 https://blog.csdn.net/u010164190/article/details/79558045

另外请问一下,这代码要怎么排版,我这个太乱了看起来

文档: Keymap of key translations that can override keymaps.

This keymap works like ‘input-decode-map’, but comes after ‘function-key-map’.

Another difference is that it is global rather than terminal-local.

排版: 换行自动缩进;注释的话,;要写两个。

能不能帮到你?

1 个赞

点赞表示我的感谢

论坛用的是markdown,代码块排版搜一下markdown语法。

好,感谢指点

• ↓ ← → ↑ 这几个符号确实看起来更简洁直观, 就是要在键盘上打出来的时候感觉不太顺手,可能打<down><up><right><left>这几个还要快一点