MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / key_down

Method key_down

source/MaaWin32ControlUnit/Input/MessageInput.cpp:1100–1113  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1098}
1099
1100bool 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
1115bool MessageInput::key_up(int key)
1116{

Callers

nothing calls this directly

Calls 1

make_keydown_lparamFunction · 0.85

Tested by

no test coverage detected