From b50470de96320425adbed82129bdb7f7f5263ddb Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Mon, 6 Mar 2023 12:25:39 +0000 Subject: win32: virtual terminal input fixes - Disable ENABLE_PROCESSED_INPUT in raw mode. Otherwise ^C isn't immediately detected during shell command line editing with virtual terminal input enabled. - Switch read_key()/unix_readkey() to windows_read_key()/read_key(). This allows the shell `read` builtin to use windows_read_key(). Without this change `read` fails when virtual terminal input is enabled. --- shell/shell_common.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/shell_common.c b/shell/shell_common.c index 9d74dcb7a..efe8828e4 100644 --- a/shell/shell_common.c +++ b/shell/shell_common.c @@ -223,7 +223,7 @@ shell_builtin_read(struct builtin_read_params *params) if (isatty(fd)) { int64_t key; - key = read_key(fd, NULL, timeout); + key = windows_read_key(fd, NULL, timeout); if (key == 0x03) { /* ^C pressed */ retval = (const char *)(uintptr_t)2; -- cgit v1.2.3-55-g6feb