Long press not functioning

Good afternoon. I just used Keyman to create a keyboard for the language we are working with here in Colombia. The keyboard works great on my Windows device, but I can’t get the long-press feature to work on my Android. The long-press options display when I hold the respective button, but when I scroll to the desired character it doesn’t type it into the text box.

Maybe this has been covered previously, but any help would be appreciated.

Matthew

Welcome Mateo!
If this is a keyboard in our repo, could you give the link so we can test?
If this is your own keyboard, the long-press needs to have the correct rules set to output the string.
For example, in the graphic below:
image

The id for the double chevron quote is U_00AB and that should output U+00AB which is the opening angled quotes. The id for < is K_COMMA and the Modifier is set to shift. That means that whatever the rule in your .kmn file says for [SHIFT K_COMMA] will be output. If the rule for [SHIFT K_COMMA] outputs U+003C then that is what will be output. But if the rule says something different the other thing will be output, not what is on this keycap.

In your case, if nothing is being output, the ID: may not be set properly.
image

Thank you for your response. It looks like the problem is with my ID’s as you mentioned. The long press phonemes with the correct idea do function correctly. The options that don’t function all have an ID of T_new_(3 numbers). This happened whether I copied and pasted the desired characters into Keyman from FLEx, or typed them into the “Text:” box from my functioning Keyman keyboard on my PC……

I’ll work at getting the ID’s properly assigned.

Thanks again for your assistance,
Matthew/Mateo

If you were to keep the IDs, the other option is to write a rule in the .kmn file. For example:
+ [T_new_111] > U+0061 U+0323

However, I prefer using the U_0061_0323 notation that is now available for the touch layouts.

If you change the IDs to the U_0061_0323 format (which means you don’t need to add a rule in the .kmn file), you will need to add a

store(&VERSION) ‘15.0’

line in the beginning lines of the .kmn file so that the compiler will accept the U_ format with more than one code point. (This is referring to the version of the compiler, which is distinct from the keyboard version.)

Thanks for these responses. I did change the IDs to the U_ format but keep getting build error KM02059: and KM05007. I’m guessing it has something to do with the rule you said needs added. Where do I add that rule to the .kmn file?

I just scrolled up in the messages and noticed error KM07002: which seems to indicate exactly what you mention here.

Near the beginning of the .kmn file (in Code view) there are some lines with store(&...
You can add the new line anywhere in that area.

After the weekend… Thanks so much for your assistance. The build was successful after adding that version line (and removing the existing Version store).

Thanks to both of you for your help!

Sorry to introduce a different “problem” here, but everything is functioning well on the mobile keyboard now–except for the shift key… Here’s a screenshot of my current settings:

Can you explain what problem you are having? It looks like you have selected the “Shift” keycap and the settings do look correct. If you want to look at the Shift layer, you need to switch "Layer from “default” to “shift” and then look at those settings.

All the keys work on my mobile device–including the long-presses–except for the shift key (meaning I can’t access any of the capitals). The “SHIFT” doesn’t do anything. Here’s the snip of the shift layer:

Off hand, I’m not sure if this is the problem, but:

  • On the default layout, you could change “Key Type” to “Special” (not “Special (Active)”)
  • On the shift layout change “Key Type” to “Special (Active)” “Special”
  • Then change “Next Layer” to “default”

Those were the original settings. I reverted to them and did a re-install on my mobile device but it didn’t change the output. For some reason (possibly related)? it’s displaying an “Error in keyboard null:null for language” and Error in keyboard hup:hup for language" message(s) when I open Keyman on my phone–but the keyboard still functions as previously mentioned.

If you want to zip up your project and send it to me by direct message I can look at it.

Mateo was able to resolve this issue by uninstalling the previous development version of the keyboard and then installing the new version.