On Mon, Apr 18, 2011 at 12:11:01PM +1000, Ben Schmidt wrote:
> - Ambiguous key triggers ambiguous map
>      - ^M triggers ^M
> - Specific key triggers specific map, or ambiguous if none
>      - CSI-Ctrl-M triggers CSI-Ctrl-M or ^M
>      - CSI-Enter triggers CSI-Enter or ^M

No terminal would ever be sending Enter as a CSI, because if it did so
no real program now would recognise it.

Paramount to my design for input sequences (again:
  http://www.leonerd.org.uk/hacks/fixterms/
)

is that the simplest way currently to type a key sequence, continues to
be encoded using the same byte(s) as before. Specifically, pressing the
Enter key must still send a single 0x0d byte, because that's what it
used to send. Only Ctrl-M is now allowed to be different, being a CSI.
On receipt of the single 0x0d byte we cannot tell whether this is an
Enter key, or a user of a "legacy" (i.e. non CSI-sending) terminal
pressing Ctrl-M.

> - Drawbacks
>      - Specific stuff will never work in an ambiguous terminal, so more
>        work for users to support both terminal types

You hit upon this here ;) No terminal would be set that way, so this is
a non-starter.

> APPROACH 2:
...
>      - Old stuff only breaks where <>-notation is involved; in this
>        case, the intent of the notation is clear, so breakages should
>        not be unexpected (except by gurus who were exploiting the
>        ambiguity anyway)

I foresee one major problem here - I suspect Bram himself is in this
camp, so is likely to raise significant objections if it involves him.

:(

> Approach 2 looks like a clear winner to me so far. I think it would be
> better with the <specific> map modifier than with <!>-notation, though
> that would possibly cause problems if you want an LHS with some specific
> and some possibly-ambiguous stuff; I doubt this would be a problem in
> practice, though, and there is a workaround (use intermediate mappings).

Is it possible to update approach 2, in light of the fact there are no
"non-ambiguous terminals", as such? I.e. that we can never tell if we
received an Enter on a CSI-sending terminal, vs. Enter or Ctrl-M on a
legacy one..., etc etc..

-- 
Paul "LeoNerd" Evans

[email protected]
ICQ# 4135350       |  Registered Linux# 179460
http://www.leonerd.org.uk/

Attachment: signature.asc
Description: Digital signature

Raspunde prin e-mail lui