Skip to content
CleverKeys Wiki

Per-Key Actions

Customize what happens when you swipe in each of the 8 directions from any key. Assign characters, actions, or macros to each swipe direction.

Quick Summary

WhatDescription
PurposeCustomize subkey actions per direction
AccessSettings > Activities > Customize Per-Key Actions, or hold a key with the Subkey Popover on
Directions8 directions (N, NE, E, SE, S, SW, W, NW)

Understanding Subkeys

Each key has up to 8 subkey positions:

    NW   N   NE
      \  |  /
   W -- KEY -- E
      /  |  \
    SW   S   SE

When you short swipe in a direction, the corresponding subkey is activated. With the Subkey Popover on, holding the key shows the same eight slots around your finger.

How to Customize

From Settings

  1. Open CleverKeys Settings (gear icon)
  2. In the Activities section, tap Customize Per-Key Actions
  3. The screen shows your actual keyboard. Tap the key you want to customize; a magnified key opens with its 8 directions and any existing mappings
  4. Tap a direction. The Command Palette opens:
    • for an empty direction, pick a command, or one of the quick actions (Dynamic template, Custom Text, Send Intent, Timestamp);
    • for a direction you already customized, the palette opens in that action’s editor, filled in. Back out of the editor to choose a different action
  5. Confirm the label shown on the key. The mapping is saved immediately

The list of your custom mappings on the key screen lets you delete one; the reset button in the top bar clears all of them at once, without asking for confirmation.

From the Keyboard (Subkey Popover)

With Subkey popover on hold turned on (Settings > Gesture Tuning):

  1. Hold the key until the popover opens
  2. To add an action, slide to an empty slot (shown as +) and let go. The command palette opens for that key and direction
  3. To change an action, rest your finger on its slot for 3 seconds. The edit screen offers Edit, Reassign, Restore default (when your action covers a layout subkey) and Remove

Both routes edit the same mappings. See Subkey Popover.

Available Actions

ActionDescription
CharactersAny Unicode character
Delete WordDelete previous word
Cursor Left/RightMove cursor
Home/EndJump to line start/end
TabInsert tab character
EscapeSend escape key
Undo/RedoUndo or redo action
Copy/Cut/PasteClipboard operations (terminal-aware — see below)
Select AllSelect all text
Word Left/Right, Select Word Left/RightMove by a word, or extend the selection by a word
Select Word / Select LineSelect the word or line at the cursor
Cycle Caselower → Title → UPPER for the selection or the word at the cursor
ShareShare the selected text in any app
Append ‘s / Append apostropheAttach an exact suffix to the last verified word; Backspace undoes only that suffix
Dynamic templateExpand clipboard, selection, UUID or a caret marker (see below)
TimestampInsert current date/time using a SimpleDateFormat pattern (see below)

Timestamp Action

The Timestamp action type inserts the current date and/or time, formatted via a SimpleDateFormat pattern. The pattern is the action value; at swipe time the current Date is formatted with the system default locale and the result is committed to the text field.

PatternExample output
yyyy-MM-dd HH:mm2026-05-22 14:30
yyyy-MM-dd2026-05-22
HH:mm14:30
yyyy-MM-dd'T'HH:mm:ssXXX2026-05-22T14:30:00+00:00 (ISO 8601)

Any valid SimpleDateFormat pattern works. The Command Palette dialog also offers a few preset chips covering the common date/time formats.

Dynamic Templates (development build)

Choose Dynamic template in the command palette, or enable that option in the custom-text editor. The per-key screen and popover assignment use the same editor. Existing Custom text mappings remain literal, including text like {uuid}.

TokenResult
{clipboard}Current plain clipboard text; media/URI clips are refused
{selection}Selected text, or empty text at a confirmed collapsed caret
{uuid}One UUIDv4 per invocation; repeated tokens share that UUID
{cursor}One caret marker, removed from the inserted text

For example, [{selection}]({cursor}) wraps a selected label and leaves the caret inside the parentheses. {{uuid}} inserts the literal text {uuid}. Tokens inside clipboard or selected text are inserted literally; they are not expanded again.

Templates are limited to 4,096 UTF-16 units, and expanded text to 65,536. Unknown tokens, unmatched braces, duplicate caret markers and unavailable token inputs are refused before editing. The editor must provide selection/content readback; password fields and active clipboard, emoji or GIF editors refuse these actions. Assignment previews never read your clipboard or selection. Template text is not automatically added to personalized vocabulary.

If an app accepts the text but refuses caret movement, the text may remain inserted and the action reports failure. CleverKeys does not retry or erase an uncertain edit. An app can partially accept an edit; inspect the field before invoking it again.

Custom-layout syntax: {}:template:'[{selection}]({cursor})', or :template symbol='{}':'[{selection}]({cursor})'. XML export preserves the explicit TEMPLATE type, quotes and backslashes; mappings and backups retain the same type.

Common Customizations

Adding Frequently Used Symbols

Place symbols you use often in easy-to-reach positions:

KeyDirectionSuggestion
eSouth@ (email)
sEast$ (currency)
pNorth% (percent)

Programming Shortcuts

For developers:

KeyDirectionAction
ShiftNWEscape
ShiftSETab
aNWHome
aSWEnd

Put navigation actions where you can reach them:

KeyDirectionAction
BackspaceWestDelete Word
SpaceSubkeysCursor movement

Pinned Clipboard Actions

Insert pinned clipboard entries directly via swipe gestures, without opening the clipboard panel. Five positional commands are available:

CommandDescription
paste_pinned_1Insert 1st pinned clipboard entry
paste_pinned_2Insert 2nd pinned clipboard entry
paste_pinned_3Insert 3rd pinned clipboard entry
paste_pinned_4Insert 4th pinned clipboard entry
paste_pinned_5Insert 5th pinned clipboard entry

Pinned entries are ordered most-recently-pinned first. If you request an index that exceeds the number of pinned items (e.g., paste_pinned_3 with only 2 pins), a toast notification tells you how many are available instead of inserting anything.

To set up:

  1. Go to Settings > Activities > Customize Per-Key Actions and tap a key and direction, or let go on an empty slot of the Subkey Popover
  2. In the command palette, search for “paste_pinned” or browse the Clipboard category
  3. Select the desired slot (1-5)

[!TIP] Pin your most-used text snippets (email signature, address, code boilerplate) and bind them to swipe directions for instant insertion.

Terminal-Aware Actions

Paste adapts when you type in a terminal app such as Termux:

ActionStandard AppsTerminal Apps
PasteAndroid paste actionTypes the current clipboard text directly
CopyAndroid copy actionSame
CutAndroid cut actionSame

Terminals usually ignore Android’s paste action, so CleverKeys inserts the clipboard text itself. This is automatic for known terminal apps; add others under Settings > Advanced > Custom terminal packages (see Advanced Settings).

Custom Text Input

When using the Text Input action type, you can enter up to 4096 characters per action. This is useful for long templates, code snippets, or multi-line text blocks.

The text input field includes a paste button (icon in the trailing position) for pasting from the system clipboard. This is provided because Compose dialogs do not always receive paste commands from the IME reliably.

Tips and Tricks

  • Start small: Customize a few keys first, learn them, then add more
  • Muscle memory: Keep frequently used actions in consistent positions
  • Backup: Export your customizations before making major changes
  • Per-layout: Customizations can be layout-specific

[!TIP] Consider your typing patterns. If you frequently type certain symbols, put them in easy-to-swipe positions.

Resetting Customizations

To restore defaults:

  1. Go to Settings > Activities > Backup & Restore
  2. Use the restore function to reset to default configuration

Settings

SettingLocationDescription
Customize Per-Key ActionsActivities sectionVisual subkey editor
Subkey popover on holdGesture TuningAssign and edit slots from the keyboard
Backup & RestoreActivities sectionSave/restore customizations

Technical Details

See Per-Key Actions Technical Specification.

Explicit Apostrophe Suffix Commands (development build)

Assign Append ‘s or Append apostrophe to a short swipe, popover slot, ordinary layout key or Extra Keys. After James, Append ‘s produces James's; after parents, Append apostrophe produces parents'. The command makes the spelling explicit and does not infer singular/plural grammar. Literal apostrophe flicks and TEXT snippets continue to use their existing behavior.

The command requires the exact last word and caret position to remain verified. It attaches before that word’s single owned trailing space, or inserts no space when the original commit was spaceless. It refuses selected ranges, password fields, inline editors, terminals and remote-desktop fields (see Advanced Settings) and stale editor/word ownership. Observed caret movement, changing fields or preferences, typing another character, or invoking a duplicate suffix invalidates attachment. Android does not identify which operation caused a selection callback: an identical manual move during the brief owned-callback window can be ambiguous, so cross-editor manual testing remains necessary.

Immediately press Backspace to undo only the suffix, preserving the base word and its spacing. A refused or partial undo consumes that key press so whole-word swipe undo cannot delete the word underneath it. An uncertain editor write can leave text or a selection changed; there is no blind retry or compensating deletion.

Personalized learning replaces the exact owned commit with the full suffixed word. Undo uses a fresh identity to replace it back; fragments like s are not separately learned. If a learning receipt expires after the text edit, the text remains and learning context is cleared rather than inventing another observation. Owned counts can be reversed; old timestamps and vocabulary evictions are not restored.