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

Method emit_key

source/MaaKWinControlUnit/Input/UInputController.cpp:521–533  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

519}
520
521bool UInputController::emit_key(int code, int value)
522{
523 input_event ev = { };
524 ev.type = EV_KEY;
525 ev.code = code;
526 ev.value = value;
527
528 if (write(fd_, &ev, sizeof(ev)) != sizeof(ev)) {
529 LogError << "Failed to write EV_KEY event" << VAR(code) << VAR(value) << VAR(errno) << VAR(std::strerror(errno));
530 return false;
531 }
532 return true;
533}
534
535bool UInputController::emit_syn()
536{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected