?
Solved

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

Posted on 2003-03-28
6
Medium Priority
?
207 Views
Last Modified: 2010-03-31
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-
0
Comment
Question by:ulf_k
6 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 225 total points
ID: 8226631
Flag spacebar is true on KeyEvent KEY_PRESSED, flag spacebar is false on KeyEvent KEY_RELEASED
0
 

Author Comment

by:ulf_k
ID: 8226640
Hmm but i thought it's possible without using a KeyListener additionally.

Isn't it?

-ulf-
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 8226696
Don't think so. The spacebar is not a modifier.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Expert Comment

by:CleanupPing
ID: 9058428
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.
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9735279
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
0
 
LVL 15

Expert Comment

by:jimmack
ID: 9737964
Thank you :-)
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Are you developing a Java application and want to create Excel Spreadsheets? You have come to the right place, this article will describe how you can create Excel Spreadsheets from a Java Application. For the purposes of this article, I will be u…
Introduction Java can be integrated with native programs using an interface called JNI(Java Native Interface). Native programs are programs which can directly run on the processor. JNI is simply a naming and calling convention so that the JVM (Java…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Suggested Courses
Course of the Month8 days, 13 hours left to enroll

621 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question