freelanceprogrammers.org Forum Index » C

how to get the ascii value of shift key in C


View user's profile Post To page top
anuj_1985_gupta Posted: Wed Jan 19, 2005 1:21 pm


Joined: 19 Jan 2005

Posts: 1
how to get the ascii value of shift key in C
pleasen help me


how to get the ascii value of shift key in C
Reply with quote
Send private message
View user's profile Post To page top
joe_steeve_1981 Posted: Thu Jan 20, 2005 12:26 pm


Joined: 26 Jul 2003

Posts: 20
how to get the ascii value of shift key in C
how to get the ascii value of shift key in C

The shift key has no ascii value. You`ll have to grab the scan
codes of the make/break of the shift key.

--
.O. A proud GNU user
..O http://www.joesteeve.tk/
OOO http://gnukid.5gigs.com/
Reply with quote
Send private message
View user's profile Post To page top
sasi_tankappan Posted: Thu Jan 20, 2005 12:27 pm


Joined: 20 Jan 2005

Posts: 2
how to get the ascii value of shift key in C
tht is very easy..
 
u declare a character variable and store the keyboard entry to tht variable and thn PRINT it as INTEGER..
 
 
 
#include<stdio.h>#include<conio.h>
 
void main(){char c;
 
printf("enter the shift key
");fflush(stdin);  //clear the keyboard bufferc=getch();
 
printf("ascii value is %d
",c);  // this gives the ascii of the keyboard                           // key typed
 
}

----- Original Message -----
From: anuj
To: Programmers-Town@yahoogroups.com
Sent: Wednesday, January 19, 2005 12:51 PM
Subject: (PT) how to get the ascii value of shift key in C
pleasen help mehow to get the ascii value of shift key in CTo unsubscribe : programmers-town-unsubscribe@yahoogroups.com

Do you Yahoo!? Yahoo! Search presents - Jib Jab`s `Second Term`
Reply with quote
Send private message
View user's profile Post To page top
shabble Posted: Fri Jan 21, 2005 12:16 am


Joined: 29 Dec 2004

Posts: 31
how to get the ascii value of shift key in C
From: anuj [mailto:anuj_1985_gupta@...]

>how to get the ascii value of shift key in C

ASCII describes characters visible on the screen. The `shift key` isn`t
a visible character so it doesn`t have one.

--
PJH

"...one of the main causes of the fall of the Roman Empire was that,
lacking zero, they had no way to indicate successful termination of
their C programs." - Robert Firth



Alderley plc, Arnolds Field Estate, The Downs, Wickwar, Gloucestershire, GL12
8JD, UK
Tel: +44(0)1454 294556 Fax: +44 (0)1454 299272

Website : www.alderley.com Sales : sales@... Service :
service@...

This email and its contents are confidential and are solely for the use of the
intended recipient. If you are not the original recipient you have received it
in error and any use, dissemination, forwarding, printing or copying of this
email is strictly prohibited. Should you receive this email in error please
immediately notify it@...

This email has been scanned for viruses, however you should always scan emails
with your own systems prior to opening.
Reply with quote
Send private message
Post new topic Reply to topic
Display posts from previous:   
 

All times are GMT
Page 1 of 1
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Freelace Website Designer - Customer web design and software building.
China Wholesale - Electronics Products
Character Studio - Tutorials and Help