On Mon, Jan 12, 2009 at 9:15 PM, swamynathan <mesw...@gmail.com> wrote:

>
> eg if i press 'a'  , 'a' is passed to the function
> if i press 'a','d' then the function should be called simultaneously
>
>
The standard keyboard controller (the chip inside the keyboard) does not
work like a piano keyboard. When the user presses a key, it sends the
corresponding 'scan code' to the OS's handler. If you keep pressing the same
key, it starts to go into a repeat mode to keep transmitting the scan code
again and again to the OS handler.  When you press another key while holding
down the previous key, on most controllers, the repeat mode kicks out and
sends the new key's scan code once and stops irrespective of weather the
user continues to hold both keys down or not. The only exception of
course is the special keys Alt, Ctrl & Shift. They can be used in
combination with other keys and your program can handle 2 keys (eg Alt+A,
Ctrl+A) together or even handle 4 keys (eg Alt+Ctrl+Shift+A) together, but
only the special keys.

regards,
Arun Venkataswamy
arun289.wordpress.com
_______________________________________________
To unsubscribe, email ilugc-requ...@ae.iitm.ac.in with 
"unsubscribe <password> <address>"
in the subject or body of the message.  
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to