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

Add handling of unused keys and mouse buttons, rewrite numpad input #709

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

Fleeym
Copy link
Contributor

@Fleeym Fleeym commented Apr 20, 2024

This PR implements unused keys and mouse buttons. It does not include mouse left click, right click, scroll click.
Additionally, it remaps numpad input from their KEY_1 - KEY_0 counterparts to their actual numpad enumKeyCodes.

Added key codes are as follows

KEY_GraveAccent = 0x1000,
KEY_OEMEqual = 0x1001,
KEY_LeftBracket = 0x1002,
KEY_RightBracket = 0x1003,
KEY_Backslash = 0x1004,
KEY_Semicolon = 0x1005,
KEY_Apostrophe = 0x1006,
KEY_Slash = 0x1007,
KEY_Equal = 0x1008,
KEY_NumEnter = 0x1009,
// Keys used by some non-US keyboard layouts
KEY_World1 = 0x100A,
KEY_World2 = 0x100B,
// Mouse buttons (excluding clicks)
MOUSE_4 = 0x1100,
MOUSE_5 = 0x1101,
MOUSE_6 = 0x1102,
MOUSE_7 = 0x1103,
MOUSE_8 = 0x1104

CCKeyboardDispatcher::dispatchKeyboardMSG will use these codes instead of -1. Additionally, I have hooked CCKeyboardDispatcher::keyToString for the newly created key codes.

This will remain a draft PR until I figure out how MacOS does keyboard and mouse input.

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.

None yet

1 participant