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

Similar Messages

  • 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

  • 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.

  • 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

  • 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....

  • 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

  • Graphic - drawing nodes and edges, place elements and mouse event

    Hello, I am new to Java. I would like to do the following:
    show graphically a node and edge structure in star format, where each of the nodes, including the centre node, is a string.
    The number of edges is varialbe, so I guess I have to divide the 360' arc into equally spaced angles, define the distance at which to place the nodes at the extremity and then draw n-lines from the centre node (also a string of characters) to each of the peripherical nodes (also a string of characters).
    Additioanally, I would need a mouse click event, where by when I click on any of the nodes (including the periphery ones), an certain event is triggered, depending on which node I am clicking. Basically, something that recognise that the mouse is on top of a specific String when clicked (to make things more complex, I would need a left click or a righ click with pop-up menu of actions..but I guess, that's the easy part)
    thanks to all for the help

    My advice is to start learning Java:
    http://java.sun.com/docs/books/tutorial/
    ... and using existing tools instead of re-inventing the wheel:
    http://www.jgraph.com/jgraph.html

  • SUN ULTRA 5 type 5 keyboard and mouse

    Hi.
    I have some questions about old SUN TYPE 5 keyboard and mouse.
    I have got an very old ULTRA 5 machine just for little "playing" with just such type of keyboard and mouse ( SUN type 5).
    I am wondering , if this input devices will fail, is it possible to get some other compatible type of keyboard and mouse for it ???
    I am not SUN specialist , so I dont know - is it also possible to use also SUN type 6 keyboard / mouse with my ULTRA 5 workstation??? The connector type seems similar like a PS/2 , but I think there is no way to use standard PC PS/2 keyboard/mouse with it , or is it ??? Whats the best solution , where to get ULTRA 5 compatible keyboard/mouse ? Thank you veyr much for your answer.

    Hello,
    a Type 5 keyboard (lacks the power-on key) and mouse might work. The preferred types are Type 5c or Type 6.
    Most OHCI compatible USB cards work (http://www.sun.com/bigadmin/products/hardware.html), but the USB keyboard and mouse aren't usable until the operating system (and USB driver) have been loaded (you have to configure keyboard and mouse manually).
    I would recommend that you get a Sun Type 5c or Type 6 keyboard/mouse from second hand e.g. eBay. They are not that expensive anymore.
    Another choice is to use the Ultra 5 via the serial console (text mode) and then use a X-Server to access the system (after installation of Solaris) via the network.
    Michael

  • How to adjust mouse event with scaled DesktopPane

    Hi
    I am manjunatha, i am developing Data warehouse product, in this, i am showing inter-related Transforms in desktop pane, i given option to view the content of desktop pane with different scaled factor (ex 100%,50%,25%), when i will scale the content of desktop pane using Graphics class, only content will be scaled, but the events on the Internal frames will be referring 100% view only,(ie mouse event will not effected by scaled factor, so it will be point to 100% view points only, ex at first an Internal Frame will have bounds(10,10,200,200), after i will scale this to 10%, it will be drawn with (1,1,20,20) on the desktop pane, but internally its bounds will be (10,10,200,200) and mouse event will detect Internal Frame at (10,10,200,200) location , instead of scaled (1,1,20,20) location.
    My question is how can i scale the Internal Frames and adjust relevant events to it?
    (You can see screen shot of this page with (Mapplet View as screen name)
    At www.MyDataWarehousing.com)

    Did you ever find a solution to this? How did you scale all the components on resize?

Maybe you are looking for

  • IPhone5 rear-facing camera and flashlight not working after iOs 7.0.3 update

    This is my first time posting here so do forgive me if I leave anything out. Problem 1 I updated my iPhone 5 to iOs 7.0.3 (on 10/22 when it released). Since then, my rear-facing camera has stopped working. When I open up the camera, it's just a black

  • Roboform stopped working with Firefox 30

    After FF rebooted to install FF 30, I noticed that all traces of Roboform are gone. That is, I have no right-click options to fill forms, etc and there no longer is a Roboform toolbar. I do have a Roboform icon in my systray, but it does not do anyth

  • Dock missing images

    I have just bought a brand new iMac (2.8GHz Duo, 2GB Ram) and I'm getting weird images missing on the Dock now and then. I don't fully understand. I've never seen this before with my MacBook pro or anything. When i hit the downloads folder, i saw the

  • Why can't we get infinity

    Good Afternoon, According to this checker: http://fttc-check.alc.im It produces the following result: Cabinet Probability Uplift Phase Status Type P6 100% 4.11 7a Part of deployment FTTC (Fiber to the Cabinet) If it gives an uplift of  4.11, that sur

  • PC SUITE 6030

    hi,i have Nokia 6030 i've got its data cable and i want to write sms in pc and send them on cell phone is that possible as there isnt pc suite for this set soo you guys know any other software thourgh which i can send messeges?? Message Edited by sha