Arrow keys seem to feed different key-codes than in cmd or powershell. #5021

Open
opened 2026-01-31 00:03:09 +00:00 by claunia · 0 comments
Owner

Originally created by @jwlodek on GitHub (Nov 15, 2019).

Environment

Windows build number:  10.0.18362.0
Windows Terminal version (if applicable): 0.6.2951.0

Using a windows port of ncurses to work with a TUI application.

Steps to reproduce

Print key code received on key press to terminal. Specifically the issue is with key codes for arrow keys. In cmd and powershell these are in the range 258 to 261, while when using windows terminal is in the 450-456 range with each being an even number in that range, inclusive. Most other keys seem to retain the same key values.

Expected behavior

It would be nice to have the same key code for arrow keys so that TUI applications can work in windows terminal, if not, then is there documentation for the keycodes for each key and their differences with those found in cmd or powershell?

Originally created by @jwlodek on GitHub (Nov 15, 2019). # Environment ```none Windows build number: 10.0.18362.0 Windows Terminal version (if applicable): 0.6.2951.0 ``` Using a windows port of ncurses to work with a TUI application. # Steps to reproduce Print key code received on key press to terminal. Specifically the issue is with key codes for arrow keys. In `cmd` and `powershell` these are in the range 258 to 261, while when using windows terminal is in the 450-456 range with each being an even number in that range, inclusive. Most other keys seem to retain the same key values. # Expected behavior It would be nice to have the same key code for arrow keys so that TUI applications can work in windows terminal, if not, then is there documentation for the keycodes for each key and their differences with those found in cmd or powershell?
claunia added the Resolution-Duplicate label 2026-01-31 00:03:09 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#5021