On 14:23 26 May 2002, Huter.Liu <[EMAIL PROTECTED]> wrote: | I know the arrow key and the letter key can move cursor quite | well,but I'm wondering why not just use arrow key?so I think there's | now arrow key in the old keyboard and the old vi have *NO* choice but | use letter key to move cursor?
Correct. The other thing is that arrow keys send multibyte character sequences, not single characters. These sequences commence with escape. Now, imagine you're the vi programs listing to the typer. You get "ESC [ A". Now, did the user type ESC (to leave insert mode perhaps) and then [ and then A, or did they type the up arrow? The hueristic in curses is to watch the timing - if these characters arrive close enough together they are considered an arrow key. However, over a remote connection (telnet, ssh, busy serial line, whatever) almost arbitrary timing gaps may appear between the charaters and the curses program (vi in your example) can misread things. Avoid the arrow keys - they are EEEEEVIL! I tend to use backspace and space, minus and enter for single motions, and the other motions: H, M, L, {, }, /pattern, w, W, b, B, etc for faster / different motions. And of course j and k. I hardly ever use h and l. hjkl are also the ergonomic keys for playing hack. Very important. -- Cameron Simpson, DoD#743 [EMAIL PROTECTED] http://www.zip.com.au/~cs/ Sex without love is an empty experience, but, as empty experiences go, it's one of the best. -- Woody Allen _______________________________________________ Redhat-list mailing list [EMAIL PROTECTED] https://listman.redhat.com/mailman/listinfo/redhat-list