Rule for touch layout question

I’m working on a keyboard where the language community wants a cedilla on U+0188. I wrote a rule to output U+0188 then U+0327 to do this.

It is not working on an iPhone. I created it as a long keypress option from the “c” key.
I understood from the documentation that I cannot put two Unicode characters from one tap key without writing a rule.

So the touch layout key activates a custom keycode I set up called T_chookced.
I have a rule in the KMN file:

+[T_chookced] > U+0188 U+0327 

When I test this in the web browser, it outputs the character. When I install the keyboard on an iPhone, the rule does nothing. You tap the longpress key and nothing happens.

Do I need to put the rule in the code section of the touch layout tab so it goes into the .js file? If so, where do I put it in the code tab?

type or paste code here

If using Keyman version 15 is an option, you can use U_0188_0327 as the id in the touch layout (and omit the rule in the .kmn file). This is a new feature in version 15.

You will need to specify store(&VERSION) '15.0' in the .kmn file. (If using Developer, you can switch to Code view on the Layout tab to make this change.)

I’m not sure what the problem is with your original code on iPhone.

@Marc Is there something wrong with Keyman Developer or how KMW behaves in iOS?

Thanks for the tip. U_0188_0327 works.
I was surprised that I had to add the version info manually, Iꞌm used to Keyman Developer adding the appropriate minimum version based on the code or layout.

1 Like

The need to manually set the version number tripped me up as well. This is because Developer is scanning the .kmn file to set the version and hasn’t yet considered the .keyman-touch-layout file where this feature is used.

I hear you! I’m tweaking the error message in the next Keyman Developer update; this is what it would look like:

keyboard.kmn: Error: 405A Key "U_0430_0304" on "phone", layer "default" has a multi-part identifier which requires version 15.0 or newer.

See https://github.com/keymanapp/keyman/pull/6990

Also:

Not as far as I know! The change that @drowe recommended worked, and I am improving the error message which was causing grief so hopefully that covers all the bases :slight_smile: