问题
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