Skip to content
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

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open

Conversation

Treata11
Copy link

@Treata11 Treata11 commented Jun 19, 2024

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.)

Copy link
Author

@Treata11 Treata11 left a 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.

@Treata11 Treata11 marked this pull request as ready for review June 19, 2024 13:33
Treata11 added 2 commits June 20, 2024 17:06
Now the project should run crossplatform.
Copy link
Author

@Treata11 Treata11 left a 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
Copy link
Owner

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.

Comment on lines +1178 to +1183
HANDLE hThread
#if defined(_WIN32) || defined(_WIN64)
// FIXME: Find LPCONTEXT Alternative
, LPCONTEXT lpContext
#endif
);
Copy link
Owner

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)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

Comment on lines +1451 to +1453
#if defined(_WIN32) || defined(_WIN64)
CONTEXT Context;
#endif
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above.

@Leandros
Copy link
Owner

Leandros commented Aug 2, 2024

I'm willing to accept the keycode changes. However, the other changes warrant a further discussion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants