MCPcopy Create free account
hub / github.com/78/tenbox / SendKeyEvent

Method SendKeyEvent

src/daemon/runtime_manager.cpp:927–938  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

925}
926
927bool RuntimeManager::SendKeyEvent(const std::string& vm_id, uint32_t key_code, bool pressed) {
928 auto session = FindSession(vm_id);
929 if (!session) return false;
930 ipc::Message message;
931 message.channel = ipc::Channel::kInput;
932 message.kind = ipc::Kind::kRequest;
933 message.type = "input.key_event";
934 message.vm_id = vm_id;
935 message.fields["key_code"] = std::to_string(key_code);
936 message.fields["pressed"] = pressed ? "1" : "0";
937 return SendRuntime(session, message);
938}
939
940bool RuntimeManager::SendPointerEvent(const std::string& vm_id, int x, int y, uint32_t buttons) {
941 auto session = FindSession(vm_id);

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected