freelanceprogrammers.org Forum Index » C

(Query)Scan Code of Shift+Arrow key


View user's profile Post To page top
shabbir_saiyed@... Posted: Fri Jul 25, 2003 5:24 pm


Joined: 10 Jul 2003

Posts: 4
(Query)Scan Code of Shift+Arrow key
Compiler Turbo C++ 3.0

Hello friends ,
here in my program i`m trying to get the scan
code
& ascii code of all key combination . i`m using int86 function .
but when i `m trying to get ascii & scan code of Shift+arrow
it s giving the same value as it gives when you press only arrow
key ,s o plz tell how do i find ascii& scan code of combination
keys Shift-Arrow .

Thanking you in anticipation
-Shabbir(Bablu)


___________________________________________________
Download the hottest & happening ringtones here!
OR SMS: Top tone to 7333
Click here now:
http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl
Reply with quote
Send private message
View user's profile Post To page top
ndpatnaik Posted: Fri Jul 25, 2003 6:02 pm


Joined: 25 Jul 2003

Posts: 3
(Query)Scan Code of Shift+Arrow key
Plz refer Ray duncon book on MS dos programming,
i did it long back, i didn`t remeber. but i think u
have to put some values in either AX or BX or DX or CX
register to scan both the combination or u might have
to do some masking .. just check in that book

regards
Patnaik

--- Shabbir Ali Saiyed <shabbir_saiyed@...>
wrote:
> Compiler Turbo C++ 3.0
>
> Hello friends ,
> here in my program i`m trying to get
> the scan
> code
> & ascii code of all key combination . i`m using
> int86 function .
> but when i `m trying to get ascii & scan code of
> Shift+arrow
> it s giving the same value as it gives when you
> press only arrow
> key ,s o plz tell how do i find ascii& scan code of
> combination
> keys Shift-Arrow .
>
> Thanking you in anticipation
> -Shabbir(Bablu)
>
>
> ___________________________________________________
> Download the hottest & happening ringtones here!
> OR SMS: Top tone to 7333
> Click here now:
> http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl
>
>

> ATTACHMENT part 2 message/rfc822
> From: "Shabbir Ali Saiyed"
> <shabbir_saiyed@...>
> To: shabbir_saiyed@...
> Subject: Scan Code of Shift+Arrow key
>
> Hello friends ,
> here in my program i`m trying to get
> the scan code
> & ascii code of all key combination .
> but when i `m trying to get ascii & scan code of
> Shift+arrow
> it s giving the same value as it gives when you
> press only arrow
> key
>
> -Shabbir(Bablu)
>
> ___________________________________________________
> Download the hottest & happening ringtones here!
> OR SMS: Top tone to 7333
> Click here now:
> http://sms.rediff.com/cgi-bin/ringtone/ringhome.pl
>
>
>


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Reply with quote
Send private message
View user's profile Post To page top
shantanu_k06 Posted: Fri Jul 25, 2003 9:01 pm


Joined: 19 Jul 2003

Posts: 29
(Query)Scan Code of Shift+Arrow key
--- Shabbir Ali Saiyed <shabbir_saiyed@...>
wrote:
> Compiler Turbo C++ 3.0
>
> Hello friends ,
> here in my program i`m trying to get
> the scan
> code
> & ascii code of all key combination . i`m using
> int86 function .
> but when i `m trying to get ascii & scan code of
> Shift+arrow
> it s giving the same value as it gives when you
> press only arrow
> key ,s o plz tell how do i find ascii& scan code of
> combination
> keys Shift-Arrow .

INT 16h (Keyboard interrupt)

FUNCTION: 00h (Get keyboard input) -- reads next char
in keyboard buffer, if not key ready, waits for one.
Entry: AH = 00h
Return: AH = scan code, AL = ASCII char

FUNCTION: 02h (shift status) -- fetches bit flags
indicating shift status
Entry: AH = 02h
Return: AL = status byte (same as 0040:0017)
bits
7 Insert ON
6 CapsLock ON
5 NumLock ON
4 Scroll Lock ON
3 Alt Key DOWN
2 Control Key DOWN
1 Left Shift DOWN
0 Right Shift DOWN

Hope that helps. BTW, what do you find wrong with the
regular CONIO.H functions? Just curious!

Regards,
Shantanu


__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
Reply with quote
Send private message
View user's profile Post To page top
joe_steeve_1981 Posted: Sat Jul 26, 2003 6:14 am


Joined: 26 Jul 2003

Posts: 20
(Query)Scan Code of Shift+Arrow key
On 25 Jul 2003 12:24:26 -0000, "Shabbir Ali Saiyed"
<shabbir_saiyed@...> wrote:
> here in my program i`m trying to get the scan
> code & ascii code of all key combination . i`m using int86 function .

Wait., I hope you are not mistaken.
Every key on the keyboard has a scan code. A combination of keys dosent.
A combination of keys is informed in a different way.

> but when i `m trying to get ascii & scan code of Shift+arrow

You`ll get some unique/weird ascii code for that combination. But the
scan code that you get may be either that of the right Shift key or the
left shift key or the arrow key. but *DEFINITELY* not a combination of
them.

Cheers,
Joe

--

Software is like sex, its better when it is free.
- Linus Torvalds
Visit:http://www.joesteeve.tk/
PS:> I hate HTML mail
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.
Booking Calendar - reservation calendar script
Land Surveying - total station instruments and equipments
China Wholesale - Electronics Products
Character Studio - Tutorials and Help