[PATCH] Cygwin: console: Do not use memcmp() to compare INPUT_RECORD.

2022-03-18 Thread Takashi Yano
- Using memcmp() to compare structure such as INPUT_RECORD is not correct manner because padding may not be initialized. This patch stops to use memcmp() for comparison of INPUT_RECORD. --- winsup/cygwin/fhandler_console.cc | 41 --- 1 file changed, 38 insertions(+)

[PATCH] Cygwin: console: Ignore dwControlKeyState in event comparison.

2022-03-18 Thread Takashi Yano
- dwControlKeyState also may be null'ed on WriteConsoleInputW(). Therefore ignore it in event comparison as well as wVirtualKeyCode and wVirtualScanCode. --- winsup/cygwin/fhandler_console.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/winsup/cygwin/fhandler_conso

[PATCH] Cygwin: console: Fix typeahead key swapping which still occurs.

2022-03-18 Thread Takashi Yano
- The commit "Cygwin: console: Improve the code to avoid typeahead key swapping." did not solve the problem enough. Two unexpected things happen. (1) wVirtualKeyCode and wVirtualScanCode of readback key event may be null'ed even if they are not zero on WriteConsoleInputW(). The