[Github-comments] [geany/geany] Unexpected behavior with IME (crashing, inserting characters) (#2760)

Thomas Brownback notifications at xxxxx
Wed Mar 10 18:29:59 UTC 2021


1.37.1 in Windows 10, (using Chinese Simplified Microsoft Pinyin IME).

**Reproduce:** 
0. (Be in Chinese character pinyin input mode)
1. Type "p" (see the floating input dialogue)
2. Press "ctrl+space" to escape the pinyin input mode for English. (ctrl+space is set as my IME switch, some people use ctrl+shift or other key combos, I haven't tried changing all these shortcuts to test the behavior across all conditions.)

**Expected**: the letter "p" is typed as the buffer is cleared

**Result**: the print dialogue is opened ("ctrl+p")

**Background --** 

When using an IME with Geany, often a floating input selection box pops up on the screen where it offers character options, none of which are inserted into the document as you type. The IME also lets you switch between, say, Chinese, and Latin input with a shortcut, something like ctrl+space.

(Geany's behavior is slightly different than most IME input boxes I see. Others insert characters as you type, while also giving you a floating set of options to overwrite what you typed. I would guess Geany's is probably inherited from somewhere, but not sure why it doesn't rely on the generic Windows interface for this process, which seems to work fine and consistently in random input boxes across other applications.)

E.g., from within this browser input box, the options float just below the cursor, while still inserting keystrokes as you type:
* * * * * * * 
> ![image](https://user-images.githubusercontent.com/26754/110676661-32afd000-81a2-11eb-864b-c6800fcbe1ad.png)
* * * * * * * 

E.g., Geany, the input box moves the input to the upper left:
* * * * * * * 
> ![image](https://user-images.githubusercontent.com/26754/110676841-70145d80-81a2-11eb-955d-26f914646885.png)
* * * * * * * 


I discovered this when halfway through the word "request"... the "q" triggered a surprising "crash." But it looks like all keystrokes behave this way. If you are in the input method window, it holds all the keystrokes in a buffer. If you hit ctrl+space, you'd expect them to all simply be typed as Latin letters at the cursor, but instead they are all sequentially pressed as a "ctrl+" combination. 

**Workarounds**: 
If you hit "ESC" to escape that IME box, then no characters are not inserted and the input box closes. If you hit space or punctuation, then it enters the recommended option, usually Chinese characters in my case. If you hit the "Enter" key, it enters the Latin letters you typed and ignores the suggestions in the window. These three other ways of escaping an IME box may make for reasonable workarounds. The only thing is, muscle memory is stubborn, it would be preferable if the IME didn't have a path to invoke a bunch of ctrl+commands seemingly at random from any of its states, even though that state could technically be avoided with careful typing.

Not sure what the worst random string of commands would be. "axq" is probably up there.

**Other possibly related issues?:**

I didn't find any clear examples. Closest thing I found was #795, where he talks about some crashes while inputting text, and some Japanese language files. But my issue seems to be on inputting characters, that one reads like it happens more intermittently and in other conditions, so I don't think they're actually the same issue.

Good luck with this one, and thanks for your work on Geany.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/issues/2760
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20210310/cf41b258/attachment.htm>


More information about the Github-comments mailing list