I'm trying to have a selection wheel appear when the user holds down the Shift key.
The wheel should be centred on the mouse's position.
However when I test this, pageX
and clientX
are both undefined on the event object.
Is it possible to get the mouse coordinates on a keyboard event?
Once you're in Mouse settings, select Additional mouse options from the links on the right side of the page. In Mouse Properties, on the Pointer Options tab, at the bottom, select Show location of pointer when I press the CTRL key, and then select OK.
The onkeypress event occurs when the user presses a key (on the keyboard).
There are three types of keyboard events: keydown , keypress , and keyup . For most keys, Gecko dispatches a sequence of key events like this: When the key is first pressed, the keydown event is sent. If the key is not a modifier key, the keypress event is sent.
No, simply track mousemove
events and continuously save the current position in case you get a keyboard event.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With