keyboards icon indicating copy to clipboard operation
keyboards copied to clipboard

Pan-sahelian keyboard (NFD) needs to reorder diacritics

Open darcywong00 opened this issue 7 years ago • 6 comments

Steps to reproduce:

  1. Create bookmarklet for Fulfulde, Adamawa Keyboard
javascript: void((function() {
    try {
        var e = document.createElement('script');
        e.type = 'text/javascript';
        e.src = 'https://r.keymanweb.com/code/bml20.php?langid=fub&keyboard=ps32&lang=Fulfulde%2C Adamawa pan-Sahelian (v. 3.2)%26font%3D%7B"family"%3A"LatinWeb"%2C"source"%3A%5B"DejaVuSans.ttf"%2C"DejaVuSans.mobileconfig"%5D%2C"files"%3A%5B"DejaVuSans.ttf"%2C"DejaVuSans.mobileconfig"%5D%2C"path"%3A"https%3A%2F%2Fs.keyman.com%2Ffont%2Fdeploy%2F"%7D';
        document.body.appendChild(e);
    } catch (v) {}
})())
  1. Use the bookmarklet on a website
  2. Using the Pan-sahelian keyboard, type w + 2 + 9 ==> ẃ̩

The resulting diacritics (U+0301) + (U+0329) are in the wrong order

darcywong00 avatar Nov 20 '17 10:11 darcywong00

If you type w + 9 + 2 are the diacritics in the correct order? Do keyboards have to guarantee that the output is perfectly formed? If so, I suspect there are a lot of keyboards that wouldn't qualify!

DavidLRowe avatar Jun 13 '18 22:06 DavidLRowe

@darcywong00 does this problem also occurs in windows version? Or just the js version? And which version of pan-sahelian?

andjc avatar Jun 13 '18 23:06 andjc

Sorry, I see that I created this issue. But I'm drawing a blank if it was on behalf of someone, or from a legacy issue report.

darcywong00 avatar Jun 14 '18 00:06 darcywong00

I think the keyboard is this one: https://github.com/keymanapp/keyboards/tree/master/legacy/p/ps32

DavidLRowe avatar Jun 14 '18 00:06 DavidLRowe

I had a look at the source to see what is happening.

  1. ther eis no js version, was never developed for KMW or bookmarklets.
  2. there are ordering constraints for diacritics but these only come into play with the vowels.
  3. A sequence such as
w + 2 + 9 ==> ẃ̩

was never explicitly intended.

Probably easiest fix is to prevent use of 2 or more diacriitcs with consonants, or alternatively restrict consonants that can have combining diacritics.

Will add it to my post contract task list

andjc avatar Jun 14 '18 05:06 andjc

Although layout is probably in need of updated research and a complete overhaul and rewrite. It is quite old now.

andjc avatar Jun 14 '18 05:06 andjc