Repository navigation
STYLUS_STUDIO
sohamsans edited this page Nov 3, 2026
·
1 revision
Stylus Studio is designed specifically for mathematical derivation, paper annotation, and freeform research sketching on modern Android tablets.
ResearchLoom features native barrel button support optimized for the Xiaomi Smart Pen 2 / Focus Pen (Xiaomi Pad 7 / Pad 6 series) and Samsung S-Pen:
-
Primary Barrel Button (Button 1 / PageUp 92):
- Single click: Cycles active tools (
Pen$\to$ Highlighter$\to$ Stroke Eraser$\to$ Pixel Eraser$\to$ Pen). - Hold down: Temporarily activates eraser while held; returns to previous writing tool upon release.
- Single click: Cycles active tools (
-
Secondary Barrel Button (Button 2 / PageDown 93):
- Instant undo / secondary tool trigger.
On Xiaomi HyperOS / MIUI tablets:
- Long-pressing the pen button normally triggers the native Xiaomi Notes app.
- Pressing the second button triggers the partial screenshot editor.
-
ResearchLoom's
MainActivity.javaintercepts these hardware keycodes when the app is in the foreground, consuming the event so your drawing flow is never interrupted. Standard system 3-finger swipe screenshots continue working normally.
-
Stroke Eraser (Vector):
- Uses line-segment distance computation (
distToSegment). - Any stroke intersected by the eraser path is deleted in its entirety with a single swipe.
- Uses line-segment distance computation (
-
Pixel Eraser (Raster):
- Uses HTML5 canvas
destination-outblending. - Cleans up exact touched pixels without deleting the surrounding stroke, ideal for fine mathematical corrections.
- Uses HTML5 canvas
Toggle the Snap button on the top toolbar:
- Sketch a rough circle, ellipse, rectangle, triangle, or straight line.
- The engine computes the isoperimetric quotient and corner angles.
- Upon pen lift, the rough sketch is automatically replaced with a clean geometric shape.