microsoft / microsoft/win32metadata

Scan codes (SCANCODE_*) are not complete

Open
#2,099 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.5k
Forks
149
Avg merge
5d 16h
Merged PRs (30d)
4

Description

I don't know if this is in scope of this project but [Microsoft's documentation on keyboard input][1] has a lot more scan codes listed. Having them included would enable projects like [CsWin32](https://github.com/microsoft/CsWin32) to generate them all and make it even more useful.

Scan Codes in the source: https://github.com/microsoft/win32metadata/blob/3a36bf792ed5d90ebbd130c1e1147fa6d19141e0/generation/WinSDK/RecompiledIdlHeaders/um/kbd.h#L2143-L2155

Additional resources:
https://handmade.network/forums/t/2011-keyboard_inputs_-_scancodes,_raw_input,_text_input,_key_names
https://github.com/monke8555/ScanCodes
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mapvirtualkeyw

[1]: https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input#scan-codes

Contributor guide

Open the contributing guide

Research direction

Start by comparing the SCANCODE_* definitions in generation/WinSDK/RecompiledIdlHeaders/um/kbd.h at lines 2143-2155 with the scan codes currently exposed by win32metadata. Use Microsoft's keyboard-input documentation and MapVirtualKeyW reference to resolve the expected set. Done means the additional scan codes are included so projects such as CsWin32 can generate them.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
operating-systems, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.