bug-ncurses
[Top][All Lists]
Advanced

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

Re: about keycodes


From: Chinlu
Subject: Re: about keycodes
Date: Tue, 29 May 2007 15:53:54 +0100

   curses reads a stream of characters (and there should be no endianess or
   byte-ordering issues in that).

Yes I know endianness doesn't affect single bytes, but it does when it comes
to multi-byte strings, doesn't it?

   It's matching strings - they're stored in a tree to make the matching
   somewhat more efficient than a list.  As soon as it finds a match, curses
   returns the corresponding keycode.

Sure, I've noticed those strings comes from the current terminal description,
but for example, my terminal sends key_left as:

  0x1b 0x4f 0x44

Same terminal within a big-endian computer should report:

  0x1b 0x44 0x4f

for the same key, and so they'd be different strings. 

That's why I though you'd be somehow adding all the values seen on the fifo
together in order to compute the keycode (then it wouldn't make a difference
wheter a char comes before or after on the fifo), or am I missing something
again?

Thanks,







reply via email to

[Prev in Thread] Current Thread [Next in Thread]