Listening for any key to be pressed?

I'm writing a small text-based program and when Task #1 finishes,
it prompts for the user to press any key.
If any key is pressed, the program proceeds to Task #2 and when it finishes the user needs to press any key again. And so on...
So how can I listen if any key has been pressed or not?
Can somebody give me some pointers to some examples dealing with this and which class I should look at?
Any help would be appreciated.

your class needs to implement KeyListener, and define 3 methods
keyPressed
keyTyped
and
keyReleased.
you will also need some counter to know when to do task 1, task 2 etc.
so it would look like:
public class Whatever extends Something implements KeyListener {
     private static int counter = 1;
     public static void main(String[] args) {
     public static void task1() {
          some code
          counter++;
     public static void task2() {
          some code
          counter++;
     public void keyTyped(KeyEvent e) {
          switch(counter) {
               case 1: task1(); break;
               case 2: task2(); break;
     public void keyPressed(KeyEvent e) {
     public void KeyReleased(KeyEvent e) {
}hope this helps!
Tom

Similar Messages

  • Huge performance differences between a map listener for a key and filter

    Hi all,
    I wanted to test different kind of map listener available in Coherence 3.3.1 as I would like to use it as an event bus. The result was that I found huge performance differences between them. In my use case, I have data which are time stamped so the full key of the data is the key which identifies its type and the time stamp. Unfortunately, when I had my map listener to the cache, I only know the type id but not the time stamp, thus I cannot add a listener for a key but for a filter which will test the value of the type id. When I launch my test, I got terrible performance results then I tried a listener for a key which gave me much better results but in my case I cannot use it.
    Here are my results with a Dual Core of 2.13 GHz
    1) Map Listener for a Filter
    a) No Index
    Create (data always added, the key is composed by the type id and the time stamp)
    Cache.put
    Test 1: Total 42094 millis, Avg 1052, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 2: Total 43860 millis, Avg 1096, Total Tries 40, Cache Size 80000
    Update (data added then updated, the key is only composed by the type id)
    Cache.put
    Test 3: Total 56390 millis, Avg 1409, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 4: Total 51734 millis, Avg 1293, Total Tries 40, Cache Size 2000
    b) With Index
    Cache.put
    Test 5: Total 39594 millis, Avg 989, Total Tries 40, Cache Size 80000
    Cache.putAll
    Test 6: Total 43313 millis, Avg 1082, Total Tries 40, Cache Size 80000
    Update
    Cache.put
    Test 7: Total 55390 millis, Avg 1384, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 8: Total 51328 millis, Avg 1283, Total Tries 40, Cache Size 2000
    2) Map Listener for a Key
    Update
    Cache.put
    Test 9: Total 3937 millis, Avg 98, Total Tries 40, Cache Size 2000
    Cache.putAll
    Test 10: Total 1078 millis, Avg 26, Total Tries 40, Cache Size 2000
    Please help me to find what is wrong with my code because for now it is unusable.
    Best Regards,
    Nicolas
    Here is my code
    import java.io.DataInput;
    import java.io.DataOutput;
    import java.io.IOException;
    import java.util.HashMap;
    import java.util.Map;
    import com.tangosol.io.ExternalizableLite;
    import com.tangosol.net.CacheFactory;
    import com.tangosol.net.NamedCache;
    import com.tangosol.util.Filter;
    import com.tangosol.util.MapEvent;
    import com.tangosol.util.MapListener;
    import com.tangosol.util.extractor.ReflectionExtractor;
    import com.tangosol.util.filter.EqualsFilter;
    import com.tangosol.util.filter.MapEventFilter;
    public class TestFilter {
          * To run a specific test, just launch the program with one parameter which
          * is the test index
         public static void main(String[] args) {
              if (args.length != 1) {
                   System.out.println("Usage : java TestFilter 1-10|all");
                   System.exit(1);
              final String arg = args[0];
              if (arg.endsWith("all")) {
                   for (int i = 1; i <= 10; i++) {
                        test(i);
              } else {
                   final int testIndex = Integer.parseInt(args[0]);
                   if (testIndex < 1 || testIndex > 10) {
                        System.out.println("Usage : java TestFilter 1-10|all");
                        System.exit(1);               
                   test(testIndex);               
         @SuppressWarnings("unchecked")
         private static void test(int testIndex) {
              final NamedCache cache = CacheFactory.getCache("test-cache");
              final int totalObjects = 2000;
              final int totalTries = 40;
              if (testIndex >= 5 && testIndex <= 8) {
                   // Add index
                   cache.addIndex(new ReflectionExtractor("getKey"), false, null);               
              // Add listeners
              for (int i = 0; i < totalObjects; i++) {
                   final MapListener listener = new SimpleMapListener();
                   if (testIndex < 9) {
                        // Listen to data with a given filter
                        final Filter filter = new EqualsFilter("getKey", i);
                        cache.addMapListener(listener, new MapEventFilter(filter), false);                    
                   } else {
                        // Listen to data with a given key
                        cache.addMapListener(listener, new TestObjectSimple(i), false);                    
              // Load data
              long time = System.currentTimeMillis();
              for (int iTry = 0; iTry < totalTries; iTry++) {
                   final long currentTime = System.currentTimeMillis();
                   final Map<Object, Object> buffer = new HashMap<Object, Object>(totalObjects);
                   for (int i = 0; i < totalObjects; i++) {               
                        final Object obj;
                        if (testIndex == 1 || testIndex == 2 || testIndex == 5 || testIndex == 6) {
                             // Create data with key with time stamp
                             obj = new TestObjectComplete(i, currentTime);
                        } else {
                             // Create data with key without time stamp
                             obj = new TestObjectSimple(i);
                        if ((testIndex & 1) == 1) {
                             // Load data directly into the cache
                             cache.put(obj, obj);                         
                        } else {
                             // Load data into a buffer first
                             buffer.put(obj, obj);                         
                   if (!buffer.isEmpty()) {
                        cache.putAll(buffer);                    
              time = System.currentTimeMillis() - time;
              System.out.println("Test " + testIndex + ": Total " + time + " millis, Avg " + (time / totalTries) + ", Total Tries " + totalTries + ", Cache Size " + cache.size());
              cache.destroy();
         public static class SimpleMapListener implements MapListener {
              public void entryDeleted(MapEvent evt) {}
              public void entryInserted(MapEvent evt) {}
              public void entryUpdated(MapEvent evt) {}
         public static class TestObjectComplete implements ExternalizableLite {
              private static final long serialVersionUID = -400722070328560360L;
              private int key;
              private long time;
              public TestObjectComplete() {}          
              public TestObjectComplete(int key, long time) {
                   this.key = key;
                   this.time = time;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
                   this.time = in.readLong();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
                   out.writeLong(time);
         public static class TestObjectSimple implements ExternalizableLite {
              private static final long serialVersionUID = 6154040491849669837L;
              private int key;
              public TestObjectSimple() {}          
              public TestObjectSimple(int key) {
                   this.key = key;
              public int getKey() {
                   return key;
              public void readExternal(DataInput in) throws IOException {
                   this.key = in.readInt();
              public void writeExternal(DataOutput out) throws IOException {
                   out.writeInt(key);
              public int hashCode() {
                   return key;
              public boolean equals(Object o) {
                   return o instanceof TestObjectSimple && key == ((TestObjectSimple) o).key;
    }Here is my coherence config file
    <?xml version="1.0"?>
    <!DOCTYPE cache-config SYSTEM "cache-config.dtd">
    <cache-config>
         <caching-scheme-mapping>
              <cache-mapping>
                   <cache-name>test-cache</cache-name>
                   <scheme-name>default-distributed</scheme-name>
              </cache-mapping>
         </caching-scheme-mapping>
         <caching-schemes>          
              <distributed-scheme>
                   <scheme-name>default-distributed</scheme-name>
                   <backing-map-scheme>
                        <class-scheme>
                             <scheme-ref>default-backing-map</scheme-ref>
                        </class-scheme>
                   </backing-map-scheme>
              </distributed-scheme>
              <class-scheme>
                   <scheme-name>default-backing-map</scheme-name>
                   <class-name>com.tangosol.util.SafeHashMap</class-name>
              </class-scheme>
         </caching-schemes>
    </cache-config>Message was edited by:
    user620763

    Hi Robert,
    Indeed, only the Filter.evaluate(Object obj)
    method is invoked, but the object passed to it is a
    MapEvent.<< In fact, I do not need to implement EntryFilter to
    get a MapEvent, I could get the same result (in my
    last message) by writting
    cache.addMapListener(listener, filter,
    true)instead of
    cache.addMapListener(listener, new
    MapEventFilter(filter) filter, true)
    I believe, when the MapEventFilter delegates to your filter it always passes a value object to your filter (old or new), meaning a value will be deserialized.
    If you instead used your own filter, you could avoid deserializing the value which usually is much larger, and go to only the key object. This would of course only be noticeable if you indeed used a much heavier cached value class.
    The hashCode() and equals() does not matter on
    the filter class<< I'm not so sure since I noticed that these methods
    were implemented in the EqualsFilter class, that they
    are called at runtime and that the performance
    results are better when you add them
    That interests me... In what circumstances did you see them invoked? On the storage node before sending an event, or upon registering a filtered listener?
    If the second, then I guess the listeners are stored in a hash-based map of collections keyed by a filter, and indeed that might be relevant as in that case it will cause less passes on the filter for multiple listeners with an equalling filter.
    DataOutput.writeInt(int) writes 4 bytes.
    ExternalizableHelper.writeInt(DataOutput, int) writes
    1-5 bytes (or 1-6?), with numbers with small absolute
    values consuming less bytes.Similar differences exist
    for the long type as well, but your stamp attribute
    probably will be a large number...<< I tried it but in my use case, I got the same
    results. I guess that it must be interesting, if I
    serialiaze/deserialiaze many more objects.
    Also, if Coherence serializes an
    ExternalizableLite object, it writes out its
    class-name (except if it is a Coherence XmlBean). If
    you define your key as an XmlBean, and add your class
    into the classname cache configuration in
    ExternalizableHelper.xml, then instead of the
    classname, only an int will be written. This way you
    can spare a large percentage of bandwidth consumed by
    transferring your key instance as it has only a small
    number of attributes. For the value object, it might
    or might not be so relevant, considering that it will
    probably contain many more attributes. However, in
    case of a lite event, the value is not transferred at
    all.<< I tried it too and in my use case, I noticed that
    we get objects nearly twice lighter than an
    ExternalizableLite object but it's slower to get
    them. But it is very intersting to keep in mind, if
    we would like to reduce the network traffic.
    Yes, these are minor differences at the moment.
    As for the performance of XMLBean, it is a hack, but you might try overriding the readExternal/writeExternal method with your own usual ExternalizableLite implementation stuff. That way you get the advantages of the xmlbean classname cache, and avoid its reflection-based operation, at the cost of having to extend XMLBean.
    Also, sooner or later the TCMP protocol and the distributed cache storages will also support using PortableObject as a transmission format, which enables using your own classname resolution and allow you to omit the classname from your objects. Unfortunately, I don't know when it will be implemented.
    >
    But finally, I guess that I found the best solution
    for my specific use case which is to use a map
    listener for a key which has no time stamp, but since
    the time stamp is never null, I had just to check
    properly the time stamp in the equals method.
    I would still recommend to use a separate key class, use a custom filter which accesses only the key and not the value, and if possible register a lite listener instead of a heavy one. Try it with a much heavier cached value class where the differences are more pronounced.
    Best regards,
    Robert

  • How to create a keypress event for ANY key on the keyboard that is pressed ? (not a specific key.)

    I realise that if I use:
    if (e.which == 81) {
    do whatever
    I can activate an action based on key 81 being pressed.
    But how would I do the same, regardless of what key is pressed?

    Sorry, figured it out...
    I just don't need to specify an if..... at all.
    Duh!

  • How to add a listener for enter key

    I'd like to build a chatzone applcation just like msn. The application
    has two textarea, one is for the messages sent and recieve and one is
    for the message typing area. Just like MSN, I'd like to send the text
    after the user pressed enter key. But my problem is I don't know how
    to make a key listener. I've tried jTextArea1.addKeyListener() but I don't
    know how to use it. Anyone can help me?
    Thanks in advance

    KeyListener is just an interface, so you could use:
    public class MyKeyListener implements KeyListener
       private JTextArea area = null;
       public MyKeyListener (JTextArea area)
            this.area = area;
       // Don't care about a key being pressed.
       public void keyPressed (KeyEvent e) {}
       // Don't care about a key being typed.
       public void keyTypes (KeyEvent e) {}
       // We care about the key being released.
       public void keyReleased (KeyEvent e)
           // Check what key it is.  Note sure if \n is the right one...maybe use the key codes.
           if (e.getKeyChar () == '\n')
                // The return key has been pressed and released, they really meant to press it!
                // Get the last line of the text from the text area.  This bits up to you...maybe
                // store the last location of the caret and then read from that point up
                // to the current point...
    }You can also use a DocumentListener if you are using a JTextArea but this is a little bit more complex but may be better, DocumentListeners work on telling you about more macro changes to the document...

  • Listener for Unique Key in coherence Cache

    Hi Experts,
    I am using Oracle Coherence in one of my project and I am facing a Performance issue .Here is my scenario,
    Thie is my Coherence cache structure
    UniqueKey         <Hive data>
    D1                     Hive Data1         
    D2                     Hive Data2
    D3                     Hive Data3
    Each Unique Key is for user Session. My application is a single Sign on with multiple applications involved.
    The Coherence cache can be updated by any application/sub applications. When ever there is a change in my a user hive Data I need to update. My current implementation is
    I get all the data (Map) from the Coherence Cache (Named Cache).
    Look for the specific user's key
    Hence there is a performance issue when ever i retrieve/set the hive data
    Is there a default Listener/methodology which I can use in Oracle Coherence ?

    Thanks Jonathan for your timely response will look into the Map event, but just a quick question
    Map<Object, Map<Object, Object>> updateUserData = (HashMap) namedCache.get(uniqueKey);
    So this is how i retrieve the user data from the NamedCache. What it returns is a Map .....and any change to this current daykey is what the user is worry about.
    The addListener() on the ObservableMap will  start to listen on any event happening at the all key in the namedCache.I am looking for something like a listener/logic which looks only the for this uniqueKey for this user session.
    Will look into the Map Event in detail.
    Thanks Again,
    Sarath

  • Tab inside JTable (works for any key but tab)

    Hi there
    I have looked on the internet and forums for the answer to how to do this, but I have had no solution.
    I have a JTable and the second column is full of editable cells. The requirement is that when a cell is being edited and tab is pressed, that the editor moves to the next editable cell. (In this case the one below it.)
    I can get the code to work for pressing an arbitrary key (like F11) but for tab I cannot get it to work.
    Any help would be most appreciated.
    Many kind regards,
    Rachel

    Hi Rachel,
    I did this some time ago for a small project. Please note that the code that I'm pasting is a little too specific for your goal, but you'll be able to modify it so that it works.
    public class TableKeyboardAction extends AbstractAction {
          * Constructs a TableKeyboardAction.
         public TableKeyboardAction() {
              super();
         } //end constructor
          * Deals with all keyboard focus movement caused by the TAB, SHIFT+TAB & ENTER keys.
          * @param ae The ActionEvent indicating that either TAB, SHIFT+TAB or ENTER has been
          * pressed.
          * @see java.awt.event.ActionListener#actionPerformed(java.awt.event.ActionEvent)
         public void actionPerformed(ActionEvent ae) {
              JTable table = (JTable)ae.getSource();
              String ac = ae.getActionCommand();
              boolean tab = ac.equals("\t");
              boolean enter = ac.equals("\n");
              if (tab && (ae.getModifiers() & KeyEvent.SHIFT_MASK) == KeyEvent.SHIFT_MASK) tab = false;
              int row = table.getSelectedRow();
              int col = table.getSelectedColumn();
              //if tab or enter has been pressed
              if (tab || enter) {
                   TableCellEditor tce = table.getCellEditor();
                   //if the first column
                   if (col == 1) {
                        //if the cell is currently being edited
                        if (tce != null) {
                             //if the cell can stop being edited
                             if (tce.stopCellEditing()) {
                                  if (table.isCellEditable(row, col+1)) table.changeSelection(row, col+1, false, false);
                             else {
                                  ((DoubleTableModel)table.getModel()).fireTableDataChanged();
                                  table.changeSelection(row, col, false, false);
                        else {
                             //if tab has been pressed
                             if (tab) {
                                  Double val = (Double)table.getValueAt(row, col);
                                  if (val == null) table.transferFocus();
                                  else if (table.isCellEditable(row, col+1)) table.changeSelection(row, col+1, false, false);
                   else {
                        //if the cell is currently being edited.
                        if (tce != null) {
                             //if the cell can stop being edited
                             if (tce.stopCellEditing()) {
                                  if (row == table.getModel().getRowCount()) table.transferFocus();
                                  else if (table.isCellEditable(row+1, 1)) table.changeSelection(row+1, 1, false, false);
                             else {
                                  ((DoubleTableModel)table.getModel()).fireTableDataChanged();
                                  table.changeSelection(row, col, false, false);
                        else {
                             //if tab has been pressed
                             if (tab) {
                                  if (row == table.getModel().getRowCount()) table.transferFocus();
                                  else if (table.isCellEditable(row+1, 1)) table.changeSelection(row+1, 1, false, false);
              else {
                   //if it is a tab+shift combination
                   TableCellEditor tce = table.getCellEditor();
                   //if first column
                   if (col == 1) {
                        //if the cell is being edited
                        if (tce != null) {
                             //if the cell can stop being edited
                             if (tce.stopCellEditing()) {
                                  //if it's not the first row in the table
                                  if (row != 0) {
                                       if (table.isCellEditable(row-1, col+1))     table.changeSelection(row-1, col+1, false, false);
                             else {
                                  ((DoubleTableModel)table.getModel()).fireTableDataChanged();
                                  table.changeSelection(row, col, false, false);
                        else {
                             //if it's not the first row in the table
                             if (row != 0) {
                                  if (table.isCellEditable(row-1, col+1))     table.changeSelection(row-1, col+1, false, false);
                             else table.transferFocusBackward();
                   else {
                        //if the cell is being edited
                        if (tce != null) {
                             //if the cell can stop being edited
                             if (tce.stopCellEditing()) {
                                  if (table.isCellEditable(row, col-1)) table.changeSelection(row, col-1, false, false);
                             else {
                                  ((DoubleTableModel)table.getModel()).fireTableDataChanged();
                                  table.changeSelection(row, col, false, false);
                        else {
                             if (table.isCellEditable(row, col-1)) table.changeSelection(row, col-1, false, false);
         } //end actionPerformed
    } //end class
    Now use it like so:
    JTable table = new JTable();
    table.getInputMap(JTable.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, 0), "next");
    table.getInputMap(JTable.WHEN_FOCUSED).put(KeyStroke.getKeyStroke(KeyEvent.VK_TAB, KeyEvent.SHIFT_MASK),"next");
    table.getActionMap().put("next", new TableKeyboardAction());Hope it works for you!
    -Muel

  • Listening for a key within the whole app

    Hi. I want to add a "hotkey " feature to my program, for example, to allow a user to press F1 at any time and get a help window.
    I read the Swing documentation and apparently only the focused component can receive the keystrokes (that would explain why adding the keyListener to the window does nothing).
    What would be the workaround to this issue?
    Cheers,
    Hernan

    Well first of all Menus and MenuItems can be assigned accelerators which normally takes care of your case.
    The other thing you can do is use KeyboardFocusManager

  • Listening for keyPressed events from background?

    Is it possible to have a java program running in the background and listen for keyPressed events? I would like for the program to listen for certain keys to be pressed and when they are manipulate the mouse. From what I've looked at so far however it seems the listening component must have focus. Thanks.

    On any OS that would typically involve hooking into the OS itself.
    And then manipulating OS resources as well.
    Putting an app into the 'background' is also OS specific.
    Given that the above is all you want to do then java is not an appropriate language choice. C++ would be better.

  • What i have done wrong: I got the information "no bootable device insert boot disk and press any key

    I use yesterday bootcamp to instal windows 7 at my mac. After i had start bootcamp, i instaled windows, particion my hard driver, and restart my computer. After i had restarted my computer, i got a black screan with the information: no bootable device insert boot disk and press any key.
    To press any key was not possible, to get out my cd of the drive is not possible. Can you tell me what happen?
    Thanks

    No I don´t use Fusion Drive. And yes i have read guide to use bootcamp.
    I use only the bootcamp to create the particion.
    Steps:
    1. Start Bootcamp
    2. Create a particion and updates the drivers for windows at mac
    3. divide the hard drive in 150 gb for mac and 100 for windows
    4. particition is created
    5. Put the Windows 7 OEM in the driver
    5. restart the mac
    6. after restart the mac i got the information:
    no bootable device insert boot disk and press any key
    to press any key was not possible. Only black screan
    The support told me it is no possible to use Windows 7 OEM at a mac, but i have seen video, where people use windows 7 OEM and the guy in the shops say this is possible.
    What was is wrong?
    Is OEM possible or not?

  • Two printers need to be maintained for one key combination

    Hi Experts,
    Requirement:-For one condition record two print out has to be determined on different printers.
    As per my understanding we can maintain only one printer for any key combination here as per the requirement if some one has any idea if we can maintain two printers for the same key combination.
    Regards,
    Dharmesh

    Hi,
    You cannot  assign two printers to one single combination of Condition record.
    This functionality is not possible.
    regards,
    santosh

  • Listen for Layer Changes?

    Hi
    I am looking at subscribing to network events and working out event ids and things and so far haven't been able to work out this. Fairly simple question, hopefully the answer is just as simple.
    Can I subscribe to an event which lets lets me listen for any layer changes (in my iOS app)? The docs suggest any actionable event can be listened for, but I am yet to work out how to do this.
    Thanks.

    If you're using a web front end I don't see how that's possible unless you have persistent connections and "push" technology. HTTP is a request/response protocol, which doesn't lend itself to this problem.
    If you're writing a Swing client you have a bit more control.
    Maybe one way to do it would be to use JMS publish/subscribe. When a client connects to the server, it subscribes to the database change topic. Whenever one of the registers clients makes a database change, the DAO puts a message on the topic, which is then broadcast out to all registered subscribers. They can update themselves in their onMessage() listener implementation.
    Could be a network traffic nightmare if you have a lot of clients. And what about transactions? Will you make the topic and the database transaction a single unit of work?
    Might be more complicated than it's worth, but that seems to be your requirement. Not a trivial problem.
    %

  • Listen for change in JTextField

    I would like to write an event listener to listen for any changes made to a JTextField. Normally I would think that keyListeners would do the trick except that the contents of this field can be altered by the application itself, and I would like to trap those changes too.
    Does anyone know of an event listener that listens for any changes made in the text of a JTextField, regardless of how those changes are made?

    use DocumentListener
    for more info see http://java.sun.com/docs/books/tutorial/uiswing/components/generaltext.html#doclisteners

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

  • How to listen for key press when air app does not have focus

    Hi,
    I am developing a application in air and part of the functionality I need is the ability for the app to listen for when a specific key is pressed, even when the air app does not have focus.
    Is there support for this for windows or mac? If not, how might this be accomplished? ANE?    

    Ok Mr. Smartass...Ok
    I'm building a browser that is always open, and when
    a user presses Ctrl+F1 (notice, just those two keys,
    I don't care what else they press...) the browser
    will open up. That way, you don't have to wait for it
    to load all the time.You have two ideas here. One is having a universal key map that always gets ctrl-f1 sent to your app. The other is a program that is constantly running so that you don't have to wait for it to open up. The former is not possible (and this is a good thing) As warneria and I have been saying, it is bad design for an app to try to force an OS to implement this kind of feature.
    If you're not going to help please don't post at all;
    it's a waste of time for both you, me, and anyone
    else who may need help on the same subject. Why wouldBelieve it or not, I am helping you.
    See
    http://www.google.com/search?hl=en&lr=&q=programming+code+side+effects
    and
    http://www.faqs.org/docs/artu/ch04s02.html
    "Doug McIlroy's advice to �Do one thing well� is usually interpreted as being about simplicity. But it's also, implicitly and at least as importantly, about orthogonality."
    anyone in their right mind who's trying to steal
    people's passwords come out and say, "I'm not trying
    to steal people's passwords!"wait, your question is why would someone trying to steal passwords say I'm not trying to steal passwords? I think duplicitous people in their right minds might try to trick you that way.
    Beyond that, even if you're not a malicious hacker - and I am sure you are not - if someone posts a solution to your problem, malicious coders then will have learned how to do it. If you think you're programming or using these forums in a bubble, you are not.

  • "No Bootable Device -- insert a boot disk and press any key" Error Message.

    Last month I just got a HP netbook (HP Mini 110-3100) and when I got it from the box, the error message; "No bootable device -- insert a boot disk and press any key" appeared. But then I managed to boot up the netbook normally. After that, I can use the netbook normally but the error message keeps appeared and becomes more frequent and now I even cannot turn on the netbook. 
    Is it a hard disk failure? 
    p/s: yesterday accidentally I can turn on the netbook without any problems. Did a lot of Hard Disk Maintenance by some softwares downloaded from the internet. But now already cannot turn on. 
    p/s/s: i have no cd/dvd drive, and also no 8GB usb drive.
    p/s/s/s: what should i bring if i want to send the netbook to the HP centre? just bring the netbook?

    I would suggest try and reseat the hard drive and check...If you still have the issue, than take it to the service center...And you will need to take only netbook to Service center...
    Although I am an HP employee, I am speaking for myself and not for HP.
    Make it easier for other people to find solutions, by marking my answer with 'Accept as Solution', if it solves your problem.
    Click on the BLUE KUDOS button on the left to say "Thanks"

Maybe you are looking for