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

Re: Vimode problem (key press dropping)



On Wed, Jul 29, 2015 at 5:30 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jul 29,  2:35pm, Mikael Magnusson wrote:
> }
> } I always felt like how it should work if we get the string "abc", is
> } first abc is looked up and we find it isn't bound to anything, the a
> } gets treated as a separate input string, then we look up bc instead,
> } etc.
>
> The problem with that is that if you have an unbound function key on
> your keyboard, striking it will cause unpredictable effects when the
> leading ESC is ignored and the rest of the sequence begins to be
> interpreted as individual characters.
>
> } What we do now is just discard the whole string as "undefined-key".
>
> Which is correct if the whole sequence came from a single keystroke;
> the real difficulty is determining whether that happened.

Well, what almost always happens is we eat the ^[[1 part and insert
the ~ literally, which is confusing. If we literally inserted the
whole ^[[1~ string, it would be more obvious for a user what they had
to put in their keybind commands. "You can run cat and press the key
to see what it sends" "oh, okay".

-- 
Mikael Magnusson



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