mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-31 11:52:13 +00:00
add pcqwerty layout (functional keys are a bit different now)
This commit is contained in:
parent
d438438aca
commit
3121bd5816
3 changed files with 121 additions and 7 deletions
120
app/src/main/assets/layouts/pcqwerty.json
Normal file
120
app/src/main/assets/layouts/pcqwerty.json
Normal file
|
@ -0,0 +1,120 @@
|
|||
[
|
||||
[
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "~" },
|
||||
"default": { "label": "`", "popup": { "main": { "label": "~" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "!" },
|
||||
"default": { "label": "1", "popup": { "relevant": [ { "label": "!" }, { "label": "¡" } ] } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "\\@" },
|
||||
"default": { "label": "2", "popup": { "main": { "label": "\\@" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "\\#" },
|
||||
"default": { "label": "3", "popup": { "main": { "label": "\\#" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "$" },
|
||||
"default": { "label": "4", "popup": { "main": { "label": "$" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "\\%" },
|
||||
"default": { "label": "5", "popup": { "main": { "label": "\\%" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "^" },
|
||||
"default": { "label": "6", "popup": { "main": { "label": "^" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "&" },
|
||||
"default": { "label": "7", "popup": { "main": { "label": "&" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "*" },
|
||||
"default": { "label": "8", "popup": { "main": { "label": "*" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "(" },
|
||||
"default": { "label": "9", "popup": { "main": { "label": "(" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": ")" },
|
||||
"default": { "label": "0", "popup": { "main": { "label": ")" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "_" },
|
||||
"default": { "label": "-", "popup": { "relevant": [ { "label": "_" }, { "label": "–" }, { "label": "—" }, { "label": "·" } ] } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "+", "popup": { "relevant": [ { "label": "×" }, { "label": "÷" }, { "label": "√" } ] } },
|
||||
"default": { "label": "=", "popup": { "relevant": [ { "label": "+" }, { "label": "∞" }, { "label": "≠" }, { "label": "≈" } ] } }
|
||||
}
|
||||
],
|
||||
[
|
||||
{ "label": "q", "popup": { "main": { "label": "%" } } },
|
||||
{ "label": "w", "popup": { "main": { "label": "\\" } } },
|
||||
{ "label": "e", "popup": { "main": { "label": "|" } } },
|
||||
{ "label": "r", "popup": { "main": { "label": "=" } } },
|
||||
{ "label": "t", "popup": { "main": { "label": "[" } } },
|
||||
{ "label": "y", "popup": { "main": { "label": "]" } } },
|
||||
{ "label": "u", "popup": { "main": { "label": "<" } } },
|
||||
{ "label": "i", "popup": { "main": { "label": ">" } } },
|
||||
{ "label": "o", "popup": { "main": { "label": "{" } } },
|
||||
{ "label": "p", "popup": { "main": { "label": "}" } } },
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "{" },
|
||||
"default": { "label": "[", "popup": { "main": { "label": "{" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "}" },
|
||||
"default": { "label": "]", "popup": { "main": { "label": "}" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "|" },
|
||||
"default": { "label": "\\", "popup": { "main": { "label": "\\|" } } }
|
||||
}
|
||||
],
|
||||
[
|
||||
{ "label": "a", "popup": { "main": { "label": "@" } } },
|
||||
{ "label": "s", "popup": { "main": { "label": "#" } } },
|
||||
{ "label": "d", "popup": { "main": { "label": "$$$" } } },
|
||||
{ "label": "f", "popup": { "main": { "label": "_" } } },
|
||||
{ "label": "g", "popup": { "main": { "label": "&" } } },
|
||||
{ "label": "h", "popup": { "main": { "label": "-" } } },
|
||||
{ "label": "j", "popup": { "main": { "label": "+" } } },
|
||||
{ "label": "k", "popup": { "main": { "label": "(" } } },
|
||||
{ "label": "l", "popup": { "main": { "label": ")" } } },
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": ":" },
|
||||
"default": { "label": ";", "popup": { "main": { "label": ":" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "\"" },
|
||||
"default": { "label": "'", "popup": { "main": { "label": "\"" } } }
|
||||
}
|
||||
],
|
||||
[
|
||||
{ "label": "z", "popup": { "main": { "label": "*" } } },
|
||||
{ "label": "x", "popup": { "main": { "label": "\"" } } },
|
||||
{ "label": "c", "popup": { "main": { "label": "'" } } },
|
||||
{ "label": "v", "popup": { "main": { "label": ":" } } },
|
||||
{ "label": "b", "popup": { "main": { "label": ";" } } },
|
||||
{ "label": "n", "popup": { "main": { "label": "!" } } },
|
||||
{ "label": "m", "popup": { "main": { "label": "?" } } },
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "<", "popup": { "relevant": [ { "label": "‹" }, { "label": "≤" }, { "label": "«" } ] } },
|
||||
"default": { "label": ",", "popup": { "main": { "label": "<" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": ">", "popup": { "relevant": [ { "label": "›" }, { "label": "›" }, { "label": "»" } ] } },
|
||||
"default": { "label": ".", "popup": { "main": { "label": ">" } } }
|
||||
},
|
||||
{ "$": "shift_state_selector",
|
||||
"manualOrLocked": { "label": "\\?" },
|
||||
"default": { "label": "/", "popup": { "main": { "label": "\\?" }, "relevant": [ { "label": "¿" } ] } }
|
||||
}
|
||||
]
|
||||
]
|
|
@ -63,13 +63,6 @@ open class KeyboardBuilder<KP : KeyboardParams>(protected val mContext: Context,
|
|||
return this
|
||||
|
||||
// todo: further plan
|
||||
// migrate pcqwerty to this style
|
||||
// this will be more complicated...
|
||||
// linked shift keys might be easy
|
||||
// distance below number row with high row, but reduced key height?
|
||||
// consider settings key needs to disappear if device is locked
|
||||
// ignore number row setting to avoid duplicate number row?
|
||||
// and test tablet layout!
|
||||
// do the moreKeys thing (only now, because pc layout may change stuff)
|
||||
// migrate keypad layouts to this style
|
||||
// will need more configurable layout definition -> another parser, or do it with compatible jsons
|
||||
|
|
|
@ -64,6 +64,7 @@ abstract class KeyboardParser(private val params: KeyboardParams, private val co
|
|||
&& params.mId.locale.language != "ko"
|
||||
&& params.mId.locale.language != "th"
|
||||
&& params.mId.locale.language != "lo"
|
||||
&& params.mId.mSubtype.keyboardLayoutSetName != "pcqwerty"
|
||||
) {
|
||||
// add number to the first 10 keys in first row
|
||||
// setting the correct moreKeys is handled in PopupSet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue