?
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
?
201 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Java had always been an easily readable and understandable language.  Some relatively recent changes in the language seem to be changing this pretty fast, and anyone that had not seen any Java code for the last 5 years will possibly have issues unde…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
The viewer will learn how to implement Singleton Design Pattern in Java.
Suggested Courses
Course of the Month10 days, 18 hours left to enroll

770 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