473,387 Members | 1,534 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,387 software developers and data experts.

How can i read a key from keyboard without pressing carriage key?please help...

Hi everyone,

I am a newbie in C and i can not fing a way to read keys from the keyboard immediately without having to press carriage key.
scanf, getc, getchar, need to press carriage in order to input the character in the programm.
Is there any way to bypass the carriage key???







Thank you for your help,
--Dreiko--
Feb 25 '08 #1
3 1887
ashitpro
542 Expert 512MB
Hi everyone,

I am a newbie in C and i can not fing a way to read keys from the keyboard immediately without having to press carriage key.
scanf, getc, getchar, need to press carriage in order to input the character in the programm.
Is there any way to bypass the carriage key???







Thank you for your help,
--Dreiko--
You can use getch() or getche() or kbhit()
Feb 25 '08 #2
You can use getch() or getche() or kbhit()
Thank you ashitpro, my problem solved.

--Dreiko--
Feb 25 '08 #3
I've also been wondering about that, is there a C++ coding for that because getch, ... is c code.
Feb 25 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

17
by: Guyon Morée | last post by:
what is the difference? if I open a text file in binary (rb) mode, it doesn't matter... the read() output is the same.
2
by: Raphaël | last post by:
Hi, On Linux, does somebody know how to get the keyboard status in Perl ? I explane : -> I would like to write a Perl script which scan the keyboard and return the list of pressed keys. ...
3
by: Johan | last post by:
Hi, I want to read a key from the keyboard without pressing the return key. I try the select call but it only returns when you press enter. How do you read a key from the keyboard without...
10
by: Mudasir Ahmed | last post by:
I Guys : I am working on a Application to read barcodes from a scanner and list them in a ListBox on a web page. I was wondering if any one has done a similar job. Currently I have attached the...
2
by: Rajen | last post by:
Suppose the field length is 25 characters. After entering the 25th character, it should be available to process. Program should not wait for the user to press enter/return key. Thank you.
1
by: =?Utf-8?B?bHZubg==?= | last post by:
Keyboard stopped working after replacing small battery and battery pack thinking this was why computer could not be booted up. I got as far as pressing F1 or F9 to complete setup but keyboard is...
1
by: Beany | last post by:
Hi, Can someone please provide me some code that that identifies what key im pressing on the keyboard? for example if i pressed the key 'r'.....?? I would to write some code that would allow...
2
by: codemaster1 | last post by:
help me about how to invoke key of keyboard with out pressing keyboard key using only c#.net.
8
by: panjap | last post by:
hi, i have a problem with my keyboard, whereby all the shortcuts are messed, up. My shift button is messed up, and does not work, e.g pressing 1 and shoft does not get the exclamation mark, and it...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.