KeyEvent  while Mouse moved

Have a problem at the moment with key events and mouse drag.
We have overriden the defaultKeyboardFocusManager, to include one new method, below if ot helps....
@Override
public boolean dispatchKeyEvent(KeyEvent e) {
if (e.getKeyCode() == KeyEvent.VK_S) {
if (e.getID() == KeyEvent.KEY_PRESSED) {
sKeyDown = true;
} else if (e.getID() == KeyEvent.KEY_RELEASED) {
sKeyDown = false;
return super.dispatchKeyEvent(e);
So User action is to hold down S key, left click mouse and drag. If S key release while drag in progress key event isn't recognised. Once the is mouse released and the drop completed the application still believes the S key pressed?
Should the key events still be registered while a drag is in operation???
Cheers, JK.

Two problems arrise to my head:
First, in a Windows environment (I don't no for other OS) when you press a character key (or space bar) for one second it begins to repeatively press the button to make a series of characters. In that case, the key listener will receive a KEY_PRESSED and KEY_RELEASED (and KEY_TYPED) for each letter, so if you hold down the S key while dragging, the KeyListener you are using will receive a KEY_RELEASED Event befor the user actually released the key, which is a problem that I don't know how to solve, sorry. Well, you can go in the control panel and change the options about this feature for your computer, but you don't know what will be the settings in the computer of the other users.
The second Problem is that it is very important that the component you will be clicking on is the key listener because if not, clicking will make your listener to lose focus while the key is pressed and the KEY_RELEASED event won't be dispatched to your listener. But maybe your overridding of the dispatchKeyEvent solves this, but I'm not sure.
Anyway I hope this helps (even if I doubt it)

Similar Messages

  • My mac seems to be frozen on an internet page.  I cant force quit.  I can't control+options+command+esc.  I can't access my activity monitor.  I can see my mouse moving but when I click on anything, it doesn't seem to engage or recognize it.  Fix?

    My mac seems to be frozen on an internet page.  I can't force quit.  I can't control+options+command+esc.  I can't access my activity monitor.  I CAN see my mouse moving but when I click on anything, it doesn't seem to engage or recognize it.  Fix?

    Thank you.  There is a bigger issue.  It is not the web page that is the problem.  It is that I can see my mouse moving and can move it along the bottom toolbar and the options will highlight but I can't click on anything.  I can see the apple icon to get to force quit but cant click on it. 
    I used your suggestion and force quit came up but I can't select the option to force quit... not even with my arrows and enter/return key.  Any other thoughts?
    Thank you.

  • Keyboard shortcuts not working while mouse over title-bar

    most of the time, while mouse is over the top title bar, keyboard shortcuts (like Ctrl+W, Ctrl+T, Alt+D) are not working.
    This is a strange behaviour that happens only after i migrated to linux (ubuntu 10.10)
    Sometimes, after i try the shortcuts a few times, on middle of the screen also, then suddenly it works also when the mouse is on the title bar. It's pretty strange...

    Well, that's not the case here.
    I tried to focus on text field, and the keyboard shortcuts does work, so that's obviously not the case here.
    Sometimes the address bar is selected and i can write there, but when the mouse go over the top title, it suddenly stops reacting.
    And the Alt+D and Ctrl+T are not working doesn't matter if a text field is selected.
    BTW, sometimes it does work, it almost seems like an intermittent problem.

  • After 6.0.2 video and gif playing only while mouse is moved or cursor blinking why?

    even i can say whole browser stands when mouse not moved.
    if after clicking link mouse not moving - its not working

    I had the same experience with a new iPhone 5 that I bought  last week. Did not have a chance to measure battery life before the 6.0.2 upgrade installed but I set up my phone exactly like my 4S and immediately started running out of power after short periods. Went to Xmas get together with fully charged 5 and 4S. Heading home the iPhone 5 shut down for low battery and the 4S had 65% power. Both phones had two half phone calls on then and no data usage.
    That night I fully charged the iPhone 5 and, without lighting it up, put it on my night table. Next morning I picked it up and looked at battery indicator and I had 42% charge with NO activity!
    Tried it again next night and wound up with 37% charge. (Slept longer).
    Today I called the carrier and reactivated the 4S.  Took the 5 to Apple Store and they kindly gave me choice of new replacement phone or refund. I took the refund. Uniquely, the Apple Store said it was Verizon CDMA phones that were coming back.
    The are other strings on this with temporary solutions, but from my experience with 7 firmware changes on an HTC 4G phone the problem will continue because the solution will be hardware caused. We are in the days where RTM means Rush to Market - not Release To Manufacturing.
    I fear the only solution is to either wait for the next model (I did not notice a really major change in performance over the 4S in LTE heavy Seattle area) - or switch to another manufacturer.
    It might be useful for these forums to indicate if you have a GSM or CDMA phone to see which have more problems.
    Discouraged....

  • Draw custom selection frame(dashed rectangle), while mouse dragging is moving

    Hi All,
    Maybe anyone has experience of drawing custom selection frame(dashed rectangle) for selected page items.
    I have to draw a custom selection frame(dashed rectangle), when I drag mouse cursor, while left mouse button is pressed.
    Thank you!
    Regards.

    There are two possible answers:
    1. If you use the getGraphics() in your event dispatching code, then the rectangle disappears because the component you paint on gets repainted, and it has no idea about your rectangle it should paint. The painting routine should ALWAYS be written in paintComponent(Graphics gr) method. (I wish they made the getGraphics() method protected).
    2. If you paint it in the write way, it might disappear because the components that it overlaps might cover it.
    Now a fix:
    Because you need to paint on TOP of everything in the JPanel, you can either:
    1. The dirty way: overwrite the paint(Graphics gr) method of your JPanel, first call super.paint(gr) then paint the rectangle.
    2. A proper way: Add a non-opaque JPanel on top of you JLayeredPane (similar to GlassPane), and paint the rectangle on it (in it's paintComponent method).
    Regards,
    Marcin
    You're probably doing some getGraphics() drawing which is usually wrong. If a component gets repainted by the system it loses all the information
    Now to the question:
    Your rectangle disappears beacause the Components that are overlapping it

  • Iphoto 6 toolbar stopped appearing in full screen (mouse moved to bottom)

    I have iPhoto 6.6 on an iMac core duo running osx 10.4.11. While it formerly worked correctly, now the toolbar no longer appears when the cursor is moved to the bottom of the screen in full screen edit mode.
    I have determined the following:
    The problem exists only in my main account (and only recently appeared) but works correctly in other accounts. In my main account I have tried the following, singly and in combinations:
    Create a new iPhoto library, remove the iPhoto preferences file, login with the shift key down to disable login items, removed the /Library/Contextual menu items folder. None of these corrected the problem. In full screen edit mode, menu item View->Show Toolbar does show the toolbar. However, when the toolbar is hidden, it still does not automatically show when the cursor is moved to the bottom of the screen. Switching to other screen sizes does not correct the problem. The menu at the top of the screen does automatically appear when the cursor is moved to the top of the screen.
    The term "main account" refers to an account in which I do my routine work. It does not have administrator privileges. I have other accounts on this system, including one just for admin.
    Since the toolbar automatically appears in other accounts, I assume that some data in my account has been corrupted. It appears not to be the iphoto library or preferences file since I have replaced these, or any startup item since I have disabled these.
    What else in my account could cause iPhoto to not correctly determine when the cursor is at the bottom of the screen? Or to otherwise cause this problem?

    Welcome to the Apple Discussions.
    ince the toolbar automatically appears in other accounts, I assume that some data in my account has been corrupted.
    It could be a preference file other than iPhoto's that's interfering with iPhoto. This will tell you if that's the case:
    Trouble Shooting Preferences
    Go to HD/Users/Your_name/Library. Move the Preferences folder (in its entirety) to the Desktop and make a second copy of it so you have Copy A and B. Now try the the process again and determine if problem is fixed.
    If the problem IS fixed, then go to the new Prefs folder that the OS will have created and open it up.
    Open Copy B on the Desktop and select all of the items inside. Drag them into the open new library folder. When the Copy window comes up check the Apply to All check box and then click on the Don't Replace button as seen here. That will keep the new files created and bring back all of the others.
    If the problem is NOT fixed, trash the new Prefs folder and move the intact Copy A folder back to the Library folder .
    TIP: For insurance against the iPhoto database corruption that many users have experienced I recommend making a backup copy of the Library6.iPhoto (iPhoto.Library for iPhoto 5 and earlier) database file and keep it current. If problems crop up where iPhoto suddenly can't see any photos or thinks there are no photos in the library, replacing the working Library6.iPhoto file with the backup will often get the library back. By keeping it current I mean backup after each import and/or any serious editing or work on books, slideshows, calendars, cards, etc. That insures that if a problem pops up and you do need to replace the database file, you'll retain all those efforts. It doesn't take long to make the backup and it's good insurance.
    I've created an Automator workflow application (requires Tiger or later), iPhoto dB File Backup, that will copy the selected Library6.iPhoto file from your iPhoto Library folder to the Pictures folder, replacing any previous version of it. It's compatible with iPhoto 6 and 7 libraries and Tiger and Leopard. Just put the application in the Dock and click on it whenever you want to backup the dB file. iPhoto does not have to be closed to run the application, just idle. You can download it at Toad's Cellar. Be sure to read the Read Me pdf file.
    Note: There's now an Automator backup application for iPhoto 5 that will work with Tiger or Leopard.

  • Mouse moving issue in sql developer 3.2

    Hi,
    I'm using sql developer 3.2 in vmware .I'm facing issue  when i try to select the package/procedure from left side tree structure with mouse,mouse pointer  is moving to some other place.
    If i try to click on one object name(procedure/package/function) then  mouse pointer is moving to other object name automatically.It is very difficult to work .Can some advice why it is ? And how i can resolve?
    And at the same time no issue with  sql developer 1.1 .
    Environment:
    In side vmware
    Os:Xp
    Sql developer  Version 3.2.20.09

    Enable security descriptors = Allow virtual applications full write permission to the virtual file system.
    Here is how it looks like:
    https://twitter.com/packageologist/status/462180503995813888/photo/1

  • Vi runs while mouse down

    I need a vi to run while the right mouse click button is down, but as soon as the operator releases the mouse button, the vi closes. And it needs to run under the event structure.
    PaulG.
    "I enjoy talking to you. Your mind appeals to me. It resembles my own mind except that you happen to be insane." -- George Orwell

    '-2' of what? My RMB returns 2 for the mouse button.
    And you should wait on a mouse up event after the mouse down, see here.
    Ton
    Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
    Nederlandse LabVIEW user groep www.lvug.nl
    My LabVIEW Ideas
    LabVIEW, programming like it should be!

  • Mouse moving but nothing else is responding. Had to PowerOff using button.

    I have this persistent problem - After switching users, the iMac C2D 17" would not respond to any of the mouse click after the user desktop is displayed. The mouse pointer can be moved around, but won't respond to any clicks or any key clicks on the keyboard. I have 6 different users using the computer with their own accounts - big family with one iMac and an old Beige G3 . This seems to happen regardless of which account it is switching from/to. The only way to gain back the computer is by pressing the power button for some time or pulling the plug out of the outlet.
    I have done basically everything I learnt from the forum and the web - Reset SMC, P-RAM, never sleep selected in Energy pref., cleanup permission, cache, etc (Applejack and/or Maintenence Automator). Anyone else experience the same or similar issues. Any help to resolve this is indeed appreciated.
    Thanks.
    KZ.
    iMac C2D 17"   Mac OS X (10.4.8)  

    Keyboard/Mouse are the original wired ones (wired white keyboard & wired mighty mouse). I do have 2 USB printers attached to it, usually are always switched on, an external Dell LCD monitor (connected via mini DVI adapter but switched off) and ipod firewire cable attached at the back (but no ipod connected). The internet Sharing (security with WEP/firewall open for only websharing, printer sharing and VOIP port UDP 5060) are also on to share connection with my Nokia E61.
    Thanks again,
    KZ

  • IPhoto 11 Scrolling hangs until mouse moved

    Having an incredibly frustatring problem. Have been a mac user for 20+ years, and usually know my way around, but this is too much.
    IPhoto has become unuseable - trying to accomplish anything (selecting a photo, scrolling, anything), stalls the program, and then if I move the mouse to the dock or menu bar, the program "snaps back". So I scroll, move the mouse to the dock, scroll, move the mouse to the dock...this is not acceptable.
    This happens in Safari as well, but not as bad.
    What is going on??

    Same thing with wired mighty mouse.
    Typed a line in this message, and it didnt appear until I move the mouse down to the dock. Moving up to menu bar works as well.
    Something is "hanging" the system.

  • Taking stack tracks out of record mode, while transport moving

    Is there a way to stack 10 tracks, one record button triggering them all, three other tracks out of the stack and then the record button for the stacked (one button) 10 tracks button being un-engaged, while the transport is moving leaving the other three tracks recording?  All without stopping the transport?

    Hi user13118647,
    It looks like your application is triggering an existing Sun HotSpot VM bug from the older 1.4.2_11 JDK.
    Please review the Sun bug references below.
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6405062
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6385867
    The problem appears to be resolved in JDK 1.4.2_13(b01). You may want to download and attempt to replicate with this service pack upgrade.
    Another potential problem I noticed is at your classpath level. It looks like you are using a mix of runtime JDK jar files from the Sun JDK and JRockit. Please ensure your JDK classpath; including any reference to any JDK related runtime jar files (tools.jar, rt.jar etc.) is consistent and unique e.g. Sun HotSpot or Oracle JRockit but not both.
    ## Example:
    JAVA_HOME=C:\bea\jdk142_11 // JDK home is setup to the Sun JDK
    CLASSPATH=C:\bea\JROCKI~1\lib\tools.jar; // tools.jar is loaded from the JRockit JDK home
    Regards,
    P-H
    http://javaeesupportpatterns.blogspot.com/

  • Trackpad mouse moving on its own and creating new folder on desktop

    This stared a few weeksd ago, I've lost control of my macbook pro as my mouse has a mind of its own.
    The laptop barely(or even not at all) responds to my control.  It's like there was somebody else controlling my mouse, my keyboard works fine however.  The guy hacking me looked at my mailbox, dropped a few things from the dock, made a new folder on the desktop and opened my photos.  I've tried everything including  turning off wi-if, my reuter and under "system preferences" unclicked "sharing" of anything. I also took it to the genius bar to have my laptop wiped and updated to OS X Mountain Lion.
    Last week, my mouse again started to move on its own and created a new folder on my destop.
    I don't know if anyone has the same experience...and if so, please let me know what is going on and is there a solution?
    Thank you

    Woah, I just got this really sketchy email a few hours later. It's a bounce back from an invalid address, but it includes the previous few messages too... these guys are definitely speaking in some sort of code.
    I pasted it on this google doc for your inspection, pretty crazy. Do you think it could be related to this cursor moving incident? Did I get remotely hacked or something?
    https://docs.google.com/document/d/1NlP_g-skisehtH-kEMKPvYjDL5hrhyGPBcCpS_L4_AI/ edit?hl=en_US

  • Mouse moving but not clicking.......

    after startup the mouse moves but doesn't click....if I restart sometimes it's ok and sometimes it's not....
    any help greatly appreciated...

    I've asked this thread be moved to the Mavericks forum, which Mac OS X 10.9.4 is a member of.     Classic is 13 years older.
    Macs older than 4 years may need a new PRAM battery.
    If you are using a wireless mouse, it may need a new battery itself, or to have the battery recharged, or the Bluetooth settings cleared and reset.  An iPhone nearby can confuse the bluetooth settings, if auto discovery is on.
    In the future, use this tip to find where to post.  
    http://discussions.apple.com/docs/DOC-2463

  • On load button "over" does not work until mouse moved

    hello,
    i have a flash menu that loads from another page. when it
    loads, the users mouse pointer is over one of the buttons. (because
    they just clicked on a button on the past page in that same
    location). the button on the new page does not realize that the
    pointer is over it until the user moves the mouse slightly, then it
    switches to the "over" state. is there a way of letting flash know
    that the mouse is over the button, even though the mouse has not
    moved yet?
    thanks!

    yes, it is a button component. is there a way of letting the
    button know that the mouse is indeed over it, even though the mouse
    has not yet moved? this is a problem on IE, but works fine in
    Safari.
    thanks

  • Weird Mouse moving + Fan at FULL Speed + NO Power LED (Suddenly)

    After having a minor issue on Can't Wake Up from Sleep using Apple Remote Desktop 2.2 (previous post) .... Tonite I got another surprise !!
    Tonite, when I turned on my Mini (Intel), I noticed there are some weird movement on the Mouse pointer which happened before; however, since I used ARD as main control ... I will never notice such weird Mouse pointer behavior unless I plug-in and use an USB Mouse!
    How weird? Say, I move the USB mouse from Left to Right ... the pointer move and all a sudden ... it disappeared then resurfaced back at the Starting Point which is the place where I started moving it !?! Sometimes, the USB mouse simply not functioning when I move it, the on-screen cursor "blinks" rapidly !!
    ( BTW ... keyboard seems not functionally too at that moment ... reboot ... things resume normal ... )
    Already tried swap Keyboard, Mouse and different USB port too; no use!
    Reset PRAM = NO use.
    Reset PRAM then followed by PMU, now the Cooling Fan itself spins at FULL/Top Speed and I also noticed the Power LED Lite is now gone??!!
    USB Mouse problem .... still persist and happened randomly but only limited to physical connected mouse only. Using ARD? No problem ... even the pointer already freeze and blinking but it still under control !
    Good thing is, I am still able to use my Mini (Intel) .... its still working!!
    Any clue?
    Geez .. did I finally get a "Lemon?"
    Or should I bring it to service centre for this 7.5 days old Mac Mini (Intel) !
    ( p.s. don't worry there are neither Refund or Exchange in my country ... :< ... only way is to go dealing with Apple Service Centre.)

    just to continue...
    i plug in the power cord and the fans go full before i touch the ON button. no front light, no boot chime, no hard drive noise (though the fans may drown it out), no video after many minutes, pressing the power button does nothing. About the only thing this mac does is plug in and fans on full. Unplug, fans off.
    i held power in for ten seconds, i held power button for 5 seconds with power unplugged, i held power button in when plugging in power. Nothing.
    I even reseated the ram.

Maybe you are looking for

  • Report on details of category Schema

    We created a schema and I need a report to check details of levels where I can give the schema ID and then it should return the values of the catelog entries linked to that level. Checking the schema by clicking on each level is very time consuming.

  • Powerbook freezes when I connect maxtor firewire drive

    Ever since I installed tiger and upgraded to v 10.4.6 my G4 powerbook freezes when I connect a Maxtor firewire drive. I also recently installed Final Cut Pro Studio v 5.1. The maxtor drive mounts fine on another PB OS X 10.1.2. A Lacie firewire drive

  • "No Suitable Driver" error in Applets

    I have problems establishing a jdbc/thin connection to the host machine in a Java applet. The html-web page an the java applet is installed on the same NT-machine as the Oracle database. The html-file looks something like this: <applet code="MyApplet

  • Drop Target Registration

    I am using DnD to drag items from a JTree (drag source) onto another JTree (drop target). This all takes place within a JPanel enclosing a JSplitPane. It works fine when I run this class using a main(), creating a JFrame within the main() and adding

  • Importing a XML with multiple entitties?

    Is it possible importing an XML file containing several entities of a Oracle BBDD into the correspondant tables at the same time? Thanks in advance!