Can't use Ctrl+A and Ctrl+E (bash keybindings) on Terminal.app OSX

戏子无情 提交于 2021-02-07 18:26:18

问题


So for some odd reason, i can't use ^A and ^E on bash in Terminal.app, i can however, use ^C, ^R, ^Y, ^L and all sort of other key bindings.

bind -p shows "\C-a": beginning-of-line "\C-e": end-of-line

so i think something else is obstructing these key bindings... any idea how i can fix that? or at least know if ^A and ^E are being taken by some other app?

highly appreciated


回答1:


I must note the following: Ctrl+Alt+A and Ctrl+Alt+E seem to do what Ctrl+A and Ctrl+E should do.

So when i run "read" on my terminal: Ctrl+Alt+A shows: ^A and Ctrl+Alt+E shows: ^E ... note that Ctrl+R shows: ^R and Ctrl+Y shows ^Y just fine (these are just some examples).

i checked System Preferences, couldn't find the assignments.




回答2:


Check in System Preferences -> Keyboard pane -> Keyboard Shortcuts tab. You'll have to look through all of the various categories listed in the left-hand pane to see if ^A and ^E are assigned anywhere. (Note: you van also assign keyboard shortcuts in Terminal's preferences, but these seem not apply to basic alpha keys, just F-keys, arrows, etc.)



来源:https://stackoverflow.com/questions/4474034/cant-use-ctrla-and-ctrle-bash-keybindings-on-terminal-app-osx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!