Click here to Skip to main content
15,923,164 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have to trigger some event when Capslock is ON and OFF,
I trying to do it with ANCII key value,

1. What is the ANCII values, when CAPS lock is ON and OFF,

Thanks!
Shiva
Posted
Updated 26-May-11 5:02am
v2

1 solution

Caps lock is a keyboard state, not a character value, so there is no ASCII value for it (which is what I'm guessing you mean by ANSI.)

Since you flagged this as ASP.Net, I am also guessing you want to know how to read the caps lock state from a browser. You can use Javascript to make a "best guess" when someone types into a text box; I found this example[^] here at CP. But otherwise, no.
 
Share this answer
 
Comments
sivakumar321 26-May-11 11:08am    
Your messages are usefull!

I'm using the logic that you pointed out, but the problem is,

I Called function at 'onkeypress',
when i press any key(if capslock is ON) that tell 'capslock is on'
when i off the caps lock, the message is not disappearing,
Only disappears after i press any key.!

i want that message to be disappeared when off the caps lock not after pressing any key!

Thanks!
Shiva.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900