Added support for application cursor mode input

This commit is contained in:
aristocratos 2020-07-07 12:35:48 +02:00
parent a21fac6b84
commit 900cdc0a71
1 changed files with 4 additions and 4 deletions

View File

@ -4357,10 +4357,10 @@ get_key() { #? Get one key from standard input and translate key code to readabl
if [[ -z $key && $esc -eq 1 ]]; then key="escape"
elif [[ $esc -eq 1 ]]; then
case "${key}" in
'[A'*) key="up" ;;
'[B'*) key="down" ;;
'[D'*) key="left" ;;
'[C'*) key="right" ;;
'[A'*|'OA'*) key="up" ;;
'[B'*|'OB'*) key="down" ;;
'[D'*|'OD'*) key="left" ;;
'[C'*|'OC'*) key="right" ;;
'[2~') key="insert" ;;
'[3~') key="delete" ;;
'[H'*) key="home" ;;