A common practice where I work is to alias the arrow keys as follows:
alias __A='^P' #up arrow=move back through history
alias __B='^N' #down arrow=move forward through history
alias __C='^F' #right arrow=move cursor forward one position
alias __D='^B' #left arrow=move cursor back one position
where the control characters must be entered by vi or some other editor, and preceding each letter is a double underscore.
I have also found that I can alias the "delete" and "home" keys by
alias __P='^D' #delete=delete character at cursor
alias __H='^A' #home=put cursor at start of the line
My question is: does anyone know how to alias the remaining keys?
Whereas typing "\" followed by any of the keys above produces the corresponding letter (e.g. \<delete> yields "^[[P", "\" followed by the remaining keys yields various multi-character results (e.g. \<end> yields "^[[146q"
and trying alias __146q='^E' does not work. The interface appears to demand only one character after the __ in the aliases?
Does anyone know what is going on here? And how to alias the remaining keys?
alias __A='^P' #up arrow=move back through history
alias __B='^N' #down arrow=move forward through history
alias __C='^F' #right arrow=move cursor forward one position
alias __D='^B' #left arrow=move cursor back one position
where the control characters must be entered by vi or some other editor, and preceding each letter is a double underscore.
I have also found that I can alias the "delete" and "home" keys by
alias __P='^D' #delete=delete character at cursor
alias __H='^A' #home=put cursor at start of the line
My question is: does anyone know how to alias the remaining keys?
Whereas typing "\" followed by any of the keys above produces the corresponding letter (e.g. \<delete> yields "^[[P", "\" followed by the remaining keys yields various multi-character results (e.g. \<end> yields "^[[146q"
and trying alias __146q='^E' does not work. The interface appears to demand only one character after the __ in the aliases?
Does anyone know what is going on here? And how to alias the remaining keys?