/twiddler-headless

Twiddler Headless Helper Tools and Tips

Primary LanguageJavaScript

Twiddler Headless Helpers

A set of tools and tips to make Twiddler’s “Untethered Re-Chording” mode more useable.

Contents

  1. TWIDDLER.KEY :: An example of the TWIDDLER.KEY file you would see on your device.
  2. test.org :: Empty Org Mode file to test the scripts with
  3. twiddler-read-dotkey :: HID binary to ASCII converter, as NodeJS script
  4. twiddler-dotkey-org-inbox-and-clear :: Send TWIDDLER.KEY contents to Emacs Org Mode file, as simple Bash script

Installation

twiddler-read-dotkey will require NodeJS to be installed. So far, I’ve tried to make it very backwards-compatible.

twiddler-dotkey-org-inbox-and-clear is a generic shell script, using Bash. You will need to edit the “Configuration” section of the Bash file to point to your own locations and adjust the Org headline to your liking.

Tips

  1. If you’re not sure if you’re in untethered mode, hit N+S OOMO again, you should see blinking, as it tries to connect to bluetooth, then hit the chord again and you’ll know.
  2. Use an Org Mode shell link to run the script quickly from your agenda. Mine looks like this [[shell:/home/user/twiddler-headless/twiddler-dotkey-org-inbox-and-clear][Twiddler Untethered -> Org]]. I use C-c C-o (org-open-at-point) to run this once I plug in my Twiddler.
  3. There’s no reason not to run this automatically via udev or inotify but I have not been able to make this work yet. If you do have success, please share.

Inspiration

On the TekGear (Twiddler manufacturer) forums, I learned about this mode and about the tool Trout. Unfortunately Trout doesn’t seem to work on Linux, and there was no source code. Luckily the format of the TWIDDLER.KEY file is very straight-forward. It’s just two bytes for every keypress, representing HID codes. A couple hours later I had the start of this tool.

License

Free as in beer. Do what you want. If you make anything interesting, I’d love to hear about it.