xtermを実行してキーバインディングを取得しようとしています。
Ctrl-;
Ctrl-.
Ctrl-,
etc..
(私はemacs -nwでこれらのバインディングを使うのが好きです)
オンラインでいくつかの内容を読んだ後、〜/ .Xresourcesファイルの次の行を使用して、オフィスのデスクトップ(Fedora 20を実行)でジョブ設定を取得できました。
xterm*formatOtherKeys: 1
しかし、これはVirtualBoxでWindows 7とUbuntu 12.04.5 LTSを実行している私のホームデスクトップでは動作しないようです。 ~/.Xresourcesファイルが実際にロードされていることを確認しましたが(そこでフォントサイズを制御できるため)、formatOtherKeysがオフィスデスクトップとは異なる効果を持つようです。
なぜこれらのキーバインディングが認識されないのかを知っている人はいますか?
編集する:
xterm -v は XTerm(271) を返します。
これはCtrl-を押して放したときにxdevが印刷する内容です。
KeyPress event, serial 32, synthetic NO, window 0x3e00001,
root 0x139, subw 0x0, time 63644841, (806,220), root:(824,274),
state 0x10, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 32, synthetic NO, window 0x3e00001,
root 0x139, subw 0x0, time 63645458, (806,220), root:(824,274),
state 0x14, keycode 47 (keysym 0x3b, semicolon), same_screen YES,
XLookupString gives 1 bytes: (3b) ";"
XmbLookupString gives 1 bytes: (3b) ";"
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x3e00001,
root 0x139, subw 0x0, time 63645579, (806,220), root:(824,274),
state 0x14, keycode 47 (keysym 0x3b, semicolon), same_screen YES,
XLookupString gives 1 bytes: (3b) ";"
XFilterEvent returns: False
KeyRelease event, serial 32, synthetic NO, window 0x3e00001,
root 0x139, subw 0x0, time 63645939, (806,220), root:(824,274),
state 0x14, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
ベストアンサー1
私が使用する必要がある設定は次のとおりです。
xterm*modifyOtherKeys: 1
emacsは次のキーバインディングをすべて正しく認識します。これを使用するには、.emacsにマッピングする必要があります。
(define-key input-decode-map "\e[46;5u" (kbd "C-."))
(define-key input-decode-map "\e[44;5u" (kbd "C-,"))
(define-key input-decode-map "\e[60;6u" (kbd "C-<"))
(define-key input-decode-map "\e[62;6u" (kbd "C->"))
(define-key input-decode-map "\e[59;5u" (kbd "C-;"))
(define-key input-decode-map "\e[40;6u" (kbd "C-("))
(define-key input-decode-map "\e[41;6u" (kbd "C-)"))
(define-key input-decode-map "\e[49;5u" (kbd "C-1"))
(define-key input-decode-map "\e[39;5u" (kbd "C-'"))
(define-key input-decode-map "\e[45;5u" (kbd "C--"))
(define-key input-decode-map "\e[43;6u" (kbd "C-+"))
(define-key input-decode-map "\e[61;5u" (kbd "C-="))
(define-key input-decode-map "\e[63;6u" (kbd "C-?"))