Metadata-Version: 2.3
Name: f0-usb-keyboard-bt-proxy
Version: 0.0.1a2
Summary: Utility to proxy keyboard events via BT -> FlipperZero -> USB
License: MIT
Author: Tzoiker
Author-email: tzoiker@gmail.com
Requires-Python: >=3.10,<=3.13
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Dist: PySide6 (>=6.0,<7.0)
Requires-Dist: argclass (>=1.0,<2.0)
Requires-Dist: pysdl2
Requires-Dist: pysdl2-dll
Project-URL: Repository, https://github.com/tzoiker/flipperzero-usb-keyboard-bt-proxy
Description-Content-Type: text/markdown

# FlipperZero USB Keyboard BT Proxy

– Why???

– IDK.

But in reality, I had a mini-PC to configure, a laptop and no external keyboard.

## Table of Contents

* [About](#about)
  * [GUI](#about_gui)
  * [FAP](#about_fap)
* [Installation](#installation)
  * [GUI](#gui)
  * [FAP](#fap)
* [Usage](#usage)

## <a name="about"/> About

Laptop –> Bluetooth (BLE) –> FlipperZero –> USB (HID) –> Device.

Stability/usability is questionable at this moment.

### <a name="about_gui"/> GUI
Requires **python >= 3.10**.

Should work on MacOS (tested), Linux (not tested), Windows (not tested).

**PySide6** used for bluetooth client.
It's fat and an overkill, but my experience with [Bleak](https://bleak.readthedocs.io)
was unsatisfactory.

**PySDL2** is used to capture keyboard events. They map almost as is to HID.

### <a name="about_fap"/> FAP

[This](https://github.com/pragmaeuge/flipper_zero_bts_demo_app) repository
helped to figure stuff out.

## <a name="installation"/> Installation

### <a name="gui"/> GUI

```bash
pip install f0-usb-keyboard-bt-proxy
```

### <a name="fap"/> FAP

Build from source:
```bash
git clone https://github.com/tzoiker/flipperzero-usb-keyboard-bt-proxy.git
cd flipperzero-usb-keyboard-bt-proxy/fap
pip install ufbt
```

Optionally, select desirable firmware version, e.g.,
```
ufbt update -b 1.0.1
```
and, then, after connecting F0,
```
ufbt launch
```

Otherwise,
- download .fap file from the [releases](https://github.com/tzoiker/flipperzero-usb-keyboard-bt-proxy/releases)
  (may not be compatible with your version of firmware);
- place it to the SD-card under apps/Bluetooth.


## <a name="Usage"/> Usage

1. Connect your F0 to the device you need a keyboard for.
2. Open the `USB Keyboard BT Proxy` application on F0.
3. Press Start. It will show BT device name, e.g., `UsbKbBtP <F0 name>`.
4. Enable bluetooth on your computer.
5. Run `f0-usb-keyboard-bt-proxy --device-bt-name="UsbKbBtP <F0 name>"`.
6. Now you can type in the opened window, and it will, hopefully, work.

