473,405 Members | 2,354 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

I've been looking for the c keyboard input and can't find it.

Hate to ask such a simple question but I've been looking through Help and
can't find what I need.

If I need to abort the app I print a message (fprintf) and return -1

Between those two I'd like to pause the app until user presses a key.

I've been looking for the c keyboard input and can't find it.

Just need to know user pressed any key.

Thanks
Feb 16 '06 #1
5 1127
> Hate to ask such a simple question but I've been looking through Help and
can't find what I need.

If I need to abort the app I print a message (fprintf) and return -1

Between those two I'd like to pause the app until user presses a key.

I've been looking for the c keyboard input and can't find it.

Just need to know user pressed any key.


there are a number of options. check MSDN for:

- getchar
- getc
- scanf

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"
Feb 16 '06 #2
I'll look them up.

Hope one doesn't require an Enter before it returns anything.
thanks

"Bruno van Dooren" <br**********************@hotmail.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Hate to ask such a simple question but I've been looking through Help and
can't find what I need.

If I need to abort the app I print a message (fprintf) and return -1

Between those two I'd like to pause the app until user presses a key.

I've been looking for the c keyboard input and can't find it.

Just need to know user pressed any key.


there are a number of options. check MSDN for:

- getchar
- getc
- scanf

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"

Feb 17 '06 #3
> Hope one doesn't require an Enter before it returns anything.
In that case, you might want to use _getch. it is available in conio.h

it will return as soon as you press any key.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam".
Feb 17 '06 #4
I never would have found that.

thanks
"Bruno van Dooren" <br**********************@hotmail.com> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
Hope one doesn't require an Enter before it returns anything.

In that case, you might want to use _getch. it is available in conio.h

it will return as soon as you press any key.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam".

Feb 17 '06 #5
works great
thanks again

"Bruno van Dooren" <br**********************@hotmail.com> wrote in message
news:e$**************@TK2MSFTNGP11.phx.gbl...
Hope one doesn't require an Enter before it returns anything.

In that case, you might want to use _getch. it is available in conio.h

it will return as soon as you press any key.

--

Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam".

Feb 17 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Marek Mand | last post by:
How to use generated keyboard events? What I am trying here to do is in onkeyup event handler http://www.hot.ee/idaliiga/braggart/createEventTest.htm generate a (shift)TAB keydown so the...
0
by: Ray | last post by:
I have English Windows XP Pro and Office 2003 Pro on my computer. When I enter data into fields of tables, queries and forms of Access 2003, it automatically switches to Chinese keyboard input. ...
9
by: Strahimir Antoljak | last post by:
Could anyone help me with the following: Is there a quick, or at least known way to force a ComboBox, having DropDownStyle= DropDownList, to recognize keyboard input and perform Item selection...
2
by: Dan | last post by:
Sorry if this post may sound a bit off-topic, but I could not find a specialized newsgroup. I have created a dotnet 2.0 library containing some user controls and written in C#. One of the controls...
7
by: tiger786 | last post by:
I am new to programming and studying basics in college .Can somebody write a program on this? The program should monitor a possibly infinite stream of characters from the keyboard (standard...
7
by: jpierson | last post by:
Hi, I am tryin to create a keyboard hook that sends the keystroke ctrl + pause/break. I haven't used keyboard hooks before so I'm not too sure how to use them public int MyKeyboardProc(int...
7
by: TC | last post by:
Hi, I have developed a font, which has ~30 new characters in the Unicode Private Area (starting from U+E000). Now, since these characters are not present in the standard keyboard, can you...
5
by: mattmao | last post by:
Hello everyone, I am studying the programming language C from the scratches, so my question might be too simple for you guys: How would you clear your previous keyboard strokes while let the...
1
by: BDthatsme | last post by:
I have tried various ways to get input from the keyboard using the CLI version of PHP on Windows XP SP2, and none of them seem to work. And I can't find any info about it anywhere. (as in how or...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.