JetKVM - Control any computer remotely
kvm
Go to file
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
.devcontainer chore: add VSCode extensions for improved development environment (#509) 2025-05-23 14:38:15 +02:00
.github build(deps): bump actions/checkout from 4 to 5 (#759) 2025-09-04 11:19:00 +02:00
.vscode chore: add VSCode extensions for improved development environment (#509) 2025-05-23 14:38:15 +02:00
bin Release 202412292127 2024-12-29 21:27:42 +01:00
cmd feat: add command to show version (#604) 2025-07-11 11:32:46 +02:00
internal feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
resource chore: upgrade jetkvm native and fix the params of fadeIn / fadeOut (#808) 2025-09-17 01:38:23 +02:00
scripts update netboot.xyz-multiarch.iso to 2.0.88 (#799) 2025-09-12 08:41:17 +02:00
ui feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
.gitignore chore: run golang tests 2025-05-16 19:53:01 +02:00
.golangci.yml feat: add command to show version (#604) 2025-07-11 11:32:46 +02:00
CODE_OF_CONDUCT.md Release 202412292127 2024-12-29 21:27:42 +01:00
DEVELOPMENT.md docs: update pprof section of DEVELOPMENT.md (#802) 2025-09-12 11:11:28 +02:00
LICENSE Release 202412292127 2024-12-29 21:27:42 +01:00
Makefile chore: enhance the gzip and cacheable handling of static files 2025-09-12 08:41:41 +02:00
README.md docs: add comprehensive DEVELOPMENT.md for JetKVM (#692) 2025-07-16 00:04:41 +02:00
block_device.go chore/Deprecate browser mount (#752) 2025-08-28 23:46:55 +02:00
block_device_linux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
block_device_notlinux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
cloud.go feat: send all paste keystrokes to backend (#789) 2025-09-18 13:00:57 +02:00
config.go fix/Jiggler settings not saving (#786) 2025-09-09 14:48:49 +02:00
dc_metrics.go feat(metrics): adding prometheus metrics for dc power extension (#556) 2025-07-11 17:04:41 +02:00
dev_deploy.sh Add -i/--install option to dev_deploy.sh (#527) 2025-07-11 17:09:49 +02:00
display.go chore: upgrade jetkvm native and fix the params of fadeIn / fadeOut (#808) 2025-09-17 01:38:23 +02:00
go.mod feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
go.sum feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
hidrpc.go feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
hw.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
jiggler.go fix/Jiggler settings not saving (#786) 2025-09-09 14:48:49 +02:00
jsonrpc.go feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
log.go feat: hid rpc channel (#755) 2025-09-04 22:27:56 +02:00
main.go fix(timesync): ensure that auto-update waits for time sync (#609) 2025-09-16 15:37:02 +02:00
mdns.go feat: Adds IPv6 disabling feature (#803) 2025-09-16 12:44:56 +02:00
native.go Add ability to track modifier state on the device (#725) 2025-08-26 17:09:35 +02:00
native_linux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
native_notlinux.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
network.go fix(timesync): ensure that auto-update waits for time sync (#609) 2025-09-16 15:37:02 +02:00
ota.go Implement HTTP proxy option (#515). (#521) 2025-07-11 17:43:22 +02:00
prometheus.go chore: Enable more linters 2025-03-26 18:41:09 +01:00
publish_source.sh fix: Shell linting (#328) 2025-04-11 00:43:45 +02:00
serial.go feat(metrics): adding prometheus metrics for dc power extension (#556) 2025-07-11 17:04:41 +02:00
terminal.go fix: Log spam when using a web terminal #547 (#550) 2025-06-03 01:51:30 +02:00
timesync.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
usb.go feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
usb_mass_storage.go chore/Deprecate browser mount (#752) 2025-08-28 23:46:55 +02:00
version.go feat: add command to show version (#604) 2025-07-11 11:32:46 +02:00
video.go network enhanecment / refactor (#361) 2025-04-16 01:39:23 +02:00
web.go feat: send all paste keystrokes to backend (#789) 2025-09-18 13:00:57 +02:00
web_tls.go fix: ensure certStore is initialised when adding custom cert (#639) 2025-06-30 18:58:39 +02:00
webrtc.go feat: release keyPress automatically (#796) 2025-09-18 13:35:47 +02:00
wol.go Add ability to track modifier state on the device (#725) 2025-08-26 17:09:35 +02:00

README.md

JetKVM is a high-performance, open-source KVM over IP (Keyboard, Video, Mouse) solution designed for efficient remote management of computers, servers, and workstations. Whether you're dealing with boot failures, installing a new operating system, adjusting BIOS settings, or simply taking control of a machine from afar, JetKVM provides the tools to get it done effectively.

Features

  • Ultra-low Latency - 1080p@60FPS video with 30-60ms latency using H.264 encoding. Smooth mouse and keyboard interaction for responsive remote control.
  • Free & Optional Remote Access - Remote management via JetKVM Cloud using WebRTC.
  • Open-source software - Written in Golang on Linux. Easily customizable through SSH access to the JetKVM device.

Contributing

We welcome contributions from the community! Whether it's improving the firmware, adding new features, or enhancing documentation, your input is valuable. We also have some rules and taboos here, so please read this page and our Code of Conduct carefully.

I need help

The best place to search for answers is our Documentation. If you can't find the answer there, check our Discord Server.

I want to report an issue

If you've found an issue and want to report it, please check our Issues page. Make sure the description contains information about the firmware version you're using, your platform, and a clear explanation of the steps to reproduce the issue.

Development

JetKVM is written in Go & TypeScript. with some bits and pieces written in C. An intermediate level of Go & TypeScript knowledge is recommended for comfortable programming.

The project contains two main parts, the backend software that runs on the KVM device and the frontend software that is served by the KVM device, and also the cloud.

For comprehensive development information, including setup, testing, debugging, and contribution guidelines, see DEVELOPMENT.md.

For quick device development, use the ./dev_deploy.sh script. It will build the frontend and backend and deploy them to the local KVM device. Run ./dev_deploy.sh --help for more information.

Backend

The backend is written in Go and is responsible for the KVM device management, the cloud API and the cloud web.

Frontend

The frontend is written in React and TypeScript and is served by the KVM device. It has three build targets: device, development and production. Development is used for development of the cloud version on your local machine, device is used for building the frontend for the KVM device and production is used for building the frontend for the cloud.