]> git.proxmox.com Git - mirror_qemu.git/commit
curses: support wide input
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Mon, 4 Mar 2019 21:05:32 +0000 (22:05 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Mon, 11 Mar 2019 07:39:02 +0000 (08:39 +0100)
commit459a707eccc74b729beafceaef882c9ed1bcbc97
treec1b27addc30417568041bb2317dcd1a3f47349ee
parent633786fea79391c9cbf0d77cc028fa5c14d76657
curses: support wide input

This makes use of wide curses functions instead of 8bit functions. This
allows to type e.g. accented letters.

Unfortunately, key codes are then returned with values that could be
confused with wide characters by ncurses, so we need to add a maybe_keycode
variable to know whether the returned value is a key code or a character
(curses with wide support), or possibly both (curses without wide support).

The translation tables thus also need to be separated into key code
translation and character translation.  The curses2foo helper makes it easier
to use them.

Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org>
Message-id: 20190304210532.7840-1-samuel.thibault@ens-lyon.org
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/curses.c
ui/curses_keys.h