Le 13/10/2009 12:29, Markus Hennecke a icrit : > Nicolas Letellier wrote: > >> Le 13/10/2009 09:57, Nicholas Marriott a icrit : >> >>> For me, Home and End generate ^[[H and ^[[F (you can check they do for >>> you as >>> well by running cat then pressing the keys, if they don't let me know, >>> I might >>> have fiddled with some setting), so you should be able to bind them with: >>> >>> bind '^XH'=beginning-of-line >>> bind '^XF'=end-of-line >>> >>> >> For me, Home, End, PgUp, PgDown, Insert generate a ^[[7~ ^[[6~ ^[[5~ >> ^[[4~ (and it's a basic usb keyboard :-)) >> ^XH and ^XF does not work in my system. >> >> >>> It is possible to (use a hack to) bind ONE key with a trailing ~ by >>> binding the >>> start to prefix-2 and then binding ~ itself to the command, I do this >>> for the >>> Del key. >>> >> That's the hack I found, and as you say, it works only for one key. >> However, all my keys generate a four character sequence with a tilde. I >> tried with another TERM (vt220), the problem is the same. >> >> I think ksh is too complicate, and I have to get back to csh or tcsh (or >> ignore these bindkeys on ksh :-)). With them, my bindkeys work. >> > I have the lines > XTerm*loginShell: true > XTerm*eightBitInput: true > in my .Xdefaults file together with set +o emacs-usemeta in my .profile. > Those bind statements are in my .kshrc, set differently for each terminal: > > if [ -o interactive ]; then > case "$TERM" in > vt220) > bind '^[[3'=prefix-2 # DEL > bind '^[[3~'=delete-char-forward # DEL > ;; > wsvt25) > bind '^[[3'=prefix-2 # DEL > bind '^[[3~'=delete-char-forward # DEL > ;; > xterm*) > export TERM=xterm-color # force color > bind '^XH'=beginning-of-line # Pos1 > bind '^XF'=end-of-line # End > ;; > nxterm) > bind '^XH'=beginning-of-line # Pos1 > bind '^XF'=end-of-line # End > ;; > *) ;; > esac > fi > > > HTH, > Markus > It does not work on my config. In xterm*, vt220, nxterm, etc.... home is ^[[7~, end is ^[[8~, etc... In tcsh/zsh, I can use these keys for my bindkeys.
I have the same .Xdefaults -- Nicolas

