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

Method emit_abs

source/MaaKWinControlUnit/Input/UInputController.cpp:507–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

505}
506
507bool UInputController::emit_abs(int code, int value)
508{
509 input_event ev = { };
510 ev.type = EV_ABS;
511 ev.code = code;
512 ev.value = value;
513
514 if (write(fd_, &ev, sizeof(ev)) != sizeof(ev)) {
515 LogError << "Failed to write EV_ABS event" << VAR(code) << VAR(value) << VAR(errno) << VAR(std::strerror(errno));
516 return false;
517 }
518 return true;
519}
520
521bool UInputController::emit_key(int code, int value)
522{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected