mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-20 06:09:09 +00:00
fix issue when specifying codes in json layouts
This commit is contained in:
parent
3feac6d966
commit
3b8b44b34b
1 changed files with 1 additions and 1 deletions
|
@ -131,7 +131,7 @@ object KeyCode {
|
||||||
const val NOT_SPECIFIED = -10008 // todo: not sure if there is need to have the "old" unspecified keyCode different, just test it and maybe merge
|
const val NOT_SPECIFIED = -10008 // todo: not sure if there is need to have the "old" unspecified keyCode different, just test it and maybe merge
|
||||||
|
|
||||||
/** to make sure a FlorisBoard code works when reading a JSON layout */
|
/** to make sure a FlorisBoard code works when reading a JSON layout */
|
||||||
private fun Int.checkOrConvertCode(): Int = when (this) {
|
private fun Int.checkOrConvertCode(): Int = if (this > 0) this else when (this) {
|
||||||
// todo: should work, but not yet
|
// todo: should work, but not yet
|
||||||
// CURRENCY_SLOT_1, CURRENCY_SLOT_2, CURRENCY_SLOT_3, CURRENCY_SLOT_4, CURRENCY_SLOT_5, CURRENCY_SLOT_6,
|
// CURRENCY_SLOT_1, CURRENCY_SLOT_2, CURRENCY_SLOT_3, CURRENCY_SLOT_4, CURRENCY_SLOT_5, CURRENCY_SLOT_6,
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue