-
Notifications
You must be signed in to change notification settings - Fork 250
Fixed various issues with handling 'extended' keys on the Windows pla… #1248
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -122,7 +122,7 @@ KeyboardMap::KeyboardMap() | |
| {VK_RETURN , KEY_Return}, | ||
| {VK_SHIFT , KEY_Undefined}, | ||
| {VK_CONTROL , KEY_Undefined}, | ||
| {VK_MENU , KEY_Undefined}, | ||
| {VK_MENU , KEY_Alt_L}, | ||
| {VK_PAUSE , KEY_Pause}, | ||
| {VK_CAPITAL , KEY_Undefined}, | ||
| {VK_KANA , KEY_Undefined}, | ||
|
|
@@ -149,32 +149,32 @@ KeyboardMap::KeyboardMap() | |
| {VK_RIGHT , KEY_Right }, | ||
| {VK_DOWN , KEY_Down }, | ||
| {VK_SELECT , KEY_Select}, | ||
| {VK_PRINT , KEY_Print}, | ||
| {VK_SNAPSHOT , KEY_Print}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If VK_PRINT shouldn't map to KEY_Print would should VK_SNAPSHOT? What does VK_PRINT and KEY_Print meaning and are you assuming? As a general reference I used X11 conventions that the OSG adopted decades ago, so whole not 1:1 compatible the VSG KEY_ enum is broadly like the OSG's. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. OK that's a good/valid question..
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I just tried under Linux and pressing "Press Screen" is mapping to VK_PRINT, so if Windows generates VK_SNAPSHOT for this key then that would be correct mapping. |
||
| {VK_EXECUTE , KEY_Execute}, | ||
| {VK_SNAPSHOT , KEY_Undefined}, | ||
| {VK_INSERT , KEY_Insert}, | ||
| {VK_DELETE , KEY_Delete}, | ||
| {VK_HELP , KEY_Help}, | ||
| {VK_LWIN , KEY_Super_L}, | ||
| {VK_RWIN , KEY_Super_R}, | ||
| {VK_APPS , KEY_Undefined}, | ||
| {VK_APPS , KEY_Menu}, | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Um... VK_Menu isn't a menu but VK_APPS is? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please see this comment above |
||
| {VK_SLEEP , KEY_Undefined}, | ||
| {VK_NUMPAD0 , KEY_Undefined}, | ||
| {VK_NUMPAD1 , KEY_Undefined}, | ||
| {VK_NUMPAD2 , KEY_Undefined}, | ||
| {VK_NUMPAD3 , KEY_Undefined}, | ||
| {VK_NUMPAD4 , KEY_Undefined}, | ||
| {VK_NUMPAD5 , KEY_Undefined}, | ||
| {VK_NUMPAD6 , KEY_Undefined}, | ||
| {VK_NUMPAD7 , KEY_Undefined}, | ||
| {VK_NUMPAD8 , KEY_Undefined}, | ||
| {VK_NUMPAD9 , KEY_Undefined}, | ||
| {VK_MULTIPLY , KEY_Undefined}, | ||
| {VK_ADD , KEY_Undefined}, | ||
| {VK_SEPARATOR , KEY_Undefined}, | ||
| {VK_SUBTRACT , KEY_Undefined}, | ||
| {VK_DECIMAL , KEY_Undefined}, | ||
| {VK_DIVIDE , KEY_Undefined}, | ||
| {VK_NUMPAD0 , KEY_KP_0}, | ||
| {VK_NUMPAD1 , KEY_KP_1}, | ||
| {VK_NUMPAD2 , KEY_KP_2}, | ||
| {VK_NUMPAD3 , KEY_KP_3}, | ||
| {VK_NUMPAD4 , KEY_KP_4}, | ||
| {VK_NUMPAD5 , KEY_KP_5}, | ||
| {VK_NUMPAD6 , KEY_KP_6}, | ||
| {VK_NUMPAD7 , KEY_KP_7}, | ||
| {VK_NUMPAD8 , KEY_KP_8}, | ||
| {VK_NUMPAD9 , KEY_KP_9}, | ||
| {VK_MULTIPLY , KEY_KP_Multiply}, | ||
| {VK_ADD , KEY_KP_Add}, | ||
| {VK_SEPARATOR , KEY_KP_Separator}, | ||
| {VK_SUBTRACT , KEY_KP_Subtract}, | ||
| {VK_DECIMAL , KEY_KP_Decimal}, | ||
| {VK_DIVIDE , KEY_KP_Divide}, | ||
| {VK_F1 , KEY_F1}, | ||
| {VK_F2 , KEY_F2}, | ||
| {VK_F3 , KEY_F3}, | ||
|
|
@@ -208,13 +208,13 @@ KeyboardMap::KeyboardMap() | |
| {VK_NAVIGATION_ACCEPT , KEY_Undefined}, // reserved | ||
| {VK_NAVIGATION_CANCEL , KEY_Undefined}, // reserved | ||
| {VK_NUMLOCK , KEY_Undefined}, | ||
| {VK_SCROLL , KEY_Undefined}, | ||
| {VK_SCROLL , KEY_Scroll_Lock}, | ||
| {VK_LSHIFT , KEY_Shift_L}, | ||
| {VK_RSHIFT , KEY_Shift_R}, | ||
| {VK_LCONTROL , KEY_Control_L}, | ||
| {VK_RCONTROL , KEY_Control_R}, | ||
| {VK_LMENU , KEY_Menu}, | ||
| {VK_RMENU , KEY_Menu}, | ||
| {VK_LMENU , KEY_Alt_L}, | ||
| {VK_RMENU , KEY_Alt_R}, | ||
| {VK_BROWSER_BACK , KEY_Undefined}, | ||
| {VK_BROWSER_FORWARD , KEY_Undefined}, | ||
| {VK_BROWSER_REFRESH , KEY_Undefined}, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.
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.
Why wouldn't this map to KEY_Menu?
Uh oh!
There was an error while loading. Please reload this page.
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.
VK_MENU on Windows is the (left) 'Alt' key. KEY_Menu is (according to KeyEvent.h) supposed to be "VK_APPS, the context-menu key" (I elaborated on this a bit more in the issue discussion)