Remix.run Logo
nneonneo 3 days ago

Why is it hard? In principle you render an image instead of discrete buttons, and do your hit testing manually. Sure, it’s more annoying than just having your OS tell you what key got hit, but keyboard makers are doing way fancier stuff just fine (e.g. Swype).

shakna 3 days ago | parent [-]

Apple's keyboard receives more information, to put it simply. It doesn't get told that a touch was at a particular point, but the entire fuzzy area. Allowing you to use circular occlusion and other things to choose between side-by-side buttons and override the predictive behaviour when it is the wrong choice.

A third-party maker gets a single point - usually several in short succession, but still it requires more math to work out where the edges of the finger are pressing, to help determine which direction you're moving. So most just... Don't.

jrmg 2 days ago | parent [-]

Are you aware of the `majorRadius` and `majorRadiusTolerance` UITouch properties?

shakna 2 days ago | parent [-]

Apple's software gets the actual mapping matrix that those use.