Take account of the numlock when mapping mgl virtual keycodes to wx ones.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39389 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
10383fe27b
commit
3fa2676fc3
@ -297,23 +297,25 @@ static long wxScanToKeyCode(event_t *event, bool translate)
|
||||
|
||||
if ( translate )
|
||||
{
|
||||
bool numlock = (event->modifiers & EVT_NUMLOCK) != 0;
|
||||
|
||||
switch ( EVT_scanCode(event->message) )
|
||||
{
|
||||
KEY (KB_padMinus, WXK_NUMPAD_SUBTRACT)
|
||||
KEY (KB_padPlus, WXK_NUMPAD_ADD)
|
||||
KEY (KB_padTimes, WXK_NUMPAD_MULTIPLY)
|
||||
KEY (KB_padDivide, WXK_NUMPAD_DIVIDE)
|
||||
KEY (KB_padCenter, WXK_NUMPAD_SEPARATOR) // ?
|
||||
KEY (KB_padLeft, WXK_NUMPAD_LEFT)
|
||||
KEY (KB_padRight, WXK_NUMPAD_RIGHT)
|
||||
KEY (KB_padUp, WXK_NUMPAD_UP)
|
||||
KEY (KB_padDown, WXK_NUMPAD_DOWN)
|
||||
KEY (KB_padInsert, WXK_NUMPAD_INSERT)
|
||||
KEY (KB_padDelete, WXK_NUMPAD_DELETE)
|
||||
KEY (KB_padHome, WXK_NUMPAD_HOME)
|
||||
KEY (KB_padEnd, WXK_NUMPAD_END)
|
||||
KEY (KB_padPageUp, WXK_NUMPAD_PAGEUP)
|
||||
KEY (KB_padPageDown, WXK_NUMPAD_PAGEDOWN)
|
||||
KEY (KB_padCenter, numlock ? WXK_NUMPAD5 : WXK_NUMPAD_SEPARATOR) // ?
|
||||
KEY (KB_padLeft, numlock ? WXK_NUMPAD4 : WXK_NUMPAD_LEFT)
|
||||
KEY (KB_padRight, numlock ? WXK_NUMPAD6 : WXK_NUMPAD_RIGHT)
|
||||
KEY (KB_padUp, numlock ? WXK_NUMPAD8 : WXK_NUMPAD_UP)
|
||||
KEY (KB_padDown, numlock ? WXK_NUMPAD2 : WXK_NUMPAD_DOWN)
|
||||
KEY (KB_padInsert, numlock ? WXK_NUMPAD0 : WXK_NUMPAD_INSERT)
|
||||
KEY (KB_padDelete, numlock ? WXK_DECIMAL : WXK_NUMPAD_DELETE)
|
||||
KEY (KB_padHome, numlock ? WXK_NUMPAD7 : WXK_NUMPAD_HOME)
|
||||
KEY (KB_padEnd, numlock ? WXK_NUMPAD1 : WXK_NUMPAD_END)
|
||||
KEY (KB_padPageUp, numlock ? WXK_NUMPAD9 : WXK_NUMPAD_PAGEUP)
|
||||
KEY (KB_padPageDown, numlock ? WXK_NUMPAD3 : WXK_NUMPAD_PAGEDOWN)
|
||||
KEY (KB_1, '1')
|
||||
KEY (KB_2, '2')
|
||||
KEY (KB_3, '3')
|
||||
|
Loading…
Reference in New Issue
Block a user