-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added more Virtual-Key codes. #26
base: master
Are you sure you want to change the base?
Conversation
All of the codes specified in [Microsoft docs](https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes) are now included in `windows.h`
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.
Added the entire table of VK codes
... Also left a description for each key.
Now the project should run crossplatform.
…for this target` on non-windows platforms.
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.
Issue #27 is addressed & the project builds successfully on macOS & perhaps Linux as well.
The exact procedures in `windows.h` was followed.
#define CALLBACK __stdcall | ||
#ifdef _WIN32 | ||
|
||
#define NTAPI __stdcall |
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.
One of the main reasons for choosing and creating this alternative windows.h
is to reduce the macros that pollute the code.
This is working against the goal.
Therefore, I'd recommend to stick with a single macro following the system reserved convention: _STDCALL
.
HANDLE hThread | ||
#if defined(_WIN32) || defined(_WIN64) | ||
// FIXME: Find LPCONTEXT Alternative | ||
, LPCONTEXT lpContext | ||
#endif | ||
); |
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.
This will create an invalid API call. An alternative would be to define LPCONTEXT
as void *
.
@@ -1405,15 +1437,20 @@ typedef struct _MINIDUMP_EXCEPTION_INFORMATION64 { | |||
typedef struct _MINIDUMP_THREAD_CALLBACK { | |||
ULONG ThreadId; | |||
HANDLE ThreadHandle; | |||
#if defined(_WIN32) || defined(_WIN64) |
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.
same as above
#if defined(_WIN32) || defined(_WIN64) | ||
CONTEXT Context; | ||
#endif |
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.
Same as above.
I'm willing to accept the keycode changes. However, the other changes warrant a further discussion. |
There are still plenty more
VK codes
to be added ...https://learn.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes
These were a few that I found useful, but I can add them all if it's necessary ... (I've already extracted them & it's ready to be committed.)