chore: cleanup comments and defines

This commit is contained in:
Marc Durdin 2021-11-23 16:08:19 +11:00
parent bbbf1afce7
commit dcedb15b69
4 changed files with 36 additions and 10 deletions

View file

@ -110,6 +110,8 @@ namespace kmx {
#define TSS_COMPARISON 30
#define TSS__KEYMAN_80_MAX 30
/* Keyman 9.0 system stores */
#define TSS_PLATFORM 31
@ -126,7 +128,22 @@ namespace kmx {
#define TSS_TARGETS 38
#define TSS__MAX 38
#define TSS__KEYMAN_90_MAX 38
/* Keyman 14.0 system stores */
#define TSS_CASEDKEYS 39
#define TSS__KEYMAN_140_MAX 39
/* Keyman 15.0 system stores */
#define TSS_BEGIN_NEWCONTEXT 40
#define TSS_BEGIN_POSTKEYSTROKE 41
#define TSS__KEYMAN_150_MAX 41
#define TSS__MAX 41
/* wm_keyman_control_internal message control codes */

View file

@ -53,16 +53,16 @@ namespace com.keyman.text {
}
/**
* Tell the currently active keyboard that a new context has been selected,
* e.g. by focus change, selection change, keyboard change, etc.
*
* @param outputTarget
* @returns
* @param {Object} outputTarget The OutputTarget that has focus
* @returns {Object} A RuleBehavior object describing the cumulative effects of
* all matched keyboard rules
*/
processNewContextEvent(outputTarget: OutputTarget): RuleBehavior {
// We presently need the true keystroke to run on the FULL context. That index is still
// needed for some indexing operations when comparing two different output targets.
const ruleBehavior = this.keyboardProcessor.processNewContextEvent(this.device, outputTarget);
// Should we swallow any further processing of keystroke events for this?
if(ruleBehavior != null) {
ruleBehavior.finalize(this.keyboardProcessor, outputTarget);
}

View file

@ -98,6 +98,7 @@ struct COMP_STORE {
#define TSS__KEYMAN_70_MAX 29
/* Keyman 8.0 system stores */
#define TSS_COMPARISON 30
#define TSS__KEYMAN_80_MAX 30
/* Keyman 9.0 system stores */
#define TSS_PLATFORM 31
#define TSS_BASELAYOUT 32
@ -109,7 +110,16 @@ struct COMP_STORE {
#define TSS_KEYBOARDVERSION 36 // &keyboardversion system store // I4140
#define TSS_KMW_EMBEDCSS 37
#define TSS_TARGETS 38
#define TSS__MAX 38
#define TSS__KEYMAN_90_MAX 38
/* Keyman 14.0 system stores */
#define TSS_CASEDKEYS 39
#define TSS__KEYMAN_140_MAX 39
/* Keyman 15.0 system stores */
#define TSS_BEGIN_NEWCONTEXT 40
#define TSS_BEGIN_POSTKEYSTROKE 41
#define TSS__KEYMAN_150_MAX 41
#define TSS__MAX 41
// ShiftFlags
#define LCTRLFLAG 0x0001 // Left Control flag

View file

@ -355,11 +355,10 @@ namespace com.keyman.dom {
DOMEventHandlers.states._SelectionControl = target;
if(target && outputTarget) {
//
// Call the current keyboard's newContext handler;
// timeout is required in order to get the current
// selection, swhich is not ready at time of focus event
//
// selection, which is not ready at time of focus event,
// at least on Chrome
window.setTimeout(() => {
//console.log('processNewContextEvent called from focus');
com.keyman.singleton.core.processNewContextEvent(outputTarget);