Fix backspace to delete composing chars in Khipro layout#2247
Fix backspace to delete composing chars in Khipro layout#2247qomarhsn wants to merge 2 commits intoHeliBorg:mainfrom
Conversation
|
Known issue There is a small known issue in some apps (not all), mainly AI chat apps like ChatGPT, Perplexity, Grok, and Qwen. After typing Before deleting that space, if I start typing a new character or press space, the IME sometimes commits the last part of the previously deleted word e.g. |
I noticed the same behavior also happens in the Korean phonetic layout. So it seems this might not be specific to the BnKhiproCombiner, but related to the main combiner system. @Helium314 could you please check if this is coming from the main combiner system? If so, this PR should be safe to merge. |
|
This behavior occurs for me in HeliBoard settings (search field), so I assume it's a problem with compose. I don't think there is anything we can do against such behavior. When we only trust our cache, then we will not read text field changes intended by the app. When we trust the text field, then we can only lose because the text field says the cursor is after the first character, but there are 2 characters before the cursor. What a waste of 3 hours... if only text field devs would give a shit about the "Editor authors:" part in documentation |
Previously, pressing backspace while composing Bengali text with the Khipro layout would incorrectly commit the entire word to the text field instead of deleting characters one-by-one. This fix adds proper DELETE key handling to BnKhiproCombiner that removes characters from the composing buffer (preedit), and when the last character is deleted, cleanly commits the word by returning a SPACE event. Additionally, a safety check in WordComposer synchronizes the cursor position when the word becomes empty, preventing a crash caused by the cursor position being out of sync with the code point size.