| 519 | } |
| 520 | |
| 521 | bool 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 | |
| 535 | bool UInputController::emit_syn() |
| 536 | { |
nothing calls this directly
no outgoing calls
no test coverage detected