mirror of
https://github.com/python/cpython.git
synced 2025-09-25 09:50:37 +00:00
gh-123572: Fix key codes in VK_MAP in windows_console.py (#122692)
This commit is contained in:
parent
6822cb23c6
commit
782217f28f
2 changed files with 7 additions and 4 deletions
|
@ -63,6 +63,7 @@ TYPE_CHECKING = False
|
||||||
if TYPE_CHECKING:
|
if TYPE_CHECKING:
|
||||||
from typing import IO
|
from typing import IO
|
||||||
|
|
||||||
|
# Virtual-Key Codes: https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
|
||||||
VK_MAP: dict[int, str] = {
|
VK_MAP: dict[int, str] = {
|
||||||
0x23: "end", # VK_END
|
0x23: "end", # VK_END
|
||||||
0x24: "home", # VK_HOME
|
0x24: "home", # VK_HOME
|
||||||
|
@ -87,10 +88,10 @@ VK_MAP: dict[int, str] = {
|
||||||
0x7D: "f14", # VK_F14
|
0x7D: "f14", # VK_F14
|
||||||
0x7E: "f15", # VK_F15
|
0x7E: "f15", # VK_F15
|
||||||
0x7F: "f16", # VK_F16
|
0x7F: "f16", # VK_F16
|
||||||
0x79: "f17", # VK_F17
|
0x80: "f17", # VK_F17
|
||||||
0x80: "f18", # VK_F18
|
0x81: "f18", # VK_F18
|
||||||
0x81: "f19", # VK_F19
|
0x82: "f19", # VK_F19
|
||||||
0x82: "f20", # VK_F20
|
0x83: "f20", # VK_F20
|
||||||
}
|
}
|
||||||
|
|
||||||
# Console escape codes: https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
|
# Console escape codes: https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Fix key mappings for various F-keys in Windows for the new REPL. Patch by
|
||||||
|
devdanzin
|
Loading…
Add table
Add a link
Reference in a new issue