Commit ea25ba7
committed
Cygwin: console: Fix master thread for OpenConsole.exe
If the console is originating from a pseudo console, current master
thread code does not work as expected if ENABLE_VIRTUAL_TERMINAL_INPUT
flag is set, particularly when OpenConsole.exe is used. This is because
the pseudo console does not preserve all the key event as is.
All bKeyDown == 0 events will be omitted from the input record written
by WriteConsoleInput() and events regarding pressing shift/control/alt
keys will be dropped as well.
This patch adds strip_inrec() function to remove all the key events
of bKeyDown == 0 or UnicodeChar == 0 before comparing/writing input
record. This function is called only when the console is originating
from a pseudo console and ENABLE_VIRTUAL_TERMINAL_INPUT flag is set.
Signed-off-by: Takashi Yano <takashi.yano@nifty.ne.jp>
Reviewed-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>1 parent 10a3de5 commit ea25ba7
1 file changed
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
308 | 325 | | |
309 | 326 | | |
310 | 327 | | |
| |||
417 | 434 | | |
418 | 435 | | |
419 | 436 | | |
| 437 | + | |
| 438 | + | |
420 | 439 | | |
421 | 440 | | |
422 | 441 | | |
| |||
472 | 491 | | |
473 | 492 | | |
474 | 493 | | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
475 | 511 | | |
476 | 512 | | |
477 | 513 | | |
| |||
483 | 519 | | |
484 | 520 | | |
485 | 521 | | |
| 522 | + | |
| 523 | + | |
486 | 524 | | |
487 | 525 | | |
488 | 526 | | |
| |||
607 | 645 | | |
608 | 646 | | |
609 | 647 | | |
| 648 | + | |
| 649 | + | |
610 | 650 | | |
611 | 651 | | |
612 | 652 | | |
| |||
625 | 665 | | |
626 | 666 | | |
627 | 667 | | |
| 668 | + | |
| 669 | + | |
628 | 670 | | |
629 | 671 | | |
630 | 672 | | |
| |||
0 commit comments