-
-
Notifications
You must be signed in to change notification settings - Fork 115
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12825 from keymanapp/feat/web/kmxkeyboard
feat(web): add `Keyboard` and `KMXKeyboard` classes 🎼
- Loading branch information
Showing
24 changed files
with
269 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 5 additions & 0 deletions
5
web/src/engine/keyboard/src/keyboards/keyboardMinimalInterface.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
import { Keyboard } from './keyboardLoaderBase.js'; | ||
|
||
export interface KeyboardMinimalInterface { | ||
activeKeyboard: Keyboard; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { km_core_keyboard } from 'keyman/engine/core-processor'; | ||
|
||
/** | ||
* Acts as a wrapper class for KMX(+) Keyman keyboards | ||
*/ | ||
export class KMXKeyboard { | ||
|
||
constructor(id: string, keyboard: km_core_keyboard) { | ||
this._id = id; | ||
this._keyboard = keyboard; | ||
} | ||
|
||
private _id: string; | ||
private _keyboard: km_core_keyboard; | ||
|
||
get isMnemonic(): boolean { | ||
return false; | ||
} | ||
|
||
get version(): string { | ||
// TODO-web-core: get version from `km_core_keyboard_get_attrs` | ||
return ''; | ||
} | ||
|
||
get id(): string { | ||
return this._id; | ||
} | ||
|
||
get keyboard(): km_core_keyboard { | ||
return this._keyboard; | ||
} | ||
} |
Oops, something went wrong.