ueno / libskk

Japanese SKK input method library
GNU General Public License v3.0
78 stars 27 forks source link

Let key release events pass through #52

Closed lo48576 closed 6 years ago

lo48576 commented 6 years ago

Some web pages and web applications requires key release events (even when focuset to input box) to work correctly.

For example, google's keyword suggestions requires up/down keys' release event to select candidates, and Mastodon's search box in web UI requires Enter key's release event to start searching. But current libskk filters out those key release events, and those web pages cannot operated with fcitx-skk.

This patch let key release events pass through, and let those applications (which requires both key release events and text inputs at same time) work correctly.

coveralls commented 6 years ago

Coverage Status

Coverage increased (+0.01%) to 79.934% when pulling 651392b5ddd4644c55c92eb9298815b3a3cb1f17 on lo48576:fix/let-key-release-events-passthrough into d5df1624942f97d39ca8f76102e56ee4d6a7302d on ueno:master.

lo48576 commented 6 years ago

Ideally, the release event should be ignored only when the corresponding key press event is consumed. But it seems very hard with the current implementation, because each state handlers expect only key press events and does not remember or log the event is consumed or unhandled...

Currently this patch let key release events pass through when dict_edit_level() == 0, but I'm not sure if it would cause unexpected side-effect. I think (and wish) many applications which process text input will use key press event (not key release event), so this change would be less likely to cause problem.