Thread: Is there a way to know if user is really inputting?

  1. #1
    Registered User
    Join Date
    Jul 2012
    Posts
    18

    Is there a way to know if user is really inputting?

    Is there any way for me to make sure that the user would at least input a single character? If there is, can you guys make a sample?

  2. #2
    Registered User
    Join Date
    Sep 2012
    Posts
    357
    What do you mean? Right now? Well ... probably right now, at this very nanosecond, there are two keys half depressed on the user's keyboard: one is the 'y' key which has been put in the Operating System input buffer and the other is the 'ENTER' key which, when the Operating System sees it (in some thousand nanoseconds), will send the whole buffer to your application.

    So, no. With no extra libraries there is no way to check if any key in the user's keyboard is half depressed (and even with extra libraries I guess it is impossible).

    What you can, with extra libraries, is to get the characters directly, bypassing the Operating System buffer.
    Read about curses.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Inputting Strings
    By rwagstaff in forum C Programming
    Replies: 2
    Last Post: 09-21-2012, 06:25 PM
  2. Inputting with SPACES...
    By Nephilim in forum C Programming
    Replies: 7
    Last Post: 06-05-2011, 02:00 PM
  3. Inputting to an array.
    By mintsmike in forum C++ Programming
    Replies: 3
    Last Post: 03-27-2009, 10:26 AM
  4. why its not inputting as before..
    By transgalactic2 in forum C Programming
    Replies: 5
    Last Post: 01-26-2009, 06:11 AM
  5. inputting commas
    By Chaplin27 in forum C++ Programming
    Replies: 4
    Last Post: 04-13-2005, 02:41 PM

Tags for this Thread

Website Security Test