Our R&D, 2005
Recognising mouse gestures anywhere on the desktop, in 2005.
An R&D project that watched the mouse across every application on a Windows PC and recognised shapes drawn with it: a line, a square, a flick. It turned raw movement into a short sequence of compass directions and matched that against a library of gestures.
- Owner
- Our own R&D
- Industry
- Desktop software and human-computer interaction
- Services
- Low-level engineering, gesture recognition
- Platforms
- Windows, C++ and MFC, Win32 hooks
- Our role
- We designed and built the recogniser, the system-wide mouse hook and the tray app.
The challenge
A gesture is a messy stream of mouse positions: different speeds, sizes and wobbles every time. To trigger something useful, the software has to see the mouse wherever it is on the desktop, reduce that noise to something it can compare, and decide quickly which shape the person meant.
What we did
- Watching the whole desktop. A low-level mouse hook, installed from a small DLL, sees mouse movement in every application, not just our own window. The app lives in the system tray.
- From pixels to directions. Each movement is turned into a heading and snapped to one of eight compass directions, each a 45° sector. A gesture becomes a short sequence such as south, east, north, west.
- Size and speed don't matter. Because only the directions are kept, a small fast square and a large slow one produce the same sequence.
- Gestures as data. The gesture library is a plain data file: a name and its direction sequence. New gestures need no new code.
- Matching. When the drag ends, the recorded sequence is compared with each pattern and the matching gesture's name is returned.
Results
- 8compass directions, 45° each, to describe any stroke
- Any appgestures recognised across the whole Windows desktop
- 0lines of code to add a gesture: it's data
The same idea carried forward: in 2011 our Kinect engine recognised spells drawn in the air with the same direction-sequence approach, and later we put a trained neural network behind a drawn-glyph game.
Under the hood
Small, fast pattern matching, years before touchscreens made gestures normal.
- C++
- MFC
- Win32 low-level mouse hook
- DLL
- System tray app
- Direction quantisation
- Pattern matching
Related
The services behind this work, and more stories like it.
Services
Case studies
Knowby R&DHands-free help, with no cloud. An R&D prototype: Gemma 4 E2B running on the phone paired with Ray-Ban Meta glasses, reading work instructions aloud.
Halfbrick Studios and THQReal-time 3D on 16.8 MHz. A Game Boy Advance 3D engine hand-written in ARM assembly, pitched to Activision, THQ and EA.
VariousSmaller builds and R&D. Cloud migrations, geo platforms, video pipelines and on-device experiments.
Bring us the hard problem.
A 45-minute discovery call with the engineer who'll build it.