libchewing icon indicating copy to clipboard operation
libchewing copied to clipboard

Documentation issue: chewing_handle_Default accepts asciis 32~127

Open andy0130tw opened this issue 3 years ago • 0 comments

In the documentation libchewing.texi, it states that chewing_handle_Default only accepts alphanumeric characters as input,

https://github.com/chewing/libchewing/blob/89ef2a8453e4bca8465a3fff172a39df79f28316/doc/libchewing.texi#L306-L312

At a quick glance, it is unusual that a default function only handles a tiny set of keys. There is no other function that seems to be "generic". For example, there does not appear to be a function that specifically handles the key to open the punctuation panel `. Upon further inspection, I found the code itself showed the inconsistency, as spaces are passed in to the function in chewingio.c,

https://github.com/chewing/libchewing/blob/89ef2a8453e4bca8465a3fff172a39df79f28316/src/chewingio.c#L833

This inconsistency is also present in ibus-chewing, from which I come across. Its engine passes everything in ASCII range 32-127 to this function. It seems to be fine on my keyboard layout, though. Uncertain if it is the intended use of the function by libchewing.

andy0130tw avatar Dec 18 '22 11:12 andy0130tw