[haiku-development] Re: AltGr Key, key_map, and the US-International Keyboard

  • From: John Scipione <jscipione@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Thu, 29 Mar 2012 18:04:22 -0400

On Thu, Mar 29, 2012 at 3:29 PM, Rimas Kudelis <rq@xxxxxx> wrote:
> I actually managed to get to testing where that keymap failed a month or so
> ago, and it did reliably fail with long dead key definitions such as the one
> I showed you. I may have added the spaces you are talking about, but I don't
> think they are to blame.
>
> You can try editing any keymap file. Paste line 209 to it, and the keymap
> app should crash, unless it's been fixed without me knowing. :)

Ahh, now I see what the problem is. Keymap only supports UTF-8
characters 1 through 4-bytes wide.

0xc4afcc87cc81 is 6 bytes, which is allowed by UTF-8, but not by
keymap. Asian languages will also run into similar problems. To
support 6-byte wide UTF-8 characters we need to increase the length of
the maps from 128 to 192 and the deadkey maps from 32 to 48.

This will break backwards compatibility for sure. Maybe this could be
implemented by adding a second key_map struct with bigger maps.
Perhaps this could be turned on via a build flag or if possible the
keymap struct could be switched out dynamically to support older
applications.

John Scipione

Other related posts: