После переустановки Debian и установки X Window, поведение моей программы на Си, запрашивающей коды нажатых клавиш через wgetch(), изменилось. Если раньше было KEY_UP = 0x0103, то сейчас KEY_UP = 0x0041 (+0x005B - префикс, образующего типа расширенного «scan code» с кодом клавиши).
Очень познавателен также man 3ncurses util:
The keyname routine returns a character string corresponding to the key c. Control characters are displayed in the ^X notation. Values above 128 are either meta characters, shown in the M-X notation, or the names of function keys, or null. The corresponding key_name returns a character string corresponding to the wide-character value w. The two functions do not return the same set of strings; the latter returns null where the former would display a meta character.
Однако, остаётся вопрос: что делать? Как правильно обрабатывать на UNIX-системах код, возвращаемый wgetch()?
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.