Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Vimode problem (key press dropping)



On Jul 29,  6:45pm, Oliver Kiddle wrote:
}
} We could alleviate this issue by binding a few more keys by default at
} startup. Insert, Delete, Home, End, Page Up/Dn and the function keys
} all have termcap entries. Is there really a good reason not to bind at
} least the first four of these. What was the historical reason for not
} doing so?

Different terminals send different sequences for the same keys.  Also
you have to worry about whether the terminal is in keypad transmit mode
or not.  And the "same" terminal can behave differently when it's on
the far end of an ssh connection vs. when it's in a local console or
locally-running emulator.

So none of this can be hardwired, and it's a mess to calculate based on
the terminfo definition.  Duplicating the effort that programs like vim
and emacs go through to make this work has always seemed like overkill
for what's supposed to be a simple editor with minimal screen management.

This is why zkbd exists.

} Also, anyone know why the sequences for the cursors need to be
} passed through tputs()?

Some attempt to handle the keypad-transmit issue, I suspect.  I don't
recall; I think Wayne did the most recent work here, but I may be wrong
about that too.

} I also wonder whether we should consider trying to do something for
} Ctrl/Alt Left and Right to make it easier for new users.

A fair number of the terminals I use don't differentiate those modifier
keys in any useful way except when combining with non-alphabetics (and in
some caes not even then for e.g. the meta key).  My feeling has always
been that it's not a good idea to promise things we can't deliver.



Messages sorted by: Reverse Date, Date, Thread, Author