| 1098 | } |
| 1099 | |
| 1100 | bool MessageInput::key_down(int key) |
| 1101 | { |
| 1102 | LogInfo << VAR(config_.mode) << VAR(key); |
| 1103 | |
| 1104 | if (!hwnd_) { |
| 1105 | LogError << VAR(config_.mode) << VAR(config_.with_cursor_pos) << VAR(config_.with_window_pos) << "hwnd_ is nullptr"; |
| 1106 | return false; |
| 1107 | } |
| 1108 | |
| 1109 | HWND target = send_activate(); |
| 1110 | |
| 1111 | LPARAM lParam = make_keydown_lparam(key); |
| 1112 | return send_or_post_w(target, WM_KEYDOWN, static_cast<WPARAM>(key), lParam); |
| 1113 | } |
| 1114 | |
| 1115 | bool MessageInput::key_up(int key) |
| 1116 | { |
nothing calls this directly
no test coverage detected