Loading...
 
(Cached)

7 Compile and Test the Touch Keyboard

Compiling your Keyboard

Now click Save to save your work, and compile the keyboard, using one of the following methods:

  • Build tab, Compile Keyboard button
  • Keyboard menu, Compile Keyboard menu item
  • F7 shortcut key

Hopefully you’ll see it compiled with no error messages:

K Compilemsg

Errors when Compiling?

You might see a warning like:

Warning: line 0  warning 2092: Key "T_new_579" on layer "default", platform "phone", is a custom key but has no corresponding rule in the source.

This shows you forgot to enter the correct keycode for a new key you added. Double-check your longpress popup keys for one with a “T_new_NNN” code (T_new_579 in this example), and add in the desired “U_NNNN” code.

The purpose of the T_new_NNN codes is so that you can write rules for these keys in the same way you do for physical keys.  If you add these key references (which you can customize to anything, like T_Hook_Y_UC) to the code, then you can make rules for them alongside your physical keyboard rules in the kmn coding section. 

You might also see a message like

Error: line 0 error 405A: Key "U+0181" on "phone", layer "default" has an invalid identifier.

This shows you attempted to change the keycode but mistyped the code. I’ve gotten this more than once because I am used to typing U+0181 to refer to a Unicode value, but the correct syntax for a keycode in Keyman Developer is U_0181.

Testing your keyboard

See also the Keyman help page on testing keyboards

The “Test Keyboard” command under the “Keyboard” menu only tests the desktop versions of a keyboard, not the mobile versions. To test a mobile keyboard, you can use the Chrome browser on your Windows computer to simulate a mobile device.

The Build Tab

To do this, go to the Build tab (bottom one in the left column) and in the “Web and Mobile targets” box, click “Test keyboard on web”. Now click  “Open debugger in local browser.”

K Starttest

 

Testing in Chrome

Your default browser will open with the keyboard.

If your default browser is not Chrome, this may or may not work. If it doesn't, you will need to copy the URL and paste it into Chrome.

1. The default web keyboard is displayed

It opens with a Keyboard Test Host window showing a visual keyboard. Don't worry, this is not your touch keyboard, but the web version of your desktop keyboard.

K Test Host  

2. Open Chrome's web developer tools

Chrome can simulate a mobile device. Press F12 or Ctrl-Shift-i to open the web developer tools, and a panel will open on the right.

3. Open the Mobile Toolbar

MobileToolbar1 

4. Select your test device

As shown above, click on the Toggle device button.  You will get a device selection bar at the top of the screen like this:MobileToolbar2

Now the “Keyboard test host” panel should shrink in size

5. Refresh the page

You must click the curling arrow K Refresh (or press the F5 key) to reload the page in Chrome before you see the mobile keyboard layout. When you see a button saying “Install Keyman for Android” (or “Install Keyman for iOS”), you have gotten to the right setup.

6. Click in the yellow box

Now the mobile keyboard layout should appear below. Your cursor has changed to a gray circle representing the size of a fingertip on a mobile keyboard. You should be able to test the keyboard now. Click on any key to make a simple press of that key, click and hold to make a longpress on a key. (If you're using a touch pad rather than an actual mouse, tap the pad for a simple press and double tap and hold for longpress.)

Touchtestchrome

 

 


Contributors to this page: dhigby .
Page last modified on Wednesday February 26, 2020 21:49:33 GMT-0000 by dhigby.

License

Creative Commons License
All content on this LingTranSoft wiki are by SIL International are licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.