feat: hid rpc channel (#755)

* feat: use hidRpcChannel to save bandwidth

* chore: simplify handshake of hid rpc

* add logs

* chore: add timeout when writing to hid endpoints

* fix issues

* chore: show hid rpc version

* refactor hidrpc marshal / unmarshal

* add queues for keyboard / mouse event

* chore: change logging level of JSONRPC send event to trace

* minor changes related to logging

* fix: nil check

* chore: add comments and remove unused code

* add useMouse

* chore: log msg data only when debug or trace mode

* chore: make tslint happy

* chore: unlock keyboardStateLock before calling onKeysDownChange

* chore: remove keyPressReportApiAvailable

* chore: change version handle

* chore: clean up unused functions

* remove comments
This commit is contained in:
Aveline
2025-09-04 22:27:56 +02:00
committed by GitHub
parent e8ef82e582
commit bcc307b147
21 changed files with 1292 additions and 216 deletions

View File

@@ -83,7 +83,7 @@ func writeJSONRPCEvent(event string, params any, session *Session) {
Str("data", requestString).
Logger()
scopedLogger.Info().Msg("sending JSONRPC event")
scopedLogger.Trace().Msg("sending JSONRPC event")
err = session.RPCChannel.SendText(requestString)
if err != nil {