Skip to content

Commit

Permalink
Swiping on the spacebar moves the cursor. Fixes #59 (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines authored Mar 22, 2023
1 parent c5cc8ee commit 4d5da72
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ This project is a follow-up to the now unmaintained (and closed-source) [Message
- Swipe up or down on `A` to capitalize. <img width=60px height=60px src="https://i.postimg.cc/Znt2Ft9G/thumbkey-1-1.png">
- Double tap the space bar to type a comma, triple tap to type a period.
- Slide left on the backspace key to delete whole words.
- Slide left or right on the spacebar to move the cursor.
- Press the `#` key to see a numeric keypad, and additional symbols.
- Press the Settings Gear key to configure Thumb-Key.
- Practice typing, and check your words per minute, using [monkeytype.com](https://monkeytype.com)
Expand Down
20 changes: 20 additions & 0 deletions app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,26 @@ val SPACEBAR_KEY_ITEM =
display = KeyDisplay.TextDisplay(" "),
action = KeyAction.CommitText(" ")
),
swipes = mapOf(
SwipeDirection.LEFT to KeyC(
action = KeyAction.SendEvent(
KeyEvent(
KeyEvent.ACTION_DOWN,
KeyEvent.KEYCODE_DPAD_LEFT
)
),
display = null
),
SwipeDirection.RIGHT to KeyC(
action = KeyAction.SendEvent(
KeyEvent(
KeyEvent.ACTION_DOWN,
KeyEvent.KEYCODE_DPAD_RIGHT
)
),
display = null
)
),
nextTapActions = arrayOf(
KeyAction.ReplaceLastText(", ", trimCount = 1),
KeyAction.ReplaceLastText(". "),
Expand Down

0 comments on commit 4d5da72

Please sign in to comment.