Some more key binding fixes. I know I should have made it in just one commit, I'm sorry, but I forgot to test some keys...
This fixes on WiiMote Button Mapping: Num / Num * Num Decimal Num Separator Num Lock Right Alt -> But on keyboards that have "Alt Gr" keys it still gonnal report it as Left Ctrl, because when you press it, the OS sends a Left Ctrl then a Alt key... Also fixes on SimplePad Button Mapping: Num Decimal Num Separator Num Enter Num Lock Right Shift Right Ctrl Right Alt Also it now differs Left (Ctrl|Shift|Alt) from the Right ones... All keys should be working now... I left "Print Scrn" and "Pause" out because I don't think those can (or should) be bound... git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4735 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
78facb0dc5
commit
4483f2c7b5
|
@ -260,10 +260,20 @@ std::string VKToString(int keycode)
|
||||||
case VK_LEFT: return "LEFT";
|
case VK_LEFT: return "LEFT";
|
||||||
case VK_RIGHT: return "RIGHT";
|
case VK_RIGHT: return "RIGHT";
|
||||||
|
|
||||||
case VK_LSHIFT: return "LEFT SHIFT";
|
case VK_LSHIFT: return "Left Shift";
|
||||||
case VK_LCONTROL: return "LEFT CTRL";
|
case VK_RSHIFT: return "Right Shift";
|
||||||
case VK_RCONTROL: return "RIGHT CTRL";
|
case VK_LCONTROL: return "Left Ctrl";
|
||||||
case VK_LMENU: return "LEFT ALT";
|
case VK_RCONTROL: return "Right Ctrl";
|
||||||
|
case VK_LMENU: return "Left Alt";
|
||||||
|
case VK_RMENU: return "Right Alt";
|
||||||
|
|
||||||
|
case VK_NUMLOCK: return "Num Lock";
|
||||||
|
case VK_MULTIPLY: return "Num *";
|
||||||
|
case VK_ADD: return "Num +";
|
||||||
|
case VK_SEPARATOR: return "Num Separator";
|
||||||
|
case VK_SUBTRACT: return "Num -";
|
||||||
|
case VK_DECIMAL: return "Num Decimal";
|
||||||
|
case VK_DIVIDE: return "Num /";
|
||||||
|
|
||||||
default: return KeyString = KeyStr;
|
default: return KeyString = KeyStr;
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,6 +40,24 @@ void DInput::DIKToString(unsigned int keycode, char *keyStr)
|
||||||
case DIK_RETURN:
|
case DIK_RETURN:
|
||||||
sprintf(keyStr, "Enter");
|
sprintf(keyStr, "Enter");
|
||||||
break;
|
break;
|
||||||
|
case DIK_LCONTROL:
|
||||||
|
sprintf(keyStr, "Left Ctrl");
|
||||||
|
break;
|
||||||
|
case DIK_RCONTROL:
|
||||||
|
strcpy(keyStr, "Right Ctrl");
|
||||||
|
break;
|
||||||
|
case DIK_LSHIFT:
|
||||||
|
sprintf(keyStr, "Left Shift");
|
||||||
|
break;
|
||||||
|
case DIK_RSHIFT:
|
||||||
|
sprintf(keyStr, "Right Shift");
|
||||||
|
break;
|
||||||
|
case DIK_LMENU:
|
||||||
|
sprintf(keyStr, "Left Alt");
|
||||||
|
break;
|
||||||
|
case DIK_RMENU:
|
||||||
|
strcpy(keyStr, "Right Alt");
|
||||||
|
break;
|
||||||
case DIK_UP:
|
case DIK_UP:
|
||||||
sprintf(keyStr, "Up");
|
sprintf(keyStr, "Up");
|
||||||
break;
|
break;
|
||||||
|
@ -70,6 +88,9 @@ void DInput::DIKToString(unsigned int keycode, char *keyStr)
|
||||||
case DIK_PGDN:
|
case DIK_PGDN:
|
||||||
strcpy(keyStr, "PgDn");
|
strcpy(keyStr, "PgDn");
|
||||||
break;
|
break;
|
||||||
|
case DIK_NUMLOCK:
|
||||||
|
strcpy(keyStr, "Num Lock");
|
||||||
|
break;
|
||||||
case DIK_NUMPAD0:
|
case DIK_NUMPAD0:
|
||||||
strcpy(keyStr, "Num 0");
|
strcpy(keyStr, "Num 0");
|
||||||
break;
|
break;
|
||||||
|
@ -100,9 +121,18 @@ void DInput::DIKToString(unsigned int keycode, char *keyStr)
|
||||||
case DIK_NUMPAD9:
|
case DIK_NUMPAD9:
|
||||||
strcpy(keyStr, "Num 9");
|
strcpy(keyStr, "Num 9");
|
||||||
break;
|
break;
|
||||||
case DIK_NUMPADSLASH:
|
case DIK_DIVIDE:
|
||||||
strcpy(keyStr, "Num /");
|
strcpy(keyStr, "Num /");
|
||||||
break;
|
break;
|
||||||
|
case DIK_NUMPADENTER:
|
||||||
|
strcpy(keyStr, "Num Enter");
|
||||||
|
break;
|
||||||
|
case DIK_DECIMAL:
|
||||||
|
strcpy(keyStr, "Num Decimal");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPADCOMMA:
|
||||||
|
strcpy(keyStr, "Num Separator");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
// TODO: Switch to unicode GetKeyNameText?
|
// TODO: Switch to unicode GetKeyNameText?
|
||||||
GetKeyNameTextA(keycode << 16, keyStr, 64);
|
GetKeyNameTextA(keycode << 16, keyStr, 64);
|
||||||
|
|
Loading…
Reference in New Issue