Skip to content

Commit d70d711

Browse files
committed
Fix backtick
1 parent ef6aaea commit d70d711

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.idea/vcs.xml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,12 @@ In its current version, it does not have any user interface or settings, and it
1111
# Features
1212

1313
- Full keyboard layout with all keys and symbols.
14+
- No space taken on the screen.
1415
- Long press for alternate characters (see list below).
1516
- Multiple key presses (in quick succession) for accented characters, and other alternate symbols (see list below).
1617
- Keyboard navigation, simulating arrow keys and home/end/page up/page down keys, using the `sym` modifier.
1718
- Lock modifier keys by double-tapping them, while a single tap will only have effect for the next key press.
19+
- See modifier key state in the status bar.
1820
- Auto-capitalization of the first letter of a sentence.
1921
- Two spaces after a period automatically replaced by a period and a space.
2022

app/src/main/java/io/github/oin/titanpocketkeyboard/InputMethodService.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ class InputMethodService : AndroidInputMethodService() {
7777
KeyEvent.KEYCODE_H to arrayOf(MPSUBST_TOGGLE_ALT, '²', '', MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),
7878
KeyEvent.KEYCODE_J to arrayOf(MPSUBST_TOGGLE_ALT, '=', '', '', '±', MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),
7979
KeyEvent.KEYCODE_K to arrayOf(MPSUBST_TOGGLE_ALT, '%', '', '', MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),
80-
KeyEvent.KEYCODE_L to arrayOf(MPSUBST_TOGGLE_ALT, '`', MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),
80+
KeyEvent.KEYCODE_L to arrayOf(MPSUBST_TOGGLE_ALT, MPSUBST_BACKTICK, MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),
8181
KeyEvent.KEYCODE_Z to arrayOf(MPSUBST_TOGGLE_ALT, '¡', '', MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),
8282
KeyEvent.KEYCODE_X to arrayOf(MPSUBST_TOGGLE_ALT, '×', 'χ', MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),
8383
KeyEvent.KEYCODE_C to arrayOf(MPSUBST_TOGGLE_ALT, '©', '¢', '', '', '', '', MPSUBST_TOGGLE_SHIFT, MPSUBST_BYPASS),

app/src/main/java/io/github/oin/titanpocketkeyboard/MultipressController.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ const val MPSUBST_ALT = '\uFFF3'
3030
* A special value meaning that the substitution should be the default character, but as if the Alt modifier was toggled from its current state.
3131
*/
3232
const val MPSUBST_TOGGLE_ALT = '\uFFF5'
33+
/**
34+
* A special value meaning that the substitution should be a backtick character.
35+
*/
36+
const val MPSUBST_BACKTICK = '\uFFF7'
3337
/**
3438
* A special value meaning that the substitution should be the string ". ".
3539
*/
@@ -107,6 +111,7 @@ class MultipressController(private val substitutions: Array<HashMap<Int, Array<C
107111
}
108112
e.getUnicodeChar(mstate).toChar()
109113
}
114+
MPSUBST_BACKTICK -> '`'
110115
in arrayOf('`', '´', '^', '¨', '~') -> KeyEvent.getDeadChar(substitution.code, e.unicodeChar).toChar()
111116
else -> substitution
112117
}

0 commit comments

Comments
 (0)