diff --git a/README.md b/README.md index 54bd1e980..0597c8c6d 100644 --- a/README.md +++ b/README.md @@ -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. - 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) diff --git a/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt b/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt index d9025a166..7e6315ede 100644 --- a/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt +++ b/app/src/main/java/com/dessalines/thumbkey/keyboards/CommonKeys.kt @@ -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(". "),