How to detect any key pressed for program running in the background?

Hi All,
is it possible to detect when any key is pressed if a java program is not in the focus? For example, when I have a console based program I can write something like:
System.in.read();
and wait until any key is pressed. However, if I move the mouse away from the console and make any other window active, the console program "doesn't hear" anything. Ok, it's clear, of course, but how is it possible to make the program detect any keys pressed even if it's running in the background?
Thanks a lot for any hints!

qnx wrote:
1) Stop trying to make spyware. -> I don't do anything like this!
2) Stop re-posting the same questions. -> didn't know they are the same, sorry.
3) Stop taking us for fools. -> what? Honestly, I don't think that I realy deserved this :)With a limited posting history and the type of questions you are asking they are unusual.
There are very few legitimate problem domains that would require what you are asking about. There are illegitimate ones though. And the legitimate ones would generally require someone with quite a bit of programming experience and would also be required (the fact that java can't do it would not get rid of the requirement.)
Thus one might make assumptions about your intentions.

Similar Messages

  • Boo do you close out programs running in the background

    How do I close out runni g programs running in the background in OS7

    Double-tap on the Home button. You will see a preview of the app above the actual icon. Slide the preview up to kill it.
    Please get the iPhone User Guide (For iOS 7 Software)Sep 19, 2013 - 23 MB.

  • How to turn off programs running in the background in the background on iPad

    how to turn off programs running in the background in the background on iPad

    Most apps do not run in the background on an iPad. Their stae is kept in memory so that when you start the app again it will load quickly at the location you last used it. But you can remove these apps from the Recently Used list. Here's how:
    Double click the Home button to show the screen with running and recently used apps. Each app icon will have a sample page above it. Flick up on the page (not the app icon) and the page will fly away and the app icon will disappear. This quits that app.
    Some apps do refresh in the background if you have that Setting turned on. You can control apps there individually or turn off Back Ground App Refresh completely in the Settings App.
    Settings > General > Background App Refresh

  • HOW DO I DELETE PROGRAMS RUNNING IN THE BACKGROUND OF MY IPHONE WITH SOFTWARE IOS7

    How do I delete programs running in the background now that I have upgraded my software to IOS7?

    http://www.apple.com/ios/whats-new/

  • HT201365 how do i turn off programs running in the background?

    how do i turn off programs running in the background?

    i double tapped home button, swiped up and nothing happened. what is screen shot.  I even tried swiping up on each icon, still did not close app  cannoyt get anything on internet  too many apps running at once

  • HT201365 how to turn off programs running in the background.

    How to turn off programs running in the background withiOS7?

    I would just add that it is not necessary. The programs referred to are only the recently used programs, and are not "running in the background" with the sometimes exception of GPS apps and music apps. They are simply dormant in the memory. The operating system will remove these programs if the space is required.

  • HT4528 How do you close programs running in the background after you update to the ios7?

    How do you close programs running in the background after you update to the ios7?  It no longer works to tap the button twice

    double tap the home button, and swiipe upp on the app screenshot

  • Programs running in the background

    i've read here that pressing the home button for a couple of seconds when you want to permanently quit a program helps conserve battery power...FYI, a program continously runs even after you quit from it resulting in unecesary battery consumption. thats why i ask this question.
    does this function terminate only that program or ALL other programs running in the background of iphone?
    if it does not, restarting/re-booting iphone (holding sleep and home buttons until logo appears) is the only solution to terminate ALL programs
    thanks guys?

    albert69 wrote:
    does this function terminate only that program or ALL other programs running in the background of iphone?
    Only that program.
    if it does not, restarting/re-booting iphone (holding sleep and home buttons until logo appears) is the only solution to terminate ALL programs
    Correct.

  • My macpro runs slow with or without internet on..... How can I find out if something is running in the background?

    my macpro runs slow with or without internet on..... How can I find out if something is running in the background?

    Please boot in safe mode and test. Still slow? If you connect to a wireless network, you may have to connect with Ethernet in safe mode.
    After testing, reboot as usual (not in safe mode.)
    Mac OS X: Starting up in Safe Mode

  • Using InputMap and ActionMap to detect any key pressed...plz help

    Hi,
    I am quite new to Java. I have a tiny problem. I wanna put an actionlistener into a JTextField, so it printout something whenever a key is pressed (when the textField is selected).
    I can only get it to print if I assign a specific key to pressed...example below (works):
    JTextField searchBox = new JTextField();
    InputMap imap = searchBox.getInputMap();
    ActionMap amap = searchBox.getActionMap();
    imap.put(KeyStroke.getKeyStroke(KeyEvent.VK_A, 0), "pressed");
    amap.put("pressed", new AbstractAction() {
              public void actionPerformed(ActionEvent e) {
                   System.out.println("TYPEEEEEEEEEEEEEEE");
    HOWEVER, when i change keystroke to any key pressed, it doesn't work. Example below(doesn't work):
    JTextField searchBox = new JTextField();
    InputMap imap = searchBox.getInputMap();
    ActionMap amap = searchBox.getActionMap();
    imap.put(KeyStroke.getKeyStroke(KeyEvent.KEY_PRESSED, 0), "pressed");
    amap.put("pressed", new AbstractAction() {
              public void actionPerformed(ActionEvent e) {
                   System.out.println("TYPEEEEEEEEEEEEEEE");
    Somebody plz helps me. I am really confused how to use KeyEvent.KEY_PRESSED. I thought it would work the same way as KeyEvent.VK_A...if i can't use KEY_PRESSED for that purpose, what KeyEvent do I use?
    Thank you very much in advance.

    Sounds like you want a KeyListener.
    textField.addKeyListener(new KeyListener() {
        public void keyTyped(KeyEvent e) {
            System.out.println("Key typed.");
        public void keyPressed(KeyEvent e) {
            System.out.println("Key pressed.");
        public void keyReleased(KeyEvent e) {
            System.out.println("Key released.");
    });See the API documentation for more information.

  • How do I shut down programs running in the background on the new os for iphones

    Just uploaded the new ios 7 for my iphone 4s. 
    I have several apps running in the background, when I push the com butten twise it shows me the apps running in the background but I cant' get them to turn off.  I tryed holding my finger on it for several moments like the old ios but nothing works.  Help Please.
    fran.

    Double-click the home button. It will bring up the multitasking set up. Any apps you want to close just hold on the thumbnail and then swipe up.

  • How can I make a program run in the background?

    I'm working on a custom console program. I plan to have the commands as seperate applications and create a server/client relationship so they can communicate with each other. However whenever I call a command I don't want to have a console window pop up, flicker out, etc. I want it to look like it's one complete app. So I'm wondering how can I have the app run in the background?

    If you're using a unix system, use the "&" argument (or character, what is its name anyway?) at the end of the command line.
    I think you can use javaw in the MS-Windows world.

  • Close programs running in the background

    I have a program that I have been attempting to delete but it says that it is currently open and can not be deleted.   How do I force close a program that automatically runs in the background upon startup? (I can't locate the program itself other than in application where it does not offer me a close or force close option)   And Yes I tried restarting the computer.

    See the following about uninstalling applications. Also, open Activity Monitor in the Utilities folder. Select All Processes from the Processes dropdown menu. Locate this program in the list and select it. Now click on the Quit icon in the toolbar then click on the Force Quit button.
    Uninstalling Software: The Basics
    Most OS X applications are completely self-contained "packages" that can be uninstalled by simply dragging the application to the Trash.  Applications may create preference files that are stored in the /Home/Library/Preferences/ folder.  Although they do nothing once you delete the associated application, they do take up some disk space.  If you want you can look for them in the above location and delete them, too.
    Some applications may install an uninstaller program that can be used to remove the application.  In some cases the uninstaller may be part of the application's installer, and is invoked by clicking on a Customize button that will appear during the install process.
    Some applications may install components in the /Home/Library/Applications Support/ folder.  You can also check there to see if the application has created a folder.  You can also delete the folder that's in the Applications Support folder.  Again, they don't do anything but take up disk space once the application is trashed.
    Some applications may install a startupitem or a Log In item.  Startupitems are usually installed in the /Library/StartupItems/ folder and less often in the /Home/Library/StartupItems/ folder.  Log In Items are set in the Accounts preferences.  Open System Preferences, click on the Accounts icon, then click on the LogIn Items tab.  Locate the item in the list for the application you want to remove and click on the "-" button to delete it from the list.
    Some software use startup daemons or agents that are a new feature of the OS.  Look for them in /Library/LaunchAgents/ and /Library/LaunchDaemons/ or in /Home/Library/LaunchAgents/.
    If an application installs any other files the best way to track them down is to do a Finder search using the application name or the developer name as the search term.  Unfortunately Spotlight will not look in certain folders by default.  You can modify Spotlight's behavior or use a third-party search utility, EasyFind, instead.
    Some applications install a receipt in the /Library/Receipts/ folder.  Usually with the same name as the program or the developer.  The item generally has a ".pkg" extension.  Be sure you also delete this item as some programs use it to determine if it's already installed.
    There are many utilities that can uninstall applications.  Here is a selection:
        1. AppZapper
        2. AppDelete
        3. Automaton
        4. Hazel
        5. AppCleaner
        6. CleanApp
        7. iTrash
        8. Amnesia
        9. Uninstaller
      10. Spring Cleaning
    For more information visit The XLab FAQs and read the FAQ on removing software.

  • Program running in the background

    Hello!
    I am wondering if it is possible to create a java program that runs in the background on a mobile phone. I.E can it run without beeing interuppted by a call or the locking of the key pad.
    Is it possible to let the program run without interfering with the normal functionallity of the phone?

    qnx wrote:
    1) Stop trying to make spyware. -> I don't do anything like this!
    2) Stop re-posting the same questions. -> didn't know they are the same, sorry.
    3) Stop taking us for fools. -> what? Honestly, I don't think that I realy deserved this :)With a limited posting history and the type of questions you are asking they are unusual.
    There are very few legitimate problem domains that would require what you are asking about. There are illegitimate ones though. And the legitimate ones would generally require someone with quite a bit of programming experience and would also be required (the fact that java can't do it would not get rid of the requirement.)
    Thus one might make assumptions about your intentions.

  • How do I find out what applications are running in the background

    I have a 2008 iMac with 2GB memory.  How do I find out what programs are running in the background?  I am going to buy a new iMac before the end of the year to replace this one.  When I looked at Activity Monitor it shows 1.8Gb used but doesn't tell all the programs running.

    open activity monitor [if it doesnt launch click winders>Activity Monitor]. then it'll show all proceses

Maybe you are looking for

  • How do I do this... rollover effect.

    Hi, I have been doing some layout in Photoshop for a basic website.  I have one .jpg which will be my background.  I have created some thumbnails (filmstrip area), and I want them to highlight as the mouse goes over them.  At the same time I want the

  • Bridge Web Gallery Output Problems

    I have just set up a new MacPro. I have downloaded and Activitated Bridge & Photoshop CC However I can't create a web gallery, I get two error messages... When I try to save a Web Gallery I get "save location does not exist" If I try to preview in br

  • Printing to a RAW CUPS/SAMBA/Linux Printer

    How do I specify drivers for a pass-through printer setup. I have a linux file/print server with an Canon PIXMA IP4300 printer connected via USB to the linux box. I am able to add the printer using and URI smb://host/printer. The problem is that it i

  • ORA-28 error via perl wrapper of DBMS_DEBUG::get_value

    Hi, I have built a perl wrapper for the DBMS_DEBUG package. It works to synchronize, recompile a procedure, set a breakpoint and step into a function into another package. When I call get_value, I recieve the helpful dbms_debug.error_exception which

  • Loyalty Discount?! What is it?

    Can someone tell me what the loyalty discount is in detail?  In july  I am " eligible to upgrade with an additional loyalty discount on 7/04/11 You may upgrade now at full price. "