Skip to main content

128×32 pixels with purpose

ZeroKeyUSB uses a white OLED panel (SSD1306 controller, I²C 400 kHz) with a 128×32 resolution.
The firmware keeps the interface intentionally minimal: large typography, clear icons, and smooth transitions that remain legible even in low light.
Menu itemPurpose
BackupStart the guided export of encrypted credentials.
SettingsConfigure device preferences such as brightness and PIN.
TOTPView time-based codes with large, legible typography.
Danger ZoneConfirm destructive actions like factory reset or wipe.
InfoShow firmware version, serial data, and support details.
Every screen is built inside a 1-bit frame buffer (~512 bytes) stored in SRAM and sent in full to the display on each refresh cycle.

Rendering pipeline

  1. Frame buffer build – the application composes the entire screen in RAM using helper functions such as draw_text(), draw_icon(), and draw_progress().
  2. Full-frame transfer – every refresh sends all 512 bytes to the OLED via I²C, ensuring consistent updates.
  3. Refresh pacing – a cooperative loop updates the display roughly 30 times per second, avoiding flicker while keeping CPU usage minimal.
This method keeps the UI smooth and responsive even while encryption or TOTP operations run in parallel.

Typography & icons

AssetFormatPurpose
Main fontCustom 6×12 bitmapUsed for menus, lists, and info screens.
Mono font8×12 bitmapOptimized for passwords and 2FA codes.
Icons16×16 spritesBackup, settings, clock, warning, info.
All fonts and icons are stored in PROGMEM flash memory within the firmware.
When displaying passwords or TOTP codes, the mono font avoids confusion between similar characters (O vs 0, I vs 1).

Scrolling & focus

  • Auto-scroll – long site names (over ≈ 8 characters) scroll horizontally at a steady pace.
  • Focus highlight – the currently selected option is inverted, while others remain dimmed.
  • Long-press feedback – a filling progress bar confirms destructive actions (factory reset, delete all).
Animations use simple incremental updates inside the main loop — no floating-point easing or blocking delays.

Secure display practices

  • Sensitive fields (passwords, TOTP codes) are masked by default and only revealed briefly when confirmed by touch.
  • After typing credentials, the firmware clears the frame buffer to remove residual data from RAM.
  • While connected to USB, the display remains active; it does not automatically lock or power off due to inactivity.
  • The OLED never displays decrypted secrets for longer than a few seconds, even if the host is unresponsive.

Diagnostics view

A hidden diagnostic mode (used only in factory testing) shows I²C status, raw touch data, and firmware version.
It is compiled out of production builds through a conditional flag to prevent debug information leaks.

The OLED sits behind a sealed resin window, providing excellent contrast and resistance to scratches, dust, and moisture.
I