Use Ctrl–a a, or change screen’s escape keystroke (option
Ctrl–x–Ctrl–x lets you go to the first character of the line for any readline-compatible environment like Bash, python and mysql. GNU SCREEN safely ignores this. No customized configuration necessary.
If you use this instead of Ctrl–a–a, you use a consistant shortcut key – you don’t have to keep in mind whether you are in GNU SCREEN or not.
For anyone interested, the same shortcut key also lets you go to the end of the line if you are already at the begining.
Either you can change the
screen bindings or you can change the bindings of your shell. Assuming your shell is
bash, the output of
bind -p | grep C-a should give you the current action binded to
Ctrl+A. To bind this action to something else use the following form:
$ bind '"C-p": beginning-of-line'
This will bind
Ctrl+P to move the cursor to the beginning of the line. Remember the double-quotes inside the expression. To unset a binding you would just set it to nothing:
$ bind '"C-a": '
To list all input sequences associated with the action, use:
$ bind -p | grep beginning-of-line
Lastly, to make the bindings permament you can put the statements in your
~/.bashrc file and issue