From 52726ae849102c0ca0d3ad494813dc2e786b188b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:50:22 +0200 Subject: [PATCH 1/2] Fix event key codes for Virtual Keyboards on Windows. --- Lib/_pyrepl/windows_console.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Lib/_pyrepl/windows_console.py b/Lib/_pyrepl/windows_console.py index 6c3f7031a74271..f80835809ac69d 100644 --- a/Lib/_pyrepl/windows_console.py +++ b/Lib/_pyrepl/windows_console.py @@ -87,10 +87,10 @@ def __init__(self, err: int | None, descr: str | None = None) -> None: 0x7D: "f14", # VK_F14 0x7E: "f15", # VK_F15 0x7F: "f16", # VK_F16 - 0x79: "f17", # VK_F17 - 0x80: "f18", # VK_F18 - 0x81: "f19", # VK_F19 - 0x82: "f20", # VK_F20 + 0x80: "f17", # VK_F17 + 0x81: "f18", # VK_F18 + 0x82: "f19", # VK_F19 + 0x83: "f20", # VK_F20 } # Console escape codes: https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences From f0ddd201b011e615892936f9e56bc27830247dd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?B=C3=A9n=C3=A9dikt=20Tran?= <10796600+picnixz@users.noreply.github.com> Date: Sun, 1 Sep 2024 13:52:05 +0200 Subject: [PATCH 2/2] blurb --- .../next/Library/2024-09-01-13-52-01.gh-issue-123572.DDtUWy.rst | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 Misc/NEWS.d/next/Library/2024-09-01-13-52-01.gh-issue-123572.DDtUWy.rst diff --git a/Misc/NEWS.d/next/Library/2024-09-01-13-52-01.gh-issue-123572.DDtUWy.rst b/Misc/NEWS.d/next/Library/2024-09-01-13-52-01.gh-issue-123572.DDtUWy.rst new file mode 100644 index 00000000000000..3fa06573dc740c --- /dev/null +++ b/Misc/NEWS.d/next/Library/2024-09-01-13-52-01.gh-issue-123572.DDtUWy.rst @@ -0,0 +1,2 @@ +Fix REPL Windows virtual keyboard support. Keys F17 to F20 were previously +handled incorrectly. Patch by Bénédikt Tran.