Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug(mac): generated backspace of SMP character corrupts text #1643

Closed
darcywong00 opened this issue Feb 28, 2019 · 7 comments · Fixed by #11086
Closed

bug(mac): generated backspace of SMP character corrupts text #1643

darcywong00 opened this issue Feb 28, 2019 · 7 comments · Fixed by #11086
Assignees
Milestone

Comments

@darcywong00
Copy link
Contributor

darcywong00 commented Feb 28, 2019

When Keyman processes a keystroke that replaces the previous SMP character with a new one, it replaces only half of the previous character, leaving the text corrupted. This will produce unexpected results that may vary depending on the app being used.

Note that this only occurs for compliant apps, like Pages or Stickies. This can be reproduced with the Brahmi Inscript keyboard because it outputs the same characters as the one reported by the original user.

Reported by @sewhite on the community site using Keyman 11.0.220

A keyboard I’ve made that works fine in Windows is not working well in Mac OS.
I’m working with the Brahmi script, (U+11000…U+1107F) which has one symbol for free standing vowels and a different symbol that combines with a preceding consonant.

My code says this:

store(cons) ‘𑀓𑀔𑀕𑀖𑀗𑀘𑀙𑀚𑀛𑀜𑀝𑀞𑀟𑀠𑀡𑀢𑀣𑀤𑀥𑀦𑀧𑀨𑀩𑀪𑀫𑀬𑀭𑀮𑀯𑀰𑀱𑀲𑀳𑀴𑀵𑀶𑀷’
begin Unicode > use(main)

group(main) using keys

+ [K_K] > ‘𑀓’
+ [K_A] > ‘𑀅’

c combining vowels
any(cons) + [K_A] > index(cons,1) ‘𑀸’ c sign aa

On Mac, the rule that makes the vowel be the combining form if a consonant precedes it is not working, I always get the freestanding vowel form.

My entire KMN file: https://drive.google.com/file/d/1H35C9TcmqGQsapyWM_uzrNraxZ13oF2m/view?usp=sharing

@darcywong00 darcywong00 added this to the Future milestone Feb 28, 2019
@mcdurdin mcdurdin changed the title SMP issue with Keyman for macOS [mac] SMP issue with Keyman for macOS Feb 28, 2019
@mcdurdin
Copy link
Member

I suggest we address this with Keyman Core refactor rather than trying to fix the existing core.

@sewhite
Copy link

sewhite commented Feb 28, 2019

KMN file in attached zip.
brahmi.zip

@mcdurdin mcdurdin modified the milestones: Future, 14.0 Feb 25, 2020
@mcdurdin mcdurdin modified the milestones: 14.0, P10S12 Mar 8, 2020
@mcdurdin mcdurdin modified the milestones: P10S12, P10S14 Jun 15, 2020
@mcdurdin mcdurdin modified the milestones: P10S14, P10S18 Jul 9, 2020
@mcdurdin mcdurdin modified the milestones: P10S18, P10S20 Oct 9, 2020
@mcdurdin mcdurdin modified the milestones: P10S20, Future Nov 23, 2020
@darcywong00
Copy link
Contributor Author

Is this addressed in 15.0 with #5012?

I just got an email from a user asking if there's a workaround in the meantime.

@mcdurdin
Copy link
Member

Is this addressed in 15.0 with #5012?

Yes, that's the plan.

I just got an email from a user asking if there's a workaround in the meantime.

Not really, sorry.

@mcdurdin mcdurdin added this to the A17S25 milestone Oct 27, 2023
@mcdurdin mcdurdin modified the milestones: A17S25, A17S26 Nov 13, 2023
@darcywong00 darcywong00 modified the milestones: A17S26, A17S27 Nov 27, 2023
@sgschantz sgschantz self-assigned this Dec 5, 2023
@mcdurdin mcdurdin modified the milestones: A17S27, A17S28 Dec 8, 2023
@mcdurdin mcdurdin modified the milestones: A17S28, A17S29, A17S30 Dec 31, 2023
@sgschantz sgschantz modified the milestones: A17S30, B17S1 Jan 8, 2024
@mcdurdin mcdurdin modified the milestones: B17S1, B17S2 Feb 17, 2024
@sgschantz
Copy link
Contributor

This still exists after the move to Keyman Core. I created a kmp file for the attached kmn, and was able to reproduce the issue in several compliant apps like Pages, TextEdit and Stickies.

It is not a problem in non-compliant apps because they are unable to read the context from the application. So for compliant apps Keyman is misleading Core by passing an incorrect context string when the context read from the app contains SMP characters.

@sgschantz sgschantz modified the milestones: B17S2, B17S3 Mar 1, 2024
@darcywong00 darcywong00 modified the milestones: B17S3, B17S4 Mar 16, 2024
@sgschantz sgschantz changed the title bug(mac): SMP issue with Keyman for macOS bug(mac): generated backspace of SMP character corrupts text Mar 22, 2024
@sgschantz
Copy link
Contributor

This is actually not caused by setting the context incorrectly. This only occurs for compliant apps when inserting and replacing a SMP character.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants