Welcome toVigges Developer Community-Open, Learning,Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

bash - Control + , in Terminal.app

I use the shortcut C-, with the window version of emacs.

(global-set-key (kbd "C-,") 'dabbrev-expand)

My problem is that this shortcut does not work in the console version of emacs.

I've tried many things (.inputrc, set bind-tty-special-chars off, bind command in .bashrc) but nothing seems to work; I never manage to receive something with this combination of keys.

I've managed to bind other non standards shortcuts like Ctrl-<left-arrow>.

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Control-Comma does not map to a control character in the system keyboard map. Therefore, it is sent to applications as just a comma. Terminal then sends this comma to the tty, where Emacs receives it. If you want Control-Comma to map to a control character or other sequence that Emacs can distinguish from a normal comma, you'll have to alter the system keyboard map. Doing so is left as an exercise for the reader.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Vigges Developer Community for programmer and developer-Open, Learning and Share
...