Reputation: 113
I have a GWT application with a Canvas. I added several event handlers to the canvas, including a KeyPressedHandler.
When the user presses a key and the KeyPressEvent is fired, I want to find out the mouse's location within the Canvas (similar to that provided by MouseEvent.getX(), MouseEvent.getY(). However, neither KeyPressEvent nor NativeEvent provide this information as far as I can tell. How can I obtain it?
Thanks!
Upvotes: 0
Views: 292
Reputation: 8671
A MouseMoveHandler
will help, but this won't work until the user actually moves the mouse...
Upvotes: 1