Keymap and new "dead keys"

How can I add additional dead keys, for example: dead_macron, dead_cedilla, and maybe others, into keymap?
Is it possible?

Yes, it is possible!

https://dev.haiku-os.org/ticket/9744

1 Like

However, if I understood well, your patch was not accepted?

Lithuanian needs 17 pairs of dead key characters.
Lithuanian characters with tons:

(With a gray background are not included in Unicode (unfortunately))

Now haiku support 19 keys?

Dead cedilla needed for latvian; dead macron needed for latin and latvian.
Dead keys is only way to add additional optional characters to keymap, without need to making new one additional keymap, and some times it is only way.

No accepted. If I remember Haiku support only 5 dead keys. My patches support 32 dead keys.

Not accepted?
Eeee… why?

You can read the explanation in the ticket. The way this patch implemented things changes the keymap format, which is fine, but it also changes the keymap API, which would break BeOS apps.
What would need to be done:

  1. Modify the patch, so that the old API stays the same and continues to support only 5 dead keys,
  2. Introduce a new, Haiku-specific API, that removes the limitation (with a different name from the old one). Probably we would make that new API accept any number of dead keys so we never need to change it again.
  3. Update Haiku apps and libs (keymap preferences, BTextView) to use the new API

However, I don’t know if an extended keymap is the right way to go. It may be better to use an “input method” instead. This is, for example, what is done for Japanese text. The input method way is a lot more flexible and would allow more complex mapping (implementing a “compose” key, for example).

1 Like

Also “input method” is what cannot be done by some user, only by some apps developer.
And also, is it need for “input method” to be able to input character with macron or cedilla? I do not think so. That no so difficult and can and must be done by simple keymap.
I think there must be no need for some “input methods” for latin based writings.

An Input Method is just a technical implementation of things. All the dead key handling could be moved to an input method. Of course it would ship in all standard installs and be properly integrated with the system, if it is required for some common keymap layouts (and if we do this as a generic solution for all dead keys, it will be). For the users, it would work exactly the same as it is now, but the code for dead key handling would be in a single place (the corresponding method add-on).

If the user will be able to add / change the characters for input, it’s right for me.
I’m just worried that the things do not become too complicated for a user, if he want add or change some character in the keymap or in some dead key “characters repository”.

Input method created.

http://haiku.healynet.org/xdk.html

I also made a demonstration map using the Lithuanian characters above. It should be pretty easy to create a Greek Polytonic map; if someone does so, I would be glad to include it in my maps package.

Source code is available. MIT license.

(Package for gcc2 only.)

The source code is not available, please you correct the link.

xdk deskbar replicant cannot see any maps (there is one installed), ‘Rescan map folders’ not helps.

And, fixed input_server blocking shutdown process.

Test.

I posted, it failed, I reposted, it refused because the message was too similar to the last message. Somehow, the validator doesn’t seem to realize the post failed. Maybe the validator is JavaScript, so it’s in the browser memory, and doesn’t account for the fact that posts might fail?

Adding an otherwise unnecessary sentence to the top of my post to trick the validator into letting me post.

Okay, I have put a new version out that will hopefully fix your problem.

Uninstalling will crash Haiku, and I noticed that sometimes, it doesn’t actually get uninstalled, so the old version is still there when you reload. You may need to manually delete the xdk*.hkpg files from /boot/system/packages.(Which will also crash Haiku.)

The fixed input server will block shutdown because it’s not running from its normal folder. There doesn’t seem to be any way around that.

Issues:

  • input server: Currently, you either need to use my workaround (which blocks shutdown) or wait until my patch gets approved and committed.
  • installation: Currently you need to reboot after installing; fixing this would require changing input server to allow loading of add-ons at other times than initial load, and then adding a script to the package to load the new add-on
  • uninstallation: Currently uninstalling will crash the system; it doesn’t have to, because I was able to uninstall t9 (another input method) without crashing; if I can’t figure this one out, changing input server to graciously unload would work, too.
  • icons: Icons look clunky and are not updating when you switch maps (the second part isn’t a problem if you’re only using one map).

(Sorry, this is my first input method and my first Haiku repo, and everything is not going as smoothly as I’d hoped. Thanks for being my guinea pig.)

You don’t see a page at http://haiku.healynet.org/xdk?

If you see the page there, click “Timeline”, then click a checkin id to see details about that check-in, including links to zip or tarball.

(Sorry if the “Empty Page” confused you, I haven’t put any content on the front page of the code repository yet.)

I updated Haiku to hrev50851, and now in menu I see the maps, I can select them, but I do not know how it works (?!), I cannot input any characters from the map, only those which is included in standard keymap. Further I removed yours fixed input server and removed and reinstalled xdk, still I cant input additional characters.
And still some modal window of input server blocking shutdown process.

Sorry to take so long; I have a wife, small children, and a full-time job. These things tend to reduce my free time.

If you can still see the XDK submenu and are getting the error on shutdown, then you haven’t fully removed my version of input_server.

To fully remove the input_server:

Open the zip folder again, double click on each folder. From the servers folder, remove input_server. (It should be the only file in there.) From the other folder, remove the packages file. (It should not be the only file in there.)

Since as far as I know, my input server patch has not been applied, doing this will make you unable to see the input method submenus, so you might want to wait.

To turn on the method:

Make sure the XDK method is selected. Its icon should be visible in the deskbar instead of the keyboard icon for the ‘Roman’ input method.

Make sure a map is selected. It should have a checkmark next to it in the submenu, and when you look at the top-level input method menu, the text should have changed from ‘XDK’ to the name of the menu.

Once that is in place, `, ', and ~ are the deadkeys.

You should use it with the main Haiku keyboard set to the Lithuanian keymap, because otherwise you won’t have access to the base letters to use with the deadkeys.

1 Like

I applied the patch as of hrev50868. Thanks for your efforts!