simple-keyboard icon indicating copy to clipboard operation
simple-keyboard copied to clipboard

[BUG] Touch input responding outside of keys area

Open user8446 opened this issue 2 years ago • 5 comments

Hello,

Bug: When you press in the whitespace to the left of the "a" key, an "a" is pressed. If the "show separate number row" is active and you press in the whitespace to the right of the "0" key, a "0" is pressed.

Expected behavior: Pressing in the whitespaces should not initiate a keypress just like when pressing in the whitespace to the right of the "." nothing happens as expected.

user8446 avatar Jan 30 '22 21:01 user8446

Key touch zones not matching the key borders is by design. LatinIME originally worked this way and other keyboards should work the same.

Clicking below the key triggers the key above. That was done as people tend to click slightly below what they intend. Then key area is extended to sides till the middle point to the next key or till the side of the screen, and till the bottom of the screen. This leaves 0 pixels that aren't bound to a key.

After one PR touch zones in all directions around keys was reduced to half space between keys. It instantly felt wrong and amount of misclicks increased. Your "expected behavior" would make it unusable. You've been using these extended touch areas without even knowing it.

I'll check the dead zone around "." and remove it if it's there.

rkkr avatar Jan 31 '22 06:01 rkkr

Hi @rkkr

Thanks for the explanation and I agree with the extended touch area outside of the keys.

However, the "a" and "0" should not extend all the way to the edge of the screen. Simply holding the device has caused misclicks which is how I discovered the issue (especially on tablets). Those two keys should be the same as all of the other keys.

I tried a few other keyboard and they didn't exhibit that behavior (Fleksy, Google keyboard, Leankey keyboard).

user8446 avatar Jan 31 '22 14:01 user8446

This is GBoard:

image

It has the same extended touch zone to sides.

rkkr avatar Feb 16 '22 06:02 rkkr

Thank you for researching. I failed to mention that this is with tablets in landscape mode, with makes it more pronounced:

Screenshot_20220216-104029_LI

The whole area in the circles by the "a" and "0" click the key. However, the area circled by the "." does not click the period.

user8446 avatar Feb 16 '22 15:02 user8446

I fixed this in #221 (see point 4), but @rkkr and I had a discussion about whether everywhere on the keyboard needs to map to a key (17862f16c345bfc6b76401bdc344af565d807d77). Although we didn't really come to an agreement on unclickable spaces, in #232 I made a compromise to increase the key hitbox padding limit (clickable space next to a key reaches further, but still not forever). It looks like in 404ff3ea9e228225648a7d691923b3bdd3ef7a06 the padding limit was removed entirely, which made this an issue again. For what it's worth, I still think there should be some unclickable places, such as where @user8446 pointed out.

wittmane avatar Feb 17 '22 03:02 wittmane