diff --git a/zshrc b/zshrc index ccc633d..8418175 100644 --- a/zshrc +++ b/zshrc @@ -131,8 +131,11 @@ bindkey -M vicmd '^V' edit-command-line # Enable HOME and END keys if [[ `uname` = Linux ]]; then - bindkey $key[Home] beginning-of-line - bindkey $key[End] end-of-line + # If Home and End are not working as expected setup zkbd mappings. + [ -f ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} ] && \ + source ~/.zkbd/$TERM-${${DISPLAY:t}:-$VENDOR-$OSTYPE} + [[ -n ${key[Home]} ]] && bindkey "${key[Home]}" beginning-of-line + [[ -n ${key[End]} ]] && bindkey "${key[End]}" end-of-line fi # Get the shells parent process name.