فهرست منبع

Removed getCommand in Windows input handling

marco.bellan 9 سال پیش
والد
کامیت
f17be5b3ad
1فایلهای تغییر یافته به همراه5 افزوده شده و 13 حذف شده
  1. 5 13
      Source/BansheeCore/Source/Win32/BsWin32Platform.cpp

+ 5 - 13
Source/BansheeCore/Source/Win32/BsWin32Platform.cpp

@@ -455,22 +455,22 @@ namespace BansheeEngine
 	 * @param[in]	ignoreMovement	If true, then movement keys (up/down/left/right) will be ignored and not considered
 	 * @param[in]	ignoreMovement	If true, then movement keys (up/down/left/right) will be ignored and not considered
 	 *								as input commands (useful if you need to parse num keys as numbers and not movement).
 	 *								as input commands (useful if you need to parse num keys as numbers and not movement).
 	 */
 	 */
-	bool getCommand(unsigned int virtualKeyCode, InputCommandType& command, bool ignoreMovement = false)
+	bool getCommand(unsigned int virtualKeyCode, InputCommandType& command)
 	{
 	{
 		switch (virtualKeyCode) 
 		switch (virtualKeyCode) 
 		{ 
 		{ 
 		case VK_LEFT:
 		case VK_LEFT:
 			command = isShiftPressed ? InputCommandType::SelectLeft : InputCommandType::CursorMoveLeft;
 			command = isShiftPressed ? InputCommandType::SelectLeft : InputCommandType::CursorMoveLeft;
-			return !ignoreMovement;
+			return true;
 		case VK_RIGHT:
 		case VK_RIGHT:
 			command = isShiftPressed ? InputCommandType::SelectRight : InputCommandType::CursorMoveRight;
 			command = isShiftPressed ? InputCommandType::SelectRight : InputCommandType::CursorMoveRight;
-			return !ignoreMovement;
+			return true;
 		case VK_UP:
 		case VK_UP:
 			command = isShiftPressed ? InputCommandType::SelectUp : InputCommandType::CursorMoveUp;
 			command = isShiftPressed ? InputCommandType::SelectUp : InputCommandType::CursorMoveUp;
-			return !ignoreMovement;
+			return true;
 		case VK_DOWN:
 		case VK_DOWN:
 			command = isShiftPressed ? InputCommandType::SelectDown : InputCommandType::CursorMoveDown;
 			command = isShiftPressed ? InputCommandType::SelectDown : InputCommandType::CursorMoveDown;
-			return !ignoreMovement;
+			return true;
 		case VK_ESCAPE:
 		case VK_ESCAPE:
 			command = InputCommandType::Escape;
 			command = InputCommandType::Escape;
 			return true;
 			return true;
@@ -862,14 +862,6 @@ namespace BansheeEngine
 						if(GetKeyboardState(keyState) == 0)
 						if(GetKeyboardState(keyState) == 0)
 							return 0;
 							return 0;
 
 
-						unsigned int vk = MapVirtualKeyEx(scanCode, MAPVK_VSC_TO_VK_EX, layout);
-						if(vk == 0)
-							return 0;
-
-						InputCommandType command = InputCommandType::Backspace;
-						if(getCommand(vk, command, true)) // We ignore character combinations that are special commands
-							return 0;
-
 						UINT32 finalChar = (UINT32)wParam;
 						UINT32 finalChar = (UINT32)wParam;
 
 
 						if(!onCharInput.empty())
 						if(!onCharInput.empty())