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

Method key_down

source/MaaKWinControlUnit/Input/UInputController.cpp:327–345  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

325}
326
327bool UInputController::key_down(int key_code)
328{
329 LogDebug << VAR(key_code);
330
331 std::unique_lock<std::mutex> lock(mutex_);
332
333 if (!connected_) {
334 LogError << "Not connected";
335 return false;
336 }
337
338 if (!emit_key(key_code, 1)) {
339 return false;
340 }
341 if (!emit_syn()) {
342 return false;
343 }
344 return true;
345}
346
347bool UInputController::key_up(int key_code)
348{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected