You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of #17. This issue is not shortcut rows and not the shelved swipe-up-symbol-popup idea.
Actual target
Make selected non-letter/control/punctuation keys support a slide-to-target interaction like Shift/Symbol/Numpad already do.
This is not a coarse directional shortcut system.
Correct mental model:
press source key
-> enter a temporary target layer / action surface
-> slide to a target key/action
-> release to dispatch that target
-> restore the previous keyboard state
Examples:
press Enter/action key -> slide to JOIN_NEXT / FORCE_NEXT_SPACE / UNDO_WORD / hide keyboard
press period -> slide to punctuation/action targets
press comma -> slide to emoji/settings/custom targets
The actions are not the missing part. JOIN_NEXT, FORCE_NEXT_SPACE, UNDO_WORD, toolbar actions, editor actions, and layout actions already exist as key codes / toolbar actions. The missing capability is letting a source key expose/select those existing targets through the same kind of press-slide-release interaction users already know from Shift/Symbol/Numpad.
JOIN_NEXT is only an example target, not the feature itself.
How Shift / Symbol / Numpad work today
Current modifier-key sliding is slide-to-target, not direction binding.
Pipeline:
layout JSON label
-> resolved KeyCode
-> Key.isModifier()
-> PointerTracker drag/sliding path
-> KeyboardState hard-coded press/release handling
-> user lands on another key in the temporary layer
-> KeyboardState.onFinishSlidingInput() restores momentary layout state
hard-codes SHIFT, SYMBOL_ALPHA, SYMBOL, ALPHA, and NUMPAD in onPressKey / onReleaseKey.
uses SwitchState.MOMENTARY_* states to restore the previous layout in onFinishSlidingInput().
Important consequence: the existing model is not (source + direction) -> action. The selected target comes from where the finger lands after the temporary layer/state is active.
dispatches existing action key codes such as JOIN_NEXT, FORCE_NEXT_SPACE, and UNDO_WORD.
#37 should route selected targets through the same key-code dispatch path used by toolbar keys, not directly call feature-specific methods.
Recommended implementation shape
1. Add source-key action layers, not directional bindings
For each supported source key, define a small temporary target surface:
SourceKey -> temporary target layout/action layer
MVP source keys:
ACTION_KEY / Enter key family
PERIOD
COMMA
MVP target entries should resolve to existing ToolbarKey / key-code actions.
2. Reuse the slide-to-target mechanics where possible
The implementation should be closer to Shift/Symbol/Numpad than to space/delete swipes:
on source-key press:
keep normal tap behavior pending
when finger slides out far enough:
open/show a temporary action target layer or popup
cancel long-press/repeat timers
enter a slide-selection mode
while moving:
track the target key/action under the finger
on release:
if a target is selected, dispatch its existing key code
else, preserve/cancel according to normal slide semantics
restore previous keyboard/action surface
The target surface could be implemented as one of:
a real temporary keyboard layer, closest to Symbol/Numpad behavior;
a popup-key/action panel anchored to the source key;
a small action row/palette that reuses toolbar key rendering/labels.
Prefer the smallest approach that preserves the real press-slide-release interaction.
3. Canonicalize source keys deliberately
Do not key only on raw primaryCode for Enter.
The bottom-right action key can resolve to different codes depending on editor state (Enter, Shift+Enter, Next, Previous, custom action). The user-facing source is still “the action/enter key.”
Part of #17. This issue is not shortcut rows and not the shelved swipe-up-symbol-popup idea.
Actual target
Make selected non-letter/control/punctuation keys support a slide-to-target interaction like Shift/Symbol/Numpad already do.
This is not a coarse directional shortcut system.
Correct mental model:
Examples:
The actions are not the missing part.
JOIN_NEXT,FORCE_NEXT_SPACE,UNDO_WORD, toolbar actions, editor actions, and layout actions already exist as key codes / toolbar actions. The missing capability is letting a source key expose/select those existing targets through the same kind of press-slide-release interaction users already know from Shift/Symbol/Numpad.JOIN_NEXTis only an example target, not the feature itself.How Shift / Symbol / Numpad work today
Current modifier-key sliding is slide-to-target, not direction binding.
Pipeline:
Grounding:
app/src/main/assets/layouts/functional/functional_keys.jsonshift,symbol_alpha,numpad,period,action.app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyLabel.ktshiftbecomes!code/key_shift.symbol_alpha,symbol,alphabecomeKeyCode.SYMBOL_ALPHA,KeyCode.SYMBOL,KeyCode.ALPHA.app/src/main/java/helium314/keyboard/keyboard/internal/KeyboardCodesSet.java!code/key_shift,!code/key_enter, etc. to integer key codes.app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyCode.ktisModifier()returns true forSHIFT,SYMBOL_ALPHA,ALPHA,SYMBOL,NUMPAD, and hardware modifier codes.app/src/main/java/helium314/keyboard/keyboard/PointerTracker.javaonReleaseKey(sourceCode, withSliding = true)when the finger leaves the source key.onFinishSlidingInput()on finger-up.app/src/main/java/helium314/keyboard/keyboard/internal/KeyboardState.ktSHIFT,SYMBOL_ALPHA,SYMBOL,ALPHA, andNUMPADinonPressKey/onReleaseKey.SwitchState.MOMENTARY_*states to restore the previous layout inonFinishSlidingInput().Important consequence: the existing model is not
(source + direction) -> action. The selected target comes from where the finger lands after the temporary layer/state is active.Existing action model to reuse
Do not invent new actions for #37.
Existing action representation:
app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyCode.ktJOIN_NEXT,FORCE_NEXT_SPACE,UNDO_WORD,NUMPAD,IME_HIDE_UI, arrows, clipboard actions, etc.app/src/main/java/helium314/keyboard/latin/utils/ToolbarUtils.ktToolbarKeyenum names assignable toolbar actions.getCodeForToolbarKey(ToolbarKey)maps toolbar actions to key codes.ToolbarKey,KeyCode,LongpressKeyCodeentries inSettings.PREF_TOOLBAR_CUSTOM_KEY_CODES.app/src/main/java/helium314/keyboard/settings/dialogs/ToolbarKeysCustomizer.ktapp/src/main/java/helium314/keyboard/latin/inputlogic/InputLogic.javaJOIN_NEXT,FORCE_NEXT_SPACE, andUNDO_WORD.#37 should route selected targets through the same key-code dispatch path used by toolbar keys, not directly call feature-specific methods.
Recommended implementation shape
1. Add source-key action layers, not directional bindings
For each supported source key, define a small temporary target surface:
MVP source keys:
ACTION_KEY/ Enter key familyPERIODCOMMAMVP target entries should resolve to existing
ToolbarKey/ key-code actions.2. Reuse the slide-to-target mechanics where possible
The implementation should be closer to Shift/Symbol/Numpad than to space/delete swipes:
The target surface could be implemented as one of:
Prefer the smallest approach that preserves the real press-slide-release interaction.
3. Canonicalize source keys deliberately
Do not key only on raw
primaryCodefor Enter.The bottom-right
actionkey can resolve to different codes depending on editor state (Enter,Shift+Enter,Next,Previous, custom action). The user-facing source is still “the action/enter key.”Use a small canonical source enum, for example:
Period/comma are safer as raw character source keys. The action/enter key needs canonicalization.
4. Do not add Enter/period/comma to
KeyCode.isModifier()as a shortcutThat would be too broad.
Adding them to
isModifier()would:PointerTrackertreat them like layout modifiers everywhere;InputLogicignore them in modifier branches;If a shared abstraction is needed, split the concept: true keyboard modifiers vs slide-source keys.
5. Preserve existing conflict paths
MVP should not take over these until explicitly reviewed:
SPACE: already has horizontal/vertical swipe, touchpad mode, cursor movement, language switching, and toggle-numpad options.DELETE: already has delete slider behavior.MVP acceptance
ACTION_KEYorPERIODcan open a temporary target action surface by press-slide, not by raw direction detection.JOIN_NEXTremains just an example target.Test plan
onFinishSlidingInput().Non-goals
JOIN_NEXTas a new action; it already exists and is already assignable elsewhere.(source + direction) -> actionshortcuts.