Skip to content

Commit

Permalink
Add insert key to bind -n
Browse files Browse the repository at this point in the history
  • Loading branch information
roadkell committed Dec 15, 2023
1 parent 113a0d5 commit bb8d4f2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions functions/bind
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,15 @@ elif [[ -v opts[-n] ]]; then
( Z ) name+='Shift-Tab' ;;
esac
;;
( (#b)($'\e['([356])\~)* )
( (#b)($'\e['([2356])\~)* )
case $match[2] in
( 2 ) name+='Insert' ;;
( 3 ) name+='Delete' ;;
( 5 ) name+='PageUp' ;;
( 6 ) name+='PageDown' ;;
esac
;;
( (#b)($'\e'(O|\[|\[[1356]\;|\[27\;)(|<2-16>)([ABCDFH~]|\;8~))* )
( (#b)($'\e'(O|\[|\[[12356]\;|\[27\;)(|<2-16>)([ABCDFH~]|\;8~))* )
case $match[3] in
( 2 ) name+='Shift' ;;
( 3 ) name+='Alt' ;;
Expand Down Expand Up @@ -79,6 +80,7 @@ elif [[ -v opts[-n] ]]; then
( \;8~ ) name+='Backspace' ;;
( \~ )
case $match[2] in
( '[2;' ) name+='Insert' ;;
( '[3;' ) name+='Delete' ;;
( '[5;' ) name+='PageUp' ;;
( '[6;' ) name+='PageDown' ;;
Expand Down

0 comments on commit bb8d4f2

Please sign in to comment.