gpt4 book ai didi

emacs - 如何设置带有 C-x 8 前缀的键?

转载 作者:行者123 更新时间:2023-12-04 19:13:51 25 4
gpt4 key购买 nike

说我要重新绑定(bind)C-x 8 xξ .所以我这样做:

(global-set-key (kbd "C-x 8 x") (lambda () (interactive) (insert "ξ")))

但它不起作用:它仍然插入默认的 x 符号。然后我尝试了两个:

(global-unset-key (kbd "C-x 8 x"))
(global-set-key (kbd "C-x 8 x") nil)

没有任何效果。

编辑 :

这是我现在为希腊人使用的:

(define-key 'iso-transl-ctl-x-8-map "a" [?α])
(define-key 'iso-transl-ctl-x-8-map "b" [?β])
(define-key 'iso-transl-ctl-x-8-map "g" [?γ])
(define-key 'iso-transl-ctl-x-8-map "d" [?δ])
(define-key 'iso-transl-ctl-x-8-map "e" [?ε])
(define-key 'iso-transl-ctl-x-8-map "z" [?ζ])
(define-key 'iso-transl-ctl-x-8-map "h" [?η])
(define-key 'iso-transl-ctl-x-8-map "o" [?θ])
(define-key 'iso-transl-ctl-x-8-map "i" [?ι])
(define-key 'iso-transl-ctl-x-8-map "k" [?κ])
(define-key 'iso-transl-ctl-x-8-map "l" [?λ])
(define-key 'iso-transl-ctl-x-8-map "m" [?μ])
(define-key 'iso-transl-ctl-x-8-map "n" [?ν])
(define-key 'iso-transl-ctl-x-8-map "x" [?ξ])
(define-key 'iso-transl-ctl-x-8-map "p" [?π])
(define-key 'iso-transl-ctl-x-8-map "r" [?ρ])
(define-key 'iso-transl-ctl-x-8-map "s" [?σ])
(define-key 'iso-transl-ctl-x-8-map (kbd "M-s") [?ς])
(define-key 'iso-transl-ctl-x-8-map "x" [?ξ])
(define-key 'iso-transl-ctl-x-8-map "t" [?τ])
(define-key 'iso-transl-ctl-x-8-map "y" [?υ])
(define-key 'iso-transl-ctl-x-8-map "f" [?φ])
(define-key 'iso-transl-ctl-x-8-map "v" [?χ])
(define-key 'iso-transl-ctl-x-8-map "j" [?ψ])
(define-key 'iso-transl-ctl-x-8-map "w" [?ω])
(define-key 'iso-transl-ctl-x-8-map "A" [?Α])
(define-key 'iso-transl-ctl-x-8-map "B" [?Β])
(define-key 'iso-transl-ctl-x-8-map "G" [?Γ])
(define-key 'iso-transl-ctl-x-8-map "D" [?Δ])
(define-key 'iso-transl-ctl-x-8-map "E" [?Ε])
(define-key 'iso-transl-ctl-x-8-map "Z" [?Ζ])
(define-key 'iso-transl-ctl-x-8-map "H" [?Η])
(define-key 'iso-transl-ctl-x-8-map "O" [?Θ])
(define-key 'iso-transl-ctl-x-8-map "I" [?Ι])
(define-key 'iso-transl-ctl-x-8-map "K" [?Κ])
(define-key 'iso-transl-ctl-x-8-map "L" [?Λ])
(define-key 'iso-transl-ctl-x-8-map "M" [?Μ])
(define-key 'iso-transl-ctl-x-8-map "N" [?Ν])
(define-key 'iso-transl-ctl-x-8-map "X" [?Ξ])
(define-key 'iso-transl-ctl-x-8-map "P" [?Π])
(define-key 'iso-transl-ctl-x-8-map "R" [?Ρ])
(define-key 'iso-transl-ctl-x-8-map "S" [?Σ])
(define-key 'iso-transl-ctl-x-8-map "T" [?Τ])
(define-key 'iso-transl-ctl-x-8-map "Y" [?Υ])
(define-key 'iso-transl-ctl-x-8-map "F" [?Φ])
(define-key 'iso-transl-ctl-x-8-map "V" [?Χ])
(define-key 'iso-transl-ctl-x-8-map "J" [?Ψ])
(define-key 'iso-transl-ctl-x-8-map "W" [?Ω])

最佳答案

您必须在 iso-transl-ctl-x-8-map 中设置 key .如:

(eval-after-load 'iso-transl
'(define-key iso-transl-ctl-x-8-map "x" "ξ"))

那是因为 C-x 8实际上在 key-translation-map 中定义,它会覆盖全局映射。

关于emacs - 如何设置带有 C-x 8 前缀的键?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12331699/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com