-
-
Notifications
You must be signed in to change notification settings - Fork 111
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(web): add
Keyboard
and KMXKeyboard
classes
The `Keyboard` class can be either a JS or KMX keyboard. Also make use of the `Keyboard` class where it makes sense and add TODOs in the places that still need to be implemented for KMX keyboard support.
- Loading branch information
1 parent
b4d78ce
commit 4759764
Showing
26 changed files
with
264 additions
and
167 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
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,24 @@ | ||
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; | ||
} | ||
|
||
id: string; | ||
keyboard: km_core_keyboard; | ||
|
||
get isMnemonic(): boolean { | ||
return false; | ||
} | ||
|
||
get version(): string { | ||
// TODO-web-core: get version from `km_core_keyboard_get_attrs` | ||
return ''; | ||
} | ||
} |
Oops, something went wrong.