Link to home
Start Free TrialLog in
Avatar of ulf_k
ulf_k

asked on

How to determine if the user is holding down the space key while moving the mouse?

I wanted to have the same behaviour as in Adobe Photoshop. If you hold down the space key while draggging the mouse around, you move the image inside the viewport.
I know that i can do this with the shift, ctrl, alt and altGr keys, but how to do that with the space key?
Any suggestions?

Many thanx in advance!!

-ulf-
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ulf_k
ulf_k

ASKER

Hmm but i thought it's possible without using a KeyListener additionally.

Isn't it?

-ulf-
Don't think so. The spacebar is not a modifier.
ulf_k:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept CEHJ's comment as answer.

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

jimmack
EE Cleanup Volunteer
Thank you :-)