Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

forge-glass

ci

A transparent Wayland overlay that teaches you the CharaChorder Master Forge (M4G) while you type on it.

The problem

The M4G is a chording keyboard: 16 five-way switches, 64 key positions spread over three layers, and a personal chord library on top. Learning it means taping a printed cheatsheet to your monitor — and the chords you carefully added are forgotten anyway, because nothing ever reminds you they exist while you're typing.

The fix

forge-glass draws the M4G switch layout as a click-through overlay above your windows (wlr-layer-shell) and highlights keys live as you press them, read straight from evdev. It also talks to the device over serial, so what you see is the real keymap and chord library from the device itself — and when you type out a phrase manually that you already have a chord for, a toast points out the chord you should have used.

Features

  • Live key highlighting — evdev-based, finds the device by VID:PID, handles multiple keyboard interfaces and key repeat.
  • Real keymap over serial — layers and chord library are read from the device (CCOS VAR / CML commands), not from a hardcoded layout. Layer changes are auto-detected from what you type; the pill in the corner shows the active layer.
  • Chord coaching — typing a chorded phrase manually shows a suggestion toast with key highlights; executing a chord replays it on the layout; a chord explorer panel lists what's reachable from the keys you're holding.
  • Practice stats — suggested vs. actually-chorded counts persist to ~/.config/forge-glass/chord_stats.json, plus a live WPM readout and an optional event log panel.
  • Stays out of the way — click-through except a thin control strip: left click cycles layers, middle-drag repositions, right click toggles the background panel. A StatusNotifierItem tray menu (Waybar etc.) covers visibility, opacity, event log, and monitor selection.

Requirements

  • Wayland compositor with wlr-layer-shell support (Sway, Hyprland, ...)
  • GTK4 and gtk4-layer-shell libraries, libudev
  • read access to /dev/input (sudo usermod -aG input $USER, then re-login) and to the serial port (uucp or dialout group, distro-dependent)

Building

cargo build --release
./target/release/forge-glass

RUST_LOG=debug for verbose logging. Configuration lives in ~/.config/forge-glass/config.toml (window anchor/margins/opacity/scale, monitor, device VID:PID, serial port/baud) and is written back when you move or adjust the overlay. The defaults match a stock M4G (303A:829A), so with the device plugged in there is nothing to configure.

License

MIT — see LICENSE.

About

Wayland overlay trainer for the CharaChorder Master Forge

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages