-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make conechokey use ReadConsoleInputW by default (#5148)
This PR updates our internal tool `conechokey` to use `ReadConsoleInputW` by default. It also adds a flag `-a` to force it to use `ReadConsoleInputA`. I discovered this while digging around for #1503, but figured I'd get this checked in now while I'm still investigating. Since this is just a helper tool, I spent as little effort writing this change - yea the whole tool could benefit from cleaner code but _ain't nobody got time for that_.
- Loading branch information
1 parent
2872f14
commit 1ae4252
Showing
1 changed file
with
120 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1ae4252
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hm since the code is C++ you could use function templates so as not to duplicate code of e.g. handleKeyEventW vs. handleKeyEventA, and then call their specialized version of wchar_t vs. char according to your gUseAscii flag.