File tree Expand file tree Collapse file tree 2 files changed +29
-0
lines changed
tools/cldr-apps/js/src/esm Expand file tree Collapse file tree 2 files changed +29
-0
lines changed Original file line number Diff line number Diff line change 1+ /**
2+ * Operations around keyboard support
3+ */
4+
5+ // See https://keyman.com/developer/keymanweb/ for the latest version and scripts to use
6+ const KEYMAN_VERSION = "17.0.333" ;
7+ const KEYMAN_SCRIPTS = [ "keymanweb.js" , "kmwuitoggle.js" ] ;
8+ const KEYMAN_BASE = "https://s.keyman.com/kmw/engine/" ;
9+
10+ /*
11+ out.write(
12+ "<script src='https://s.keyman.com/kmw/engine/16.0.141/keymanweb.js'></script>\n");
13+ out.write(
14+ "<script src='https://s.keyman.com/kmw/engine/16.0.141/kmwuitoggle.js'></script>\n");
15+ out.write(
16+ "<script>(function(kmw) {"
17+ + "kmw.init({attachType:'auto'});\n"
18+ + "})(keyman);</script>\n");
19+ */
Original file line number Diff line number Diff line change @@ -418,6 +418,16 @@ function updateLocaleMenu() {
418418 const curLocale = cldrStatus . getCurrentLocale ( ) ;
419419 let prefixMessage = "" ;
420420 if ( curLocale != null && curLocale != "" && curLocale != "-" ) {
421+ // here, update keyboards
422+
423+ for ( const { InternalName } of keyman . getKeyboards ( ) ) {
424+ keyman . removeKeyboards ( InternalName ) ;
425+ console . log ( `Removed kbd: ${ InternalName } ` ) ;
426+ }
427+ console . log ( `Adding kbd: @${ curLocale } ` ) ;
428+ keyman . addKeyboards ( `@${ curLocale } ` ) ;
429+ // end keyboards
430+
421431 const locmap = cldrLoad . getTheLocaleMap ( ) ;
422432 cldrStatus . setCurrentLocaleName ( locmap . getLocaleName ( curLocale ) ) ;
423433 var bund = locmap . getLocaleInfo ( curLocale ) ;
You can’t perform that action at this time.
0 commit comments