Recording the input of mouse and keyboard outside of  a visible GUI

I am trying to write something sorta like pc anywhere except I dont quite know how to approach the problem of recording the input from the mouse and keyboard. I have thought of using a glass pane the size of the screen but once I have captured the mouse or keyboard events how do I send them through to the underlying OS (as if nothing happened)?

This is not possible in java. You should register to some native mouse and keyboard listener mechanism. and let them notify you of all the mouse and keyboard events. Maybe JNI can help you accomplish this.

Similar Messages

  • Reading mouse and keyboard outside program

    Hi!
    Is it possible to do what title says? I would like to make program that record everything that user do with mouse and keyboard and then "play" same actions again.
    Playing is easy using Robot class. Also reading (polling) mouse location on screen is possible with PointerInfo class.
    But is it really so that I can't read mouse clicks or keypresses any way when mouse or keyboard focus is outside the Java program frame? At least I didn't find any kind of class that I could use for this.
    Thanks!

    No spyware, I was thinking more like cheating in one game ;-)
    But well, that's a bit odd. There is already PointerInfo telling mouse coordinates, why not somekind of ButtonInfo telling state of mouse buttons...
    I have additional question, related to this same thing:
    If I want to make Java program that run on background (i.e. no frame or window visible) and I want to have it so that when you press for example ctrl+shift+L, that Java program gui appears to screen.
    But if it's not possible to read keyboard events outside program frame, this isn't possible either? Or is there some workaround to this?
    There seems to be possibility of using SystemTray coming in Java version 6, that nice! But still, I would like to know is there any way to "wake up" Java program that doesn't currently have any kind of gui visible on screen.
    Thanks again!

  • TS3048 I am usng a bluetooth keyboard with my Mac and some of the keys are not working.  They are the numbers 1 through  9.  I have gone through the troubleshooting for mouse and keyboard and everything looks good. How can I get them to work again?

    Hi,  I am using a Mac computer that my husband set up.  I have worked on it recently with no problems.  Today, I am having problems with the bluetooth keyboard not  working properly.  The numbers 1 through 9 do not work.  I have gone through troubleshooting wireless mouse and keyboard issues and everything looks good.  Except, when I check the keys on the keyboard viewer, these keys still do not work.  The webpage guides me through and at this point I do not know what to do next, because the keyboard is still not working properly.  I sure hope there are some experienced people in the community to help me.  What should I do?

    Hi:
    I wish my suggestion had gotten you further.
    I do suggest you try to connect the keyboard again.  The request for a number is a step in it trying to pair.  If it gets by the number, it sometimes takes a little while to get connected.  If you are unable to get it connected and want a new one, I have been using Apple Bluetooth keyboards for years - and I like them. The one I have (the newest model) only uses two batteries and is very thin. 
    Speaking of batteries, if you are not already doing so, you might consider rechargeables.  I have a drawer full of them and use a 15 minute charger.  I go tired of buying batteries and rechargeables are environmentally friendly to boot. At the moment, I use 2450 mAh Energizers and a 15 minute Energizer charger (all purchased new on eBay at a very reasonable price).
    I am far from an iPad "expert," although I have one.  If my suggestion below does not help, post your question in a separate thread in the iPad forum.
    I had a terrible time syncing my iCal on my Mac with my iPad iCal (confusing - hopefully it makes sense).  I quit using iCloud as that added to the confusion. There is a facility to one-time sync items.  When you connect your computer to your iPad, iTunes opens.  The system begins a process (automatic backup and so on). After it finishes, you can click on "info."  At the bottom of the screen, there is an advanced section.  You can select any of the items and then force it to sync. The iCal information from your computer would be deposited on the iPad. 
    After all that, I do not use a Google calendar so the information may be worthless to you.
    If you want to reset the iPad to factory settings, you can do that when it is connected to iTunes (one of the options).  Me being me, I try never to erase anything. 
    Barry
    Message was edited by: Barry Hemphill

  • My Imac just quit the bluetooth for mouse and keyboard. What do I do?

    today my I mac doesn 't recognize my blue tooth mouse and keyboard. Fortunately I still had USB units for back up. how do I get Imac to do bluetooth again?

    I have the solution!!!!!!!
    After months of irritating trying....
    I installed usboverdrive
    then deinstalled it
    from earlier sessions  had installed magicprefs --> now I could configure my mouse
    And magic   my mouse still works after a 'sleep'

  • How I got the Bluetooth Magic mouse and Aluminum keyboard to work in XP

    NOTE: The following steps fixed my issue. I thought I would share what worked for me but I really don't ever visit these discussion groups. I used a combination of Sysinternal tools to isolate what was causing my issue and rectified it.
    I couldn't for the life of me get the bluetooth magic mouse and keyboard working in a bootcamp'd windows xp. Here are the steps that I performed to finally get it to work. The assumptions are that you are running a clean XP build with SP3 and all windows updates installed.
    1. Using a USB mouse and keyboard. Insert the OS X install disc into the drive and run through the bootcamp drivers install. (These steps are outlined at Page 12 in the Apple Boot Camp Installation Guide: http://manuals.info.apple.com/en/bootcampinstall-setup.pdf). Let the installers run per apple instructions in the bootcamp installation guide. At the end it will want to reboot. Reboot the system.
    2. After the system reboots login and run the Apple Software Update utility to update from bootcamp 3.1 to 3.2. It will run through a bunch of installers and ask to reboot at the end. Reboot.
    3. After the system reboots login and go to start=>run and type "services.msc" to bring up the services control panel.
    4. Double-click the "Bluetooth Support Service" to open the properties.
    5. Go to the "log on" tab and look to see what is set. If it is set to "NT Authority\LocalService" then click above it to change to "Local System account." Then click "OK." It will tell you the changes won't take effect until the service is restarted. No worries.
    6. You will be back in the main services control panel. Make sure the "Bluetooth Support Service" is highlighted and look up to the left and select "restart the service."
    7. Close all the open windows and then go to start=>run and type "control panel" and hit enter.
    8. Double-click the "Bluetooth devices" control panel applet and follow the Apple instructions provided on Page 18 of the guide referred to earlier. Start with the mouse first. Stop when done with the mouse and don't continue on to the keyboard yet.
    9. At this point my mouse was "installed" but did not show "connected" in the bluetooth devices applet. I then highlighted the mouse and clicked the "properties" button down to the right.
    10. Once in the properties of the mouse I selected the "services" tab. My issue before making the switch to "Local System" account for the Bluetooth services was then when I tried to click the check box to enable "Drivers for keyboard, mice, etc (HID)" I would get an "access denied" error. Now that the switch has been made you should be able to click that check box without error. Click OK after enabling.
    11. You will suddenly see systray (lower right of the screen where the clock is) saying that new hardware has been detected and enabled. Once this is all done you will see "connected" below the device in the Bluetooth applet. Give your mouse a go. It should be working now. Sweet!
    12. Follow the steps in the Apple guide for your keyboard. This should work too now. Sweet!
    Best of luck.

    It depends on how far it is and how thick your walls are. If there plasterboard partitions and only 10 feet apart then probably.
    If you have a mobile phone with bluetooth, then try sending the computer a picture of file from similar distances to that you intend using the keyboard, if it works then a bluetooth keyboard and mouse should.

  • Where are the mouse and keyboard settings stored

    I reinstalled the OS, and cleared the PRAM and NVRAM. The Mac still recognises the Apple bluetooth mouse and keyboard. How do I reset them?
    thanks

    Hi alienvoord-
    Some of the settings are stored in NVRAM.
    Have you tried pulling the batteries out of the mouse and keyboard for a few minutes and see if that does it?
    Are you trying to un-pair devices? Why not just delete them in the BlueTooth preferences?
    Luck-
    -DaddyPaycheck

  • What is required for Bluetooth mouse and keyboard?

    I am thinking of buying a wireless keyboard and mouse and want to make sure I can do it on this iMac G4 computer, bought in 2003. I ran the system profiler and see no information on Bluetooth. If I bought the Apple wireless mouse and keyboard and the D-Link DBT-120 USB Bluetooth Adapter, would that be all I need? Is the installation of these things straighforward so that I could do it at home? Is it likely to work well?
    iMac G4   Mac OS X (10.4.4)   1 Ghz, 512 RAM

    Hello James:
    The Bluetooth dongle and the BT mouse and KB are the only things you would need. I found that setting up (pairing) the mouse and KB are straightforward and easy.
    Barry

  • Battery level for mouse and keyboard always 100%

    The battery level shown in the bluetooth menu and in the system preferences mouse and keyboard panes constantly shows 100% and never declines. Does anyone know the solution to this to start getting realistic readings again? I've tried trashing the bluetooth plist and restarting but that hasn't made any difference.
    Many thanks for any help
    James

    One suggestion I have is to do a "full factory reset" of your bluetooth stuff. I'm not precisely sure all that entails but here's how you do it.
    1. If you don't have the XCode developer tools installed then install them.
    2. Launch the Bluetooth Explorer. It can be found in /Developer/Applications/Utilities/Bluetooth/.
    3. In Bluetooth Explorer's Utilities menu select Modify Software & Device Configuration. A window will be displayed with a number of checkboxes.
    4. Check the first four checkboxes (Recant..., *Full Factory Reset*..., Delete link keys..., Delete global bluetooth preference...). They may already be checked for you as the default.
    5, Click the Perform actions button.
    6. Click Reboot NOW button.
    After rebooting re-pair your bluetooth devices. Hopefully your power percentages will be fixed too. If not, I have no other suggestions.

  • Apple Wireless mouse and keyboard with Windows on iMac Intel

    Hi there!
    Is it possible to use the Apple Wireless mouse and keyboard on the iMac Intel running Windows XP?
    My bluetooth setup assistant can't find any of them.
    Thanks!

    Actually if You Use the wireless mouse during the setup for windows it works fine the only drawback it that using the wireless mouse on windows is that it drains the battery more quickly than Mac OS X does. So make sure you have extra batteries around

  • Do I require wired mouse and keyboard to bootcamp on imac 2012 with bluetooth mouse and keyboard?

    have just purchased a late 2012 imac which I want to bootcamp. Have read on some posts that during the process you lose the use of mouse and keyboard as they are bluetooth and windows does not have the drivers, so you need a wired mouse and keyboard to bootcamp the imac.
    Is this correct as there is nothing in the Apple bootcamp guide mentioning this.
    would appreciate some assistance on this point.

    Welcome to Apple Support Communities
    In theory, you don't need a USB mouse and keyboard because the iMac can detect the Bluetooth ones during startup (difficult but it can). If you are new, I recommend you to get a USB mouse and keyboard to install Windows in Boot Camp, so installation will be easier and you won't have any problem to start up in OS X later.
    With the USB keyboard  and mouse, it's as simple as following the Apple's steps to install Windows on your Mac > http://manuals.info.apple.com/en_US/boot_camp_install-setup_10.8.pdf It's very important to download the Windows support software, which you will need to make Windows work correctly

  • How to fix the mouse and keyboard freezing when installing Windows 7 on 27' iMac late 2013?

    Hi, I have a question for u guys who can solve this.
    I recently bought the new 27' iMac late 2013, and I installed some softwares and used it for few days.
    Before I bought this I used the 15' Macbook Pro Retina, I installed Windows 7 Home Premium 64 bit, and I used the Windows for gaming.
    So back to my question.
    So I bought the new iMac and I was tying to install Windows 7 Home Premium 64 bit (with the same CD).
    After dividing the partition, and other stuff, the iMac rebooted and I hold down the option (alt) key. I choose the Windows CD, and it said it is "getting ready to install Windows". I let it load, and the blue screen where you choose the language, time/location and keyboard input popped up. At the bottom right corner (at the same page), there is a button that said "Next (N)" which u need to click it to go to the next step. I was moving my mouse to click the button, but I realized that my mouse and keyboard was frozen. I tried both wireless and wired mouse and keyboard but they didn't work. There was nothing I could do. I hold the power button, (that was the only option) and tried my mouse and keyboard on Mac OS and it worked fine.
    I thought something went wrong in the CD so I bought the Windows 7 Ultimate 64 bit. The result was same. It frizzed again. (I just wast few hundred $)
    Latter my friend lend me his Windows 8.1 Pro 64 bit. I tried it, and it worked, it didn't freezed on Windows 8.
    The problem is I played Battlefield 4, Titan fall, and Watch Dogs, and Battlefield 4 multiplayer doesn't work on Windows 8.1. Even though when it works on Windows 8, I prefer using Windows 7.
    Dose anyone knows how to fix this freezing thing?
    My computer is:
    27' iMac late 2013 (bought it just few days ago)
    I did no upgrades when I bought it, except the graphic card.
    I bought the iMac in Korean Apple Store, and my Windows CD is in Korean, can that be a problem?
    Please leave a comment when u think u can solve my problem.

    See -> http://manuals.info.apple.com/MANUALS/1000/MA1636/en_US/boot_camp_install-setup_ 10.8.pdf.
    In addition to the Windows disc (or USB flash drive with the Windows installer) you'll need a 8GB+ flash drive.
    The referenced manual - on page 3, I think, gives you a run-down of what you'll need before you begin the installation. You may also want to post any further Boot Camp questions in the Boot Camp forum -> https://discussions.apple.com/community/windows_software/boot_camp.
    Good luck,
    Clinton

  • Wireless mouse and Keyboard Issue after closing the lid - external display

    Can anyone give any insight. Recent purchase of a new Late 2008 15" MBP. I have connected it to an external 24" Apple monitor on my desk and use a wireless mouse and wireless keyboard on my desk top. I have configured the laptop to wake on bluetooth devices. So here is the problem: The laptop when the lid is up recognizes the bluetooth keyboard and mouse. I close the lid/screen. Laptop powers down... the after several seconds I move the mouse and the laptop comes alive... But after that there are no bluetooth devices attached. When I use the mouse, I get "connection lost" with a white figure of the mighty mouse on the screen. The wireless keyboard is not there and I have to open the lid and manually find the mouse and reconnect. The keyboard seems to work however....
    Apple..... any thoughts..... anyone?????

    Hi Stentdoc; I'm thinking, 'connection lost ~= sorta low AA batteries in the Mighty Mouse? (I would put in fresh AA batteries in the mouse and keyboard, to eliminate as an issue that the 'connection lost' is due to low batt voltage; that this is causing the failure to wake.) ... then, in System Preferences > Hardware > Energy Saver, settings for Power Adapter > Sleep, set to "never" for "Put the computer to sleep when it is inactive for ..." to eliminate that as a conflict when trying to wake with bluetooth from sleep induced by closing the lid ...
    Check your current "Sleep" setup (I left my MBP as "3")
    go to Utilities > Terminal
    After you launch Terminal, the first step is to determine which sleep mode your Mac is currently using. You can both view and change the sleep mode using the Unix program pmset. To see your current settings, type (or, copy and paste)
    pmset -g | grep hibernatemode
    press 'enter'
    You should see something like this:
    $ pmset -g | grep hibernatemode
    hibernatemode 3
    So your machine is using mode 3 ... thanks to the documentation for the handy Deep Sleep Dashboard widget, which puts your machine immediately into hibernation mode (so you don’t have to yank all the power sources to invoke it):
    * 0 - Old style sleep mode, with RAM powered on while sleeping, safe sleep disabled, and super-fast wake.
    * 1 - Hibernation mode, with RAM contents written to disk, system totally shut down while “sleeping,” and slower wake up, due to reading the contents of RAM off the hard drive.
    * 3 - The default mode on machines introduced since about fall 2005. RAM is powered on while sleeping, but RAM contents are also written to disk before sleeping. In the event of total power loss, the system enters hibernation mode automatically.
    also, I enabled this (to change back, input "lidwake 1":
    go to Utilities > Terminal
    type in sudo pmset lidwake 0 then "enter"
    it will ask for your password. type it in, that's it!
    Now, when your computer is sleeping with the lid closed, when you open the lid nothing happens until you press any key ... nice: keeps it off when accidentally opened, like in a backpack?
    WARNING: Improper use of the sudo command could lead to data loss
    or the deletion of important system files. Please double-check your
    typing when using sudo. Type "man sudo" for more information.
    To proceed, enter your password, or type Ctrl-C to abort.

  • TS3048 I can't log in the mouse and keyboard are not paired to computer

    I can't log in to my computer because both the mouse and keyboard lights are blinking

    Hello:
    Try resetting the SMC (no peripherals needed).
    Barry

  • Bluetooth mouse and keyboard go off exactly the same time, and don't connect agian after ive installed the mac os x 10.8 updates please fix this apple

    After Installing the mac os x update for 10.6.8 ive recentley in the last couple of days the bluetooth mouse and keyboard going off at the same time ive looked at some help but i feel like this is a software bug after installing so any other suggetions than taking it into an Apple Store,
    I hope apple fixthis problem in there next patch update.

    Hi,
    Welcome to the    Discussions
    Does the App launch form the Applications Folder rather than the DOCK ?
    The icons in the DOCK are links to the App. Sometimes this link can get broken.
    8:37 PM Sunday; December 27, 2009
    Please, if posting Logs, do not post any Log info after the line "Binary Images for iChat"

  • HT5639 I have downloaded Windows 8 on my Mac Pro 13'' retina display. The first few hours everything worked fine until I open windows today and the trackpad/mouse and keyboard aren't working. Ive tried resetting windows but it didnt work. help appreciated

    I have downloaded Windows 8 on my Mac Pro 13'' retina display. The first few hours everything worked fine until I open windows today and the trackpad/mouse and keyboard aren't working. Ive tried resetting windows but it didnt work. help appreciated thanks

    It sounds like it is time to restore from the backups you made just before making the disk changes.
    You can re-partition and restore your backups.  If you didn't make backups first (you were warned that it might damage things and to make sure you had a good backup) then you will need to repartition everything and reinstall from scratch...

Maybe you are looking for