diff --git a/android/KMEA/app/src/main/assets/keyboard.html b/android/KMEA/app/src/main/assets/keyboard.html index d0d4f93cf0..e938cb9558 100644 --- a/android/KMEA/app/src/main/assets/keyboard.html +++ b/android/KMEA/app/src/main/assets/keyboard.html @@ -248,7 +248,8 @@ var keyPos = x.toString() + ',' + y.toString(); for(i=0; i 0) { - keyName = keyName.substring(separatorIndex+1); + // Virtual key name starts with T_, K_, or U_ + // matches[1]: displayLayer (not used) + // matches[2]: keyId + // matches[3]: optional functionalLayer + let matches = keyName.match(/^(.+)-([TKU]_[^+]+)\+?(.+)?$/); + if (matches == null) { + return false; } - + keyName = matches[2] + (matches[3] ? '+' + matches[3] : ''); + // Note: this assumes Lelem is properly attached and has an element interface. // Currently true in the Android and iOS apps. var Lelem=keymanweb.domManager.lastActiveElement;