简体   繁体   中英

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> .

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM