Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
matijs
· 2y ago · 0 comments
`event.detail` [1] is 0 for keyboard “clicks” and 1 for pointer clicks.
1:
https://developer.mozilla.org/en-US/docs/Web/API/UIEvent/det...
Comments
[–]
andy_ppp
2y ago
The whole point of the learning from this article is don’t use hacks and make assumptions about what is happening. This is not for that, this is about how many clicks happened. You might get away with it but it’s not good code.