fix(web): spacebar caption when functional layer differs from display layer

This commit is contained in:
jahorton 2021-09-14 15:34:27 +07:00
parent 6bfc64b17c
commit d429c76a52
2 changed files with 6 additions and 2 deletions

View file

@ -21,6 +21,10 @@ namespace com.keyman.osk {
return this.spec.coreID;
}
getBaseId(): string {
return this.spec.baseKeyID;
}
// Produces a small reference label for the corresponding physical key on a US keyboard.
private generateKeyCapLabel(): HTMLDivElement {
// Create the default key cap labels (letter keys, etc.)

View file

@ -76,10 +76,10 @@ namespace com.keyman.osk {
* @param {string} keyId key identifier
* @return {Object} Reference to key
*/
public findKey(coreID: string): OSKBaseKey {
private findKey(keyId: string): OSKBaseKey {
for(const row of this.rows) {
for(const key of row.keys) {
if(key.getCoreId() == coreID) {
if(key.getBaseId() == keyId) {
return key;
}
}