Add keyup/keydown hack for Ubuntu 12.04 & FreeBSD.
This commit is contained in:
14
.zshrc
14
.zshrc
@@ -65,6 +65,20 @@ key[Insert]=${terminfo[kich1]}
|
||||
key[PageDown]=${terminfo[knp]}
|
||||
key[PageUp]=${terminfo[kpp]}
|
||||
key[Up]=${terminfo[kcuu1]}
|
||||
#
|
||||
# Terminal hack (keyup/keydown) for Ubuntu 12.04 & FreeBSD
|
||||
if [[ -f /etc/lsb-release ]]; then
|
||||
source /etc/lsb-release
|
||||
|
||||
if [[ "$DISTRIB_RELEASE" == "12.04" ]]; then
|
||||
key[Down]="[B"
|
||||
key[Up]="[A"
|
||||
fi
|
||||
elif [[ "`sysctl kern.ostype 2>&1`" == "FreeBSD" ]]; then
|
||||
key[Down]="[B"
|
||||
key[Up]="[A"
|
||||
fi
|
||||
#
|
||||
[[ -n "${key[Delete]}" ]] && bindkey "${key[Delete]}" delete-char
|
||||
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line
|
||||
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
|
||||
|
||||
Reference in New Issue
Block a user