Skip to main content

Introducing KeyTempo: A Privacy-First Keystroke Dynamics Extractor for the AI Era

Introducing KeyTempo: A Privacy-First Keystroke Dynamics Extractor for the AI Era

Today, I am thrilled to announce the release of @keytempo/core on NPM.

KeyTempo is a lightweight, zero-dependency edge sensor module designed to extract the physical rhythm of typing—known as keystroke dynamics—while strictly preserving user privacy.

The Ethical Boundary: Privacy by Design

As developers, we are constantly looking for ways to better understand user behavior, flow, and state. However, this should never come at the cost of reading their private thoughts or sensitive data.

KeyTempo is NOT a keylogger.

Built with a strict "Privacy by Design" philosophy, it never captures or stores the semantic meaning of the text. Every keystroke is instantly and irreversibly masked into abstract categories (such as CHAR, MODIFIER, ENTER, or IME_COMPOSING).

Instead of looking at what you type, KeyTempo purely observes the physics of how you type, extracting two critical metrics:

  • Dwell Time: The exact duration (in milliseconds) a specific key is held down.

  • Flight Time: The transition time elapsed between consecutive keystrokes.

Beyond Analytics: The Proof of Humanity

We are living in an era where generative AI and autonomous agents can produce text that is completely indistinguishable from human writing. In this landscape, how do we prove that there is an actual human on the other side of the screen?

The answer lies in the physical world. AI does not have muscle fatigue. AI does not have organic hesitation, nor does it experience the physical distance of moving a finger from the home row to the backspace key.

By analyzing the natural fluctuations, hesitations, and momentum in Dwell and Flight times, KeyTempo provides a foundational layer for distinguishing genuine human physical presence from programmed bots. It transforms your keyboard into a cryptographic sensor for human rhythm.

Key Features

  • Zero Dependencies: Incredibly lightweight and easy to drop into any web application or browser extension.

  • Edge-Ready: All extraction happens securely in the local DOM environment.

  • Robust IME Support: Safely and transparently handles complex input modalities, including Japanese IME conversions and mobile flick inputs.

Quick Start

You can integrate KeyTempo into your project in minutes:

Bash
npm install @keytempo/core
TypeScript
import { KeyTempo } from '@keytempo/core';

const targetElement = document.getElementById('secure-input');

const tempo = new KeyTempo({
  element: targetElement,
  onKeystroke: (data) => {
    // Outputs purely physical metadata:
    // { keyType: 'CHAR', dwellTime: 54.1, flightTime: 120.5, ... }
    console.log('Keystroke Dynamics:', data);
  }
});

tempo.start();

Whether you are researching human cognitive states, building accessibility tools, or designing the next generation of bot-protection protocols, KeyTempo provides the clean, ethical data stream you need.

Check out the documentation and source on NPM (@keytempo/core). I would love to hear your thoughts and see what you build with it!

Contact Form

Name

Email *

Message *