fcitx / mozc

Mozc - a Japanese Input Method Editor designed for multi-platform

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Using dead keys in preedit

jansol opened this issue · comments

Summary

I am using a keyboard layout where ~ among other symbols are mapped to dead keys. I would like fcitx to pick up characters typed that way (e.g. dead key + space or dead key tapped twice) as part of the preedit string. Currently the characters get sent past fcitx, directly to the underlying application. The most common use for this would be converting ~ to 〜 which I do in this exact way on macOS, but haven't found a way to replicate it in fcitx yet. (I know I can type "nami" in mozc to get 〜 as a suggestion but the dead keys are much more convenient for me in this case)

I can add composing support to mozc. At the same time, I'm just saying, maybe, you can set mozc to use a non-dead key layout if that works for you?

That works yes, just requires a little bit of muscle memory adjustment.

It would still be a nice feature to have, if only to reduce the number of surprises for people migrating from other platforms/input methods. The same feature request also applies at least to fcitx-rime, possibly others.

@jansol add composing support from my point of view is like a per-engine effort, since the engine may prefer to handle the dead key directly with its own logic, or dead key string won't be easily to integrate into the engine logic (especially when engine maintains its own buffer that doesn't not accept random key/string).

Fair enough. Opened a separate issue for fcitx5-rime.

Before applying PR

Layout

English(us,alt. intl).

It will not be preedited, and only the dead key will be input.

English(us,intl., with dead keys).

It will not be preedited, and only the dead key will be input.

English(us,intl., with AltGr dead keys).

When tapping a dead key (+shift key), `(~) appears as a conversion candidate in preedit mode.

When PR is applied

Layout

English(us,alt. intl).

When tapping the dead key (+shift key) twice, `(~) is displayed as a conversion candidate in preedit mode.

English(us,intl., with dead keys).

When tapping the dead key (+shift key) twice, `(~) is displayed as a conversion candidate in preedit mode.

English(us,intl., with AltGr dead keys).

When tapping a dead key (+shift key), `(~) appears as a conversion candidate in preedit mode.

@phoepsilonix hi I just wonder if you try to explain you find a bug in PR or what do you mean by this comment? :)

@wengxt
Sorry for the lack of words. This is a report on the results of operation verification.
I don't know what layout @jansol is using, but I think this is probably the expected behavior if SHIFT+dead key is assigned a tilde.
However, even if we do not apply PR, depending on the layout we are using, even if a tilde is assigned to a dead key, it may be displayed as a conversion candidate.

@phoepsilonix you probably think you’re pressing dead key while it’s not.

In dead altgr us layout, shift + “the key under esc”, is the normal ~. shift + altgr + that key is dead tilde.