Turn your keyboard and mouse connected to your computer into a bluetooth hid device.
WIP
- Linux 5.8+
- libinput
(Sorry. Only linux is supported.)
Rust 1.51+
Stop bluez if running.
sudo systemctl stop bluetooth.service
via Docker
docker run --rm \
--mount type=volume,source=btknmle,target=/var/lib/btknmle \
--device /dev/input --mount type=bind,source=/run/udev,target=/run/udev,readonly \
--mount type=bind,source=/sys/class/bluetooth,target=/sys/class/bluetooth,readonly \
--net host --cap-add net_admin \
ghcr.io/yskszk63/btknmle:latest
With key grab.
docker run --rm \
--mount type=volume,source=btknmle,target=/var/lib/btknmle \
--device /dev/input --mount type=bind,source=/run/udev,target=/run/udev,readonly \
--mount type=bind,source=/sys/class/bluetooth,target=/sys/class/bluetooth,readonly \
--net host --cap-add net_admin \
-eBTKNMLE_GRAB=yes \
ghcr.io/yskszk63/btknmle:latest
or
Download form Nightly Release Page
- pre build binary
- deb package
arch: amd64 / arm / armv7 / arm64
usage
btknmle
USAGE:
btknmle [FLAGS] [OPTIONS]
FLAGS:
-h, --help Prints help information
-v, --verbosity
-V, --version Prints version information
OPTIONS:
-D, --debug <debug> [env: BTKNMLE_DEBUG=]
-d, --device-id <device-id> [env: BTKNMLE_DEVID=] [default: 0]
--grab <grab> [env: BTKNMLE_GRAB=]
-T, --trace <trace> [env: BTKNMLE_TRACE=]
-f, --var-file <var-file> [env: BTKNMLE_VAR_FILE=] [default: /var/lib/btknmle/db.toml]
- Start btknmle [Device]
- Press any key to start Advertise [Device]
- Scan bluetooth devices [Host]
- Connect to btknmle named
btknmle
[Host] - Passkey input if required [Device]
- Connected
ArchLinux
sudo pacman -S libinput
git clone https://github.com/yskszk63/btknmle
cd btknmle
cargo build --release
Currently ThinkPad A285 (ArchLinux) as device and Pixel3 as host only.
Licensed under either of
- Apache License, Version 2.0 (LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or http://opensource.org/licenses/MIT)
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.