Robokeyboard

RoboKey is an open-source tool that transforms an Arduino Due into a powerful programmable keyboard. Designed for automation, testing, demos, and productivity hacks, RoboKey lets you control a PC using macro commands triggered from another device—like a Stream Deck or custom macro keypad.

What Can RoboKey Do?

Whether you’re delivering software demos, automating tasks, or building accessibility solutions, RoboKey helps you:

  • Send complex keystroke sequences from one PC to another
  • Use an Arduino Due as a USB HID keyboard
  • Control it via a Kotlin desktop app (GUI or CLI)
  • Trigger actions from macro tools like StreamDeck or AutoHotKey
  • Pause, stop, or resume keyboard tasks in real time

How It Works

RoboKey has two main parts:

  • Arduino Sketch: Turns your Arduino Due into a keyboard emulator using the HID library. Listens on the serial port for commands.
  • Kotlin Client: A desktop app that sends commands over serial or simulates local keystrokes. Built with Spring Boot, supports GUI + REST API + CLI.

Features

  • FlatLaf GUI for modern look & feel
  • Serial communication using PureJavaComm
  • Coroutine-based task pool for smooth concurrent execution
  • Interrupt-driven Arduino firmware for stop/pause/resume
  • UUID-tagged commands for response tracking and testing

Why Coroutines?

Originally, RoboKey used traditional threads, but managing long-running or interruptible tasks proved clunky. By switching to Kotlin coroutines, RoboKey can:

  • Run multiple tasks without blocking the main thread
  • Respond immediately to critical commands like pause or stop
  • Efficiently queue and manage keyboard sequences

The coroutine-based task pool makes RoboKey scalable, testable, and future-proof—ready for priority task support, advanced scheduling, and more.

Architecture Overview

  • Spring Boot base application
  • REST controller for integration with other tools
  • application.yaml for configuration (e.g., port, delays)
  • State machine on Arduino: IDLE, BUSY, PRIORITY
  • UUID-matching for testable command-response mapping

Stop, Pause, Resume

Granular control is built in:

  • Stop: Immediately halts all output, clears buffer
  • Pause: Freezes output mid-sequence (buffer retained)
  • Resume: Continues from paused position

Use Cases

  • Live demos: Perfectly timed sequences with pause/resume
  • Test automation: Simulate user input or key sequences
  • Stream Deck macros: Trigger sequences from other machines
  • Accessibility: Alternate keyboard control for special workflows

Get Involved

RoboKey is open-source (GPL v3) and contributions are welcome! Whether you’re adding features, creating integrations, or documenting new use cases, there’s plenty of room to help grow the project.

Coming Soon

  • Advanced task prioritization in coroutine pool
  • Integration with Raspberry Pi-based Robokeyboard hardware
  • Dedicated GUI-based editor for keystroke sequences
  • Improved unit + integration testing tools for async flows

Download it, try it out, and let me know what you think!

🧠 Check out the project docs for full Arduino code, Kotlin client setup, and usage examples. If you missed Part 1 of the series, start here.

🚀 Want to Skip the Setup?

We offer a ready-to-use RoboKey device for sale: an Arduino Due-compatible board pre-installed with RoboKey firmware and mounted in a 3D-printed desktop case. Perfect for rapid prototyping, demos, or just getting started without the hardware hassle.

It includes:

  • Pre-flashed Arduino Due-compatible board
  • Custom 3D-printed desktop enclosure
  • USB cable + optional PC-side Kotlin client (pre-configured)

Ideal for developers, automation testers, educators, or anyone looking to explore keyboard-based control. We make it easy so you can get automating right away.

Interested? Get in touch or email [email protected] for pricing and availability.

📫 Feedback, issues, or ideas? Email me at [email protected]

Scroll to Top