如何使用Cx 8前缀设置密钥?

Ado*_*obe 5 emacs

假设我想重新绑定C-x 8 x?。所以我做:

(global-set-key (kbd "C-x 8 x") (lambda () (interactive) (insert "?")))
Run Code Online (Sandbox Code Playgroud)

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

(global-unset-key (kbd "C-x 8 x"))
(global-set-key (kbd "C-x 8 x") nil)
Run Code Online (Sandbox Code Playgroud)

没有效果。

编辑

这是我现在用于希腊人的内容:

(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" [??])
Run Code Online (Sandbox Code Playgroud)

Sig*_*gma 5

您必须在中设置密钥iso-transl-ctl-x-8-map。如:

(eval-after-load 'iso-transl
  '(define-key iso-transl-ctl-x-8-map "x" "?"))
Run Code Online (Sandbox Code Playgroud)

这是因为C-x 8实际上是在中定义的key-translation-map,它会覆盖全局地图。