View previous topic :: View next topic |
Author |
Message |
khayyam Watchman
Joined: 07 Jun 2012 Posts: 6227 Location: Room 101
|
Posted: Mon Apr 29, 2013 3:57 pm Post subject: |
|
|
_______0 wrote: | how to restore home/end button to not convert upper/lower case and got beginning/end line? |
_______0 ... it depends on what those keys are sending:
Code: | % cat
^[[1~ # returned by hitting home
^[[4~ # returned by hitting end
^C # control C to exit cat
% bindkey '\e[1~' beginning-of-line
% bindkey '\e[4~' end-of-line |
alternately, you can use terminfo:
Code: | typeset -A key
key[Home]=${terminfo[khome]}
key[End]=${terminfo[kend]}
[[ -n "${key[Home]}" ]] && bindkey "${key[Home]}" beginning-of-line
[[ -n "${key[End]}" ]] && bindkey "${key[End]}" end-of-line |
There is also the zkbd utility which can be used to setup the entire keyboard, see:
Code: | % man zshcontrib | less -p "^ *Keyboard" |
best ... khay |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|