Capture key and mouse event

Hi,
What I want to do is..
when users click on a item such as text item and press the 'Ctrl' key, a message will
appear.
How can I capture the event ?
Thanks.
Ivan

Duplicate thread. Please see the other one at:
<p>capture key and mouse event

Similar Messages

  • Key and mouse event

    Hi all,
    anybody please tel me how can i access key and mouse events.here i don't have any GUI application.
    thanks in advance
    pradeep

    If you don't have a GUI application then no events will be generated.
    Or do you mean "GUI experience?" A quick google would have found you these:
    http://java.sun.com/docs/books/tutorial/uiswing/events/mouselistener.html
    http://java.sun.com/docs/books/tutorial/uiswing/events/keylistener.html

  • Key and mouse recorder

    is it possible to build a java app that allow you to record and replay key-strokes and mouse actions?

    Do a search on jfcUnit. It does exactly what you are talking about. It actually adds a listener to the AWT event system, and can listen for all events. It then plucks out key/mouse events as needed. You can record these, then probably play them back with the Robot class, although a translation may be needed to take an event and use the Robot class to play it back.

  • Unable to capture startup and shutdown event of Photoshop in automation Plugin.

    Hi,
    I am creating an automation plugin and I want to register some events. I have seen listener plugin sample to register event in startup and unregister event in shutdown. I have used same code in my plugin but I am unable to capture the startup nad shutdown event of Photoshop. On clicking the menu item of my plugin the calls come inside the AutoPluginMain but during the startup or shutdown of plugin, the calls does not come inside the AutoPluginMain.
    I am unable to detect the cause of the problem. Can someone please giude me??
    Thanks in advance.

    Hi Tom,
    Thanks for the suggestion.
    Yes, I am working on Windows. As you suggested, I compiled .rc file but the compile option for .r file was disabled. After compiling the .rc file, I again rebuild the complete project and tested my build. But still I was not able to achive the desired result.
    Any other thing that I need to do to make it work?
    Thanks

  • Function Keys and Mouse Right Click Stopped Working On New iMac

    I bought a new iMac a couple of days ago and everything was working fine until last night when I noticed that the volume up/down function keys and also the mouse right click no longer worked.
    For the mouse I tried turning off the right click option and back on again and also tried another mouse which has the same problem.  Both work ok on a MBP which I have.
    I have tried doing the normal SMC and PRAM resets which doesn't solve the problem.
    One program which I installed after I got the computer was Logmein which screwed up my audio settings.  After uninstalling that my audio settings are ok but I was wondering if the program could also have changed some other settings.
    Any ideas would be greatly appreciated.

    Have you checked the System/Keyboard preference pane to see if the Function key option is checked?
    OT

  • Can i capture the the mouse events

    i am writting application in which i have to send the screen image to client as well as mouse events and keyboard events. i am successfull in doing screen image but mouse events are not traped
    please send me any suggestion about how i will do it.
    [email protected]

    Have you tried to implement MouseListener?

  • Bluetooth keyboard K810 and mouse T630 at the same time, repeating keys and mouse starts to stutter

    I use a Lenovo Thinkpad Tablet 2, Windows 8.1(core edition), x86 (32bit).
    If I pair a Bluetooth keyboard K810 and mouse T630 at the same time, with Wifi On, the keyboard starts repeating the keys and the mouse starts to stutter. Especially if WiFi is under load (when downloading something).
    This doesn’t happens if I pair only the keyboard, or if I pair mouse and keyboard with Wifi OFF.
    If I pair a Bluetooth keyboard and use a USB mouse with Wifi ON, everything works fine.
    If I pair a Bluetooth mouse and use a USB keyboard with Wifi ON, everything works fine.
    I think it is an issue with two Bluetooth devices paired at the same time with Wifi ON.
    So here is a summary:
    BT mouse and BT keyboard / Wifi ON ----> repeating chars and the mouse starts to stutter (bug)
    BT mouse and BT keyboard / Wifi OFF ----> works fine
    Only BT keyboard / Wifi ON ----> works fine
    Only BT mouse / Wifi ON ----> works fine
    USB mouse and BT keyboard / Wifi ON ----> works fine
    USB keyboard and BT mouse / Wifi ON ----> works fine
    Where is the problem? Is there any solution?
    Solved!
    Go to Solution.

    I have solved the problem. In the Wlan-Drives-Settings there is the "Bluetooth Collaboration" option. I put the value to "Disable" and now works everything like charm.
    Best regards, jC
    Broadcom manual:
    Bluetooth Collaboration
    Bluetooth Collaboration enables general purpose input/output transmit suppression protocol between the IEEE 802.11 media access control (MAC) and an external Bluetooth chip to minimize transmit interference. Bluetooth Collaboration is enabled by default.

  • Keyboard and mouse events during screen sharing

    I use OS X 10.6.8, my mom has 10.5.(8?).
    Screen sharing used to work fine. I am always viewing her screen.
    Lately, none of my keyboard presses or mouse clicks make it through the connection to her machine. I can 'influence' but not really control the placement of her cursor as viewed on my screen. She never sees the pointer move from wherever it was before I started trying to move it. I can see her screen fine, and even see some frame rate if she plays a video from an email message (but I don't get the audio stream). We can't continue talking while the video is playing though because our voice connection has too many dropouts.
    She did change from using Comcast to using AT&T Uverse several months ago. I can't remember exactly when the troubles started, but it could have been at the time of that switch. She is getting a lower speed connection than she used to.
    Are these issues strictly a problem of a too-slow connection, or is there something else to try. I'm most concerned about the keyboard and mouse loss, since that means I have to describe every action to her instead of doing anything myself. I can live without viewing videos over a screen sharing link...

    Hi,
    It is worth doing  Speed check at both ends
    http://www.speedtest.net/
    It may also pay to open the Connection Doctor (Video Menu) during a Audio or Video chat and checking the Bit rate and Framerate (on Video).
    iChat in 1-1 Video needs "Real World" speed of 256kbps  (it will manage according to Apple at 128kbps).
    This Min of 128kbps is the min for Screen Sharing as well.
    The Connection Doctor will show you what iChat is using (your Bit rate) NOT what the Internet Speed is measured at.
    It will be closer to the Upload Speed you have.
    iChat will tend to settle closer to the slower speed of whichever Buddy has the slowest Upload (plus a margin for variances in the ISP's feed/service)
    If the variances in the Internet Speed from the ISP varies too much then iChat will have difficulties.
    It will drop Audio (As far as you as concerned) as it will start dropping frames to smooth the video out.
    For this reason it can pay to go to iChat > Preferences > Video Section and try the Bandwidth Limit at 500kbps  (If for instance you have a 10Mbps Upload a 5% variance can be a whole 500kbps)
    With both ends at 500kbps you can be below the Variance factor.
    Try 200kbps if there still appear to be problems.
    NOTE:-
    iChat's responses are determined by the Internet Speed (Or at least the portion that computer is getting = Bandwidth) and what else the computer is doing.
    Depending on the Mac and it's Processor and the apps running at the time iChat may not get a decent use of the Processor.  (It is set to use it "last" a it were so Downloading, Playing Video elsewhere, or setting background tasks (Anit Virus scans, iMovie Rendering) may impinge on free Processor cycles).
    Try to eliminate as much as possible.
    <
    9:19 PM      Tuesday; July 19, 2011
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb( 10.6.8)
     Mac OS X (10.6.8),
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • What am I doing to make my screen zoom in while I  am using my mouse?  It zooms to about double size, and using the control key and mouse will not return it to its former size.

    When I am searching the internet and using my mouse, my screen will suddenly zoom in to about double size.  Clicking control and mousing will not return it back to where it was.  I have no idea what I am doing to cause this to happen or how to reverse it.

    Hi.
    If you're using a Magic Mouse, a double tap on the mouse with one finger will zoom.
    Double tap again to unzoom.
    Helpful?

  • Problem with TrayIcon and mouse events

    Hi,
    I am trying to listen for a mouseEntered event on a TrayIcon.
    This is the code i am using:
    final TrayIcon icon = new TrayIcon(getImage(), "tray icon");
    final SystemTray tray = SystemTray.getSystemTray();
    try {
       tray.add(icon);
    }catch (AWTException e) {System.out.println("TrayIcon could not be added.");return;}
    icon.addMouseListener(new MouseAdapter() {
    @Override
    public void mouseEntered(MouseEvent e){
       System.out.println("works");
    }});The icon is correctly shown in the tray bar, but the mouse entered event is not working.
    I have to say that i am using the exactly same code to achieve the same effect on a JButton and it works without any problem.
    Is there anything wrong?
    Thanks,
    Nite

    is there a way to request my thread to be moved into Swing section? Well, the idea is to post the question in the proper forum in the first place.
    yes, but i didnt find anything related to my problem.Really, I found posted examples of using a MouseListener.
    Does your code work for other events or is the problem only related to mouseEntered() events (which may not be supported, I don't know since I don't have the proper API to use TrayIcons)?
    If you need further help then you need to create a [Short, Self Contained, Compilable and Executable, Example Program (SSCCE)|http://homepage1.nifty.com/algafield/sscce.html], that demonstrates the incorrect behaviour.
    Then maybe others can test your code or see something else wrong.

  • Problem with JScrollPane and Mouse Event in JDK 1.4

    The folowing code works fine with JDK 1.3. But not with JDK 1.4. It has got a JPanel(main panel) which hosts JScrollPane which hosts another JPanel (drawing Panel). If I remove(do not add) JScrollPane to the main Panel and ad drawing panel directly to the main panel, it works.
    Thanks.
    In order to replicate the exact scenario, I have modified Sun's tutorial ScrollDemo2.java
    * This code is based on an example provided by John Vella,
    * a tutorial reader.
    import javax.swing.*;
    import javax.swing.event.MouseInputAdapter;
    import java.awt.*;
    import java.awt.event.*;
    import java.util.*;
    public class ScrollDemo2 extends JPanel {
    private Dimension size; // indicates size taken up by graphics
    private Vector objects; // rectangular coordinates used to draw graphics
    private final Color colors[] = {
    Color.red, Color.blue, Color.green, Color.orange,
    Color.cyan, Color.magenta, Color.darkGray, Color.yellow};
    private final int color_n = colors.length;
    JPanel drawingArea;
    public ScrollDemo2() {
    setOpaque(true);
    size = new Dimension(0,0);
    objects = new Vector();
    //Set up the instructions.
    JLabel instructionsLeft = new JLabel(
    "Click left mouse button to place a circle.");
    JLabel instructionsRight = new JLabel(
    "Click right mouse button to clear drawing area.");
    JPanel instructionPanel = new JPanel(new GridLayout(0,1));
    instructionPanel.add(instructionsLeft);
    instructionPanel.add(instructionsRight);
    class MyScrollPane extends JScrollPane
    MyScrollPane(JPanel drawingArea)
    super(drawingArea);
    public void grabFocus()
    super.grabFocus();
    public void requestFocus()
    super.requestFocus();
    protected void processFocusEvent(FocusEvent e)
    if ( e.getID() == FocusEvent.FOCUS_GAINED )
    int i = 0;
    else
    if( e.getID() == FocusEvent.FOCUS_LOST )
    int i = 0;
    super.processFocusEvent(e);
    //Set up the drawing area.
    drawingArea = new JPanel() {
    protected void paintComponent(Graphics g) {
    super.paintComponent(g);
    Rectangle rect;
    for (int i = 0; i < objects.size(); i++) {
    rect = (Rectangle)objects.elementAt(i);
    g.setColor(colors[(i % color_n)]);
    g.fillOval(rect.x, rect.y, rect.width, rect.height);
    g.drawString("Hello",100,100);
    protected void processMouseEvent(MouseEvent pEvent)
    if(pEvent.getID() == pEvent.MOUSE_PRESSED)
    super.processMouseEvent(pEvent);
    else
    super.processMouseEvent(pEvent);
    drawingArea.setBackground(Color.LIGHT_GRAY);
    addMouseListener(new MyMouseListener());
    //Put the drawing area in a scroll pane.
    JScrollPane scroller = new MyScrollPane(drawingArea);
    scroller.setPreferredSize(new Dimension(200,200));
    setLayout(new BorderLayout());
    add(scroller, BorderLayout.CENTER);
    //If the above line is commented and the line bellow will be uncommented it works.
    //add(drawingArea, BorderLayout.CENTER);
    protected void processMouseEvent(MouseEvent pEvent)
    if(pEvent.getID() == pEvent.MOUSE_PRESSED)
    super.processMouseEvent(pEvent);
    else
    super.processMouseEvent(pEvent);
    class MyMouseListener extends MouseInputAdapter {
    final int W = 100;
    final int H = 100;
    public void mouseReleased(MouseEvent e) {
    boolean changed = false;
    if (SwingUtilities.isRightMouseButton(e)) {
    // This will clear the graphic objects.
    objects.removeAllElements();
    size.width=0;
    size.height=0;
    changed = true;
    } else {
    int x = e.getX() - W/2;
    int y = e.getY() - H/2;
    if (x < 0) x = 0;
    if (y < 0) y = 0;
    Rectangle rect = new Rectangle(x, y, W, H);
    objects.addElement(rect);
    drawingArea.scrollRectToVisible(rect);
    int this_width = (x + W + 2);
    if (this_width > size.width)
    {size.width = this_width; changed=true;}
    int this_height = (y + H + 2);
    if (this_height > size.height)
    {size.height = this_height; changed=true;}
    if (changed) {
    //Update client's preferred size because
    //the area taken up by the graphics has
    //gotten larger or smaller (if cleared).
    drawingArea.setPreferredSize(size);
    //Let the scroll pane know to update itself
    //and its scrollbars.
    drawingArea.revalidate();
    drawingArea.repaint();
    public static void main (String args[]) {
    JFrame frame = new JFrame("ScrollDemo2");
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {System.exit(0);}
    frame.setContentPane(new ScrollDemo2());
    frame.pack();
    frame.setVisible(true);

    I tried it . It didn't work.
    Thanks for the suggestionI've got it... I know that inside the paitComponet method you can't call setSize() in jdk1.4, but you could in previous versions... that has caused al lot of problems to me...
    Abraham

  • Consistant Scrolling position between cursor keys and mouse - how to do it??

    When I read with Adobe Reader, I often use the mouse on my laptop and scroll the pages down with the scrollbar and then become engrossed  in reading the article.
    Being engrossed, however, I also sometimes press the cursor down key, with the expectation that it will scroll the page down from the current position I am reading from.
    Unfortunately it jumps to whereever it was 50 or so pages before, or to the start and I have to mess around trying to find my place.
    It's deeply, deeply irritating and slows down my reading significantly.
    I have read all the Adobe reader help and settings, but cannot find anywhere I can change this behavour. I
    Anyone else affected by this and if so how did you overcome it?

    I shoud be clearer and say that it jumps to wherever the cursor was last placed by the cursor keys.
    Can't believe its just me who has this problem....

  • A program that captures voice and mouse screen movements?

    I want to create tutorials and have it capture (in video) my voice and anything I do on the desktop so I can create tutorials and the likes.
    Any ideas?
    Any freeware or trial periods? If trial, would appreciate programs (UB) that are not limited too much and only have a time limitation vs. say only 10MB capture.
    Please advise!
    Thanks x 100

    There is such a program. It is UB, it has a trial, and if you decide you want to buy it it's actually very cheap. It's called iShowU. It does exactly what you want. You can define a portion of the screen or all of it or, my personal fav, you can define a set size and it will follow your mouse around as necessary when you start to leave the area. It also has a variety of exporting options for the video.

  • Keyboard directions keys and mouse pads are not very supportive in Pavillion G6 series

    Hi All,
    I have been using my Pavillion G6 series since 6 months now. The mouse pad and the direction keys have already started behaving as if they have become they are ages old. What should be done in this condition?

    Hi. can you please explain further? Do you mean the sensitivity? You can easily change the settings on this. 

  • Stick Keys and Mouse Keys usage?

    Hi. I'm getting ready to replace my current Dell Laptop with a new laptop. I've been using PC based computer since 1989 but this time I'm seriously considering getting a Macbook shortly after WWDC. I'm just fed up with Windows. I'm paralyzed from the neck down and type with a stick I hold by mouth (mouthstick/typing wand). Currently in WinXP I use StickyKeys and a trackstick (trackpoint) in the middle of the keys to move the pointer and do the clicking (w/clicklock enabled) for clicking and dragging with a usb mouse. Since macbooks don't have a trackstick my current trackstick/mouse combination won't do on the macbook. And I can not move a mouse around.
    I assume sticky keys works the same on OS X as on WinXP (one press of a modifier key holds until the combo key/s are press) but will pressing a modifier key twice lock it until the modifier key is pressed again?
    One thing I've never been able to do is use the Fn key combinations because stickykeys on WinXP doesn't hold the Fn key for combinations. Does sticky keys on OS X hold or lock the Fn key like the modifier keys?
    As for mousekeys on OS X, pressing the "Option" five times everytime I need to move/click the pointer then five more times is a bit much (thats why I use the trackstick/mouse combo rather than mousekeys on WinXP). Is there a quicker way? If sticky keys treats the FN key like a modifier key on OS X to press twice to lock it and once to unlock it that would be a great alternative. Any info is greatly appreciated.
    Dell Inspiron 8500   Windows XP  

    Hello!
    I'm paralyzed from the neck
    down and type with a stick I hold by mouth
    (mouthstick/typing wand).
    A solution that works well is a HeadMouse from AssistiveWare, seen used by a tetraplegic artist.
    I assume sticky keys works the same on OS X as on
    WinXP (one press of a modifier key holds until the
    combo key/s are press) but will pressing a modifier
    key twice lock it until the modifier key is pressed
    again?
    Yes, it does.
    One thing I've never been able to do is use the Fn
    key combinations because stickykeys on WinXP doesn't
    hold the Fn key for combinations. Does sticky keys on
    OS X hold or lock the Fn key like the modifier keys?
    Yes, it does.
    As for mousekeys on OS X, pressing the "Option" five
    times everytime I need to move/click the pointer then
    five more times is a bit much (thats why I use the
    trackstick/mouse combo rather than mousekeys on
    WinXP). Is there a quicker way? If sticky keys treats
    the FN key like a modifier key on OS X to press twice
    to lock it and once to unlock it that would be a
    great alternative.
    That's one solution. Another is to use VoiceOver to navigate; you can lock the option and ctrl keys so that all VO commands are performed with single key presses, since Sticky Keys will hold the shift or cmd keys.
    Yet another is a cheek switch as used by Marie-France Bru. No doubt there are plenty of other adaptations you could try, but those are the ones I know about.
    HTH
    Archie

Maybe you are looking for

  • Partner profile and partner number in output of order/invoice.

    Hello Experts, I want to know how system pick partner profile from output type triggered in sales order/invoice?? I could see partner profile is different from partner number exist in output triggered in sales order/invoice. I want to know the trigge

  • Unable to create JVM using JNI

    Hai, I am new to java programming. I am trying to invoke native application using JVM. I have a written a pilot code in C using JNI. I am getting the following error when I try to run the binary. I think that the problem is from the fact that 1.2.2 i

  • Retaining folder structure on imported photos.

    Thank you for reading this.  I just purchased an Ipad to be used as a sales device for our design team.  I have a folder of thousands of pre sorted and categorized pictures on my PC desktop that i want to import to the ipad while retaining the folder

  • Can I reset my lost iPod from iTunes?

    My iPod touch 4th generation was recently lost/stolen. I didn't have a passcode on it. I was wondering if it was possible to reset it from iTunes if the iPod connects to wifi.

  • Elements 4 - Third Party Creations templates

    I am specifically looking for a customisable golf magazine template to drop individual photos into for printing onsite (at golf clubs). Have been seaching for a couple of days and not found anything suitable. Does anyone know of a solution or can sug