Merge pull request #5351 from keymanapp/fix/android/cherry/subkeys-with-modifiers

fix(android): fixes application of nextlayer for subkeys with customized layer setting 🍒
This commit is contained in:
Joshua Horton 2021-06-24 10:48:37 +07:00 • committed by GitHub
commit e05eccdcd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 1 deletions

View file

@ -272,7 +272,7 @@
var keyPos = x.toString() + ',' + y.toString();
for(i=0; i<obj.length; i++)
{
s=s+obj[i].layer+'-'+obj[i].id;
s=s+obj[i].layer+'-'+obj[i].coreID;
if(obj[i].sp == 1 || obj[i].sp == 2) shift = true;
if(typeof(obj[i].text) != 'undefined' && obj[i].text != null && obj[i].text != '') s=s+':'+toHex(obj[i].text);
if(i < (obj.length -1)) s=s+';'

View file

@ -1042,6 +1042,10 @@ final class KMKeyboard extends WebView {
private String getSubkeyText(String keyID, String keyText) {
String text = keyText;
if (text.isEmpty()) {
if(keyID.indexOf("U_") != -1 && keyID.indexOf("+") != -1 ) {
// Chop off any appended '+____' portion of the key ID.
keyID = keyID.substring(0, keyID.indexOf("+"));
}
text = keyID.replaceAll("U_", "\\\\u");
}
return text;