| 969 | } |
| 970 | |
| 971 | void InputManager::CreateKeyboardInputItem(KeyInfo key_info, |
| 972 | DWORD initial_flags, |
| 973 | bool is_generating_key_up) { |
| 974 | INPUT input_element; |
| 975 | input_element.type = INPUT_KEYBOARD; |
| 976 | |
| 977 | input_element.ki.wVk = key_info.key_code; |
| 978 | input_element.ki.wScan = key_info.scan_code; |
| 979 | input_element.ki.dwFlags = initial_flags; |
| 980 | input_element.ki.dwExtraInfo = key_info.character; |
| 981 | input_element.ki.time = 0; |
| 982 | |
| 983 | if (key_info.is_extended_key) { |
| 984 | input_element.ki.dwFlags |= KEYEVENTF_EXTENDEDKEY; |
| 985 | } |
| 986 | if (is_generating_key_up) { |
| 987 | input_element.ki.dwFlags |= KEYEVENTF_KEYUP; |
| 988 | } |
| 989 | if (key_info.is_force_scan_code) { |
| 990 | input_element.ki.dwFlags |= KEYEVENTF_SCANCODE; |
| 991 | } |
| 992 | |
| 993 | this->inputs_.push_back(input_element); |
| 994 | } |
| 995 | |
| 996 | bool InputManager::IsModifierKey(wchar_t character) { |
| 997 | return character == WD_KEY_SHIFT || |