kvm/ui
Aveline afb146d78c
feat: release keyPress automatically (#796)
* feat: release keyPress automatically

* send keepalive when pressing the key

* remove logging

* clean up logging

* chore: use unreliable channel to send keepalive events

* chore: use ordered unreliable channel for pointer events

* chore: adjust auto release key interval

* chore: update logging for kbdAutoReleaseLock

* chore: update comment for KEEPALIVE_INTERVAL

* fix: should cancelAutorelease when pressed is true

* fix: handshake won't happen if webrtc reconnects

* chore: add trace log for writeWithTimeout

* chore: add timeout for KeypressReport

* chore: use the proper key to send release command

* refactor: simplify HID RPC keyboard input handling and improve key state management

- Updated `handleHidRPCKeyboardInput` to return errors directly instead of keys down state.
- Refactored `rpcKeyboardReport` and `rpcKeypressReport` to return errors instead of states.
- Introduced a queue for managing key down state updates in the `Session` struct to prevent input handling stalls.
- Adjusted the `UpdateKeysDown` method to handle state changes more efficiently.
- Removed unnecessary logging and commented-out code for clarity.

* refactor: enhance keyboard auto-release functionality and key state management

* fix: correct Windows default auto-repeat delay comment from 1ms to 1s

* refactor: send keypress as early as possible

* refactor: replace console.warn with console.info for HID RPC channel events

* refactor: remove unused NewKeypressKeepAliveMessage function from HID RPC

* fix: handle error in key release process and log warnings

* fix: log warning on keypress report failure

* fix: update auto-release keyboard interval to 225

* refactor: enhance keep-alive handling and jitter compensation in HID RPC

- Implemented staleness guard to ignore outdated keep-alive packets.
- Added jitter compensation logic to adjust timer extensions based on packet arrival times.
- Introduced new methods for managing keep-alive state and reset functionality in the Session struct.
- Updated auto-release delay mechanism to use dynamic durations based on keep-alive timing.
- Adjusted keep-alive interval in the UI to improve responsiveness.

* gofmt

* clean up code

* chore: use dynamic duration for scheduleAutoRelease

* Use harcoded timer reset value for now

* fix: prevent nil pointer dereference when stopping timers in Close method

* refactor: remove nil check for kbdAutoReleaseTimers in DelayAutoReleaseWithDuration

* refactor: optimize dependencies in useHidRpc hooks

* refactor: streamline keep-alive timer management in useKeyboard hook

* refactor: clarify comments in useKeyboard hook for resetKeyboardState function

* refactor: reduce keysDownStateQueueSize

* refactor: close and reset keysDownStateQueue in newSession function

* chore: resolve conflicts

* resolve conflicts

---------

Co-authored-by: Adam Shiervani <adam.shiervani@gmail.com>
2025-09-18 13:35:47 +02:00
..
public chore: enhance the gzip and cacheable handling of static files 2025-09-12 08:41:41 +02:00
src feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
.env.cloud-development feat(cloud): Add custom cloud API URL configuration support (#181) 2025-02-25 16:10:46 +01:00
.env.cloud-production feat(cloud): Add custom cloud API URL configuration support (#181) 2025-02-25 16:10:46 +01:00
.env.cloud-staging feat(cloud): Add custom cloud API URL configuration support (#181) 2025-02-25 16:10:46 +01:00
.gitignore Release 202412292127 2024-12-29 21:27:42 +01:00
.prettierrc refactor: network settings UI (#486) 2025-05-20 15:22:08 +02:00
dev_device.sh network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
eslint.config.cjs Add ability to track modifier state on the device (#725) 2025-08-26 17:09:35 +02:00
index.html chore: enhance the gzip and cacheable handling of static files 2025-09-12 08:41:41 +02:00
package-lock.json build(deps-dev): bump vite (#788) 2025-09-11 12:07:52 +02:00
package.json build(deps-dev): bump vite (#788) 2025-09-11 12:07:52 +02:00
postcss.config.js chore: Upgrade UI vite and tailwind packages (#443) 2025-05-15 14:21:03 +02:00
tailwind.config.js chore(ui): Patch-bump packages and use tailwind upgrade (#456) 2025-05-16 19:59:57 +02:00
tsconfig.json chore(ui): Clean up warnings (#536) 2025-05-30 15:01:32 +02:00
tsconfig.node.json Release 202412292127 2024-12-29 21:27:42 +01:00
vite-env.d.ts Release 202412292127 2024-12-29 21:27:42 +01:00
vite.config.ts chore: enhance the gzip and cacheable handling of static files 2025-09-12 08:41:41 +02:00