From e9fb791ad1fbb448b0303e0ce7a4e6460fc5c2f6 Mon Sep 17 00:00:00 2001 From: Keyman Build Server Date: Fri, 8 Nov 2024 14:11:20 -0500 Subject: [PATCH] auto: Keyman for developer help deployment --- .../guides/test/keyboard-touch-and-desktop.md | 4 +- developer/18.0/reference/api/index.md | 2 + .../api/kmc-copy.copieroptions.dryrun.md | 13 + .../api/kmc-copy.copieroptions.loglevel.md | 13 + .../reference/api/kmc-copy.copieroptions.md | 22 + .../api/kmc-copy.copieroptions.outpath.md | 13 + ...copy.keymanprojectcopier.asynccallbacks.md | 11 + .../kmc-copy.keymanprojectcopier.callbacks.md | 11 + ...mc-copy.keymanprojectcopier.cloudsource.md | 11 + .../kmc-copy.keymanprojectcopier.githubref.md | 11 + .../api/kmc-copy.keymanprojectcopier.init.md | 23 + ...-copy.keymanprojectcopier.islocalorigin.md | 15 + .../api/kmc-copy.keymanprojectcopier.md | 36 + .../kmc-copy.keymanprojectcopier.options.md | 11 + .../kmc-copy.keymanprojectcopier.outpath.md | 11 + .../kmc-copy.keymanprojectcopier.outputid.md | 11 + ...ymanprojectcopier.relocateexternalfiles.md | 11 + .../api/kmc-copy.keymanprojectcopier.run.md | 26 + .../kmc-copy.keymanprojectcopier.sourceid.md | 11 + .../api/kmc-copy.keymanprojectcopier.write.md | 26 + developer/18.0/reference/api/kmc-copy.md | 18 + ...mc-generate.abstractgenerator.callbacks.md | 11 + ...rate.abstractgenerator.defaultartifacts.md | 18 + ...-generate.abstractgenerator.filenamemap.md | 15 + ...enerate.abstractgenerator.fullcopyright.md | 13 + ...rate.abstractgenerator.includedprefixes.md | 13 + .../kmc-generate.abstractgenerator.init.md | 27 + .../api/kmc-generate.abstractgenerator.md | 41 ++ .../kmc-generate.abstractgenerator.options.md | 11 + ...erate.abstractgenerator.sfile_gitignore.md | 11 + ...erate.abstractgenerator.sfile_historymd.md | 11 + ...erate.abstractgenerator.sfile_licensemd.md | 11 + ...erate.abstractgenerator.sfile_readmehtm.md | 11 + ...nerate.abstractgenerator.sfile_readmemd.md | 11 + ...rate.abstractgenerator.sfile_welcomehtm.md | 11 + ...generate.abstractgenerator.spath_source.md | 11 + ...rate.abstractgenerator.templatebasepath.md | 13 + ...kmc-generate.abstractgenerator.tokenmap.md | 15 + .../kmc-generate.abstractgenerator.write.md | 26 + .../kmc-generate.generatoroptions.author.md | 13 + ...kmc-generate.generatoroptions.copyright.md | 13 + ...c-generate.generatoroptions.description.md | 13 + .../api/kmc-generate.generatoroptions.icon.md | 13 + .../api/kmc-generate.generatoroptions.id.md | 13 + ...generate.generatoroptions.keymanversion.md | 13 + ...-generate.generatoroptions.languagetags.md | 13 + .../kmc-generate.generatoroptions.loglevel.md | 13 + .../api/kmc-generate.generatoroptions.md | 31 + .../api/kmc-generate.generatoroptions.name.md | 13 + .../kmc-generate.generatoroptions.outpath.md | 13 + .../kmc-generate.generatoroptions.targets.md | 13 + .../kmc-generate.generatoroptions.version.md | 13 + .../kmc-generate.keymankeyboardgenerator.md | 34 + ...mc-generate.keymankeyboardgenerator.run.md | 19 + ....keymankeyboardgenerator.sfile_keyboard.md | 11 + ...ymankeyboardgenerator.sfile_keyboardkmn.md | 11 + ...ymankeyboardgenerator.sfile_keyboardkps.md | 11 + ...mankeyboardgenerator.sfile_keyboardkvks.md | 11 + ...e.keymankeyboardgenerator.sfile_project.md | 11 + ...ymankeyboardgenerator.sfile_touchlayout.md | 11 + .../api/kmc-generate.ldmlkeyboardgenerator.md | 32 + .../kmc-generate.ldmlkeyboardgenerator.run.md | 19 + ...te.ldmlkeyboardgenerator.sfile_keyboard.md | 11 + ...ldmlkeyboardgenerator.sfile_keyboardxml.md | 11 + ...ate.ldmlkeyboardgenerator.sfile_package.md | 11 + ...ate.ldmlkeyboardgenerator.sfile_project.md | 11 + .../api/kmc-generate.lexicalmodelgenerator.md | 33 + .../kmc-generate.lexicalmodelgenerator.run.md | 19 + ...erate.lexicalmodelgenerator.sfile_model.md | 11 + ...ate.lexicalmodelgenerator.sfile_modelts.md | 11 + ...ate.lexicalmodelgenerator.sfile_package.md | 11 + ...ate.lexicalmodelgenerator.sfile_project.md | 11 + ...lexicalmodelgenerator.sfile_wordlisttsv.md | 11 + developer/18.0/reference/api/kmc-generate.md | 21 + developer/18.0/reference/kmc/cli/reference.md | 76 ++ developer/18.0/reference/messages/index.md | 2 + developer/18.0/reference/messages/km00029.md | 6 +- developer/18.0/reference/messages/km0002a.md | 11 + developer/18.0/reference/messages/km05020.md | 11 + developer/18.0/reference/messages/km05021.md | 11 + developer/18.0/reference/messages/km05022.md | 11 + developer/18.0/reference/messages/km0a001.md | 11 + developer/18.0/reference/messages/km0a002.md | 11 + developer/18.0/reference/messages/km0a003.md | 11 + developer/18.0/reference/messages/km0a004.md | 11 + developer/18.0/reference/messages/km0a005.md | 11 + developer/18.0/reference/messages/km0a006.md | 11 + developer/18.0/reference/messages/km0b001.md | 11 + developer/18.0/reference/messages/km0b002.md | 11 + developer/18.0/reference/messages/km0b003.md | 11 + developer/18.0/reference/messages/km0b004.md | 11 + developer/18.0/reference/messages/km0b005.md | 11 + developer/18.0/reference/messages/km0b006.md | 11 + developer/18.0/reference/messages/km0b007.md | 11 + developer/18.0/reference/messages/km0b008.md | 11 + developer/18.0/reference/messages/km0b009.md | 11 + developer/18.0/reference/messages/km0b00a.md | 11 + developer/18.0/reference/messages/km0b00b.md | 11 + developer/18.0/reference/messages/km0b00c.md | 11 + developer/18.0/reference/messages/km0b00d.md | 11 + developer/18.0/reference/messages/km0b00e.md | 11 + developer/18.0/reference/messages/km0b00f.md | 11 + developer/18.0/reference/messages/km0b010.md | 11 + developer/18.0/reference/messages/km0b011.md | 17 + developer/18.0/reference/messages/km0b012.md | 12 + developer/18.0/reference/messages/km0b013.md | 12 + developer/18.0/reference/messages/km0b014.md | 12 + developer/18.0/reference/messages/km0b015.md | 11 + developer/18.0/reference/messages/km0b016.md | 12 + developer/18.0/reference/messages/km0b017.md | 12 + developer/18.0/reference/messages/km0b018.md | 12 + developer/18.0/reference/messages/km0b019.md | 12 + developer/18.0/reference/messages/km0b01a.md | 11 + developer/18.0/reference/messages/km0b01b.md | 13 + .../messages/kmc-copy.copiermessages.md | 33 + .../kmc-generate.generatormessages.md | 12 + .../messages/kmc-ldml.ldmlcompilermessages.md | 3 +- .../messages/kmc.infrastructuremessages.md | 3 + developer/core/18.0/background.md | 417 +++++++++++ developer/core/18.0/building.md | 63 ++ developer/core/18.0/changes.md | 64 ++ developer/core/18.0/index.md | 124 ++++ developer/core/18.0/json-schema.md | 77 ++ developer/core/18.0/keyboards.md | 658 ++++++++++++++++++ developer/core/18.0/options.md | 284 ++++++++ developer/core/18.0/processor.md | 198 ++++++ developer/core/18.0/state.md | 285 ++++++++ 127 files changed, 3839 insertions(+), 7 deletions(-) create mode 100644 developer/18.0/reference/api/kmc-copy.copieroptions.dryrun.md create mode 100644 developer/18.0/reference/api/kmc-copy.copieroptions.loglevel.md create mode 100644 developer/18.0/reference/api/kmc-copy.copieroptions.md create mode 100644 developer/18.0/reference/api/kmc-copy.copieroptions.outpath.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.asynccallbacks.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.callbacks.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.cloudsource.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.githubref.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.init.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.islocalorigin.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.options.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outpath.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outputid.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.relocateexternalfiles.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.run.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.sourceid.md create mode 100644 developer/18.0/reference/api/kmc-copy.keymanprojectcopier.write.md create mode 100644 developer/18.0/reference/api/kmc-copy.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.callbacks.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.defaultartifacts.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.filenamemap.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.fullcopyright.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.includedprefixes.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.init.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.options.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_gitignore.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_historymd.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_licensemd.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmehtm.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmemd.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_welcomehtm.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.spath_source.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.templatebasepath.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.tokenmap.md create mode 100644 developer/18.0/reference/api/kmc-generate.abstractgenerator.write.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.author.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.copyright.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.description.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.icon.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.id.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.keymanversion.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.languagetags.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.loglevel.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.name.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.outpath.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.targets.md create mode 100644 developer/18.0/reference/api/kmc-generate.generatoroptions.version.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.run.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboard.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkmn.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkps.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkvks.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_project.md create mode 100644 developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_touchlayout.md create mode 100644 developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.md create mode 100644 developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.run.md create mode 100644 developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboard.md create mode 100644 developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboardxml.md create mode 100644 developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_package.md create mode 100644 developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_project.md create mode 100644 developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.md create mode 100644 developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.run.md create mode 100644 developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_model.md create mode 100644 developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_modelts.md create mode 100644 developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_package.md create mode 100644 developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_project.md create mode 100644 developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_wordlisttsv.md create mode 100644 developer/18.0/reference/api/kmc-generate.md create mode 100644 developer/18.0/reference/messages/km0002a.md create mode 100644 developer/18.0/reference/messages/km05020.md create mode 100644 developer/18.0/reference/messages/km05021.md create mode 100644 developer/18.0/reference/messages/km05022.md create mode 100644 developer/18.0/reference/messages/km0a001.md create mode 100644 developer/18.0/reference/messages/km0a002.md create mode 100644 developer/18.0/reference/messages/km0a003.md create mode 100644 developer/18.0/reference/messages/km0a004.md create mode 100644 developer/18.0/reference/messages/km0a005.md create mode 100644 developer/18.0/reference/messages/km0a006.md create mode 100644 developer/18.0/reference/messages/km0b001.md create mode 100644 developer/18.0/reference/messages/km0b002.md create mode 100644 developer/18.0/reference/messages/km0b003.md create mode 100644 developer/18.0/reference/messages/km0b004.md create mode 100644 developer/18.0/reference/messages/km0b005.md create mode 100644 developer/18.0/reference/messages/km0b006.md create mode 100644 developer/18.0/reference/messages/km0b007.md create mode 100644 developer/18.0/reference/messages/km0b008.md create mode 100644 developer/18.0/reference/messages/km0b009.md create mode 100644 developer/18.0/reference/messages/km0b00a.md create mode 100644 developer/18.0/reference/messages/km0b00b.md create mode 100644 developer/18.0/reference/messages/km0b00c.md create mode 100644 developer/18.0/reference/messages/km0b00d.md create mode 100644 developer/18.0/reference/messages/km0b00e.md create mode 100644 developer/18.0/reference/messages/km0b00f.md create mode 100644 developer/18.0/reference/messages/km0b010.md create mode 100644 developer/18.0/reference/messages/km0b011.md create mode 100644 developer/18.0/reference/messages/km0b012.md create mode 100644 developer/18.0/reference/messages/km0b013.md create mode 100644 developer/18.0/reference/messages/km0b014.md create mode 100644 developer/18.0/reference/messages/km0b015.md create mode 100644 developer/18.0/reference/messages/km0b016.md create mode 100644 developer/18.0/reference/messages/km0b017.md create mode 100644 developer/18.0/reference/messages/km0b018.md create mode 100644 developer/18.0/reference/messages/km0b019.md create mode 100644 developer/18.0/reference/messages/km0b01a.md create mode 100644 developer/18.0/reference/messages/km0b01b.md create mode 100644 developer/18.0/reference/messages/kmc-copy.copiermessages.md create mode 100644 developer/18.0/reference/messages/kmc-generate.generatormessages.md create mode 100644 developer/core/18.0/background.md create mode 100644 developer/core/18.0/building.md create mode 100644 developer/core/18.0/changes.md create mode 100644 developer/core/18.0/index.md create mode 100644 developer/core/18.0/json-schema.md create mode 100644 developer/core/18.0/keyboards.md create mode 100644 developer/core/18.0/options.md create mode 100644 developer/core/18.0/processor.md create mode 100644 developer/core/18.0/state.md diff --git a/developer/18.0/guides/test/keyboard-touch-and-desktop.md b/developer/18.0/guides/test/keyboard-touch-and-desktop.md index 339002389..9db50afbb 100644 --- a/developer/18.0/guides/test/keyboard-touch-and-desktop.md +++ b/developer/18.0/guides/test/keyboard-touch-and-desktop.md @@ -70,9 +70,7 @@ able to select your keyboard from the list and start using it. To start testing on your mobile device, your device needs to be on the same network as your PC. Then open your web browser on the device. Which browser? On iOS, use Safari.  On Android devices, we recommend using -Chrome. We don't recommend the Android Browser, because its capabilities -vary dramatically depending on the Android version and the brand of your -device. +Chrome. Then you will need to pick an address from the debug host list in Keyman Developer that your device can find. An IP address on the same network diff --git a/developer/18.0/reference/api/index.md b/developer/18.0/reference/api/index.md index caac7457f..0eda56596 100644 --- a/developer/18.0/reference/api/index.md +++ b/developer/18.0/reference/api/index.md @@ -9,6 +9,8 @@ | Package | Description | | --- | --- | | [@keymanapp/kmc-analyze](./kmc-analyze.md) | kmc-analyze - keyboard analysis classes, including tools for &displayMap. | +| [@keymanapp/kmc-copy](./kmc-copy.md) | | +| [@keymanapp/kmc-generate](./kmc-generate.md) | | | [@keymanapp/kmc-keyboard-info](./kmc-keyboard-info.md) | | | [@keymanapp/kmc-kmn](./kmc-kmn.md) | kmc-kmn - Keyman keyboard compiler | | [@keymanapp/kmc-ldml](./kmc-ldml.md) | | diff --git a/developer/18.0/reference/api/kmc-copy.copieroptions.dryrun.md b/developer/18.0/reference/api/kmc-copy.copieroptions.dryrun.md new file mode 100644 index 000000000..0184b2524 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.copieroptions.dryrun.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [CopierOptions](./kmc-copy.copieroptions.md) > [dryRun](./kmc-copy.copieroptions.dryrun.md) + +## CopierOptions.dryRun property + +dryRun: show what would happen + +**Signature:** + +```typescript +dryRun: boolean; +``` diff --git a/developer/18.0/reference/api/kmc-copy.copieroptions.loglevel.md b/developer/18.0/reference/api/kmc-copy.copieroptions.loglevel.md new file mode 100644 index 000000000..9362d9cb1 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.copieroptions.loglevel.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [CopierOptions](./kmc-copy.copieroptions.md) > [logLevel](./kmc-copy.copieroptions.loglevel.md) + +## CopierOptions.logLevel property + +Reporting level to console, used by NodeCompilerCallbacks (not used in compiler modules; all messages are still reported to the internal log) + +**Signature:** + +```typescript +logLevel?: CompilerLogLevel; +``` diff --git a/developer/18.0/reference/api/kmc-copy.copieroptions.md b/developer/18.0/reference/api/kmc-copy.copieroptions.md new file mode 100644 index 000000000..befa1796b --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.copieroptions.md @@ -0,0 +1,22 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [CopierOptions](./kmc-copy.copieroptions.md) + +## CopierOptions interface + +Options for the Keyman Developer project copier + +**Signature:** + +```typescript +export interface CopierOptions +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [dryRun](./kmc-copy.copieroptions.dryrun.md) | | boolean | dryRun: show what would happen | +| [logLevel?](./kmc-copy.copieroptions.loglevel.md) | | CompilerLogLevel | _(Optional)_ Reporting level to console, used by NodeCompilerCallbacks (not used in compiler modules; all messages are still reported to the internal log) | +| [outPath](./kmc-copy.copieroptions.outpath.md) | | string | output path where project folder will be created | + diff --git a/developer/18.0/reference/api/kmc-copy.copieroptions.outpath.md b/developer/18.0/reference/api/kmc-copy.copieroptions.outpath.md new file mode 100644 index 000000000..930944a9f --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.copieroptions.outpath.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [CopierOptions](./kmc-copy.copieroptions.md) > [outPath](./kmc-copy.copieroptions.outpath.md) + +## CopierOptions.outPath property + +output path where project folder will be created + +**Signature:** + +```typescript +outPath: string; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.asynccallbacks.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.asynccallbacks.md new file mode 100644 index 000000000..6de155aeb --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.asynccallbacks.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [asyncCallbacks](./kmc-copy.keymanprojectcopier.asynccallbacks.md) + +## KeymanProjectCopier.asyncCallbacks property + +**Signature:** + +```typescript +asyncCallbacks: CopierAsyncCallbacks; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.callbacks.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.callbacks.md new file mode 100644 index 000000000..cc0f6fd20 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.callbacks.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [callbacks](./kmc-copy.keymanprojectcopier.callbacks.md) + +## KeymanProjectCopier.callbacks property + +**Signature:** + +```typescript +callbacks: CompilerCallbacks; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.cloudsource.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.cloudsource.md new file mode 100644 index 000000000..d7b6cf475 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.cloudsource.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [cloudSource](./kmc-copy.keymanprojectcopier.cloudsource.md) + +## KeymanProjectCopier.cloudSource property + +**Signature:** + +```typescript +cloudSource: KeymanCloudSource; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.githubref.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.githubref.md new file mode 100644 index 000000000..f1818ef0b --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.githubref.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [githubRef](./kmc-copy.keymanprojectcopier.githubref.md) + +## KeymanProjectCopier.githubRef property + +**Signature:** + +```typescript +githubRef: GitHubRef; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.init.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.init.md new file mode 100644 index 000000000..bf2818261 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.init.md @@ -0,0 +1,23 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [init](./kmc-copy.keymanprojectcopier.init.md) + +## KeymanProjectCopier.init() method + +**Signature:** + +```typescript +init(callbacks: CompilerCallbacks, options: CopierOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callbacks | CompilerCallbacks | | +| options | [CopierOptions](./kmc-copy.copieroptions.md) | | + +**Returns:** + +Promise<boolean> + diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.islocalorigin.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.islocalorigin.md new file mode 100644 index 000000000..becc5503b --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.islocalorigin.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [isLocalOrigin](./kmc-copy.keymanprojectcopier.islocalorigin.md) + +## KeymanProjectCopier.isLocalOrigin() method + +**Signature:** + +```typescript +isLocalOrigin(): boolean; +``` +**Returns:** + +boolean + diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.md new file mode 100644 index 000000000..eae42a051 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.md @@ -0,0 +1,36 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) + +## KeymanProjectCopier class + +**Signature:** + +```typescript +export declare class KeymanProjectCopier implements KeymanCompiler +``` +**Implements:** KeymanCompiler + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [asyncCallbacks](./kmc-copy.keymanprojectcopier.asynccallbacks.md) | | CopierAsyncCallbacks | | +| [callbacks](./kmc-copy.keymanprojectcopier.callbacks.md) | | CompilerCallbacks | | +| [cloudSource](./kmc-copy.keymanprojectcopier.cloudsource.md) | | KeymanCloudSource | | +| [githubRef](./kmc-copy.keymanprojectcopier.githubref.md) | | GitHubRef | | +| [options](./kmc-copy.keymanprojectcopier.options.md) | | [CopierOptions](./kmc-copy.copieroptions.md) | | +| [outPath](./kmc-copy.keymanprojectcopier.outpath.md) | | string | | +| [outputId](./kmc-copy.keymanprojectcopier.outputid.md) | | string | | +| [relocateExternalFiles](./kmc-copy.keymanprojectcopier.relocateexternalfiles.md) | | boolean | | +| [sourceId](./kmc-copy.keymanprojectcopier.sourceid.md) | | string | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [init(callbacks, options)](./kmc-copy.keymanprojectcopier.init.md) | | | +| [isLocalOrigin()](./kmc-copy.keymanprojectcopier.islocalorigin.md) | | | +| [run(source)](./kmc-copy.keymanprojectcopier.run.md) | | Copy a Keyman project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [KeymanProjectCopier.init()](./kmc-copy.keymanprojectcopier.init.md) function to read any input files by disk. | +| [write(artifacts)](./kmc-copy.keymanprojectcopier.write.md) | | Write artifacts from a successful compile to disk, via callbacks methods. The artifacts written will include all files from the project, across multiple folders. Folders will be created as needed | + diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.options.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.options.md new file mode 100644 index 000000000..358dba1e5 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.options.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [options](./kmc-copy.keymanprojectcopier.options.md) + +## KeymanProjectCopier.options property + +**Signature:** + +```typescript +options: CopierOptions; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outpath.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outpath.md new file mode 100644 index 000000000..a578186e4 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outpath.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [outPath](./kmc-copy.keymanprojectcopier.outpath.md) + +## KeymanProjectCopier.outPath property + +**Signature:** + +```typescript +outPath: string; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outputid.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outputid.md new file mode 100644 index 000000000..ac575dbff --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.outputid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [outputId](./kmc-copy.keymanprojectcopier.outputid.md) + +## KeymanProjectCopier.outputId property + +**Signature:** + +```typescript +outputId: string; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.relocateexternalfiles.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.relocateexternalfiles.md new file mode 100644 index 000000000..124158460 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.relocateexternalfiles.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [relocateExternalFiles](./kmc-copy.keymanprojectcopier.relocateexternalfiles.md) + +## KeymanProjectCopier.relocateExternalFiles property + +**Signature:** + +```typescript +relocateExternalFiles: boolean; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.run.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.run.md new file mode 100644 index 000000000..72219d1b6 --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.run.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [run](./kmc-copy.keymanprojectcopier.run.md) + +## KeymanProjectCopier.run() method + +Copy a Keyman project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [KeymanProjectCopier.init()](./kmc-copy.keymanprojectcopier.init.md) function to read any input files by disk. + +**Signature:** + +```typescript +run(source: string): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| source | string | Source file or folder to copy. Can be a local file or folder, github:repo\[:path\], or cloud:id | + +**Returns:** + +Promise<CopierResult> + +Binary artifacts on success, null on failure. + diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.sourceid.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.sourceid.md new file mode 100644 index 000000000..84e58d78f --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.sourceid.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [sourceId](./kmc-copy.keymanprojectcopier.sourceid.md) + +## KeymanProjectCopier.sourceId property + +**Signature:** + +```typescript +sourceId: string; +``` diff --git a/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.write.md b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.write.md new file mode 100644 index 000000000..66576502c --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.keymanprojectcopier.write.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) > [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) > [write](./kmc-copy.keymanprojectcopier.write.md) + +## KeymanProjectCopier.write() method + +Write artifacts from a successful compile to disk, via callbacks methods. The artifacts written will include all files from the project, across multiple folders. Folders will be created as needed + +**Signature:** + +```typescript +write(artifacts: CopierArtifacts): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| artifacts | CopierArtifacts | object containing artifact binary data to write out | + +**Returns:** + +Promise<boolean> + +true on success + diff --git a/developer/18.0/reference/api/kmc-copy.md b/developer/18.0/reference/api/kmc-copy.md new file mode 100644 index 000000000..191c4cc5d --- /dev/null +++ b/developer/18.0/reference/api/kmc-copy.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [@keymanapp/kmc-copy](./kmc-copy.md) + +## kmc-copy package + +## Classes + +| Class | Description | +| --- | --- | +| [KeymanProjectCopier](./kmc-copy.keymanprojectcopier.md) | | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [CopierOptions](./kmc-copy.copieroptions.md) | Options for the Keyman Developer project copier | + diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.callbacks.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.callbacks.md new file mode 100644 index 000000000..ab4d298da --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.callbacks.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [callbacks](./kmc-generate.abstractgenerator.callbacks.md) + +## AbstractGenerator.callbacks property + +**Signature:** + +```typescript +protected get callbacks(): CompilerCallbacks; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.defaultartifacts.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.defaultartifacts.md new file mode 100644 index 000000000..ff6d1537e --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.defaultartifacts.md @@ -0,0 +1,18 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [defaultArtifacts](./kmc-generate.abstractgenerator.defaultartifacts.md) + +## AbstractGenerator.defaultArtifacts() method + +Fills in the artifact outputPath used by all generators + +**Signature:** + +```typescript +protected defaultArtifacts(): GeneratorArtifacts; +``` +**Returns:** + +GeneratorArtifacts + + diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.filenamemap.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.filenamemap.md new file mode 100644 index 000000000..de71674ec --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.filenamemap.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [filenameMap](./kmc-generate.abstractgenerator.filenamemap.md) + +## AbstractGenerator.filenameMap property + +map of all files to be transformed, filled by this class and subclasses + +**Signature:** + +```typescript +protected get filenameMap(): { + [index: string]: string; + }; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.fullcopyright.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.fullcopyright.md new file mode 100644 index 000000000..8e50828ae --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.fullcopyright.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [fullCopyright](./kmc-generate.abstractgenerator.fullcopyright.md) + +## AbstractGenerator.fullCopyright property + +extension of options.copyright including copyright year + +**Signature:** + +```typescript +protected fullCopyright: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.includedprefixes.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.includedprefixes.md new file mode 100644 index 000000000..e6249c7b1 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.includedprefixes.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [includedPrefixes](./kmc-generate.abstractgenerator.includedprefixes.md) + +## AbstractGenerator.includedPrefixes property + +identifiers for lines to include when transforming template files, filled by child classes + +**Signature:** + +```typescript +protected get includedPrefixes(): string[]; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.init.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.init.md new file mode 100644 index 000000000..e5ae4a4fb --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.init.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [init](./kmc-generate.abstractgenerator.init.md) + +## AbstractGenerator.init() method + +Initialize the generator. Copies options. + +**Signature:** + +```typescript +init(callbacks: CompilerCallbacks, options: GeneratorOptions): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| callbacks | CompilerCallbacks | Callbacks for external interfaces, including message reporting and file io | +| options | [GeneratorOptions](./kmc-generate.generatoroptions.md) | Generator options | + +**Returns:** + +Promise<boolean> + +false if initialization fails + diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.md new file mode 100644 index 000000000..034375e57 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.md @@ -0,0 +1,41 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) + +## AbstractGenerator class + +Common functionality for generating projects. Do not instantiate this class, rather instantiate a subclass + +**Signature:** + +```typescript +export declare class AbstractGenerator +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [callbacks](./kmc-generate.abstractgenerator.callbacks.md) |

protected

readonly

| CompilerCallbacks | | +| [filenameMap](./kmc-generate.abstractgenerator.filenamemap.md) |

protected

readonly

| { \[index: string\]: string; } | map of all files to be transformed, filled by this class and subclasses | +| [fullCopyright](./kmc-generate.abstractgenerator.fullcopyright.md) | protected | string | extension of options.copyright including copyright year | +| [includedPrefixes](./kmc-generate.abstractgenerator.includedprefixes.md) |

protected

readonly

| string\[\] | identifiers for lines to include when transforming template files, filled by child classes | +| [options](./kmc-generate.abstractgenerator.options.md) |

protected

readonly

| [GeneratorOptions](./kmc-generate.generatoroptions.md) | | +| [SFile\_GitIgnore](./kmc-generate.abstractgenerator.sfile_gitignore.md) |

protected

static

readonly

| (not declared) | | +| [SFile\_HistoryMD](./kmc-generate.abstractgenerator.sfile_historymd.md) |

protected

static

readonly

| (not declared) | | +| [SFile\_LicenseMD](./kmc-generate.abstractgenerator.sfile_licensemd.md) |

protected

static

readonly

| (not declared) | | +| [SFile\_ReadmeHTM](./kmc-generate.abstractgenerator.sfile_readmehtm.md) |

protected

static

readonly

| string | | +| [SFile\_ReadmeMD](./kmc-generate.abstractgenerator.sfile_readmemd.md) |

protected

static

readonly

| (not declared) | | +| [SFile\_WelcomeHTM](./kmc-generate.abstractgenerator.sfile_welcomehtm.md) |

protected

static

readonly

| string | | +| [SPath\_Source](./kmc-generate.abstractgenerator.spath_source.md) |

protected

static

readonly

| (not declared) | | +| [templateBasePath](./kmc-generate.abstractgenerator.templatebasepath.md) |

protected

readonly

| string | base path for template files in this module | +| [tokenMap](./kmc-generate.abstractgenerator.tokenmap.md) |

protected

readonly

| { \[index: string\]: string; } | tokens to rewrite in output files | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [defaultArtifacts()](./kmc-generate.abstractgenerator.defaultartifacts.md) | protected | Fills in the artifact outputPath used by all generators | +| [init(callbacks, options)](./kmc-generate.abstractgenerator.init.md) | | Initialize the generator. Copies options. | +| [write(artifacts)](./kmc-generate.abstractgenerator.write.md) | | Write artifacts from a successful compile to disk, via callbacks methods. The artifacts written will include all files from the project, across multiple folders. Folders will be created as needed | + diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.options.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.options.md new file mode 100644 index 000000000..b080f6021 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.options.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [options](./kmc-generate.abstractgenerator.options.md) + +## AbstractGenerator.options property + +**Signature:** + +```typescript +protected get options(): GeneratorOptions; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_gitignore.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_gitignore.md new file mode 100644 index 000000000..b699942fc --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_gitignore.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [SFile\_GitIgnore](./kmc-generate.abstractgenerator.sfile_gitignore.md) + +## AbstractGenerator.SFile\_GitIgnore property + +**Signature:** + +```typescript +protected static readonly SFile_GitIgnore = ".gitignore"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_historymd.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_historymd.md new file mode 100644 index 000000000..7adfb46f7 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_historymd.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [SFile\_HistoryMD](./kmc-generate.abstractgenerator.sfile_historymd.md) + +## AbstractGenerator.SFile\_HistoryMD property + +**Signature:** + +```typescript +protected static readonly SFile_HistoryMD = "HISTORY.md"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_licensemd.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_licensemd.md new file mode 100644 index 000000000..9e5a11660 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_licensemd.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [SFile\_LicenseMD](./kmc-generate.abstractgenerator.sfile_licensemd.md) + +## AbstractGenerator.SFile\_LicenseMD property + +**Signature:** + +```typescript +protected static readonly SFile_LicenseMD = "LICENSE.md"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmehtm.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmehtm.md new file mode 100644 index 000000000..30cca6adc --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmehtm.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [SFile\_ReadmeHTM](./kmc-generate.abstractgenerator.sfile_readmehtm.md) + +## AbstractGenerator.SFile\_ReadmeHTM property + +**Signature:** + +```typescript +protected static readonly SFile_ReadmeHTM: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmemd.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmemd.md new file mode 100644 index 000000000..ed092f014 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_readmemd.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [SFile\_ReadmeMD](./kmc-generate.abstractgenerator.sfile_readmemd.md) + +## AbstractGenerator.SFile\_ReadmeMD property + +**Signature:** + +```typescript +protected static readonly SFile_ReadmeMD = "README.md"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_welcomehtm.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_welcomehtm.md new file mode 100644 index 000000000..910e06e89 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.sfile_welcomehtm.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [SFile\_WelcomeHTM](./kmc-generate.abstractgenerator.sfile_welcomehtm.md) + +## AbstractGenerator.SFile\_WelcomeHTM property + +**Signature:** + +```typescript +protected static readonly SFile_WelcomeHTM: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.spath_source.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.spath_source.md new file mode 100644 index 000000000..59aa0a9ad --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.spath_source.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [SPath\_Source](./kmc-generate.abstractgenerator.spath_source.md) + +## AbstractGenerator.SPath\_Source property + +**Signature:** + +```typescript +protected static readonly SPath_Source = "source/"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.templatebasepath.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.templatebasepath.md new file mode 100644 index 000000000..7f5189b5a --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.templatebasepath.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [templateBasePath](./kmc-generate.abstractgenerator.templatebasepath.md) + +## AbstractGenerator.templateBasePath property + +base path for template files in this module + +**Signature:** + +```typescript +protected get templateBasePath(): string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.tokenmap.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.tokenmap.md new file mode 100644 index 000000000..140466f15 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.tokenmap.md @@ -0,0 +1,15 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [tokenMap](./kmc-generate.abstractgenerator.tokenmap.md) + +## AbstractGenerator.tokenMap property + +tokens to rewrite in output files + +**Signature:** + +```typescript +protected get tokenMap(): { + [index: string]: string; + }; +``` diff --git a/developer/18.0/reference/api/kmc-generate.abstractgenerator.write.md b/developer/18.0/reference/api/kmc-generate.abstractgenerator.write.md new file mode 100644 index 000000000..a2a9da61d --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.abstractgenerator.write.md @@ -0,0 +1,26 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [AbstractGenerator](./kmc-generate.abstractgenerator.md) > [write](./kmc-generate.abstractgenerator.write.md) + +## AbstractGenerator.write() method + +Write artifacts from a successful compile to disk, via callbacks methods. The artifacts written will include all files from the project, across multiple folders. Folders will be created as needed + +**Signature:** + +```typescript +write(artifacts: GeneratorArtifacts): Promise; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| artifacts | GeneratorArtifacts | object containing artifact binary data to write out | + +**Returns:** + +Promise<boolean> + +true on success + diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.author.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.author.md new file mode 100644 index 000000000..91f655970 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.author.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [author](./kmc-generate.generatoroptions.author.md) + +## GeneratorOptions.author property + +name of the author of the keyboard + +**Signature:** + +```typescript +author?: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.copyright.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.copyright.md new file mode 100644 index 000000000..7a1011996 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.copyright.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [copyright](./kmc-generate.generatoroptions.copyright.md) + +## GeneratorOptions.copyright property + +name of the copyright holder for the keyboard or lexical model (do not include (c) symbol or date) + +**Signature:** + +```typescript +copyright?: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.description.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.description.md new file mode 100644 index 000000000..5ed0a4446 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.description.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [description](./kmc-generate.generatoroptions.description.md) + +## GeneratorOptions.description property + +description of the keyboard, Markdown permissible + +**Signature:** + +```typescript +description?: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.icon.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.icon.md new file mode 100644 index 000000000..092288e49 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.icon.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [icon](./kmc-generate.generatoroptions.icon.md) + +## GeneratorOptions.icon property + +set to true to generate an icon for a Keyman keyboard with the first characters of the first specified BCP 47 tag + +**Signature:** + +```typescript +icon?: boolean; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.id.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.id.md new file mode 100644 index 000000000..2e2524902 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.id.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [id](./kmc-generate.generatoroptions.id.md) + +## GeneratorOptions.id property + +identifier (basename) of the keyboard or model + +**Signature:** + +```typescript +id: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.keymanversion.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.keymanversion.md new file mode 100644 index 000000000..6fefbed1b --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.keymanversion.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [keymanVersion](./kmc-generate.generatoroptions.keymanversion.md) + +## GeneratorOptions.keymanVersion property + +version of Keyman to reference in source files, defaults to KEYMAN\_VERSION.VERSION + +**Signature:** + +```typescript +keymanVersion?: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.languagetags.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.languagetags.md new file mode 100644 index 000000000..ae4e4c845 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.languagetags.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [languageTags](./kmc-generate.generatoroptions.languagetags.md) + +## GeneratorOptions.languageTags property + +array of bcp 47 tags which are supported by the keyboard or lexical model + +**Signature:** + +```typescript +languageTags?: string[]; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.loglevel.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.loglevel.md new file mode 100644 index 000000000..a5650d13b --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.loglevel.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [logLevel](./kmc-generate.generatoroptions.loglevel.md) + +## GeneratorOptions.logLevel property + +Reporting level to console, used by NodeCompilerCallbacks (not used in compiler modules; all messages are still reported to the internal log) + +**Signature:** + +```typescript +logLevel?: CompilerLogLevel; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.md new file mode 100644 index 000000000..a63399d6b --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.md @@ -0,0 +1,31 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) + +## GeneratorOptions interface + +Options for the Keyman Developer project generator + +**Signature:** + +```typescript +export interface GeneratorOptions +``` + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [author?](./kmc-generate.generatoroptions.author.md) | | string | _(Optional)_ name of the author of the keyboard | +| [copyright?](./kmc-generate.generatoroptions.copyright.md) | | string | _(Optional)_ name of the copyright holder for the keyboard or lexical model (do not include (c) symbol or date) | +| [description?](./kmc-generate.generatoroptions.description.md) | | string | _(Optional)_ description of the keyboard, Markdown permissible | +| [icon?](./kmc-generate.generatoroptions.icon.md) | | boolean | _(Optional)_ set to true to generate an icon for a Keyman keyboard with the first characters of the first specified BCP 47 tag | +| [id](./kmc-generate.generatoroptions.id.md) | | string | identifier (basename) of the keyboard or model | +| [keymanVersion?](./kmc-generate.generatoroptions.keymanversion.md) | | string | _(Optional)_ version of Keyman to reference in source files, defaults to KEYMAN\_VERSION.VERSION | +| [languageTags?](./kmc-generate.generatoroptions.languagetags.md) | | string\[\] | _(Optional)_ array of bcp 47 tags which are supported by the keyboard or lexical model | +| [logLevel?](./kmc-generate.generatoroptions.loglevel.md) | | CompilerLogLevel | _(Optional)_ Reporting level to console, used by NodeCompilerCallbacks (not used in compiler modules; all messages are still reported to the internal log) | +| [name?](./kmc-generate.generatoroptions.name.md) | | string | _(Optional)_ descriptive name of the keyboard or lexical model | +| [outPath](./kmc-generate.generatoroptions.outpath.md) | | string | output path where project folder will be created | +| [targets?](./kmc-generate.generatoroptions.targets.md) | | KeymanTargets.KeymanTarget\[\] | _(Optional)_ supported platforms, only used in Keyman keyboard project generator | +| [version?](./kmc-generate.generatoroptions.version.md) | | string | _(Optional)_ version of the keyboard or model, 1.0 default for Keyman keyboard, lexical model, 1.0.0 default for LDML keyboard | + diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.name.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.name.md new file mode 100644 index 000000000..523e3e2ab --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.name.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [name](./kmc-generate.generatoroptions.name.md) + +## GeneratorOptions.name property + +descriptive name of the keyboard or lexical model + +**Signature:** + +```typescript +name?: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.outpath.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.outpath.md new file mode 100644 index 000000000..6716dd5f4 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.outpath.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [outPath](./kmc-generate.generatoroptions.outpath.md) + +## GeneratorOptions.outPath property + +output path where project folder will be created + +**Signature:** + +```typescript +outPath: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.targets.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.targets.md new file mode 100644 index 000000000..6ca7aa336 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.targets.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [targets](./kmc-generate.generatoroptions.targets.md) + +## GeneratorOptions.targets property + +supported platforms, only used in Keyman keyboard project generator + +**Signature:** + +```typescript +targets?: KeymanTargets.KeymanTarget[]; +``` diff --git a/developer/18.0/reference/api/kmc-generate.generatoroptions.version.md b/developer/18.0/reference/api/kmc-generate.generatoroptions.version.md new file mode 100644 index 000000000..a66e954f9 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.generatoroptions.version.md @@ -0,0 +1,13 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [GeneratorOptions](./kmc-generate.generatoroptions.md) > [version](./kmc-generate.generatoroptions.version.md) + +## GeneratorOptions.version property + +version of the keyboard or model, 1.0 default for Keyman keyboard, lexical model, 1.0.0 default for LDML keyboard + +**Signature:** + +```typescript +version?: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.md new file mode 100644 index 000000000..809bf9196 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.md @@ -0,0 +1,34 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) + +## KeymanKeyboardGenerator class + +Generate a Keyman keyboard project. The generator does not read or write from filesystem or network directly, but relies on callbacks for all external IO. + +**Signature:** + +```typescript +export declare class KeymanKeyboardGenerator extends BasicGenerator implements KeymanCompiler +``` +**Extends:** BasicGenerator + +**Implements:** KeymanCompiler + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [SFile\_Keyboard](./kmc-generate.keymankeyboardgenerator.sfile_keyboard.md) |

static

readonly

| (not declared) | | +| [SFile\_KeyboardKMN](./kmc-generate.keymankeyboardgenerator.sfile_keyboardkmn.md) |

static

readonly

| string | | +| [SFile\_KeyboardKPS](./kmc-generate.keymankeyboardgenerator.sfile_keyboardkps.md) |

static

readonly

| string | | +| [SFile\_KeyboardKVKS](./kmc-generate.keymankeyboardgenerator.sfile_keyboardkvks.md) |

static

readonly

| string | | +| [SFile\_Project](./kmc-generate.keymankeyboardgenerator.sfile_project.md) |

static

readonly

| string | | +| [SFile\_TouchLayout](./kmc-generate.keymankeyboardgenerator.sfile_touchlayout.md) |

static

readonly

| string | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [run()](./kmc-generate.keymankeyboardgenerator.run.md) | | Generate a Keyman Keyboard project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [AbstractGenerator.init()](./kmc-generate.abstractgenerator.init.md) function to read any input files by disk. | + diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.run.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.run.md new file mode 100644 index 000000000..a0068068e --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.run.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) > [run](./kmc-generate.keymankeyboardgenerator.run.md) + +## KeymanKeyboardGenerator.run() method + +Generate a Keyman Keyboard project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [AbstractGenerator.init()](./kmc-generate.abstractgenerator.init.md) function to read any input files by disk. + +**Signature:** + +```typescript +run(): Promise; +``` +**Returns:** + +Promise<GeneratorResult> + +Binary artifacts on success, null on failure. + diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboard.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboard.md new file mode 100644 index 000000000..90822ea90 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboard.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) > [SFile\_Keyboard](./kmc-generate.keymankeyboardgenerator.sfile_keyboard.md) + +## KeymanKeyboardGenerator.SFile\_Keyboard property + +**Signature:** + +```typescript +static readonly SFile_Keyboard = "keyboard"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkmn.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkmn.md new file mode 100644 index 000000000..490951049 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkmn.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) > [SFile\_KeyboardKMN](./kmc-generate.keymankeyboardgenerator.sfile_keyboardkmn.md) + +## KeymanKeyboardGenerator.SFile\_KeyboardKMN property + +**Signature:** + +```typescript +static readonly SFile_KeyboardKMN: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkps.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkps.md new file mode 100644 index 000000000..2f8c66776 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkps.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) > [SFile\_KeyboardKPS](./kmc-generate.keymankeyboardgenerator.sfile_keyboardkps.md) + +## KeymanKeyboardGenerator.SFile\_KeyboardKPS property + +**Signature:** + +```typescript +static readonly SFile_KeyboardKPS: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkvks.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkvks.md new file mode 100644 index 000000000..93c07d51a --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_keyboardkvks.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) > [SFile\_KeyboardKVKS](./kmc-generate.keymankeyboardgenerator.sfile_keyboardkvks.md) + +## KeymanKeyboardGenerator.SFile\_KeyboardKVKS property + +**Signature:** + +```typescript +static readonly SFile_KeyboardKVKS: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_project.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_project.md new file mode 100644 index 000000000..fb4ecfe8d --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_project.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) > [SFile\_Project](./kmc-generate.keymankeyboardgenerator.sfile_project.md) + +## KeymanKeyboardGenerator.SFile\_Project property + +**Signature:** + +```typescript +static readonly SFile_Project: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_touchlayout.md b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_touchlayout.md new file mode 100644 index 000000000..0b06f5ae5 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.keymankeyboardgenerator.sfile_touchlayout.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) > [SFile\_TouchLayout](./kmc-generate.keymankeyboardgenerator.sfile_touchlayout.md) + +## KeymanKeyboardGenerator.SFile\_TouchLayout property + +**Signature:** + +```typescript +static readonly SFile_TouchLayout: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.md b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.md new file mode 100644 index 000000000..71864c89c --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.md @@ -0,0 +1,32 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LdmlKeyboardGenerator](./kmc-generate.ldmlkeyboardgenerator.md) + +## LdmlKeyboardGenerator class + +Generate a LDML keyboard project. The generator does not read or write from filesystem or network directly, but relies on callbacks for all external IO. + +**Signature:** + +```typescript +export declare class LdmlKeyboardGenerator extends BasicGenerator implements KeymanCompiler +``` +**Extends:** BasicGenerator + +**Implements:** KeymanCompiler + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [SFile\_Keyboard](./kmc-generate.ldmlkeyboardgenerator.sfile_keyboard.md) |

protected

static

readonly

| (not declared) | | +| [SFile\_KeyboardXML](./kmc-generate.ldmlkeyboardgenerator.sfile_keyboardxml.md) |

static

readonly

| string | | +| [SFile\_Package](./kmc-generate.ldmlkeyboardgenerator.sfile_package.md) |

static

readonly

| string | | +| [SFile\_Project](./kmc-generate.ldmlkeyboardgenerator.sfile_project.md) |

static

readonly

| string | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [run()](./kmc-generate.ldmlkeyboardgenerator.run.md) | | Generate a LDML Keyboard project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [AbstractGenerator.init()](./kmc-generate.abstractgenerator.init.md) function to read any input files by disk. | + diff --git a/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.run.md b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.run.md new file mode 100644 index 000000000..0003c2899 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.run.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LdmlKeyboardGenerator](./kmc-generate.ldmlkeyboardgenerator.md) > [run](./kmc-generate.ldmlkeyboardgenerator.run.md) + +## LdmlKeyboardGenerator.run() method + +Generate a LDML Keyboard project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [AbstractGenerator.init()](./kmc-generate.abstractgenerator.init.md) function to read any input files by disk. + +**Signature:** + +```typescript +run(): Promise; +``` +**Returns:** + +Promise<GeneratorResult> + +Binary artifacts on success, null on failure. + diff --git a/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboard.md b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboard.md new file mode 100644 index 000000000..8a7884c0d --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboard.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LdmlKeyboardGenerator](./kmc-generate.ldmlkeyboardgenerator.md) > [SFile\_Keyboard](./kmc-generate.ldmlkeyboardgenerator.sfile_keyboard.md) + +## LdmlKeyboardGenerator.SFile\_Keyboard property + +**Signature:** + +```typescript +protected static readonly SFile_Keyboard = "keyboard"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboardxml.md b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboardxml.md new file mode 100644 index 000000000..c23a3a322 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_keyboardxml.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LdmlKeyboardGenerator](./kmc-generate.ldmlkeyboardgenerator.md) > [SFile\_KeyboardXML](./kmc-generate.ldmlkeyboardgenerator.sfile_keyboardxml.md) + +## LdmlKeyboardGenerator.SFile\_KeyboardXML property + +**Signature:** + +```typescript +static readonly SFile_KeyboardXML: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_package.md b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_package.md new file mode 100644 index 000000000..b61d244c1 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_package.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LdmlKeyboardGenerator](./kmc-generate.ldmlkeyboardgenerator.md) > [SFile\_Package](./kmc-generate.ldmlkeyboardgenerator.sfile_package.md) + +## LdmlKeyboardGenerator.SFile\_Package property + +**Signature:** + +```typescript +static readonly SFile_Package: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_project.md b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_project.md new file mode 100644 index 000000000..2fe852329 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.ldmlkeyboardgenerator.sfile_project.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LdmlKeyboardGenerator](./kmc-generate.ldmlkeyboardgenerator.md) > [SFile\_Project](./kmc-generate.ldmlkeyboardgenerator.sfile_project.md) + +## LdmlKeyboardGenerator.SFile\_Project property + +**Signature:** + +```typescript +static readonly SFile_Project: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.md b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.md new file mode 100644 index 000000000..26a83d8e8 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.md @@ -0,0 +1,33 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) + +## LexicalModelGenerator class + +Generate a Keyman lexical model project. The generator does not read or write from filesystem or network directly, but relies on callbacks for all external IO. + +**Signature:** + +```typescript +export declare class LexicalModelGenerator extends BasicGenerator implements KeymanCompiler +``` +**Extends:** BasicGenerator + +**Implements:** KeymanCompiler + +## Properties + +| Property | Modifiers | Type | Description | +| --- | --- | --- | --- | +| [SFile\_Model](./kmc-generate.lexicalmodelgenerator.sfile_model.md) |

static

readonly

| (not declared) | | +| [SFile\_ModelTs](./kmc-generate.lexicalmodelgenerator.sfile_modelts.md) |

static

readonly

| string | | +| [SFile\_Package](./kmc-generate.lexicalmodelgenerator.sfile_package.md) |

static

readonly

| string | | +| [SFile\_Project](./kmc-generate.lexicalmodelgenerator.sfile_project.md) |

static

readonly

| string | | +| [SFile\_WordlistTsv](./kmc-generate.lexicalmodelgenerator.sfile_wordlisttsv.md) |

static

readonly

| string | | + +## Methods + +| Method | Modifiers | Description | +| --- | --- | --- | +| [run()](./kmc-generate.lexicalmodelgenerator.run.md) | | Generate a Lexical Model project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [AbstractGenerator.init()](./kmc-generate.abstractgenerator.init.md) function to read any input files by disk. | + diff --git a/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.run.md b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.run.md new file mode 100644 index 000000000..597b9f502 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.run.md @@ -0,0 +1,19 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) > [run](./kmc-generate.lexicalmodelgenerator.run.md) + +## LexicalModelGenerator.run() method + +Generate a Lexical Model project. Returns an object containing binary artifacts on success. The files are passed in by name, and the compiler will use callbacks as passed to the [AbstractGenerator.init()](./kmc-generate.abstractgenerator.init.md) function to read any input files by disk. + +**Signature:** + +```typescript +run(): Promise; +``` +**Returns:** + +Promise<GeneratorResult> + +Binary artifacts on success, null on failure. + diff --git a/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_model.md b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_model.md new file mode 100644 index 000000000..8f472973d --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_model.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) > [SFile\_Model](./kmc-generate.lexicalmodelgenerator.sfile_model.md) + +## LexicalModelGenerator.SFile\_Model property + +**Signature:** + +```typescript +static readonly SFile_Model = "model"; +``` diff --git a/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_modelts.md b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_modelts.md new file mode 100644 index 000000000..90da2511a --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_modelts.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) > [SFile\_ModelTs](./kmc-generate.lexicalmodelgenerator.sfile_modelts.md) + +## LexicalModelGenerator.SFile\_ModelTs property + +**Signature:** + +```typescript +static readonly SFile_ModelTs: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_package.md b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_package.md new file mode 100644 index 000000000..ae3b65454 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_package.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) > [SFile\_Package](./kmc-generate.lexicalmodelgenerator.sfile_package.md) + +## LexicalModelGenerator.SFile\_Package property + +**Signature:** + +```typescript +static readonly SFile_Package: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_project.md b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_project.md new file mode 100644 index 000000000..cf1625f7b --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_project.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) > [SFile\_Project](./kmc-generate.lexicalmodelgenerator.sfile_project.md) + +## LexicalModelGenerator.SFile\_Project property + +**Signature:** + +```typescript +static readonly SFile_Project: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_wordlisttsv.md b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_wordlisttsv.md new file mode 100644 index 000000000..c6009faac --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.lexicalmodelgenerator.sfile_wordlisttsv.md @@ -0,0 +1,11 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) > [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) > [SFile\_WordlistTsv](./kmc-generate.lexicalmodelgenerator.sfile_wordlisttsv.md) + +## LexicalModelGenerator.SFile\_WordlistTsv property + +**Signature:** + +```typescript +static readonly SFile_WordlistTsv: string; +``` diff --git a/developer/18.0/reference/api/kmc-generate.md b/developer/18.0/reference/api/kmc-generate.md new file mode 100644 index 000000000..2ad323185 --- /dev/null +++ b/developer/18.0/reference/api/kmc-generate.md @@ -0,0 +1,21 @@ + + +[Home](./index.md) > [@keymanapp/kmc-generate](./kmc-generate.md) + +## kmc-generate package + +## Classes + +| Class | Description | +| --- | --- | +| [AbstractGenerator](./kmc-generate.abstractgenerator.md) | Common functionality for generating projects. Do not instantiate this class, rather instantiate a subclass | +| [KeymanKeyboardGenerator](./kmc-generate.keymankeyboardgenerator.md) | Generate a Keyman keyboard project. The generator does not read or write from filesystem or network directly, but relies on callbacks for all external IO. | +| [LdmlKeyboardGenerator](./kmc-generate.ldmlkeyboardgenerator.md) | Generate a LDML keyboard project. The generator does not read or write from filesystem or network directly, but relies on callbacks for all external IO. | +| [LexicalModelGenerator](./kmc-generate.lexicalmodelgenerator.md) | Generate a Keyman lexical model project. The generator does not read or write from filesystem or network directly, but relies on callbacks for all external IO. | + +## Interfaces + +| Interface | Description | +| --- | --- | +| [GeneratorOptions](./kmc-generate.generatoroptions.md) | Options for the Keyman Developer project generator | + diff --git a/developer/18.0/reference/kmc/cli/reference.md b/developer/18.0/reference/kmc/cli/reference.md index 51a28f4fc..e15fa344b 100644 --- a/developer/18.0/reference/kmc/cli/reference.md +++ b/developer/18.0/reference/kmc/cli/reference.md @@ -59,6 +59,10 @@ The following parameters are available: : Rewrites On Screen Keyboard files from source mapping +`kmc copy origin -o target` + +: Copy and rename a keyboard project + `kmc message [message...]` : Describes one or more compiler messages in greater detail @@ -302,6 +306,78 @@ For more information on the purpose of `analyze osk-char-use` and `analyze rewrite-osk-from-char-use`, see [`&displayMap`](/developer/language/reference/displaymap). +## `kmc copy` options + +Copies a keyboard or lexical model project, renaming files matching the original +project ID according to the output filename. Can copy projects from the +following sources: + +* A .kpj file, e.g. `./keyboards/khmer_angkor/khmer_angkor.kpj`, or `./sil.km.cnd.kpj` +* A local folder containing a .kpj file with a matching base name, e.g. + `./keyboards/khmer_angkor` (which contains `khmer_angkor.kpj`), or + `./models/sil.km.cnd/` (which contains `sil.km.cnd.kpj`) +* A cloud keyboard, or cloud lexical model, e.g. `cloud:khmer_angkor`. This + retrieves the current source from the Keyman Cloud, which is in the GitHub + repository keymanapp/keyboards or keymanapp/lexical-models. The project type + will be determined by the id pattern -- either a lexical model + `author.bcp47.uniq` id pattern, or a keyboard id pattern (where period `.` is + not permitted) +* A GitHub repository or subfolder within a repository that matches the Keyman + keyboard/model repository layout. The branch name is optional, and will use + the default branch from the repository if omitted. For example, + `github:keyman-keyboards/khmer_angkor:main:/khmer_angkor.kpj` + +`-o, --out-path ` + +: The target folder to write the copied project. The folder must not exist. + The folder basename will become the ID of the new project, so the .kpj, + .kps, .kmn and similar files will be renamed to match that ID. + +`-n, --dry-run` + +: Show what would happen, without making changes + +### File copying, renaming, and structure rules + +The **origin** project folder is the one that contains the .kpj file. When a +project is copied, referenced files are reorganized into the +[recommended Keyman project folder structure](../../file-layout). (Note the +difference between **origin** and `/source`: `/source` is a normal subfolder +in the recommended Keyman project folder structure). + +The destination project is called the **target**. + +* The **id** of the project and files can be updated during the copy. The + **origin id** is the basename of the **origin** project file. The + **target id** is supplied as the `-o` parameter, and becomes both the name of + the output folder, and its basename becomes the basename of the **target** + project. If other files use the same basename, they will also be updated. +* All source-type files explicitly referenced in **origin** .kpj will be copied + to **target** `/source`, and references will be updated if the filename + changes. These are the source-type files: + * .kmn keyboard source + * .xml LDML keyboard source + * .kps package source + * .model.ts model source +* Files referenced by source-type files will be copied to **target** folder + structure, if they are also in the **origin** project folder. If the files are + outside the **origin** folder, then relative references will be updated. +* File references in .html and other files are not tracked. +* For version 1.0 projects, only files explicitly referenced in the project or + the source-type files are copied. +* For version 2.0 projects, all other files in the **origin** folder and + subfolders will also be copied to **target**, in the same relative location as + they were found in the **origin**. Files which have a **origin id** basename + will also be renamed to use the **target id** basename (be aware that this + could break untracked references). +* If a referenced file does not exist, for example the compiled files referenced + in a .kps file may not be present, the references will still be updated + following the rules above. +* Unreferenced files in the **origin** project's `build/` folder will not be + copied. +* .kpj.user files will not be copied. +* .kpj options will be updated to use fixed `source/` and `build/` folders. + ## `kmc message` options One or more message identifiers can be specified for text or json formats. diff --git a/developer/18.0/reference/messages/index.md b/developer/18.0/reference/messages/index.md index 9a0075b1f..11c0f8f9d 100644 --- a/developer/18.0/reference/messages/index.md +++ b/developer/18.0/reference/messages/index.md @@ -12,3 +12,5 @@ title: Compiler Messages Reference * [kmc-kmn.KmwCompilerMessages](kmc-kmn.kmwcompilermessages) * [kmc-model-info.ModelInfoCompilerMessages](kmc-model-info.modelinfocompilermessages) * [kmc-keyboard-info.KeyboardInfoCompilerMessages](kmc-keyboard-info.keyboardinfocompilermessages) +* [kmc-generate.GeneratorMessages](kmc-generate.generatormessages) +* [kmc-copy.CopierMessages](kmc-copy.copiermessages) diff --git a/developer/18.0/reference/messages/km00029.md b/developer/18.0/reference/messages/km00029.md index 14c83f013..af02bfc5e 100644 --- a/developer/18.0/reference/messages/km00029.md +++ b/developer/18.0/reference/messages/km00029.md @@ -1,11 +1,11 @@ --- -title: KM00029: ERROR_InvalidVariableIdentifer +title: KM00029: ERROR_InvalidVariableIdentifier --- | | | |------------|---------- | -| Message | Invalid variable identifier "\\u<param>"\. Identifiers must be between 1 and 32 characters, and can use A\-Z, a\-z, 0\-9, and \_\. | +| Message | Invalid variable identifier "<param>"\. Identifiers must be between 1 and 32 characters, and can use A\-Z, a\-z, 0\-9, and \_\. | | Module | [kmc-ldml.LdmlCompilerMessages](kmc-ldml.ldmlcompilermessages) | -| Identifier | `ERROR_InvalidVariableIdentifer` | +| Identifier | `ERROR_InvalidVariableIdentifier` | diff --git a/developer/18.0/reference/messages/km0002a.md b/developer/18.0/reference/messages/km0002a.md new file mode 100644 index 000000000..61d772a14 --- /dev/null +++ b/developer/18.0/reference/messages/km0002a.md @@ -0,0 +1,11 @@ +--- +title: KM0002A: ERROR_InvalidMarkerIdentifier +--- + +| | | +|------------|---------- | +| Message | Invalid marker identifier "m\{<param>\}"\. Identifiers must be between 1 and 32 characters, and can use A\-Z, a\-z, 0\-9, and \_\. | +| Module | [kmc-ldml.LdmlCompilerMessages](kmc-ldml.ldmlcompilermessages) | +| Identifier | `ERROR_InvalidMarkerIdentifier` | + + diff --git a/developer/18.0/reference/messages/km05020.md b/developer/18.0/reference/messages/km05020.md new file mode 100644 index 000000000..ff7f33b91 --- /dev/null +++ b/developer/18.0/reference/messages/km05020.md @@ -0,0 +1,11 @@ +--- +title: KM05020: ERROR_GenerateRequiresId +--- + +| | | +|------------|---------- | +| Message | The generate command requires a single 'id' parameter | +| Module | [kmc.InfrastructureMessages](kmc.infrastructuremessages) | +| Identifier | `ERROR_GenerateRequiresId` | + + diff --git a/developer/18.0/reference/messages/km05021.md b/developer/18.0/reference/messages/km05021.md new file mode 100644 index 000000000..dbe295399 --- /dev/null +++ b/developer/18.0/reference/messages/km05021.md @@ -0,0 +1,11 @@ +--- +title: KM05021: ERROR_CopyRequiresSource +--- + +| | | +|------------|---------- | +| Message | The copy command requires a single 'source' parameter | +| Module | [kmc.InfrastructureMessages](kmc.infrastructuremessages) | +| Identifier | `ERROR_CopyRequiresSource` | + + diff --git a/developer/18.0/reference/messages/km05022.md b/developer/18.0/reference/messages/km05022.md new file mode 100644 index 000000000..f67390e70 --- /dev/null +++ b/developer/18.0/reference/messages/km05022.md @@ -0,0 +1,11 @@ +--- +title: KM05022: ERROR_CopyRequiresOutPath +--- + +| | | +|------------|---------- | +| Message | The copy command requires the \-\-out\-path, \-o parameter | +| Module | [kmc.InfrastructureMessages](kmc.infrastructuremessages) | +| Identifier | `ERROR_CopyRequiresOutPath` | + + diff --git a/developer/18.0/reference/messages/km0a001.md b/developer/18.0/reference/messages/km0a001.md new file mode 100644 index 000000000..a1af70221 --- /dev/null +++ b/developer/18.0/reference/messages/km0a001.md @@ -0,0 +1,11 @@ +--- +title: KM0A001: FATAL_UnexpectedException +--- + +| | | +|------------|---------- | +| Message | | +| Module | [kmc-generate.GeneratorMessages](kmc-generate.generatormessages) | +| Identifier | `FATAL_UnexpectedException` | + +unknown error diff --git a/developer/18.0/reference/messages/km0a002.md b/developer/18.0/reference/messages/km0a002.md new file mode 100644 index 000000000..b74a8ee93 --- /dev/null +++ b/developer/18.0/reference/messages/km0a002.md @@ -0,0 +1,11 @@ +--- +title: KM0A002: INFO_GeneratingProject +--- + +| | | +|------------|---------- | +| Message | Generating project of type <param> with id <param> | +| Module | [kmc-generate.GeneratorMessages](kmc-generate.generatormessages) | +| Identifier | `INFO_GeneratingProject` | + + diff --git a/developer/18.0/reference/messages/km0a003.md b/developer/18.0/reference/messages/km0a003.md new file mode 100644 index 000000000..ce8c9caac --- /dev/null +++ b/developer/18.0/reference/messages/km0a003.md @@ -0,0 +1,11 @@ +--- +title: KM0A003: ERROR_CannotCreateFolder +--- + +| | | +|------------|---------- | +| Message | This is an internal error; the message will vary | +| Module | [kmc-generate.GeneratorMessages](kmc-generate.generatormessages) | +| Identifier | `ERROR_CannotCreateFolder` | + + diff --git a/developer/18.0/reference/messages/km0a004.md b/developer/18.0/reference/messages/km0a004.md new file mode 100644 index 000000000..604e506b6 --- /dev/null +++ b/developer/18.0/reference/messages/km0a004.md @@ -0,0 +1,11 @@ +--- +title: KM0A004: ERROR_OutputPathAlreadyExists +--- + +| | | +|------------|---------- | +| Message | Output path <param> already exists, not overwriting | +| Module | [kmc-generate.GeneratorMessages](kmc-generate.generatormessages) | +| Identifier | `ERROR_OutputPathAlreadyExists` | + + diff --git a/developer/18.0/reference/messages/km0a005.md b/developer/18.0/reference/messages/km0a005.md new file mode 100644 index 000000000..0826343ea --- /dev/null +++ b/developer/18.0/reference/messages/km0a005.md @@ -0,0 +1,11 @@ +--- +title: KM0A005: ERROR_CannotWriteOutputFile +--- + +| | | +|------------|---------- | +| Message | This is an internal error; the message will vary | +| Module | [kmc-generate.GeneratorMessages](kmc-generate.generatormessages) | +| Identifier | `ERROR_CannotWriteOutputFile` | + + diff --git a/developer/18.0/reference/messages/km0a006.md b/developer/18.0/reference/messages/km0a006.md new file mode 100644 index 000000000..cbd59cf09 --- /dev/null +++ b/developer/18.0/reference/messages/km0a006.md @@ -0,0 +1,11 @@ +--- +title: KM0A006: WARN_ModelIdDoesNotFollowLexicalModelConventions +--- + +| | | +|------------|---------- | +| Message | The id <param> does not follow the recommended model id conventions\. The id should be all lower case, include only alphanumeric characters and underscore \(\_\), not start with a digit, and should have the structure <author>\.<bcp47>\.<uniq> | +| Module | [kmc-generate.GeneratorMessages](kmc-generate.generatormessages) | +| Identifier | `WARN_ModelIdDoesNotFollowLexicalModelConventions` | + + diff --git a/developer/18.0/reference/messages/km0b001.md b/developer/18.0/reference/messages/km0b001.md new file mode 100644 index 000000000..744b5e836 --- /dev/null +++ b/developer/18.0/reference/messages/km0b001.md @@ -0,0 +1,11 @@ +--- +title: KM0B001: FATAL_UnexpectedException +--- + +| | | +|------------|---------- | +| Message | | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `FATAL_UnexpectedException` | + +unknown error diff --git a/developer/18.0/reference/messages/km0b002.md b/developer/18.0/reference/messages/km0b002.md new file mode 100644 index 000000000..c4ec3ff08 --- /dev/null +++ b/developer/18.0/reference/messages/km0b002.md @@ -0,0 +1,11 @@ +--- +title: KM0B002: INFO_CopyingProject +--- + +| | | +|------------|---------- | +| Message | Copying project of type <param> with id <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `INFO_CopyingProject` | + + diff --git a/developer/18.0/reference/messages/km0b003.md b/developer/18.0/reference/messages/km0b003.md new file mode 100644 index 000000000..3ea19895b --- /dev/null +++ b/developer/18.0/reference/messages/km0b003.md @@ -0,0 +1,11 @@ +--- +title: KM0B003: ERROR_CannotCreateFolder +--- + +| | | +|------------|---------- | +| Message | This is an internal error; the message will vary | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CannotCreateFolder` | + + diff --git a/developer/18.0/reference/messages/km0b004.md b/developer/18.0/reference/messages/km0b004.md new file mode 100644 index 000000000..afa0b29a4 --- /dev/null +++ b/developer/18.0/reference/messages/km0b004.md @@ -0,0 +1,11 @@ +--- +title: KM0B004: ERROR_OutputPathAlreadyExists +--- + +| | | +|------------|---------- | +| Message | Output path <param> already exists, not overwriting | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_OutputPathAlreadyExists` | + + diff --git a/developer/18.0/reference/messages/km0b005.md b/developer/18.0/reference/messages/km0b005.md new file mode 100644 index 000000000..4e8b8f60f --- /dev/null +++ b/developer/18.0/reference/messages/km0b005.md @@ -0,0 +1,11 @@ +--- +title: KM0B005: ERROR_CannotWriteOutputFile +--- + +| | | +|------------|---------- | +| Message | This is an internal error; the message will vary | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CannotWriteOutputFile` | + + diff --git a/developer/18.0/reference/messages/km0b006.md b/developer/18.0/reference/messages/km0b006.md new file mode 100644 index 000000000..84a1f2093 --- /dev/null +++ b/developer/18.0/reference/messages/km0b006.md @@ -0,0 +1,11 @@ +--- +title: KM0B006: WARN_ModelIdDoesNotFollowLexicalModelConventions +--- + +| | | +|------------|---------- | +| Message | The id <param> does not follow the recommended model id conventions\. The id should be all lower case, include only alphanumeric characters and underscore \(\_\), not start with a digit, and should have the structure <author>\.<bcp47>\.<uniq> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `WARN_ModelIdDoesNotFollowLexicalModelConventions` | + + diff --git a/developer/18.0/reference/messages/km0b007.md b/developer/18.0/reference/messages/km0b007.md new file mode 100644 index 000000000..fee1cd675 --- /dev/null +++ b/developer/18.0/reference/messages/km0b007.md @@ -0,0 +1,11 @@ +--- +title: KM0B007: INFO_DryRunCreatingFolder +--- + +| | | +|------------|---------- | +| Message | Would create folder <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `INFO_DryRunCreatingFolder` | + + diff --git a/developer/18.0/reference/messages/km0b008.md b/developer/18.0/reference/messages/km0b008.md new file mode 100644 index 000000000..fe4a668c0 --- /dev/null +++ b/developer/18.0/reference/messages/km0b008.md @@ -0,0 +1,11 @@ +--- +title: KM0B008: INFO_DryRunWritingFile +--- + +| | | +|------------|---------- | +| Message | Would write file <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `INFO_DryRunWritingFile` | + + diff --git a/developer/18.0/reference/messages/km0b009.md b/developer/18.0/reference/messages/km0b009.md new file mode 100644 index 000000000..bd5ab8fb8 --- /dev/null +++ b/developer/18.0/reference/messages/km0b009.md @@ -0,0 +1,11 @@ +--- +title: KM0B009: ERROR_CannotFindInputProject +--- + +| | | +|------------|---------- | +| Message | Could not find project file '<param>' | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CannotFindInputProject` | + + diff --git a/developer/18.0/reference/messages/km0b00a.md b/developer/18.0/reference/messages/km0b00a.md new file mode 100644 index 000000000..c3f3bef0e --- /dev/null +++ b/developer/18.0/reference/messages/km0b00a.md @@ -0,0 +1,11 @@ +--- +title: KM0B00A: WARN_FileNotFound +--- + +| | | +|------------|---------- | +| Message | The file '<param>' could not be found, skipping file copy\. Any references have been updated to '<param>' | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `WARN_FileNotFound` | + + diff --git a/developer/18.0/reference/messages/km0b00b.md b/developer/18.0/reference/messages/km0b00b.md new file mode 100644 index 000000000..34aa0e913 --- /dev/null +++ b/developer/18.0/reference/messages/km0b00b.md @@ -0,0 +1,11 @@ +--- +title: KM0B00B: WARN_NoWordlistsFound +--- + +| | | +|------------|---------- | +| Message | No wordlists could be found in the lexical model source file '<param>'\. The file may be too complex for kmc\-copy to parse | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `WARN_NoWordlistsFound` | + + diff --git a/developer/18.0/reference/messages/km0b00c.md b/developer/18.0/reference/messages/km0b00c.md new file mode 100644 index 000000000..d68f50d1b --- /dev/null +++ b/developer/18.0/reference/messages/km0b00c.md @@ -0,0 +1,11 @@ +--- +title: KM0B00C: ERROR_PackageFileCouldNotBeRead +--- + +| | | +|------------|---------- | +| Message | The package source file '<param>' could not be loaded\. The file may have an invalid format | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_PackageFileCouldNotBeRead` | + + diff --git a/developer/18.0/reference/messages/km0b00d.md b/developer/18.0/reference/messages/km0b00d.md new file mode 100644 index 000000000..758c0a747 --- /dev/null +++ b/developer/18.0/reference/messages/km0b00d.md @@ -0,0 +1,11 @@ +--- +title: KM0B00D: ERROR_UnsupportedProjectVersion +--- + +| | | +|------------|---------- | +| Message | Project version <param> for '<param>' is not supported by this version of Keyman Developer | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_UnsupportedProjectVersion` | + + diff --git a/developer/18.0/reference/messages/km0b00e.md b/developer/18.0/reference/messages/km0b00e.md new file mode 100644 index 000000000..e9e711793 --- /dev/null +++ b/developer/18.0/reference/messages/km0b00e.md @@ -0,0 +1,11 @@ +--- +title: KM0B00E: ERROR_InvalidProjectFile +--- + +| | | +|------------|---------- | +| Message | Project file '<param>' is not valid: <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_InvalidProjectFile` | + + diff --git a/developer/18.0/reference/messages/km0b00f.md b/developer/18.0/reference/messages/km0b00f.md new file mode 100644 index 000000000..f29a2883a --- /dev/null +++ b/developer/18.0/reference/messages/km0b00f.md @@ -0,0 +1,11 @@ +--- +title: KM0B00F: ERROR_ProjectFileCouldNotBeRead +--- + +| | | +|------------|---------- | +| Message | Project file '<param>' could not be read | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_ProjectFileCouldNotBeRead` | + + diff --git a/developer/18.0/reference/messages/km0b010.md b/developer/18.0/reference/messages/km0b010.md new file mode 100644 index 000000000..cc917731a --- /dev/null +++ b/developer/18.0/reference/messages/km0b010.md @@ -0,0 +1,11 @@ +--- +title: KM0B010: INFO_DryRun +--- + +| | | +|------------|---------- | +| Message | Dry run requested\. No changes have been saved | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `INFO_DryRun` | + + diff --git a/developer/18.0/reference/messages/km0b011.md b/developer/18.0/reference/messages/km0b011.md new file mode 100644 index 000000000..416aa968c --- /dev/null +++ b/developer/18.0/reference/messages/km0b011.md @@ -0,0 +1,17 @@ +--- +title: KM0B011: ERROR_InvalidGitHubSource +--- + +| | | +|------------|---------- | +| Message | Source project specification '<param>' is not a valid GitHub reference | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_InvalidGitHubSource` | + +The source project specification for GitHub sources must match the pattern: +github:\[:\]:\ +The path must include the .kpj filename and may optionally begin with a forward slash. +The following are valid examples: +github:keymanapp/keyboards:master:release/k/khmer_angkor/khmer_angkor.kpj +github:keymanapp/keyboards:release/k/khmer_angkor/khmer_angkor.kpj +github:keymanapp/keyboards:/release/k/khmer_angkor/khmer_angkor.kpj diff --git a/developer/18.0/reference/messages/km0b012.md b/developer/18.0/reference/messages/km0b012.md new file mode 100644 index 000000000..da7ec6e4c --- /dev/null +++ b/developer/18.0/reference/messages/km0b012.md @@ -0,0 +1,12 @@ +--- +title: KM0B012: ERROR_CannotDownloadFolderFromGitHub +--- + +| | | +|------------|---------- | +| Message | The folder '<param>' could not be downloaded: <param> <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CannotDownloadFolderFromGitHub` | + +An error was encountered attempting to download a folder from GitHub API. Check the +provided error details for the cause. diff --git a/developer/18.0/reference/messages/km0b013.md b/developer/18.0/reference/messages/km0b013.md new file mode 100644 index 000000000..578301349 --- /dev/null +++ b/developer/18.0/reference/messages/km0b013.md @@ -0,0 +1,12 @@ +--- +title: KM0B013: ERROR_FolderDownloadedFromGitHubIsNotAValidFolder +--- + +| | | +|------------|---------- | +| Message | The path '<param>' does not appear to be a folder on GitHub | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_FolderDownloadedFromGitHubIsNotAValidFolder` | + +The provided path may be a file or may not exist. Check the reference +before trying again. diff --git a/developer/18.0/reference/messages/km0b014.md b/developer/18.0/reference/messages/km0b014.md new file mode 100644 index 000000000..205e15617 --- /dev/null +++ b/developer/18.0/reference/messages/km0b014.md @@ -0,0 +1,12 @@ +--- +title: KM0B014: WARN_CannotDownloadFileFromGitHub +--- + +| | | +|------------|---------- | +| Message | The file '<param>' could not be downloaded: <param> <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `WARN_CannotDownloadFileFromGitHub` | + +An error was encountered attempting to download a file from GitHub. Check the +provided error details for the cause. diff --git a/developer/18.0/reference/messages/km0b015.md b/developer/18.0/reference/messages/km0b015.md new file mode 100644 index 000000000..a2bdcd5a1 --- /dev/null +++ b/developer/18.0/reference/messages/km0b015.md @@ -0,0 +1,11 @@ +--- +title: KM0B015: ERROR_InvalidCloudKeyboardId +--- + +| | | +|------------|---------- | +| Message | The keyboard identifier '<param>' is not a valid keyboard identifier | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_InvalidCloudKeyboardId` | + +Keyboard identifiers on Keyman Cloud can only use the characters a-z, 0-9, and _. diff --git a/developer/18.0/reference/messages/km0b016.md b/developer/18.0/reference/messages/km0b016.md new file mode 100644 index 000000000..d9887b257 --- /dev/null +++ b/developer/18.0/reference/messages/km0b016.md @@ -0,0 +1,12 @@ +--- +title: KM0B016: ERROR_CouldNotRetrieveFromCloud +--- + +| | | +|------------|---------- | +| Message | Details for keyboard or model identified by '<param>' could not be downloaded: <param> <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CouldNotRetrieveFromCloud` | + +An error was encountered attempting to retrieve keyboard or model details from Keyman Cloud API. Check the +provided error details for the cause. diff --git a/developer/18.0/reference/messages/km0b017.md b/developer/18.0/reference/messages/km0b017.md new file mode 100644 index 000000000..fa26c9eec --- /dev/null +++ b/developer/18.0/reference/messages/km0b017.md @@ -0,0 +1,12 @@ +--- +title: KM0B017: ERROR_KeymanCloudReturnedInvalidData +--- + +| | | +|------------|---------- | +| Message | Keyman Cloud API returned invalid data for keyboard or model identified by '<param>' | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_KeymanCloudReturnedInvalidData` | + +There may be a network error or a server error. Retry your request later or contact +Keyman Support for assistance. diff --git a/developer/18.0/reference/messages/km0b018.md b/developer/18.0/reference/messages/km0b018.md new file mode 100644 index 000000000..2a85432c0 --- /dev/null +++ b/developer/18.0/reference/messages/km0b018.md @@ -0,0 +1,12 @@ +--- +title: KM0B018: ERROR_CloudDoesNotHaveSource +--- + +| | | +|------------|---------- | +| Message | The keyboard or model identified by '<param>' does not have source available | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CloudDoesNotHaveSource` | + +Legacy keyboards in Keyman Cloud do not have source available. Check the Keyman keyboard catalog +at keyman.com for further details. Some new keyboards or models may be available as binary-only. diff --git a/developer/18.0/reference/messages/km0b019.md b/developer/18.0/reference/messages/km0b019.md new file mode 100644 index 000000000..3a5d2f922 --- /dev/null +++ b/developer/18.0/reference/messages/km0b019.md @@ -0,0 +1,12 @@ +--- +title: KM0B019: ERROR_CannotDownloadRepoFromGitHub +--- + +| | | +|------------|---------- | +| Message | The repository at '<param>' could not be accessed: <param> <param> | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CannotDownloadRepoFromGitHub` | + +An error was encountered attempting to download details about a repository from GitHub API. +Check the provided error details for the cause. diff --git a/developer/18.0/reference/messages/km0b01a.md b/developer/18.0/reference/messages/km0b01a.md new file mode 100644 index 000000000..4909e4e89 --- /dev/null +++ b/developer/18.0/reference/messages/km0b01a.md @@ -0,0 +1,11 @@ +--- +title: KM0B01A: ERROR_CouldNotFindDefaultBranchOnGitHub +--- + +| | | +|------------|---------- | +| Message | The default branch could not be found for the GitHub repository '<param>' | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `ERROR_CouldNotFindDefaultBranchOnGitHub` | + +The repository may be private, or you may have a typo in the owner or repository name. diff --git a/developer/18.0/reference/messages/km0b01b.md b/developer/18.0/reference/messages/km0b01b.md new file mode 100644 index 000000000..89c8d6386 --- /dev/null +++ b/developer/18.0/reference/messages/km0b01b.md @@ -0,0 +1,13 @@ +--- +title: KM0B01B: INFO_CannotDownloadBinaryFileFromGitHub +--- + +| | | +|------------|---------- | +| Message | The Keyman binary file '<param>' could not be downloaded: <param> <param>\. This is not normally a problem | +| Module | [kmc-copy.CopierMessages](kmc-copy.copiermessages) | +| Identifier | `INFO_CannotDownloadBinaryFileFromGitHub` | + +In most repositories, Keyman binary files such as .kmx, .kmp, .js are not included. +This is not normally a problem, as the files can be built from the source. Check +the provided error details for more details. diff --git a/developer/18.0/reference/messages/kmc-copy.copiermessages.md b/developer/18.0/reference/messages/kmc-copy.copiermessages.md new file mode 100644 index 000000000..547e2b64a --- /dev/null +++ b/developer/18.0/reference/messages/kmc-copy.copiermessages.md @@ -0,0 +1,33 @@ +--- +title: Compiler Messages Reference for @keymanapp/kmc-copy +--- + + Code | Identifier | Message +------|------------|--------- +[KM0B001](km0b001) | `FATAL_UnexpectedException` | +[KM0B002](km0b002) | `INFO_CopyingProject` | Copying project of type <param> with id <param> +[KM0B003](km0b003) | `ERROR_CannotCreateFolder` | This is an internal error; the message will vary +[KM0B004](km0b004) | `ERROR_OutputPathAlreadyExists` | Output path <param> already exists, not overwriting +[KM0B005](km0b005) | `ERROR_CannotWriteOutputFile` | This is an internal error; the message will vary +[KM0B006](km0b006) | `WARN_ModelIdDoesNotFollowLexicalModelConventions` | The id <param> does not follow the recommended model id conventions\. The id should be all lower case, include only alphanumeric characters and underscore \(\_\), not start with a digit, and should have the structure <author>\.<bcp47>\.<uniq> +[KM0B007](km0b007) | `INFO_DryRunCreatingFolder` | Would create folder <param> +[KM0B008](km0b008) | `INFO_DryRunWritingFile` | Would write file <param> +[KM0B009](km0b009) | `ERROR_CannotFindInputProject` | Could not find project file '<param>' +[KM0B00A](km0b00a) | `WARN_FileNotFound` | The file '<param>' could not be found, skipping file copy\. Any references have been updated to '<param>' +[KM0B00B](km0b00b) | `WARN_NoWordlistsFound` | No wordlists could be found in the lexical model source file '<param>'\. The file may be too complex for kmc\-copy to parse +[KM0B00C](km0b00c) | `ERROR_PackageFileCouldNotBeRead` | The package source file '<param>' could not be loaded\. The file may have an invalid format +[KM0B00D](km0b00d) | `ERROR_UnsupportedProjectVersion` | Project version <param> for '<param>' is not supported by this version of Keyman Developer +[KM0B00E](km0b00e) | `ERROR_InvalidProjectFile` | Project file '<param>' is not valid: <param> +[KM0B00F](km0b00f) | `ERROR_ProjectFileCouldNotBeRead` | Project file '<param>' could not be read +[KM0B010](km0b010) | `INFO_DryRun` | Dry run requested\. No changes have been saved +[KM0B011](km0b011) | `ERROR_InvalidGitHubSource` | Source project specification '<param>' is not a valid GitHub reference +[KM0B012](km0b012) | `ERROR_CannotDownloadFolderFromGitHub` | The folder '<param>' could not be downloaded: <param> <param> +[KM0B013](km0b013) | `ERROR_FolderDownloadedFromGitHubIsNotAValidFolder` | The path '<param>' does not appear to be a folder on GitHub +[KM0B014](km0b014) | `WARN_CannotDownloadFileFromGitHub` | The file '<param>' could not be downloaded: <param> <param> +[KM0B015](km0b015) | `ERROR_InvalidCloudKeyboardId` | The keyboard identifier '<param>' is not a valid keyboard identifier +[KM0B016](km0b016) | `ERROR_CouldNotRetrieveFromCloud` | Details for keyboard or model identified by '<param>' could not be downloaded: <param> <param> +[KM0B017](km0b017) | `ERROR_KeymanCloudReturnedInvalidData` | Keyman Cloud API returned invalid data for keyboard or model identified by '<param>' +[KM0B018](km0b018) | `ERROR_CloudDoesNotHaveSource` | The keyboard or model identified by '<param>' does not have source available +[KM0B019](km0b019) | `ERROR_CannotDownloadRepoFromGitHub` | The repository at '<param>' could not be accessed: <param> <param> +[KM0B01A](km0b01a) | `ERROR_CouldNotFindDefaultBranchOnGitHub` | The default branch could not be found for the GitHub repository '<param>' +[KM0B01B](km0b01b) | `INFO_CannotDownloadBinaryFileFromGitHub` | The Keyman binary file '<param>' could not be downloaded: <param> <param>\. This is not normally a problem diff --git a/developer/18.0/reference/messages/kmc-generate.generatormessages.md b/developer/18.0/reference/messages/kmc-generate.generatormessages.md new file mode 100644 index 000000000..252224b10 --- /dev/null +++ b/developer/18.0/reference/messages/kmc-generate.generatormessages.md @@ -0,0 +1,12 @@ +--- +title: Compiler Messages Reference for @keymanapp/kmc-generate +--- + + Code | Identifier | Message +------|------------|--------- +[KM0A001](km0a001) | `FATAL_UnexpectedException` | +[KM0A002](km0a002) | `INFO_GeneratingProject` | Generating project of type <param> with id <param> +[KM0A003](km0a003) | `ERROR_CannotCreateFolder` | This is an internal error; the message will vary +[KM0A004](km0a004) | `ERROR_OutputPathAlreadyExists` | Output path <param> already exists, not overwriting +[KM0A005](km0a005) | `ERROR_CannotWriteOutputFile` | This is an internal error; the message will vary +[KM0A006](km0a006) | `WARN_ModelIdDoesNotFollowLexicalModelConventions` | The id <param> does not follow the recommended model id conventions\. The id should be all lower case, include only alphanumeric characters and underscore \(\_\), not start with a digit, and should have the structure <author>\.<bcp47>\.<uniq> diff --git a/developer/18.0/reference/messages/kmc-ldml.ldmlcompilermessages.md b/developer/18.0/reference/messages/kmc-ldml.ldmlcompilermessages.md index 09242afd2..a713279bb 100644 --- a/developer/18.0/reference/messages/kmc-ldml.ldmlcompilermessages.md +++ b/developer/18.0/reference/messages/kmc-ldml.ldmlcompilermessages.md @@ -43,7 +43,8 @@ title: Compiler Messages Reference for @keymanapp/kmc-ldml [KM00026](km00026) | `HINT_CharClassImplicitDenorm` | File has character classes which span non\-NFD character\(s\), including Illegal \(U\+NAN\)\. These will not match any text\. [KM00027](km00027) | `WARN_CharClassExplicitDenorm` | File has character classes which include non\-NFD characters\(s\), including Illegal \(U\+NAN\)\. These will not match any text\. [KM00028](km00028) | `ERROR_UnparseableReorderSet` | Illegal UnicodeSet "<param>" in reorder "<param> -[KM00029](km00029) | `ERROR_InvalidVariableIdentifer` | Invalid variable identifier "\\u<param>"\. Identifiers must be between 1 and 32 characters, and can use A\-Z, a\-z, 0\-9, and \_\. +[KM00029](km00029) | `ERROR_InvalidVariableIdentifier` | Invalid variable identifier "<param>"\. Identifiers must be between 1 and 32 characters, and can use A\-Z, a\-z, 0\-9, and \_\. +[KM0002A](km0002a) | `ERROR_InvalidMarkerIdentifier` | Invalid marker identifier "m\{<param>\}"\. Identifiers must be between 1 and 32 characters, and can use A\-Z, a\-z, 0\-9, and \_\. [KM00030](km00030) | `ERROR_InvalidQuadEscape` | Invalid escape "\\u0000"\. Hint: Use "\\u\{<param>\}" [KM00F00](km00f00) | `ERROR_UnparseableTransformFrom` | Invalid transform from="<param>": "<param>" [KM00F01](km00f01) | `ERROR_IllegalTransformDollarsign` | Invalid transform from="<param>": Unescaped dollar\-sign \($\) is not valid transform syntax\. diff --git a/developer/18.0/reference/messages/kmc.infrastructuremessages.md b/developer/18.0/reference/messages/kmc.infrastructuremessages.md index 8dbb642e6..2662cd476 100644 --- a/developer/18.0/reference/messages/kmc.infrastructuremessages.md +++ b/developer/18.0/reference/messages/kmc.infrastructuremessages.md @@ -35,3 +35,6 @@ title: Compiler Messages Reference for @keymanapp/kmc [KM0501D](km0501d) | `ERROR_OutputPathMustBeSpecifiedForMarkdownFormat` | Output path must be specified with \-o for markdown output format [KM0501E](km0501e) | `ERROR_OutputPathMustExistAndBeADirectory` | Output path <param> must exist and must be a folder [KM0501F](km0501f) | `ERROR_MessageNamespaceNameNotFound` | Invalid parameter: \-\-message <param> does not have a recognized namespace +[KM05020](km05020) | `ERROR_GenerateRequiresId` | The generate command requires a single 'id' parameter +[KM05021](km05021) | `ERROR_CopyRequiresSource` | The copy command requires a single 'source' parameter +[KM05022](km05022) | `ERROR_CopyRequiresOutPath` | The copy command requires the \-\-out\-path, \-o parameter diff --git a/developer/core/18.0/background.md b/developer/core/18.0/background.md new file mode 100644 index 000000000..b0d09da10 --- /dev/null +++ b/developer/core/18.0/background.md @@ -0,0 +1,417 @@ +--- +title: Background - Keyman Core API +--- + +## Namespace +All calls, types and enums are prefixed with the namespace identifier `km_core_` + +## API idioms + +### Error Handling + +Error handling and success failure notification are communicated through a +general mechanism similar to COM’s `HRESULT` scheme (unlike COM, any non-zero +value is an error). Any functions that can fail will always return a status +value and all results are returned via outparams passed to the function. + +### Passing variable length data out + +Almost all calls marshalling variable length aggregate data in or out of an API +object take the form: + +```c +km_core_status fn_name(object_ref, buffer_ptr, size_ptr) +``` +where the `buffer_ptr` is nullable and all other arguments are required (will +result in an [`KM_CORE_STATUS_INVALID_ARGUMENT`](#km_core_status_codes) +status being returned if nulled). When `buffer_ptr` is `nullptr` or `0` the +function will place the size of the required buffer in the variable pointed to +by `size_ptr`. + +### Resource management + +Calls which result in the allocation of resources, regardless of resulting +ownership, are of the form: +```c +km_core_status fn_name(object_ref, handle_out_ptr) +``` +where `handle_out_ptr` is a valid pointer to a caller allocated variable to hold +the resulting resource handle. This is often a reference to a created object. +Unless stated all arguments are required (will result in an +[`KM_CORE_STATUS_INVALID_ARGUMENT`](#km_core_status_codes) status being +returned if nulled). + +All dispose calls are designed to accept `nullptr` or `0` as a valid value and +will do nothing in that event. + +### Fixed size attribute access + +For accessors to fixed size attributes of an object these will take the form: +```c +attr_value fn_name(object_ref) +``` +`object_ref` is required to be valid and will result in a nonsense value being returned if `nullptr` or `0`. + +### Versioning scheme + +This follows the libtool interface versioning scheme of `current.age.revision`: + +`current` + +The most recent interface number that the engine implements. + +`age` + +How many interface numbers back from current the library implements. E.g. 5.2.0 +would mean the library provides interface versions 3-5 and 5.0.0 would mean just +interface version 5 and nothing older. + +`revision` + +The implementation version of the current interface. This represents +improvements to the code that don't change the intended behaviour of the +interface such as bug fixes and optimisations. + +For Linux and other OS which support this scheme the dynamic linker will +automatically choose the most updated version if more than one implementation is +available. For Windows or dynamic loaded shared objects on Linux you can use the +[km_core_get_engine_attrs] call and [Library version +macros](#lib-version-macros) to check the loaded DLL supplies the correct +interface. + +------------------------------------------------------------------------------- + +# Common functions, types, and macros + + +## Basic types + +Fundamental types for representing data passed across the API. + +### km_core_cp type {#km_core_cp} + +`uint16_t/char16_t` + +Represents a UTF16 codepoint, most strings are passed as UTF16. + +### km_core_usv type {#km_core_usv} + +`uint32_t/char32_t` + +An integral type capable of holding a single Unicode Scalar Value, a decoded UTF +codepoint. + +### km_core_virtual_key type {#km_core_virtual_key} + +`uint16_t` + +An integral type capable of holding a platform specific virtual key code. + +### km_core_status type {#km_core_status} + +`uint32_t` + +An integral 32 bit wide type capable of holding any valid status code as defined +by the `enum` [km_core_status_codes]. + +### km_core_modifier_state type {#km_core_modifier_state} + +`uint16_t` + +An integral type bitmask representing the state of each modifier key. + + + +## Resource types + +Opaque types for representing resources provided or created by the keyboard +processor implementation. + +### km_core_keyboard struct {#km_core_keyboard} + +Represents a keyboard loaded from disk, that can be executed by the keyboard +processor to consume events, update state associated with an insertion point and +produce action items. A keyboard object may be referenced by any number of state +objects but must be disposed of after all state objects referencing it have +first been disposed of. + +### km_core_state struct {#km_core_state} + +Represents all state associated with an insertion point using a keyboard. This +tracks context, and current action items resulting from a processed keyboard +event. There can be many state objects using the same keyboard. A state object +may not live longer than the keyboard it manages state for. + +### km_core_options struct {#km_core_options} + +Represents a set of option items for environmental state and keyboard state. + + + + + + +------------------------------------------------------------------------------- + +# km_core_status_codes enum {#km_core_status_codes} + +## Description + +An error code mechanism similar to COM’s `HRESULT` scheme (unlike COM, any +non-zero value is an error). + +## Specification + +```c +enum km_core_status_codes { + KM_CORE_STATUS_OK = 0, + KM_CORE_STATUS_NO_MEM = 1, + KM_CORE_STATUS_IO_ERROR = 2, + KM_CORE_STATUS_INVALID_ARGUMENT = 3, + KM_CORE_STATUS_KEY_ERROR = 4, + KM_CORE_STATUS_INSUFFICENT_BUFFER = 5, + KM_CORE_STATUS_INVALID_UTF = 6, + KM_CORE_STATUS_INVALID_KEYBOARD = 7, + KM_CORE_STATUS_NOT_IMPLEMENTED = 8, + KM_CORE_STATUS_OS_ERROR = 0x80000000 +}; + +``` + +## Values + +`KM_CORE_STATUS_OK` + +: Success code. Call completed as documented. + +`KM_CORE_STATUS_NO_MEM` + +: The call failed to allocate memory during its execution, causing it to fail. + +`KM_CORE_STATUS_IO_ERROR` + +: The call performed an I/O operation which failed, causing it to fail. + +`KM_CORE_STATUS_INVALID_ARGUMENT` + +: The call detected one of its parameters was invalid or unsafe. + +`KM_CORE_STATUS_KEY_ERROR` + +: The provided key or index into a collection object was not present. + +`KM_CORE_STATUS_INSUFFICENT_BUFFER` + +: The provided buffer did not contain enough space to fully encode or copy the +result of this call. + +`KM_CORE_STATUS_INVALID_UTF` + +: A malformed or partial UTF sequence prevented complete decoding of a unicode +string. + +`KM_CORE_STATUS_INVALID_KEYBOARD` + +: An attempt to decode a keyboard file failed. + +`KM_CORE_STATUS_OS_ERROR` + +: This allows encapsulating a platform error code: the remaining 31 low bits are +the error code returned by the OS for cases where the failure mode is platform +specific. For HRESULT codes this only permits failure codes to be passed and not +success codes. + +------------------------------------------------------------------------------- + +# km_core_attr struct {#km_core_attr} + +## Description + +A structure describing information about Keyman Core implementing this API. + +## Specification + +```c + +typedef struct { + size_t max_context; + uint16_t current; + uint16_t revision; + uint16_t age; + uint16_t technology; + char const *vendor; +} km_core_attr; + +``` +## Members + +`max_context` +: Maximum context size supported by processor. + +`current` +: Current API number supported. + +`revision` +: Implementation number of current API. + +`age` +: current - age == Oldest API number supported. + +`technology` +: A bit field of [km_core_tech_value] values, +specifiying which Keyboard technologies the engine supports. + +`vendor` +: A UTF-8 encoded string identifying the implementer of the processor. + +------------------------------------------------------------------------------- + +# km_core_tech_value enum {#km_core_tech_value} + +## Description + +Values for a bit field indicating which keyboarding technologies a keyboard +processor supports. + +## Specification + +```c + +enum km_core_tech_value { + KM_CORE_TECH_UNSPECIFIED = 0, + KM_CORE_TECH_MOCK = 1 << 0, + KM_CORE_TECH_KMX = 1 << 1, + KM_CORE_TECH_LDML = 1 << 2 +}; + +``` +## Values + +`KM_CORE_TECH_UNSPECIFIED` +: The keyboard processor implementation does not disclose which technologies it +implements. + +`KM_CORE_TECH_MOCK` +: The keyboard processor implements a simple en-US keyboard for the purposes of +testing the API. + +`KM_CORE_TECH_UNSPECIFIED` +: The keyboard processor implements a Keyman KMX compatible engine. + +`KM_CORE_TECH_UNSPECIFIED` +: The keyboard processor implements a LDML capable processing engine. + +------------------------------------------------------------------------------- + +# km_core_get_engine_attrs() {#km_core_get_engine_attrs} + +## Description + +Get access processors attributes describing version and technology implemented. + +## Specification + +```c +KMN_API +km_core_attr const * +km_core_get_engine_attrs(km_core_state const *state); + +``` + +## Parameters + +`state` +: An opaque pointer to a [km_core_state]. + +## Returns +A pointer to a [km_core_attr] structure. Do not modify the contents of this +structure. + +------------------------------------------------------------------------------- + +# km_core_bool enum {#km_core_bool} + +## Description + +Defines a boolean state. + +## Specification +```c +typedef enum { KM_CORE_FALSE = 0, KM_CORE_TRUE = 1 } km_core_bool; + +``` +------------------------------------------------------------------------------- + + +[km_core_cp]: background#km_core_cp "km_core_cp type" +[km_core_usv]: background#km_core_usv "km_core_usv type" +[km_core_virtual_key]: background#km_core_virtual_key "km_core_virtual_key type" +[km_core_status]: background#km_core_status "km_core_status type" +[km_core_modifier_state]: background#km_core_modifier_state "km_core_modifier_state type" +[km_core_keyboard]: background#km_core_keyboard "km_core_keyboard struct" +[km_core_state]: background#km_core_state "km_core_state struct" +[km_core_options]: background#km_core_options "km_core_options struct" +[km_core_status_codes]: background#km_core_status_codes "km_core_status_codes enum" +[km_core_attr]: background#km_core_attr "km_core_attr struct" +[km_core_tech_value]: background#km_core_tech_value "km_core_tech_value enum" +[km_core_get_engine_attrs]: background#km_core_get_engine_attrs "km_core_get_engine_attrs function" +[km_core_bool]: background#km_core_bool "km_core_bool enum" +[km_core_caps_state]: state#km_core_caps_state "km_core_caps_state enum" +[km_core_actions]: state#km_core_actions "km_core_actions struct" +[km_core_state_get_actions]: state#km_core_state_get_actions "km_core_state_get_actions function" +[km_core_context_status]: state#km_core_context_status "km_core_context_status enum" +[km_core_state_context_set_if_needed]: state#km_core_state_context_set_if_needed "km_core_state_context_set_if_needed function" +[km_core_state_context_clear]: state#km_core_state_context_clear "km_core_state_context_clear function" +[km_core_option_scope]: options#km_core_option_scope "km_core_option_scope enum" +[km_core_option_item]: options#km_core_option_item "km_core_option_item struct" +[km_core_options_list_size]: options#km_core_options_list_size "km_core_options_list_size function" +[km_core_state_options_update]: options#km_core_state_options_update "km_core_state_options_update function" +[km_core_state_options_to_json]: options#km_core_state_options_to_json "km_core_state_options_to_json function" +[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct" +[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct" +[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct" +[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function" +[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function" +[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function" +[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function" +[km_core_keyboard_key_list_dispose]: keyboards#km_core_keyboard_key_list_dispose "km_core_keyboard_key_list_dispose function" +[km_core_keyboard_imx_list_dispose]: keyboards#km_core_keyboard_imx_list_dispose "km_core_keyboard_imx_list_dispose function" +[km_core_state_imx_register_callback]: keyboards#km_core_state_imx_register_callback "km_core_state_imx_register_callback function" +[km_core_state_imx_deregister_callback]: keyboards#km_core_state_imx_deregister_callback "km_core_state_imx_deregister_callback function" +[km_core_state_create]: keyboards#km_core_state_create "km_core_state_create function" +[km_core_state_clone]: keyboards#km_core_state_clone "km_core_state_clone function" +[km_core_state_dispose]: keyboards#km_core_state_dispose "km_core_state_dispose function" +[km_core_debug_context_type]: keyboards#km_core_debug_context_type "km_core_debug_context_type enum" +[km_core_state_context_debug]: keyboards#km_core_state_context_debug "km_core_state_context_debug function" +[km_core_cp_dispose]: keyboards#km_core_cp_dispose "km_core_cp_dispose function" +[km_core_state_to_json]: keyboards#km_core_state_to_json "km_core_state_to_json function" +[km_core_event_flags]: processor#km_core_event_flags "km_core_event_flags enum" +[km_core_process_event]: processor#km_core_process_event "km_core_process_event function" +[km_core_event]: processor#km_core_event "km_core_event function" +[km_core_event_code]: processor#km_core_event_code "km_core_event_code enum" \ No newline at end of file diff --git a/developer/core/18.0/building.md b/developer/core/18.0/building.md new file mode 100644 index 000000000..65ca55867 --- /dev/null +++ b/developer/core/18.0/building.md @@ -0,0 +1,63 @@ +--- +title: How to build Keyman Core +--- + +## Prerequisites + +### To build + +* Python 3 +* Meson build system. +* C++17 or later compiler. + +### Optional + +* [kmc](https://keyman.com/developer/download) (for testing) + +## Installing Python3 + +### Linux + +You will be able to install a python3 package in any reputable recent version of +linux using its package manager if it's not already installed. + +### macOS + +You can get the official installer from the official Python site: +[https://www.python.org/downloads/mac-osx](https://www.python.org/downloads/mac-osx/) + +### Windows + +You can get the official installer from the official Python site: +[https://www.python.org/downloads/windows](https://www.python.org/downloads/windows/) + +## Installing Meson + +Ensure you have Python3 correctly installed and can run the command `pip3`. + + $> python3 -m pip install meson + +## Building + +In your source directory do the following: + + $> cd core + $> ./build.sh configure build test + +## Note on kmc + +kmc is node.js-based the command-line compiler from Keyman Developer, available +from [keyman.com](https://keyman.com/developer/) or on npm at +[@keymanapp/kmc](https://npmjs.com/package/@keymanapp/kmc). + +### Windows + +The search path can be edited through System settings / Advanced system settings +/ Environment Variables / User environment variables. + +If you have Keyman Developer installed, kmc should already be on your path. +Otherwise, add the path where you extracted the kmcomp archive. + +### Linux & MacOS + +Install kmc from the NPM package. diff --git a/developer/core/18.0/changes.md b/developer/core/18.0/changes.md new file mode 100644 index 000000000..ab8a2e287 --- /dev/null +++ b/developer/core/18.0/changes.md @@ -0,0 +1,64 @@ +--- +title: Changes - Keyman Core API +--- + +## Changes between 16.0 and 17.0 + +* The namespace identifier has changed from `km_kbp_` to `km_core_`. +* Most context APIs are now private, and [km_core_state_context_set_if_needed] is the + primary context function. Private APIs are available in + `keyman_core_api_context.h`. +* The action queue APIs are now private and deprecated. Instead, use + [km_core_state_get_actions]. Private APIs are available in + `keyman_core_api_actions.h`. +* Debug APIs are available in `keyman_core_api_debug.h`. + +------------------------------------------------------------------------------- + + +[km_core_cp]: background#km_core_cp "km_core_cp type" +[km_core_usv]: background#km_core_usv "km_core_usv type" +[km_core_virtual_key]: background#km_core_virtual_key "km_core_virtual_key type" +[km_core_status]: background#km_core_status "km_core_status type" +[km_core_modifier_state]: background#km_core_modifier_state "km_core_modifier_state type" +[km_core_keyboard]: background#km_core_keyboard "km_core_keyboard struct" +[km_core_state]: background#km_core_state "km_core_state struct" +[km_core_options]: background#km_core_options "km_core_options struct" +[km_core_status_codes]: background#km_core_status_codes "km_core_status_codes enum" +[km_core_attr]: background#km_core_attr "km_core_attr struct" +[km_core_tech_value]: background#km_core_tech_value "km_core_tech_value enum" +[km_core_get_engine_attrs]: background#km_core_get_engine_attrs "km_core_get_engine_attrs function" +[km_core_bool]: background#km_core_bool "km_core_bool enum" +[km_core_caps_state]: state#km_core_caps_state "km_core_caps_state enum" +[km_core_actions]: state#km_core_actions "km_core_actions struct" +[km_core_state_get_actions]: state#km_core_state_get_actions "km_core_state_get_actions function" +[km_core_context_status]: state#km_core_context_status "km_core_context_status enum" +[km_core_state_context_set_if_needed]: state#km_core_state_context_set_if_needed "km_core_state_context_set_if_needed function" +[km_core_state_context_clear]: state#km_core_state_context_clear "km_core_state_context_clear function" +[km_core_option_scope]: options#km_core_option_scope "km_core_option_scope enum" +[km_core_option_item]: options#km_core_option_item "km_core_option_item struct" +[km_core_options_list_size]: options#km_core_options_list_size "km_core_options_list_size function" +[km_core_state_options_update]: options#km_core_state_options_update "km_core_state_options_update function" +[km_core_state_options_to_json]: options#km_core_state_options_to_json "km_core_state_options_to_json function" +[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct" +[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct" +[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct" +[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function" +[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function" +[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function" +[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function" +[km_core_keyboard_key_list_dispose]: keyboards#km_core_keyboard_key_list_dispose "km_core_keyboard_key_list_dispose function" +[km_core_keyboard_imx_list_dispose]: keyboards#km_core_keyboard_imx_list_dispose "km_core_keyboard_imx_list_dispose function" +[km_core_state_imx_register_callback]: keyboards#km_core_state_imx_register_callback "km_core_state_imx_register_callback function" +[km_core_state_imx_deregister_callback]: keyboards#km_core_state_imx_deregister_callback "km_core_state_imx_deregister_callback function" +[km_core_state_create]: keyboards#km_core_state_create "km_core_state_create function" +[km_core_state_clone]: keyboards#km_core_state_clone "km_core_state_clone function" +[km_core_state_dispose]: keyboards#km_core_state_dispose "km_core_state_dispose function" +[km_core_debug_context_type]: keyboards#km_core_debug_context_type "km_core_debug_context_type enum" +[km_core_state_context_debug]: keyboards#km_core_state_context_debug "km_core_state_context_debug function" +[km_core_cp_dispose]: keyboards#km_core_cp_dispose "km_core_cp_dispose function" +[km_core_state_to_json]: keyboards#km_core_state_to_json "km_core_state_to_json function" +[km_core_event_flags]: processor#km_core_event_flags "km_core_event_flags enum" +[km_core_process_event]: processor#km_core_process_event "km_core_process_event function" +[km_core_event]: processor#km_core_event "km_core_event function" +[km_core_event_code]: processor#km_core_event_code "km_core_event_code enum" \ No newline at end of file diff --git a/developer/core/18.0/index.md b/developer/core/18.0/index.md new file mode 100644 index 000000000..8112d9c87 --- /dev/null +++ b/developer/core/18.0/index.md @@ -0,0 +1,124 @@ +--- +title: Keyman Core API +--- + +## Overview +Keyman Core is the component of Keyman Engine that implements keyboarding rules. +It is platform independent and allows support for different keyboard formats to +be implemented within Keyman Engine. Eventually, Keyman Core will be used in +Keyman on all platforms. As of writing, Keyman for Linux, Keyman for Windows, +Keyman for macOS, and Keyman Developer use Keyman Core. + +This is an internal API intended for use only within Keyman Engine. + +## Reference + +* [Background](background) +* [Changes from earlier versions](changes) +* [Keyboards](keyboards) +* [Options](options) +* [Processor](processor) +* [State and Actions](state) +* [JSON introspection Schema](json-schema) +* [Building Keyman Core](building) + +## Requirements +1. Cross platform. +2. Cross language. +3. Facilitate stateless operation of the Engine. +4. Keyboard format agnostic -- support both KMN and future LDML based keyboards. +5. Support querying Engine attributes. +6. Support querying Keyboard attributes. +7. Idempotent + + +## Design decisions in support of requirements +- Use C or C99 types and calling convention for the interface, it has the + broadest language FFI support. [1,2] +- Have client (Platform layer) code load keyboards, manage & pass state. [3,4,7] +- Provide query calls to return static attributes data for keyboards and + engine [5,6] +- Provide get/set calls for client accessible keyboard state information [3,4] + + +## Glossary +- __Platform layer:__ +The code that consumes the Keyman Core API, and provides the +operating system-specific handling of keystroke events and integration with +applications. +- __Client Application:__ +The application that has the focus and receives text events from the Platform +layer. +- __Context:__ Text preceding the insertion point +- __Marker:__ Positional state that can be placed in the Context. +- __Keyboard:__ A set of rules for execution by an Engine +- __Option:__ A variable in a dynamic or static key value store. +- __Processor:__ +The component that implements this API and can parse and execute a particular +keyboard. +- __State:__ An object that holds internal state of the Processor for a given +insertion point +- __Action:__ +A directive output by the processor detailing how the Platform layer should +transform the Client Application's text buffer. There may be several items +produced by a single keyboard event. +- __Keyboard Event:__ +A virtual key event and modifier map received from the Platform layer to be +processed with the state object for this Client application. +- __Virtual Key:__ +A code based on the US English layout, with values matching the Windows +virtual key codes. See `keyman_core_api_vkeys.h` for definitions. +- __Modifier Key:__ +The set of Control, Shift, Alt, Caps Lock keys. On some platforms these may +have other names (e.g. Alt is called Option on macOS); other platform-specific +modifiers such as Windows key are excluded from this set. Some modifiers are +transient, such as Control, and others have long-lasting state, such as +Caps Lock. + + +[km_core_cp]: background#km_core_cp "km_core_cp type" +[km_core_usv]: background#km_core_usv "km_core_usv type" +[km_core_virtual_key]: background#km_core_virtual_key "km_core_virtual_key type" +[km_core_status]: background#km_core_status "km_core_status type" +[km_core_modifier_state]: background#km_core_modifier_state "km_core_modifier_state type" +[km_core_keyboard]: background#km_core_keyboard "km_core_keyboard struct" +[km_core_state]: background#km_core_state "km_core_state struct" +[km_core_options]: background#km_core_options "km_core_options struct" +[km_core_status_codes]: background#km_core_status_codes "km_core_status_codes enum" +[km_core_attr]: background#km_core_attr "km_core_attr struct" +[km_core_tech_value]: background#km_core_tech_value "km_core_tech_value enum" +[km_core_get_engine_attrs]: background#km_core_get_engine_attrs "km_core_get_engine_attrs function" +[km_core_bool]: background#km_core_bool "km_core_bool enum" +[km_core_caps_state]: state#km_core_caps_state "km_core_caps_state enum" +[km_core_actions]: state#km_core_actions "km_core_actions struct" +[km_core_state_get_actions]: state#km_core_state_get_actions "km_core_state_get_actions function" +[km_core_context_status]: state#km_core_context_status "km_core_context_status enum" +[km_core_state_context_set_if_needed]: state#km_core_state_context_set_if_needed "km_core_state_context_set_if_needed function" +[km_core_state_context_clear]: state#km_core_state_context_clear "km_core_state_context_clear function" +[km_core_option_scope]: options#km_core_option_scope "km_core_option_scope enum" +[km_core_option_item]: options#km_core_option_item "km_core_option_item struct" +[km_core_options_list_size]: options#km_core_options_list_size "km_core_options_list_size function" +[km_core_state_options_update]: options#km_core_state_options_update "km_core_state_options_update function" +[km_core_state_options_to_json]: options#km_core_state_options_to_json "km_core_state_options_to_json function" +[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct" +[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct" +[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct" +[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function" +[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function" +[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function" +[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function" +[km_core_keyboard_key_list_dispose]: keyboards#km_core_keyboard_key_list_dispose "km_core_keyboard_key_list_dispose function" +[km_core_keyboard_imx_list_dispose]: keyboards#km_core_keyboard_imx_list_dispose "km_core_keyboard_imx_list_dispose function" +[km_core_state_imx_register_callback]: keyboards#km_core_state_imx_register_callback "km_core_state_imx_register_callback function" +[km_core_state_imx_deregister_callback]: keyboards#km_core_state_imx_deregister_callback "km_core_state_imx_deregister_callback function" +[km_core_state_create]: keyboards#km_core_state_create "km_core_state_create function" +[km_core_state_clone]: keyboards#km_core_state_clone "km_core_state_clone function" +[km_core_state_dispose]: keyboards#km_core_state_dispose "km_core_state_dispose function" +[km_core_debug_context_type]: keyboards#km_core_debug_context_type "km_core_debug_context_type enum" +[km_core_state_context_debug]: keyboards#km_core_state_context_debug "km_core_state_context_debug function" +[km_core_cp_dispose]: keyboards#km_core_cp_dispose "km_core_cp_dispose function" +[km_core_state_to_json]: keyboards#km_core_state_to_json "km_core_state_to_json function" +[km_core_event_flags]: processor#km_core_event_flags "km_core_event_flags enum" +[km_core_process_event]: processor#km_core_process_event "km_core_process_event function" +[km_core_event]: processor#km_core_event "km_core_event function" +[km_core_event_code]: processor#km_core_event_code "km_core_event_code enum" \ No newline at end of file diff --git a/developer/core/18.0/json-schema.md b/developer/core/18.0/json-schema.md new file mode 100644 index 000000000..756d5c496 --- /dev/null +++ b/developer/core/18.0/json-schema.md @@ -0,0 +1,77 @@ +--- +title: JSON Introspection Schema +--- + +The [`km_core_state_to_json()`](state#km_core_state_to_json) call +generates a JSON document describing the internal state of the keyboard +processor, this is the schema describing that document. + +**WARNING**: The structure and format of the JSON document is independently +versioned is not considered part of C API. It is intended solely for use in +diagnostics or by development and debugging tools which may need to be aware of +keyboard processor engine implementation details. + +```json +{"$schema": "http://json-schema.org/draft-06/schema#", + "$id": "@replace_me_with_introspection_schema_uri@", + "$comment": "© 2018 SIL International. MIT Licensed", + "title": "Keyboard Processor State object introspection", + "description": "Internal data from a Keyboard Processor State object, sufficient for debugging and diagnostics", + "type": "object", + + "definitions": { + "options": { + "type": "object", + "properties": { + "scope": { "enum": ["unknown", "environment", "keyboard"] }, + "options": { + "type": "object", + "default": {} + } + }, + "required": ["scope", "options"] + }, + "rule": { + "type": "object" + }, + "keyboard" : { + "type": "object", + "properties": { + "id": { "type": "string" }, + "version": { "type": "string" }, + "folder": { "type": "string"}, + "options": { "$ref": "#definitions/options" }, + "rules": { + "type":"array", + "items": { "$ref": "#/definitions/rule" } + } + }, + "required": ["id", "version", "folder", "options", "rules"] + }, + "context": { + "type":"array", + "items": {"$ref": "#/definitions/context_item"}, + "default": [] + }, + "context_item": { + "oneOf": [ + {"type": "string", "minLength": 1, "maxLength": 4}, + {"type": "number"} + ] + } + }, + "properties": { + "$schema": { "const": "keyman/core/docs/introspection.schema" }, + "keyboard": { "$ref": "#/definitions/keyboard" }, + "options": { + "type": "object", + "properties": { + "enviroment": { "$ref": "#/definitions/options" }, + "dynamic": { "$ref": "#/definitions/options" } + }, + "required": [ "enviroment","dynamic"] + }, + "context": { "$ref": "#/definitions/context" } + } +} +``` \ No newline at end of file diff --git a/developer/core/18.0/keyboards.md b/developer/core/18.0/keyboards.md new file mode 100644 index 000000000..b9312a78d --- /dev/null +++ b/developer/core/18.0/keyboards.md @@ -0,0 +1,658 @@ +--- +title: Keyboards - Keyman Core API +--- + +A keyboard is a set of rules and transforms in a Processor specific format for +transforming key events into action items. The keyboard is parsed and loaded by +the processsor and made available in an immutable fashion for use with any number +of state objects. + +------------------------------------------------------------------------------- + +# km_core_keyboard_attrs struct {#km_core_keyboard_attrs} + +## Description + +Provides read-only information about a keyboard. + +## Specification +```c +typedef struct { + km_core_cp const * version_string; + km_core_cp const * id; + km_core_path_name folder_path; + km_core_option_item const * default_options; +} km_core_keyboard_attrs; + +``` +## Members + +`version_string` +: Processor specific version string. + +`id` +: Keyman keyboard ID string. + +`folder_path` +: Path to the unpacked folder containing the keyboard and associated resources. + +`default_options` +: Set of default values for any options included in the keyboard. + +------------------------------------------------------------------------------- + +# km_core_keyboard_key struct {#km_core_keyboard_key} + +## Description + +Describes a single key and modifier combination that a keyboard handles, for +use by the Platform layer. This is used when the Platform layer must know in +advance which keys are used by a given keyboard. + +## Specification + +```c +typedef struct { + km_core_virtual_key key; + uint32_t modifier_flag; +} km_core_keyboard_key; + +#define KM_CORE_KEYBOARD_KEY_LIST_END { 0, 0 } + +``` + +## Members + +`key` +: A virtual key. + +`modifier_flag` +: A [km_core_modifier_state] bitmask. + +------------------------------------------------------------------------------- + +# km_core_keyboard_imx struct {#km_core_keyboard_imx} + +## Description + +Describes a single Input Method eXtension library and entry point. + +## Specification + +```c +typedef struct { + km_core_cp const * library_name; + km_core_cp const * function_name; + uint32_t imx_id; +} km_core_keyboard_imx; + +#define KM_CORE_KEYBOARD_IMX_END { 0, 0, 0 } + +``` +## Members + +`library_name` +: The fully-qualified path and filename of the dynamically loaded library file. + +`function_name` +: The entry point for the IMX. + +`imx_id` +: unique identifier used to call this function + +------------------------------------------------------------------------------- + +# km_core_keyboard_load() {#km_core_keyboard_load} + +## Description + +Parse and load keyboard from the supplied path and a pointer to the loaded keyboard +into the out paramter. + +## Specification + +```c +KMN_API +km_core_status +km_core_keyboard_load(km_core_path_name kb_path, + km_core_keyboard **keyboard); + +``` + +## Parameters + +`kb_path` +: On Windows, a UTF-16 string; on other platforms, a C string: + contains a valid path to the keyboard file. + +`keyboard` +: A pointer to result variable: A pointer to the opaque keyboard + object returned by the Processor. This memory must be freed with a + call to [km_core_keyboard_dispose]. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_NO_MEM` +: In the event an internal memory allocation fails. + +`KM_CORE_STATUS_IO_ERROR` +: In the event the keyboard file is unparseable for any reason + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: In the event the file doesn't exist or is inaccesible or `keyboard` is null. + +`KM_CORE_STATUS_OS_ERROR` +: Bit 31 (high bit) set, bits 0-30 are an OS-specific error code. + +------------------------------------------------------------------------------- + +# km_core_keyboard_dispose() {#km_core_keyboard_dispose} + +## Description + +Free the allocated memory belonging to an opaque keyboard object previously +returned by [km_core_keyboard_load]. + +## Specification + +```c +KMN_API +void +km_core_keyboard_dispose(km_core_keyboard *keyboard); + +``` +## Parameters +`keyboard` +: A pointer to the opaque keyboard object to be disposed of. + +------------------------------------------------------------------------------- + +# km_core_keyboard_get_attrs() {#km_core_keyboard_get_attrs} + +## Description + +Returns the const internal attributes of the keyboard. This structure is valid +for the lifetime of the opaque keyboard object. Do not modify the returned data. + +## Specification + +```c +KMN_API +km_core_status +km_core_keyboard_get_attrs(km_core_keyboard const *keyboard, + km_core_keyboard_attrs const **out); + +``` +## Parameters + +`keyboard` +: A pointer to the opaque keyboard object to be queried. + +`out` +: A pointer to the result: A pointer to a [km_core_keyboard_attrs] structure. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: If non-optional parameters are null. + +------------------------------------------------------------------------------- + +# km_core_keyboard_get_key_list() {#km_core_keyboard_get_key_list} + +## Description + +Returns the unordered full set of modifier+virtual keys that are handled by the +keyboard. The matching dispose call needs to be called to free the memory. + +## Specification + +```c +KMN_API +km_core_status +km_core_keyboard_get_key_list(km_core_keyboard const *keyboard, + km_core_keyboard_key **out); + +``` +## Parameters + +`keyboard` +: A pointer to the opaque keyboard object to be queried. + +`out` +: A pointer to an array of [km_core_keyboard_key] structures, + terminated by `KM_CORE_KEYBOARD_KEY_LIST_END`. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: If non-optional parameters are null. + +------------------------------------------------------------------------------- + +# km_core_keyboard_key_list_dispose() {#km_core_keyboard_key_list_dispose} + +## Description + +Free the allocated memory belonging to a keyboard key list previously +returned by [km_core_keyboard_get_key_list]. + +## Specification + +```c +KMN_API +void km_core_keyboard_key_list_dispose(km_core_keyboard_key *key_list); + +``` +## Parameters + +`key_list` +: A pointer to the keyboard key list to be disposed of. + +------------------------------------------------------------------------------- + +# km_core_keyboard_get_imx_list + +## Description + +Returns the list of IMX libraries and function names that are referenced by +the keyboard. The matching dispose call needs to be called to free the memory. + +## Specification + +```c +KMN_API +km_core_status km_core_keyboard_get_imx_list(km_core_keyboard const *keyboard, km_core_keyboard_imx **imx_list); + +``` +## Parameters + +`keyboard` +: A pointer to the keyboard + +`imx_list` +: A pointer to a variable that will contain a pointer to the IMX list. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: If non-optional parameters are null. + +------------------------------------------------------------------------------- + +# km_core_keyboard_imx_list_dispose() {#km_core_keyboard_imx_list_dispose} + +## Description + +Disposes of the IMX list. + +## Specification + +```c +KMN_API +void km_core_keyboard_imx_list_dispose(km_core_keyboard_imx *imx_list); + +``` +## Parameters + +`imx_list` +: A pointer to the IMX list. + +------------------------------------------------------------------------------- + +# km_core_state_imx_register_callback() {#km_core_state_imx_register_callback} + +## Description + +Register the IMX callback endpoint for the client. + +## Specification + +```c +KMN_API +void km_core_state_imx_register_callback(km_core_state *state, km_core_keyboard_imx_platform imx_callback, void *callback_object); + +``` +## Parameters + +`state` +: A pointer to the opaque state object + +`imx_callback` +: pointer to a function that implements the IMX callback + +`callback_object` +: TODO + +------------------------------------------------------------------------------- + +# km_core_state_imx_deregister_callback() {#km_core_state_imx_deregister_callback} + +## Description + +De-register IMX callback endpoint for the client. + +## Specification + +```c +KMN_API +void km_core_state_imx_deregister_callback(km_core_state *state); + +``` +## Parameters + +`state` +: A pointer to the opaque state object + +------------------------------------------------------------------------------- + +# km_core_state_create() {#km_core_state_create} + +## Description + +Create a keyboard processor state object, maintaining state for the keyboard in +the environment passed. + +## Specification + +```c +KMN_API +km_core_status +km_core_state_create(km_core_keyboard *keyboard, + km_core_option_item const *env, + km_core_state **out); + +``` +## Parameters + +`keyboard` +: A pointer to the opaque keyboard object this object will hold state for. + +`env` +: The array of [km_core_option_item] key/value pairs used to initialise the + environment, terminated by `KM_CORE_OPTIONS_END`. + +`out` +: A pointer to result variable: A pointer to the opaque state object + returned by the Processor, initalised to maintain state for `keyboard`. + This must be disposed of by a call to [km_core_state_dispose]. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_NO_MEM` +: In the event memory is unavailable to allocate a state object. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: In the event the `keyboard` or `out` pointer are null. + +------------------------------------------------------------------------------- + +# km_core_state_clone() {#km_core_state_clone} + +## Description + +Clone an existing opaque state object. + +## Specification + +```c +KMN_API +km_core_status +km_core_state_clone(km_core_state const *state, + km_core_state **out); + +``` +## Parameters + +`state` +: A pointer to the opaque statea object to be cloned. + +`out` +: A pointer to result variable: A pointer to the opaque state object + returned by the Processor, cloned from the existing object `state`. This + must be disposed of by a call to [km_core_state_dispose]. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_NO_MEM` +: In the event memory is unavailable to allocate a state object. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: In the event the `state` or `out` pointer are null. + +------------------------------------------------------------------------------- + +# km_core_state_dispose() {#km_core_state_dispose} + +## Description + +Free the allocated resources belonging to a [km_core_state] object previously +returned by [km_core_state_create] or [km_core_state_clone]. After this all +pointers previously returned by any [km_core_state] family of calls will become +invalid. + +## Specification + +```c +KMN_API +void +km_core_state_dispose(km_core_state *state); + +``` +## Parameters + +`state` +: A pointer to the opaque state object to be disposed. + +------------------------------------------------------------------------------- + +# km_core_debug_context_type enum {#km_core_debug_context_type} + +As of version 17, the cached context is an internal property of the +state, not exposed to the consumer of the API -- apart from the +Keyman Developer Keyboard Debugger. However, for other debug +purposes, it is helpful to be able to examine the cached context, so +a debug-formatted version of the context is made available with +[km_core_state_context_debug]. This is not intended to be parsed for +reading the context for other purposes, and the format may change. + +The three context types are: cached, intermediate, and app. + +## Specification + +```c +typedef enum { + KM_CORE_DEBUG_CONTEXT_CACHED = 0, + KM_CORE_DEBUG_CONTEXT_INTERMEDIATE = 1, + KM_CORE_DEBUG_CONTEXT_APP = 2 +} km_core_debug_context_type; + +``` +## Values + +`KM_CORE_DEBUG_CONTEXT_CACHED` +: the internal context used by Core, which may be normalized + and may contain markers. This is set via + [km_core_state_context_set_if_needed], and will be modified + during keystroke event processing. + +`KM_CORE_DEBUG_CONTEXT_INTERMEDIATE` +: internal context used by IMX, only valid during + keystroke event processing. + +`KM_CORE_DEBUG_CONTEXT_APP` +: an exact copy of the current context passed in to + [km_core_state_context_set_if_needed], which is used to verify + the precise text manipulations required when emitted changes. + This input context is in "NFU" -- normalization form unknown, + and may be mixed normalization so may require fixups when + it is manipulated by keyboard processors that support + normalization, such as the LDML keyboard processor. + +------------------------------------------------------------------------------- + +# km_core_state_context_debug() {#km_core_state_context_debug} + +## Description + +Returns a debug formatted string of the context from the state. + +## Specification + +```c +KMN_API +km_core_cp * +km_core_state_context_debug(km_core_state *state, km_core_debug_context_type context_type); + +``` +## Parameters + +`state` +: A pointer to the opaque state object to be queried. + +`context_type` +: The type of context to retrieve from the state. + +## Returns + +A pointer to a [km_core_cp] UTF-16 string. Must be disposed of by a call +to [km_core_cp_dispose]. + +------------------------------------------------------------------------------- + +# km_core_cp_dispose() {#km_core_cp_dispose} + +## Description + +Free the allocated memory belonging to a [km_core_cp] array previously +returned by [km_core_state_context_debug]. May be `nullptr`. + +## Specification + +```c +KMN_API +void +km_core_cp_dispose(km_core_cp *cp); + +``` +## Parameters + +`cp` +: A pointer to the start of the [km_core_cp] array to be disposed of. + +------------------------------------------------------------------------------- + +# km_core_state_to_json() {#km_core_state_to_json} + +## Description + +Export the internal state of a [km_core_state] object to a JSON format document +and place it in the supplied buffer, reporting how much space was used. If null +is passed as the buffer the number of bytes required is returned. If there is +insufficent space to hold the document, the contents of the buffer is undefined. +The encoding of the returned data is UTF-8. + +__WARNING__: The structure and format of the JSON document while independently +versioned is not part of this API and is intended solely for use in diagnostics +or by development and debugging tools which are aware of processor +implementation details. + +## Specification + +```c +KMN_API +km_core_status +km_core_state_to_json(km_core_state const *state, + char *buf, + size_t *space); + +``` +## Parameters + +`state` +: An pointer to an opaque state object. + +`buf` +: A pointer to the buffer to place the C string containing the JSON + document into. May be null. + +`space` +: A pointer to a size_t variable. This variable must contain the + number of bytes available in the buffer pointed to by `buf`, unless `buf` is + null. On return it will hold how many bytes were used. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_NO_MEM` +: In the event an internal memory allocation fails. + +------------------------------------------------------------------------------- + + +[km_core_cp]: background#km_core_cp "km_core_cp type" +[km_core_usv]: background#km_core_usv "km_core_usv type" +[km_core_virtual_key]: background#km_core_virtual_key "km_core_virtual_key type" +[km_core_status]: background#km_core_status "km_core_status type" +[km_core_modifier_state]: background#km_core_modifier_state "km_core_modifier_state type" +[km_core_keyboard]: background#km_core_keyboard "km_core_keyboard struct" +[km_core_state]: background#km_core_state "km_core_state struct" +[km_core_options]: background#km_core_options "km_core_options struct" +[km_core_status_codes]: background#km_core_status_codes "km_core_status_codes enum" +[km_core_attr]: background#km_core_attr "km_core_attr struct" +[km_core_tech_value]: background#km_core_tech_value "km_core_tech_value enum" +[km_core_get_engine_attrs]: background#km_core_get_engine_attrs "km_core_get_engine_attrs function" +[km_core_bool]: background#km_core_bool "km_core_bool enum" +[km_core_caps_state]: state#km_core_caps_state "km_core_caps_state enum" +[km_core_actions]: state#km_core_actions "km_core_actions struct" +[km_core_state_get_actions]: state#km_core_state_get_actions "km_core_state_get_actions function" +[km_core_context_status]: state#km_core_context_status "km_core_context_status enum" +[km_core_state_context_set_if_needed]: state#km_core_state_context_set_if_needed "km_core_state_context_set_if_needed function" +[km_core_state_context_clear]: state#km_core_state_context_clear "km_core_state_context_clear function" +[km_core_option_scope]: options#km_core_option_scope "km_core_option_scope enum" +[km_core_option_item]: options#km_core_option_item "km_core_option_item struct" +[km_core_options_list_size]: options#km_core_options_list_size "km_core_options_list_size function" +[km_core_state_options_update]: options#km_core_state_options_update "km_core_state_options_update function" +[km_core_state_options_to_json]: options#km_core_state_options_to_json "km_core_state_options_to_json function" +[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct" +[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct" +[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct" +[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function" +[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function" +[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function" +[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function" +[km_core_keyboard_key_list_dispose]: keyboards#km_core_keyboard_key_list_dispose "km_core_keyboard_key_list_dispose function" +[km_core_keyboard_imx_list_dispose]: keyboards#km_core_keyboard_imx_list_dispose "km_core_keyboard_imx_list_dispose function" +[km_core_state_imx_register_callback]: keyboards#km_core_state_imx_register_callback "km_core_state_imx_register_callback function" +[km_core_state_imx_deregister_callback]: keyboards#km_core_state_imx_deregister_callback "km_core_state_imx_deregister_callback function" +[km_core_state_create]: keyboards#km_core_state_create "km_core_state_create function" +[km_core_state_clone]: keyboards#km_core_state_clone "km_core_state_clone function" +[km_core_state_dispose]: keyboards#km_core_state_dispose "km_core_state_dispose function" +[km_core_debug_context_type]: keyboards#km_core_debug_context_type "km_core_debug_context_type enum" +[km_core_state_context_debug]: keyboards#km_core_state_context_debug "km_core_state_context_debug function" +[km_core_cp_dispose]: keyboards#km_core_cp_dispose "km_core_cp_dispose function" +[km_core_state_to_json]: keyboards#km_core_state_to_json "km_core_state_to_json function" +[km_core_event_flags]: processor#km_core_event_flags "km_core_event_flags enum" +[km_core_process_event]: processor#km_core_process_event "km_core_process_event function" +[km_core_event]: processor#km_core_event "km_core_event function" +[km_core_event_code]: processor#km_core_event_code "km_core_event_code enum" \ No newline at end of file diff --git a/developer/core/18.0/options.md b/developer/core/18.0/options.md new file mode 100644 index 000000000..e5a171d6f --- /dev/null +++ b/developer/core/18.0/options.md @@ -0,0 +1,284 @@ +--- +title: Options - Keyman Core API +--- + +A state’s default options are set from the keyboard at creation time and the +environment. The Platform layer is then is expected to apply any persisted +options it is maintaining. Options are passed into and out of API functions as +simple C arrays of [km_core_option_item] terminated with a `KM_CORE_OPTIONS_END` +sentinel value. A state's options are exposed and manipulatable via the +[km_core_options] API. All option values are of type C string. + +During processing when the Platform layer finds a PERSIST action type it should +store the updated option in the appropriate place, based on its scope. +For RESET the processor will apply the pristine value from the original scope, +the Platform layer should update that only if it manages a previously persisted +value. + +------------------------------------------------------------------------------- + +# km_core_option_scope enum {#km_core_option_scope} + +## Description + +## Specification + +```c +enum km_core_option_scope { + KM_CORE_OPT_UNKNOWN = 0, + KM_CORE_OPT_KEYBOARD = 1, + KM_CORE_OPT_ENVIRONMENT = 2, + KM_CORE_OPT_MAX_SCOPES +}; + +``` +## Values + +`KM_CORE_OPT_UNKNOWN` +: An unknown option type. Reserved. + +`KM_CORE_OPT_KEYBOARD` +: An option that is defined for the currently active keyboard; + not all processors support this type of option. These options + are specific to the active keyboard. + +`KM_CORE_OPT_ENVIRONMENT` +: Properties of the current environment, often but not necessarily + always read-only. + +------------------------------------------------------------------------------- + +# km_core_option_item struct {#km_core_option_item} + +## Description + +Defines a single option to be passed into the Keyman Core from the +Platform layer. + +## Specification +```c +struct km_core_option_item { + km_core_cp const * key; + km_core_cp const * value; + uint8_t scope; +}; + +#define KM_CORE_OPTIONS_END { 0, 0, 0 } +``` +## Members + +`key` +: Null-terminated string key for the option + +`value` +: Null-terminated string value for the option + +`scope` +: Scope which an option belongs to, from [km_core_option_scope]. + +------------------------------------------------------------------------------- + +# km_core_options_list_size() {#km_core_options_list_size} + +## Description +Return the length of a terminated [km_core_option_item] array (options +list). + +## Specification +```c +KMN_API +size_t +km_core_options_list_size(km_core_option_item const *opts); + +``` +## Parameters + +`opts` +: A pointer to a `KM_CORE_OPTIONS_END` terminated array of + [km_core_option_item] values. + +## Returns + +The number of items in the list, not including terminating item, +or 0 if `opts` is null. + +------------------------------------------------------------------------------- + +# km_core_state_option_lookup + +## Description + +Lookup an option based on its key, in an options list. + +## Specification +```c +KMN_API +km_core_status +km_core_state_option_lookup(km_core_state const *state, + uint8_t scope, + km_core_cp const *key, + km_core_cp const **value); + +``` +## Parameters + +`state` +: An opaque pointer to a state object. + +`scope` +: Which key-value store to interrogate. + +`key` +: A UTF-16 string that matches the key in the target [km_core_option_item]. + +`value` +: A pointer to the result variable: A pointer to a UTF-16 string value owned + by the state or keyboard object at the time of the call. This pointer is + only valid *until* the next call to any function on this API and should be + used immediately. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: If non-optional parameters are null, or if the scope is invalid. + +`KM_CORE_STATUS_KEY_ERROR` +: The key cannot be found. + +------------------------------------------------------------------------------- + +# km_core_state_options_update() {#km_core_state_options_update} + +## Description + +Adds or updates one or more options from a list of [km_core_option_item]s. + +## Specification +``` */ +KMN_API +km_core_status +km_core_state_options_update(km_core_state *state, + km_core_option_item const *new_opts); + +``` +## Parameters +`state` +: An opaque pointer to a state object. + +`new_opts` +: An array of [km_core_option_item] objects to update or add. Must be + terminated with `KM_CORE_OPTIONS_END`. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: If non-optional parameters are null. + +`KM_CORE_STATUS_NO_MEM` +: In the event an internal memory allocation fails. + +`KM_CORE_STATUS_KEY_ERROR` +: The key cannot be found. + +------------------------------------------------------------------------------- + +# km_core_state_options_to_json() {#km_core_state_options_to_json} + +## Description + +Export the contents of a [km_core_options] array to a JSON formatted document and +place it in the supplied buffer, reporting how much space was used. If null is +passed as the buffer the number of bytes required is returned in `space`. If +there is insufficent space to hold the document the contents of the buffer is +undefined. The returned buffer uses UTF-8 encoding. + +## Specification + +```c +KMN_API +km_core_status +km_core_state_options_to_json(km_core_state const *state, + char *buf, + size_t *space); + +``` +## Parameters + +`state` +: An opaque pointer to a state object. + +`buf` +: A pointer to the buffer to place the C string containing the JSON + document into, can be null. + +`space` +: A pointer to a size_t variable. This variable must contain the + number of bytes available in the buffer pointed to by `buf`, unless `buf` is + null. On return it will hold how many bytes were used. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: If non-optional parameters are null. + +`KM_CORE_STATUS_NO_MEM` +: In the event an internal memory allocation fails. + +------------------------------------------------------------------------------- + + +[km_core_cp]: background#km_core_cp "km_core_cp type" +[km_core_usv]: background#km_core_usv "km_core_usv type" +[km_core_virtual_key]: background#km_core_virtual_key "km_core_virtual_key type" +[km_core_status]: background#km_core_status "km_core_status type" +[km_core_modifier_state]: background#km_core_modifier_state "km_core_modifier_state type" +[km_core_keyboard]: background#km_core_keyboard "km_core_keyboard struct" +[km_core_state]: background#km_core_state "km_core_state struct" +[km_core_options]: background#km_core_options "km_core_options struct" +[km_core_status_codes]: background#km_core_status_codes "km_core_status_codes enum" +[km_core_attr]: background#km_core_attr "km_core_attr struct" +[km_core_tech_value]: background#km_core_tech_value "km_core_tech_value enum" +[km_core_get_engine_attrs]: background#km_core_get_engine_attrs "km_core_get_engine_attrs function" +[km_core_bool]: background#km_core_bool "km_core_bool enum" +[km_core_caps_state]: state#km_core_caps_state "km_core_caps_state enum" +[km_core_actions]: state#km_core_actions "km_core_actions struct" +[km_core_state_get_actions]: state#km_core_state_get_actions "km_core_state_get_actions function" +[km_core_context_status]: state#km_core_context_status "km_core_context_status enum" +[km_core_state_context_set_if_needed]: state#km_core_state_context_set_if_needed "km_core_state_context_set_if_needed function" +[km_core_state_context_clear]: state#km_core_state_context_clear "km_core_state_context_clear function" +[km_core_option_scope]: options#km_core_option_scope "km_core_option_scope enum" +[km_core_option_item]: options#km_core_option_item "km_core_option_item struct" +[km_core_options_list_size]: options#km_core_options_list_size "km_core_options_list_size function" +[km_core_state_options_update]: options#km_core_state_options_update "km_core_state_options_update function" +[km_core_state_options_to_json]: options#km_core_state_options_to_json "km_core_state_options_to_json function" +[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct" +[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct" +[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct" +[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function" +[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function" +[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function" +[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function" +[km_core_keyboard_key_list_dispose]: keyboards#km_core_keyboard_key_list_dispose "km_core_keyboard_key_list_dispose function" +[km_core_keyboard_imx_list_dispose]: keyboards#km_core_keyboard_imx_list_dispose "km_core_keyboard_imx_list_dispose function" +[km_core_state_imx_register_callback]: keyboards#km_core_state_imx_register_callback "km_core_state_imx_register_callback function" +[km_core_state_imx_deregister_callback]: keyboards#km_core_state_imx_deregister_callback "km_core_state_imx_deregister_callback function" +[km_core_state_create]: keyboards#km_core_state_create "km_core_state_create function" +[km_core_state_clone]: keyboards#km_core_state_clone "km_core_state_clone function" +[km_core_state_dispose]: keyboards#km_core_state_dispose "km_core_state_dispose function" +[km_core_debug_context_type]: keyboards#km_core_debug_context_type "km_core_debug_context_type enum" +[km_core_state_context_debug]: keyboards#km_core_state_context_debug "km_core_state_context_debug function" +[km_core_cp_dispose]: keyboards#km_core_cp_dispose "km_core_cp_dispose function" +[km_core_state_to_json]: keyboards#km_core_state_to_json "km_core_state_to_json function" +[km_core_event_flags]: processor#km_core_event_flags "km_core_event_flags enum" +[km_core_process_event]: processor#km_core_process_event "km_core_process_event function" +[km_core_event]: processor#km_core_event "km_core_event function" +[km_core_event_code]: processor#km_core_event_code "km_core_event_code enum" \ No newline at end of file diff --git a/developer/core/18.0/processor.md b/developer/core/18.0/processor.md new file mode 100644 index 000000000..0cd491ba8 --- /dev/null +++ b/developer/core/18.0/processor.md @@ -0,0 +1,198 @@ +--- +title: Processor - Keyman Core API +--- + +# km_core_event_flags enum {#km_core_event_flags} + +## Description + +Bit flags to be used with the `event_flags` parameter of [km_core_process_event] + +## Specification + +```c +enum km_core_event_flags { + KM_CORE_EVENT_FLAG_DEFAULT = 0, + KM_CORE_EVENT_FLAG_TOUCH = 1, +}; + +``` +## Values + +`KM_CORE_EVENT_FLAG_DEFAULT` +: default value: hardware + +`KM_CORE_EVENT_FLAG_TOUCH` +: set if the event is touch, otherwise hardware + +------------------------------------------------------------------------------- + +# km_core_process_event() {#km_core_process_event} + +## Description + +Run the keyboard on an opaque state object with the provided virtual key and modifer +key state. Updates the state object as appropriate and fills out its internal set +of actions, which can be retrieved with [km_core_state_get_actions]. + +The state's actions will be cleared at the start of this call; options and context in +the state may also be modified. + +## Specification + +```c +KMN_API +km_core_status +km_core_process_event(km_core_state *state, + km_core_virtual_key vk, + uint16_t modifier_state, + uint8_t is_key_down, + uint16_t event_flags); + +``` +## Parameters + +`state` +: A pointer to the opaque state object. + +`vk` +: A virtual key to be processed. + +`modifier_state` +: The combinations of modifier keys set at the time key `vk` was pressed, bitmask + from the [km_core_modifier_state] enum. + +`event_flags` +: Event level flags, see [km_core_event_flags] + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_NO_MEM` +: In the event memory is unavailable to allocate internal buffers. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: In the event the `state` pointer is null or an invalid virtual key or modifier + state is passed. + +------------------------------------------------------------------------------- + +# km_core_event() {#km_core_event} + +## Description + +Tell the keyboard processor that an external event has occurred, such as a keyboard +being activated through the language switching UI. + +The keyboard processor may generate actions which should be processed by the +consumer of the API. + +The actions will be cleared at the start of this call; options and context in +the state may also be modified. + +## Specification + +```c +KMN_API +km_core_status +km_core_event( + km_core_state *state, + uint32_t event, + void* data +); + +``` +## Parameters + +`state` +: A pointer to the opaque state object. + +`event` +: The event to be processed, from [km_core_event_code] enumeration + +`data` +: Additional event-specific data. Currently unused, must be nullptr. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_NO_MEM` +: In the event memory is unavailable to allocate internal buffers. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: In the event the `state` pointer is null or an invalid event or data is passed. + +------------------------------------------------------------------------------- + +# km_core_event_code enum {#km_core_event_code} + +## Description + +Possible events to be passed into Keyman Core from the Platform layer. + +## Specification + +```c +enum km_core_event_code { + KM_CORE_EVENT_KEYBOARD_ACTIVATED = 1, + //future: KM_CORE_EVENT_KEYBOARD_DEACTIVATED = 2, +}; + +``` +## Values + +`KM_CORE_EVENT_KEYBOARD_ACTIVATED` +: A keyboard has been activated by the user. The processor may use this + event, for example, to switch caps lock state or provide other UX. + + +[km_core_cp]: background#km_core_cp "km_core_cp type" +[km_core_usv]: background#km_core_usv "km_core_usv type" +[km_core_virtual_key]: background#km_core_virtual_key "km_core_virtual_key type" +[km_core_status]: background#km_core_status "km_core_status type" +[km_core_modifier_state]: background#km_core_modifier_state "km_core_modifier_state type" +[km_core_keyboard]: background#km_core_keyboard "km_core_keyboard struct" +[km_core_state]: background#km_core_state "km_core_state struct" +[km_core_options]: background#km_core_options "km_core_options struct" +[km_core_status_codes]: background#km_core_status_codes "km_core_status_codes enum" +[km_core_attr]: background#km_core_attr "km_core_attr struct" +[km_core_tech_value]: background#km_core_tech_value "km_core_tech_value enum" +[km_core_get_engine_attrs]: background#km_core_get_engine_attrs "km_core_get_engine_attrs function" +[km_core_bool]: background#km_core_bool "km_core_bool enum" +[km_core_caps_state]: state#km_core_caps_state "km_core_caps_state enum" +[km_core_actions]: state#km_core_actions "km_core_actions struct" +[km_core_state_get_actions]: state#km_core_state_get_actions "km_core_state_get_actions function" +[km_core_context_status]: state#km_core_context_status "km_core_context_status enum" +[km_core_state_context_set_if_needed]: state#km_core_state_context_set_if_needed "km_core_state_context_set_if_needed function" +[km_core_state_context_clear]: state#km_core_state_context_clear "km_core_state_context_clear function" +[km_core_option_scope]: options#km_core_option_scope "km_core_option_scope enum" +[km_core_option_item]: options#km_core_option_item "km_core_option_item struct" +[km_core_options_list_size]: options#km_core_options_list_size "km_core_options_list_size function" +[km_core_state_options_update]: options#km_core_state_options_update "km_core_state_options_update function" +[km_core_state_options_to_json]: options#km_core_state_options_to_json "km_core_state_options_to_json function" +[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct" +[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct" +[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct" +[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function" +[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function" +[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function" +[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function" +[km_core_keyboard_key_list_dispose]: keyboards#km_core_keyboard_key_list_dispose "km_core_keyboard_key_list_dispose function" +[km_core_keyboard_imx_list_dispose]: keyboards#km_core_keyboard_imx_list_dispose "km_core_keyboard_imx_list_dispose function" +[km_core_state_imx_register_callback]: keyboards#km_core_state_imx_register_callback "km_core_state_imx_register_callback function" +[km_core_state_imx_deregister_callback]: keyboards#km_core_state_imx_deregister_callback "km_core_state_imx_deregister_callback function" +[km_core_state_create]: keyboards#km_core_state_create "km_core_state_create function" +[km_core_state_clone]: keyboards#km_core_state_clone "km_core_state_clone function" +[km_core_state_dispose]: keyboards#km_core_state_dispose "km_core_state_dispose function" +[km_core_debug_context_type]: keyboards#km_core_debug_context_type "km_core_debug_context_type enum" +[km_core_state_context_debug]: keyboards#km_core_state_context_debug "km_core_state_context_debug function" +[km_core_cp_dispose]: keyboards#km_core_cp_dispose "km_core_cp_dispose function" +[km_core_state_to_json]: keyboards#km_core_state_to_json "km_core_state_to_json function" +[km_core_event_flags]: processor#km_core_event_flags "km_core_event_flags enum" +[km_core_process_event]: processor#km_core_process_event "km_core_process_event function" +[km_core_event]: processor#km_core_event "km_core_event function" +[km_core_event_code]: processor#km_core_event_code "km_core_event_code enum" \ No newline at end of file diff --git a/developer/core/18.0/state.md b/developer/core/18.0/state.md new file mode 100644 index 000000000..3c0c57a6a --- /dev/null +++ b/developer/core/18.0/state.md @@ -0,0 +1,285 @@ +--- +title: State and Actions - Keyman Core API +--- + +A State object maintains all per keyboard related state including context +and dynamic options ("option stores" in kmn format). + +When a keystroke is processed by Keyman Core, Core provides back a set of actions +for the Platform layer to emit to the Client application. These actions are +owned by the state object. + +------------------------------------------------------------------------------- + +# km_core_caps_state enum {#km_core_caps_state} + +## Description + +Describes the + +## Specification +```c +typedef enum { KM_CORE_CAPS_UNCHANGED = -1, KM_CORE_CAPS_OFF = 0, KM_CORE_CAPS_ON = 1 } km_core_caps_state; + +``` +## Values + +`KM_CORE_CAPS_UNCHANGED` +: Caps lock state has not changed in this event. + +`KM_CORE_CAPS_OFF` +: As a result of processing this event, the Platform layer should switch off + Caps Lock on the hardware keyboard. + +`KM_CORE_CAPS_ON` +: As a result of processing this event, the Platform layer should switch on + Caps Lock on the hardware keyboard. + +------------------------------------------------------------------------------- + +# km_core_actions struct {#km_core_actions} + +## Description + +This structure provides the results of processing a key event to the Platform layer and +should be processed by the Platform layer to issue commands to the os text +services framework to transform the text store in the Client Application, among +other actions. + +This API replaces the Action items APIs, which are now deprecated and will be +removed in the future. + +## Specification +```c +typedef struct { + unsigned int code_points_to_delete; + const km_core_usv* output; + km_core_option_item * persist_options; + km_core_bool do_alert; + km_core_bool emit_keystroke; + km_core_caps_state new_caps_lock_state; + const km_core_usv* deleted_context; +} km_core_actions; + +``` +## Members + +`code_points_to_delete` +: Number of codepoints (not codeunits!) to delete from app context. + +`output` +: Null-term string of characters to insert into document. + +`persist_options` +: List of options to persist, terminated with `KM_CORE_OPTIONS_END`. + +`do_alert` +: Issue a beep, 0 = no, 1 = yes. + +`emit_keystroke` +: Emit the (unmodified) input keystroke to the application, 0 = no, 1 = yes. + +`new_caps_lock_state` +: -1=unchanged, 0=off, 1=on + +`deleted_context` +: Reference copy of actual UTF32 codepoints deleted from end of context + (closest to caret) exactly code_points_to_delete in length (plus null + terminator). Used to determine encoding conversion differences when + deleting; only set when using [km_core_state_get_actions], otherwise nullptr. + +------------------------------------------------------------------------------- + +# km_core_state_get_actions() {#km_core_state_get_actions} + +## Description + +Returns a pointer to an actions object which details all the actions +that the Platform layer must take after a keystroke. The `code_points_to_delete` +action must be performed before the `output` action, but the other +actions may be performed in any order. + +## Specification +```c +KMN_API +km_core_actions const * +km_core_state_get_actions( + km_core_state const *state +); + +``` +## Parameters + +`state` +: An opaque pointer to a state object. + +## Returns + +A pointer to a [km_core_actions] object. This data becomes invalid +when the state object is destroyed, or after a call to +[km_core_process_event]. Do not modify the contents of this data. + +------------------------------------------------------------------------------- + +# km_core_context_status enum {#km_core_context_status} + +## Description + +Return values for [km_core_state_context_set_if_needed]. + +## Specification + +```c +typedef enum { + KM_CORE_CONTEXT_STATUS_UNCHANGED = 0, + KM_CORE_CONTEXT_STATUS_UPDATED = 1, + KM_CORE_CONTEXT_STATUS_CLEARED = 2, + KM_CORE_CONTEXT_STATUS_ERROR = 3, + KM_CORE_CONTEXT_STATUS_INVALID_ARGUMENT = 4, +} km_core_context_status; + +``` + +## Values + +`KM_CORE_CONTEXT_STATUS_UNCHANGED` +: Cached context change was not needed. + +`KM_CORE_CONTEXT_STATUS_UPDATED` +: Cached context was set to application context. + +`KM_CORE_CONTEXT_STATUS_CLEARED` +: Application context was invalid, perhaps had unpaired surrogates, + and so cached context was cleared instead. + +`KM_CORE_CONTEXT_STATUS_ERROR` +: Internal error. + +`KM_CORE_CONTEXT_STATUS_INVALID_ARGUMENT` +: One or more parameters was null. + +------------------------------------------------------------------------------- + +# km_core_state_context_set_if_needed() {#km_core_state_context_set_if_needed} + +## Description + +Sets the internal cached context for the state object, to the passed-in +application context string, if it differs from the codepoints in the +cached context. For the purposes of comparison, (1) cached markers are +ignored, (2) if the cached context is shorter than the application +context, it is considered identical, but (3) if the cached context is +longer, then it is considered different. + +If a difference is found, then the cached context will be set to the +application context, and thus any cached markers will be cleared. + +[km_core_state_context_set_if_needed] and [km_core_state_context_clear] +will replace most uses of the existing Core context APIs. + +## Specification +```c +KMN_API +km_core_context_status +km_core_state_context_set_if_needed( + km_core_state *state, + km_core_cp const *application_context +); + +``` +## Parameters + +`state` +: An opaque pointer to a state object. + +`application_context` +: A pointer to an null-terminated array of utf16 encoded data representing + the current context from the application. + +## Returns + +A value from the [km_core_context_status] enum. + +------------------------------------------------------------------------------- + +# km_core_state_context_clear() {#km_core_state_context_clear} + +## Description + +Clears the internal cached context for the state. This is the same as +`km_core_context_clear(km_core_state_context(&state))`. + +[km_core_state_context_set_if_needed] and [km_core_state_context_clear] +will replace most uses of the existing Core context APIs. + +## Specification +```c +KMN_API +km_core_status +km_core_state_context_clear( + km_core_state *state +); + +``` +## Parameters + +`state`: +An opaque pointer to a state object. + +## Returns + +`KM_CORE_STATUS_OK` +: On success. + +`KM_CORE_STATUS_INVALID_ARGUMENT` +: If any parameters are null. + +------------------------------------------------------------------------------- + + +[km_core_cp]: background#km_core_cp "km_core_cp type" +[km_core_usv]: background#km_core_usv "km_core_usv type" +[km_core_virtual_key]: background#km_core_virtual_key "km_core_virtual_key type" +[km_core_status]: background#km_core_status "km_core_status type" +[km_core_modifier_state]: background#km_core_modifier_state "km_core_modifier_state type" +[km_core_keyboard]: background#km_core_keyboard "km_core_keyboard struct" +[km_core_state]: background#km_core_state "km_core_state struct" +[km_core_options]: background#km_core_options "km_core_options struct" +[km_core_status_codes]: background#km_core_status_codes "km_core_status_codes enum" +[km_core_attr]: background#km_core_attr "km_core_attr struct" +[km_core_tech_value]: background#km_core_tech_value "km_core_tech_value enum" +[km_core_get_engine_attrs]: background#km_core_get_engine_attrs "km_core_get_engine_attrs function" +[km_core_bool]: background#km_core_bool "km_core_bool enum" +[km_core_caps_state]: state#km_core_caps_state "km_core_caps_state enum" +[km_core_actions]: state#km_core_actions "km_core_actions struct" +[km_core_state_get_actions]: state#km_core_state_get_actions "km_core_state_get_actions function" +[km_core_context_status]: state#km_core_context_status "km_core_context_status enum" +[km_core_state_context_set_if_needed]: state#km_core_state_context_set_if_needed "km_core_state_context_set_if_needed function" +[km_core_state_context_clear]: state#km_core_state_context_clear "km_core_state_context_clear function" +[km_core_option_scope]: options#km_core_option_scope "km_core_option_scope enum" +[km_core_option_item]: options#km_core_option_item "km_core_option_item struct" +[km_core_options_list_size]: options#km_core_options_list_size "km_core_options_list_size function" +[km_core_state_options_update]: options#km_core_state_options_update "km_core_state_options_update function" +[km_core_state_options_to_json]: options#km_core_state_options_to_json "km_core_state_options_to_json function" +[km_core_keyboard_attrs]: keyboards#km_core_keyboard_attrs "km_core_keyboard_attrs struct" +[km_core_keyboard_key]: keyboards#km_core_keyboard_key "km_core_keyboard_key struct" +[km_core_keyboard_imx]: keyboards#km_core_keyboard_imx "km_core_keyboard_imx struct" +[km_core_keyboard_load]: keyboards#km_core_keyboard_load "km_core_keyboard_load function" +[km_core_keyboard_dispose]: keyboards#km_core_keyboard_dispose "km_core_keyboard_dispose function" +[km_core_keyboard_get_attrs]: keyboards#km_core_keyboard_get_attrs "km_core_keyboard_get_attrs function" +[km_core_keyboard_get_key_list]: keyboards#km_core_keyboard_get_key_list "km_core_keyboard_get_key_list function" +[km_core_keyboard_key_list_dispose]: keyboards#km_core_keyboard_key_list_dispose "km_core_keyboard_key_list_dispose function" +[km_core_keyboard_imx_list_dispose]: keyboards#km_core_keyboard_imx_list_dispose "km_core_keyboard_imx_list_dispose function" +[km_core_state_imx_register_callback]: keyboards#km_core_state_imx_register_callback "km_core_state_imx_register_callback function" +[km_core_state_imx_deregister_callback]: keyboards#km_core_state_imx_deregister_callback "km_core_state_imx_deregister_callback function" +[km_core_state_create]: keyboards#km_core_state_create "km_core_state_create function" +[km_core_state_clone]: keyboards#km_core_state_clone "km_core_state_clone function" +[km_core_state_dispose]: keyboards#km_core_state_dispose "km_core_state_dispose function" +[km_core_debug_context_type]: keyboards#km_core_debug_context_type "km_core_debug_context_type enum" +[km_core_state_context_debug]: keyboards#km_core_state_context_debug "km_core_state_context_debug function" +[km_core_cp_dispose]: keyboards#km_core_cp_dispose "km_core_cp_dispose function" +[km_core_state_to_json]: keyboards#km_core_state_to_json "km_core_state_to_json function" +[km_core_event_flags]: processor#km_core_event_flags "km_core_event_flags enum" +[km_core_process_event]: processor#km_core_process_event "km_core_process_event function" +[km_core_event]: processor#km_core_event "km_core_event function" +[km_core_event_code]: processor#km_core_event_code "km_core_event_code enum" \ No newline at end of file