Deadkeys with on-screen keyboard

I’m adding an on-screen keyboard to one of my projects. It uses dead keys; e.g., the slash / followed by a vowel enters the vowel with a macron. The instructions for using the on-screen keyboard editor https://help.keyman.com/developer/14.0/context/keyboard-editor#toc-on-screen-tab have discussion of dead keys under the Touch section, but I don’t see anything about this for non-touch keyboards. I’d like the user to be aware that the slash is a dead key (different color?).

1 Like

Welcome to our community @southwindows,

There is a limited way to showcase a deadkey on an on-screen layout than what we can do on a touch layout. Mostly, the deadkeys are known through the keyboard documentation, but there are other creative ways of displaying them. Here are a few non-touch layout examples that uniquely display the deadkeys:

Please visit this topic that goes in depth on deadkeys implementation. If you are able to create a feature request for this as well, for our developers to start investigating this further.

Thank you!

Thank you, mengheng. I have no trouble creating documentation but am new to the on-screen keyboard feature. Apparently what I want is not possible (at least not now). For those who might be curious, what I had in mind was something like what you see here, the Greek Polytonic keyboard that Microsoft provides. The deadkeys are in yellow. (I was not expecting Keyman to identify each of the resulting characters as this one does.) Users of a complicated keyboard would certainly need to read the documentation, but an on-screen keyboard with diacritics highlighted might provide a useful reminder.

I followed the two links you sent. What exactly are these? Help files or documentation, obviously, but are they in a format that the user can access while working with the keyboards? Is there a special format I need to use for documentation? (Please forgive an elementary question, but it’s been years since I worked with Keyman and much has changed. I looked at the “Developing Keyboards” help topic but didn’t see anything about adding documentation.) My documentation now is a Word file that I can export as PDF.

Best wishes,
David

1 Like

Most keyboards in the Keyman keyboards repository have two help files: (a) an HTML file (usually called “welcome.htm”) and any image files it may reference are included in the keyboard package and users of the desktop keyboard can invoke that help; and (b) a PHP file with similar content (sometimes just copied from the body of the welcome.htm file) is used to provide help online. The links that Mengheng provided are examples of this latter format.

I think, however, that you are asking about the on-screen keyboard (OSK) that a desktop user can have displayed while typing. Currently this is limited to text characters (with no formatting, such as font color or background color).

One example of using text characters in the OSK is in the source files for the sil_cameroon_qwerty keyboard. On this keyboard, the “;” key of the QWERTY layout is a deadkey used to produce other characters. For example, “;e” produces “ə” (schwa U+0259). In the documentation, the “;” key is referred to as the Cameroon key and shown on keyboard images with a Cameroonian flag. On the OSK, however, this is not possible, so the author displays “CM” instead of “;” on that key.

For the case you mention, that is using the “/” as a deadkey producing a macron, you might consider displaying:

  • (/) to indiate that the slash is a deadkey
  • ¯ (U+00AF) to indicate that the key will produce a macron (even though what it produces will not be using that same U+00AF character)
  • ◌̄ (U+25CC U+0304) showing the macron over a dotted circle, which is a common convention for indicating a diacritic

One further note on your existing documentation: If you produce a PDF file, you can include that in the keyboard package and link to it from the welcome.htm file to allow the user to access it by asking Keyman to pull up the help for the keyboard.

Feel free to ask any followup questions if this doesn’t provide you what you need. You are also welcome, as Mengheng noted, to request a new feature (Change background color for OSK keys, for example), though there’s no guarantee that it will be implemented.

Thanks,
David

1 Like

We do have a related open feature request for this at [Windows] [Mac] [Linux] Feature Request: Try to show the result of a deadkey in OSK · Issue #947 · keymanapp/keyman · GitHub. It’s on my radar, but it’s something we haven’t had the resources to tackle thus far. (We have 23 open feature requests just for the on screen keyboard, so I am keen to try and work on this when we get the capacity!)

1 Like

drowe, thank you for this detailed reply. Your first paragraph clarifies some things and I have now found the instructions for creating a package.

When I wrote the post, I was trying to keep things simple. What I actually have is a polytonic Greek keyboard with many deadkeys; would that there was just one as in the Cameroonian keyboard! I hoped for some way to identify deadkeys in the OSK partially because there are many of them.

I discovered that it’s possible to have the OSK show (in a smaller font) the keycap character; this makes me more willing to consider your suggestions for the macron. The dotted circle, combining characters and I are old acquaintances (often frustratingly so). I worry that putting a dotted circle with a combining macron would suggest to users that this would enter a combining character rather than a precomposed one. I think the ideal solution would be a background color for all deadkeys, with (let’s say) an alpha in light type below a black diacritic; the light type would signal that the alpha is a placeholder for vowels in general. This isn’t possible now (I saw Marc’s reply below) but perhaps in the future.

Marc, thank you for this information! I hope that you can enhance the OSK soon.

I have sometimes put square brackets around the deadkeys on the osk. Like this [ ` ] and then used words in the help file to tell the user that is a deadkey.

1 Like

Here’s an example of a keyboard (on the shift layer), that uses the square brackets for the deadkeys:

https://keymanweb.com/#cmg-zanb,Keyboard_zanabazar_square

https://help.keyman.com/keyboard/zanabazar_square/1.0/zanabazar_square

Not the prettiest, but it does show there’s something different about those keys.

This topic was automatically closed after 14 days. New replies are no longer allowed.