QMK firmware for TEX keyboards

QMK firmware for the TEX Shinobi BLE5

Open-source QMK firmware for the TEX Shinobi BLE5, the 7-row ThinkPad-style keyboard with a TrackPoint. It is a full replacement for the stock firmware (AP_0407 V1.04.04). It supports USB, Bluetooth with three hosts, the TrackPoint, battery sleep, and settings that survive a power cut and a firmware flash with tex_flash.

Unofficial. This is not TEX firmware, and TEX does not support it. It is published with TEX’s permission, and thanks to TEX for sharing the schematic and answering questions. Install it at your own risk. TEX’s bootloader is never touched, so you can always go back to the stock firmware (see Going back to stock).

The owner’s manual covers every key and light, Bluetooth, sleep, troubleshooting and known issues.

Status: v1.4. v1.0 has been in daily use on one Shinobi BLE5 (US layout) over USB and Bluetooth since 2026-11-04.

Installing

You need the USB cable and a computer: Windows or a Mac for the quick install; Windows, Linux, FreeBSD or OpenBSD with Python for option 1; Windows for option 2 (see Other operating systems). Turn the computer’s Bluetooth off before flashing, so it only talks to the keyboard over USB. All downloads are on the Releases page, each with its SHA-256 sums.

Windows or Mac, no Python

  1. Download the firmware, tex_shinobi_v1.4.bin, and the installer for your computer:

    Computer Installer
    Windows tex_flash.exe
    Mac with Apple silicon (M1 and later) tex_flash_macos_arm64
    Mac with an Intel processor tex_flash_macos_x86_64
  2. Plug the keyboard in with the USB cable and turn the computer’s Bluetooth off.
  3. Run the installer on the firmware from the folder you downloaded both to.
    • Windows: open a Command Prompt (no administrator rights needed), then:

      cd /d %USERPROFILE%\Downloads
      tex_flash.exe tex_shinobi_v1.4.bin
      

      Windows may warn that the publisher is unknown, as the exe is not signed: More info, then Run anyway.

    • Mac: open Terminal, then (for an Intel Mac, use tex_flash_macos_x86_64 instead):

      cd ~/Downloads
      chmod +x tex_flash_macos_arm64
      xattr -d com.apple.quarantine tex_flash_macos_arm64
      ./tex_flash_macos_arm64 tex_shinobi_v1.4.bin
      

      The installer is not signed by Apple; xattr lets macOS run it. Not yet tested with a keyboard on a Mac: it builds and starts on Apple’s Intel and Apple-silicon machines, finds no keyboard there, and stops as it should. Please report what happens on yours.

  4. It takes about 10 seconds. “the firmware is up (04D9:0407)” means success. Press Fn+B in a text editor: the keyboard types a line starting v1.4 dflt .... If a step fails, the installer stops and the keyboard stays in its bootloader, ready for another try.

Your saved settings (TrackPoint, up/down speed, sleep time, Mac layout) are kept. Add --reset-settings to clear them.

What works

Fn keys

Keys Does
Fn+Mute / Fn+Vol- / Fn+Vol+ Bluetooth host 1 / 2 / 3. Hold 3 s to pair a new host to that slot
Fn+Esc back to USB
Fn+M Mac layout on or off, remembered (from v1.4)
Fn+1 … Fn+9 TrackPoint sensitivity 1-9 (default 3); the keyboard types back both TrackPoint settings, e.g. “tp3 ud100”
Fn+Down / Fn+Up / Fn+0 (or Fn - / Fn =) TrackPoint up/down speed against left/right: a step slower, a step faster, the same (50-200 %); typed back the same way
Fn+F1 … Fn+F9 sleep on battery after 1, 2, 5, 10, 15, 30, 60, 120 min or never; typed back (default 15 min)
Fn+B types one line: firmware version, battery level, power source, sleep time, TrackPoint settings and Bluetooth state
Fn+PgUp / Fn+PgDn Play/pause / Stop
Fn+Left / Fn+Right Previous / next track

The TrackPoint settings and sleep time are saved in flash. They survive a power cut, and every USB plug or unplug is a power cut on this keyboard. Flashing with tex_flash keeps them (add --reset-settings to clear them); TEX’s updater, and tex_flash from v1.3 and older, set them back to the defaults.

Going back to stock

Run TEX’s original AP_0407_4.04.exe the same way, from a Command Prompt run as administrator. Add -force if it says there is nothing to update.

Known limits

Other installation options

Option 1: the installer, tex_flash.py

Needs Python 3 with pip install hidapi, the tools folder from this repository, and the firmware tex_shinobi_v1.4.bin. Nothing from TEX is needed: the keyboard’s firmware key is built in, published with TEX’s permission.

From the tools folder:

python -I tex_flash.py tex_shinobi_v1.4.bin

It takes about 5 seconds. It switches the keyboard to the bootloader, keeps a copy of the version block, writes the image, checks the bootloader’s checksum, and restarts the keyboard. “the firmware is up (04D9:0407)” means success. Press Fn+B in a text editor: the keyboard types a line starting v1.4 dflt .... If any step fails, the installer stops and the keyboard stays in the bootloader, ready for another try or for option 2.

tex_flash.exe and the Mac installers of the quick install are this same file packaged with Python and hidapi.

Option 2: TEX’s updater (Windows, no Python needed)

tex_shinobi_v1.4_updater.exe is TEX’s AP_0407 V1.04.04 updater with this firmware inside it in place of the stock image. Nothing else in the updater is changed. TEX allowed sharing it.

  1. Open a Command Prompt as administrator: Start, type cmd, right-click Command Prompt, Run as administrator. Windows asks for administrator rights for TEX’s updater (and for TEX’s own AP_0407_4.04.exe); in a normal Command Prompt it fails with “The requested operation requires elevation”. Then go to the folder with the exe, for example cd /d %USERPROFILE%\Downloads.
  2. Run tex_shinobi_v1.4_updater.exe -force. -force is needed because the updater still shows the stock version number and would otherwise say there is nothing to update.
  3. Click through the update window as for a normal TEX update. The keyboard switches to its bootloader (USB 04D9:1407) for about 10 seconds, then comes back as the keyboard (04D9:0407).
  4. Press Fn+B in a text editor. The keyboard types one line starting v1.4 dflt ....

Other operating systems

tools/tex_flash.py is the same file on every OS. Details, the permission rules and what is verified are in tools/unix/README.md. Run it from the tools folder; no sudo is needed when flashing.

OS Status Install hidapi Permission rule (once, as root) Run
Windows tested pip install hidapi none python -I tex_flash.py tex_shinobi_v1.4.bin
macOS not yet tested with a keyboard (the packaged installer starts and looks for it on macOS 15, Intel and Apple silicon) pip install hidapi, or use the quick install none known python3 -I tex_flash.py tex_shinobi_v1.4.bin
Linux not yet tested on hardware pip install hidapi in a venv, or apt install python3-hid copy tools/unix/70-tex-shinobi.rules to /etc/udev/rules.d/, udevadm control --reload, replug python3 -I tex_flash.py tex_shinobi_v1.4.bin
FreeBSD untested pkg install hidapi libusb, then pip install hidapi group texflash and tools/unix/tex-shinobi.devd.conf as Linux
OpenBSD untested; no working backend known (hidapi needs libusb, which needs uhid out of the kernel) - /dev/uhid* group, see the guide flash from another OS

Messages are in English, Traditional Chinese, Japanese, German, French or Spanish, chosen from the system locale or with --lang (for example --lang de). The translations are unreviewed.

The installer can also take the key from TEX’s stock updater or a key file, as a second argument, for anyone who wants to check the built-in key: python -I tex_flash.py tex_shinobi_v1.4.bin AP_0407_4.04.exe. python -I tex_key.py AP_0407_4.04.exe xor_key_52.bin writes the key file.

Bootloader by hand

Hold Esc while plugging in the USB cable. The keyboard starts in the bootloader, where both options can flash it.

Building

The firmware builds against QMK qmk_firmware at the commit in qmk_firmware.commit. With the QMK CLI installed (or inside the ghcr.io/qmk/qmk_cli container), from the shinobi folder:

tools/build_firmware.sh ../qmk_firmware default

It clones qmk_firmware there if needed, checks out the pinned commit, patches the tree, copies qmk/ in as keyboards/tex/shinobi, compiles, and checks the image against the bootloader’s limits.

tools/patch_qmk_tree.sh makes QMK’s raw HID reports 64 bytes, which TEX’s updater expects. It also fixes the ChibiOS-Contrib RSTCU base address for this chip. The output, .build/tex_shinobi_default.bin in the QMK tree, is linked at 0x3200 behind TEX’s bootloader. tools/build_updater.py AP_0407_4.04.exe <image.bin> <out dir> wraps an image into a copy of TEX’s updater. The GitHub Actions workflow runs the same script on every push. Release images are built from a tagged commit and listed with their SHA-256 on the release page.

tools/tex_selftest.py runs the stock factory flash self-test over USB (raw HID 14 00) and prints PASS or FAIL. The firmware side is only in builds with TEX_SELFTEST: add #define TEX_SELFTEST to qmk/config.h before building. It costs 88 bytes; release images leave it out and answer with the stock refusal.

The other keymaps (canary, canary_slow, test90, test600, diag, sleep30) are developer test builds from the port. They return to the bootloader on a timer, sleep after 30 s or expose diagnostics. Don’t flash them for daily use.

How the port works, the hardware map and the reverse-engineered protocols are in PORT_NOTES.md.

Credits and license

QMK port by Mauro DiBenedetto. Thanks to TEX for permission to publish, the schematic, and help along the way. The linker script is adapted from QMK’s annepro2 (MIT; notice in the file).

GPL-2.0-or-later, like QMK. See LICENSE. TEX’s updater and bootloader are TEX’s and are not covered by this license.