Terms
Description
Summary
Scribe Keyboard currently has no gesture-based text editing. Users must tap the
backspace key repeatedly to delete text, with no quick way to undo accidental
deletions. This issue proposes adding swipe gestures for delete and undo, along
with an interactive onboarding tutorial to introduce the feature on first use.
Problem
- Deleting text is slow — requires repeated taps on backspace
- There is no undo gesture or quick way to recover accidentally deleted text
- New gesture features have no discoverability mechanism for existing or new users
Proposed solution
Add two horizontal swipe gestures to the keyboard surface:
- Swipe left — deletes the previous word or character (user-configurable).
Haptic tick feedback fires on each deletion step.
- Swipe right — restores the most recently deleted block from a history stack,
in sequence.
On first launch after the feature ships, show a one-time interactive tutorial
overlay that walks the user through both gestures with live practice.
Gesture behaviour
- Swipe threshold:
80px horizontal travel to register a gesture
- Step increment:
45px per deletion/restoration tick
- The history stack clears automatically when the cursor moves or the user
types normally, preventing incorrect restoration context
Tutorial flow
The overlay is non-blocking — touches pass through so users practice on the
real keyboard. Controlled by a swipe_tutorial_shown preference flag.
| Step |
Instruction |
Advances when |
| 1 |
Swipe left to delete "Scribe " |
Word successfully deleted |
| 2 |
Swipe right to restore "Scribe " |
Word successfully restored |
| ✅ |
Tap Got it! to finish |
Preference saved, overlay closed |
A Skip button is available during steps 1 and 2 to dismiss immediately.
Visual design
The tutorial overlay uses a dark-slate translucent background with minimalist
illustrations of three keyboard keys and gesture trails:
- 🔵 Swipe left — indigo/blue sweep line
- 🟢 Swipe right — emerald green sweep line
- ✅ Success — emerald green checkmark over the key outline
Proposed implementation scope
Logic changes
| File |
Work required |
KeyboardView.kt |
Add onSwipeLeft() / onSwipeRight() to action listener interface. Track horizontal gesture travel in onModifiedTouchEvent(). Abort default click handling during swipe. Fire haptic feedback. |
BackspaceHandler.kt |
Implement deletedChunksStack (java.util.Stack). Add performSwipeDelete() (push + delete) and performSwipeRestore() (pop + insert). Clear stack on cursor change or normal key input. |
GeneralKeyboardIME.kt |
Declare SwipeTutorialState enum (NOT_ACTIVE, SWIPE_LEFT_STEP, SWIPE_RIGHT_STEP, COMPLETED). Route gesture events. Drive tutorial step progression. Auto-insert "Scribe " at tutorial start. |
Layout & assets
| File |
Work required |
input_method_view.xml |
Set android:clickable="false" and android:focusable="false" on overlay for touch pass-through. Redesign to show one instruction + one illustration + one action button at a time. |
ic_swipe_left.xml |
Three-key outline with indigo/blue gesture trail |
ic_swipe_right.xml |
Three-key outline with emerald green gesture trail |
ic_swipe_success.xml |
(New file) Three-key outline with emerald green checkmark |
Tests
| File |
Work required |
BackspaceHandlerTest.kt |
JUnit/Robolectric tests for stack push/pop, deletion offsets, character vs. word-by-word modes, and automatic stack clearing |
Terms
Description
Summary
Scribe Keyboard currently has no gesture-based text editing. Users must tap the
backspace key repeatedly to delete text, with no quick way to undo accidental
deletions. This issue proposes adding swipe gestures for delete and undo, along
with an interactive onboarding tutorial to introduce the feature on first use.
Problem
Proposed solution
Add two horizontal swipe gestures to the keyboard surface:
Haptic tick feedback fires on each deletion step.
in sequence.
On first launch after the feature ships, show a one-time interactive tutorial
overlay that walks the user through both gestures with live practice.
Gesture behaviour
80pxhorizontal travel to register a gesture45pxper deletion/restoration ticktypes normally, preventing incorrect restoration context
Tutorial flow
The overlay is non-blocking — touches pass through so users practice on the
real keyboard. Controlled by a
swipe_tutorial_shownpreference flag."Scribe ""Scribe "Visual design
The tutorial overlay uses a dark-slate translucent background with minimalist
illustrations of three keyboard keys and gesture trails:
Proposed implementation scope
Logic changes
KeyboardView.ktonSwipeLeft()/onSwipeRight()to action listener interface. Track horizontal gesture travel inonModifiedTouchEvent(). Abort default click handling during swipe. Fire haptic feedback.BackspaceHandler.ktdeletedChunksStack(java.util.Stack). AddperformSwipeDelete()(push + delete) andperformSwipeRestore()(pop + insert). Clear stack on cursor change or normal key input.GeneralKeyboardIME.ktSwipeTutorialStateenum (NOT_ACTIVE,SWIPE_LEFT_STEP,SWIPE_RIGHT_STEP,COMPLETED). Route gesture events. Drive tutorial step progression. Auto-insert"Scribe "at tutorial start.Layout & assets
input_method_view.xmlandroid:clickable="false"andandroid:focusable="false"on overlay for touch pass-through. Redesign to show one instruction + one illustration + one action button at a time.ic_swipe_left.xmlic_swipe_right.xmlic_swipe_success.xmlTests
BackspaceHandlerTest.kt