[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [MiNT] Arrow keys in nano



Vincent Rivière, 09.02.2013 17:39:53:

Sure it is! Any halfway good program measures the time-gap between the >> Esc and the A as I already mentioned. There is no conflict when it's done right.

You are confusing 2 things:
- when Esc and the next char are received quickly, ncurses handles them as a single function key - when the exact same characters are received slowly (let's say, more than second after Esc), then ncurses handles all the characters as individual ones

That's exactly what I said! Where am I confusing anything?

Back to the initial problem:
I test using ^V in bash to see the actual escape codes.
- On FreeMiNT BIOS console, when I press the up arrow, I get ^[A
- On Cygwin with MinTTY (a modern terminal compatible with xterm), I turn Caps Lock on and I type Alt+A: I get ^[A In both cases, the codes are the same. They are generated quickly. So there is no way to differentiate them.

xterm != vt52! If it produces Esc-A for Alt-A, it's an xterm-property that can never be applied to the atari-world, because atari always sets the upper bit for Alt+letter. This is used for international characters (there's no UTF like mintty has, and never will be I guess).

The only surprising thing is what happens in nano.
When typing _slowly_ Esc then V for example, it does the expected M-V function, while it should produce the Esc function (whatever it is) then type V. So I believe that nano uses further hacks to handle the shortcuts, which would not be surprising regarding to that get_escape_seq_kbinput() stuff.

Maybe you should wait longer after the Esc.

You'd have to test this with all currently working programs before.

Indeed, even though the solutions are clean, they can have adverse effects to the programs accustomed to the wrong behaviour.

Still not convinced what is wrong from your description, but I'd have to look myself I guess.

What do we do for the release?

Nothing.

BTW, is there an 1.18 branch for the MiNTLib and TosWin2?

Good question.

--
Helmut Karlowski