Comments (1)
The main issue is that a delay is needed between installing and activating the keyboard.
The steps needed are:
- add the keyboard (using addKeyboards).
- wait until it has been added and is available to be selected
- select that keyboard, specifying both the (internal) keyboard name and language code
- set the focus to any editable element (otherwise the OSK will not appear)
- tell KeymanWeb to display the OSK
Here is one way to do that. Include the following function:
function useKeyboard(kbdName,elId)
{
var kmw=tavultesoft.keymanweb,kbd=kmw.getKeyboard('Keyboard_'+kbdName);
if(kbd == null)
{
var tWait=(arguments.length > 2 ? arguments[2] : 10000);
if (tWait > 0) window.setTimeout(function () { useKeyboard(kbdName, elId, tWait - 50); }, 50);
}
else
{
kmw.setActiveKeyboard(kbd.InternalName, kbd.LanguageCode);
document.getElementById(elId).focus();
kmw.osk.show(1);
}
}
then call it with the keyboard name and an element id after your call to addKeyboards(), for example:
var kmw=window.tavultesoft.keymanweb;
kmw.addKeyboards('arabic_101');
useKeyboard('arabic_101','ta1');
from keyman.
Related Issues (20)
- bug(developer): server-trying to select a keyboard down where keyboard is shown fails HOT 1
- bug(developer): After installing the Keyman Developer 17.0.197 build, the Keyman Server is not in an operational state on Windows 10 OS
- bug(developer): Clicking on a hyperlink in CSS opens the link in a popup, leaving code window unresponsive. HOT 1
- bug(developer): Fill From Layout gets confused with paths HOT 1
- chore(developer): Change field label in Related Packages dialog to `Related Package ID:`
- chore(common): verify use of `SchemaValidators...errors` throughout
- feat(developer): kmc-keyboard-info needs to read font family from .ttf rather than use a generated name, where possible
- bug(android): The Facebook link within the Keyman Help topic is currently non-functional HOT 2
- bug(ios): The links to the Keyman Community and other social media links under the "Keep in touch" Section are currently unresponsive HOT 1
- feat(web): Make popups and keytips children of .kmw-keyboard to streamline CSS selection HOT 4
- feat(developer): Improve New Project wizard
- bug(windows): RTL switches to LTR when punctuation key entered HOT 3
- bug(mac): the keyboard list in the Configuration does not get shown fully
- bug(linux): Installed Keyman package shows `-local` tag HOT 1
- bug(linux): Uninstallation of shared Hieroglyphic keyboard throws
- test(windows):Regression Test Report 17.0.196-Alpha (4failures) HOT 4
- test(web):Regression Test Report 17.0.196-Alpha (0failures)
- bug: CI cannot handle use of new commands in .kps from v17.0 HOT 1
- bug(developer): Cannot test within Keyman Developer HOT 1
- bug(web): keymanweb release build push to s.keyman.com is no longer working with new PR/auth mechanism HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from keyman.