ten1seven / what-input

A global utility for tracking the current input method (mouse/pointer, keyboard or touch).
https://ten1seven.github.io/what-input
MIT License
1.35k stars 89 forks source link

Intent does not change exiting an input #114

Closed Kal-Aster closed 3 years ago

Kal-Aster commented 3 years ago

Hi, this module is great! I haven't try it yet, but I was looking to the demo.

I noticed that the following steps did not trigger the "keyboard" intent:

Here I expect the intent to change to "keyboard", beacause I am using it to switch focused element, but it stays at "mouse".

ten1seven commented 3 years ago

Hi @Kal-Aster!

What you're seeing is expected behavior. Check out the section in the README on interacting with forms. Essentially, since even mouse users use the keyboard when using a form, the what-intent feature smooths that out by "remembering" that the mouse was being used up until the form interaction and preserves the mouse indication that you're seeing. The what-input feature switches immediately, so you can use whichever flavor of input switching is right for your use.

Kal-Aster commented 3 years ago

Thank you for the quick response!