From 06ab4d7228ca159a96a3c1871024deb663e44faa Mon Sep 17 00:00:00 2001 From: univrsal Date: Sat, 4 Jan 2025 11:57:35 +0100 Subject: [PATCH] Deps: Update fork --- .gitmodules | 2 +- deps/libuiohook | 2 +- src/network/websocket_server.cpp | 7 ++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index 4525f6e5..26047f17 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,3 +1,3 @@ [submodule "deps/libuiohook"] path = deps/libuiohook - url = https://github.com/kwhat/libuiohook + url = https://github.com/TolikPylypchuk/libuiohook diff --git a/deps/libuiohook b/deps/libuiohook index 340b6990..ce96f423 160000 --- a/deps/libuiohook +++ b/deps/libuiohook @@ -1 +1 @@ -Subproject commit 340b699086d20032f88b2cd759e92f07dc7d1df5 +Subproject commit ce96f4239e5ff7337e11f94ca5601089f82f306f diff --git a/src/network/websocket_server.cpp b/src/network/websocket_server.cpp index 8bd4969e..5a3cdeac 100644 --- a/src/network/websocket_server.cpp +++ b/src/network/websocket_server.cpp @@ -63,7 +63,9 @@ QString serialize_uiohook(const uiohook_event *e, const std::string &source_name switch (e->type) { case EVENT_KEY_TYPED: - obj["char"] = QString(e->data.keyboard.keychar); + // convert wchar_t to QString + obj["char"] = QString::fromWCharArray(&e->data.keyboard.keychar, 1); + /* fallthrough */ case EVENT_KEY_PRESSED: case EVENT_KEY_RELEASED: @@ -93,9 +95,8 @@ QString serialize_uiohook(const uiohook_event *e, const std::string &source_name obj["event_type"] = QString(ev_to_str(e->type)); obj["time"] = int(e->time); obj["mask"] = e->mask; - obj["clicks"] = e->data.wheel.clicks; obj["type"] = e->data.wheel.type; - obj["amount"] = e->data.wheel.amount; + obj["delta"] = e->data.wheel.delta; obj["rotation"] = e->data.wheel.rotation; obj["direction"] = e->data.wheel.direction; obj["x"] = e->data.wheel.x;