Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6785120

Browse files
[3.13]gh-123572: Fix key codes in VK_MAP in windows_console.py (GH-122692) (#123632)
gh-123572: Fix key codes in VK_MAP in windows_console.py (GH-122692)(cherry picked from commit782217f)Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
1 parent4894139 commit6785120

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

‎Lib/_pyrepl/windows_console.py‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ def __init__(self, err: int | None, descr: str | None = None) -> None:
6363
ifTYPE_CHECKING:
6464
fromtypingimportIO
6565

66+
# Virtual-Key Codes: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
6667
VK_MAP:dict[int,str]= {
6768
0x23:"end",# VK_END
6869
0x24:"home",# VK_HOME
@@ -87,10 +88,10 @@ def __init__(self, err: int | None, descr: str | None = None) -> None:
8788
0x7D:"f14",# VK_F14
8889
0x7E:"f15",# VK_F15
8990
0x7F:"f16",# VK_F16
90-
0x79:"f17",# VK_F17
91-
0x80:"f18",# VK_F18
92-
0x81:"f19",# VK_F19
93-
0x82:"f20",# VK_F20
91+
0x80:"f17",# VK_F17
92+
0x81:"f18",# VK_F18
93+
0x82:"f19",# VK_F19
94+
0x83:"f20",# VK_F20
9495
}
9596

9697
# Console escape codes: https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fix key mappings for various F-keys in Windows for the new REPL. Patch by
2+
devdanzin

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp