bug-ncurses
[Top][All Lists]
Advanced

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

Re: ncursesw: KEY_* and collisions with unicode chars


From: Felix Natter
Subject: Re: ncursesw: KEY_* and collisions with unicode chars
Date: Sun, 01 Jul 2012 20:21:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

Thomas Dickey <address@hidden> writes:

> On Sun, Jul 01, 2012 at 04:23:59PM +0200, Felix Natter wrote:
>> hello,

hello Thomas,
 
>> a user of GTypist reported that he cannot enter a Polish character
>> because it will be interpreted as backspace (KEY_BACKSPACE):
>> 
>> > I noticed that it is not possible to input one of the Polish diacritic
>> > letters 'c with acute' (unicode 0x107 = 263) because it interferes
>> > with KEY_BACKSPACE defined in ncurses.h (0407 = 263)
>> 
>> How can I tell the difference between KEY_BACKSPACE and unicode
>> 0x107 (or can I teach ncursesw to return 0x8 for backspace)?
>> 
>> The 'get_wch' manpage mentions KEY_CODE_YES, but IMHO this is just
>> a bit that is set is a wchar_t contains a KEY_*, thus colliding with
>> unicode 0x107.
>
> A return-value of KEY_CODE_YES says that the value is a KEY_* rather
> than a wchar_t (e.g., unicode).  If wget_wch returns OK, the value is
> a wchar_t - there's no conflict.

Aaaah, I had tried that but forgot to use "keypad(stdscr, TRUE)"
so get_wch() always returned OK ;-)

Thanks and Best Regards,
-- 
Felix Natter




reply via email to

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