mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 17:05:34 +00:00
Note: build.sh updated to make sure that test:help build action:target doesn't also call test.sh by adding `:_all` meta-target. Note: CI will need a new help-keyman-com.sh build step to deploy web engine help. Fixes: #12347
55 lines
1.4 KiB
HTML
55 lines
1.4 KiB
HTML
<html>
|
|
<head>
|
|
|
|
<script src='https://s.keyman.com/kmw/engine/17.0.331/keymanweb.js'></script>
|
|
<script>var kmw = keyman;</script>
|
|
|
|
<script type='text/javascript' src='js/unified_loader.js'></script>
|
|
<script type="text/javascript">
|
|
|
|
var KWControl = null;
|
|
|
|
function SetupDocument()
|
|
{
|
|
keyman.init().then(function(){
|
|
// Load the keyboards of your choice here.
|
|
loadKeyboards();
|
|
|
|
KWControl = document.getElementById('KWControl');
|
|
var kbds = keyman.getKeyboards();
|
|
for(var kbd in kbds)
|
|
{
|
|
var opt = document.createElement('OPTION');
|
|
opt.value = kbds[kbd].InternalName + "$$" + kbds[kbd].LanguageCode;
|
|
opt.innerHTML = kbds[kbd].Name;
|
|
KWControl.appendChild(opt);
|
|
}
|
|
document.f.multilingual.focus();
|
|
|
|
keyman.setActiveKeyboard('', '');
|
|
});
|
|
}
|
|
|
|
function KWControlChange()
|
|
{
|
|
var name = KWControl.value.substr(0, KWControl.value.indexOf("$$"));
|
|
var languageCode = KWControl.value.substr(KWControl.value.indexOf("$$") + 2);
|
|
keyman.setActiveKeyboard(name, languageCode);
|
|
document.f.multilingual.focus();
|
|
}
|
|
|
|
window.addEventListener( 'load' , SetupDocument );
|
|
|
|
</script>
|
|
</head>
|
|
<body>
|
|
|
|
<form name='f' action='.' method='post'>
|
|
|
|
<p>Keyboard: <select id='KWControl' onchange='KWControlChange()'><option value=''>English</option></select></p>
|
|
|
|
<p><input type='text' id='multilingual' name='multilingual' size="40" placeholder="id='multilingual'"/></p>
|
|
</form>
|
|
|
|
</body>
|
|
</html>
|