Try putting this in your Readline initialization file (default ~/.inputrc
):
"\e[5~": beginning-of-history
"\e[6~": end-of-history
"\e[7~": beginning-of-line
"\e[8~": end-of-line
If you want to figure out what characters are being generated by a key sequence, one way is to use od -c
, type the key sequence, then Enter, then Ctrl+D. Doing this for Home looks like this for me:
$ od -c
0000000 033 [ 7 ~ \n
0000005