Click here to Skip to main content
15,879,184 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I accidently press the caps lock key a lot , and as I don't touch type it's usually a while before I notice. I would like to create a keystroke that would invert the case of selected text. I want the keystroke to work in all applications. I would like to do this using c#.net Can someone point me in the right direction. My initial thoughts are to use the clipboard somehow, is this possible?
Posted

 
Share this answer
 
Comments
PROPZ_76 22-Jun-10 13:54pm    
Cheers this looks promising. thanks for taking the time to answer.
I wrote an article some time ago that monitored and controlled the toggle keys CapsLock, NumLock and ScrollLock. If you wanted you could monitor for CapsLock and immediately turn it off (effectively disabled) or just convert the case of alpha characters if the Shift modifier isn't pressed.

Here's the link[^] which may help.
 
Share this answer
 
v2
Comments
PROPZ_76 22-Jun-10 13:56pm    
An interesting work around i may decide to use this if i can't find a way create a global hotkey. Thanks for taking the time to answer. cheers
I know this might seem like a crazy thought, but wouldn't it be better to learn to touch type or just look up every once in a while than code a way around this problem? It seems like you have sufficient motivation to learn a valuable new skill here rather than simply make a tool to mask a lack of said skill.

Put another way, what if you have to type something on someone else's computer? Are you going to carry around the little CAPS reverser program on a thumb drive with you every where you go for the rest of your life? If you treat the source of the problem now (ie. learn to touch type) then you won't have to treat the symptoms of it (wrongly cased text) ever again.

Or just rip the CAPS LOCK key off your keyboard :)
 
Share this answer
 
Comments
DaveyM69 22-Jun-10 4:00am    
"Or just rip the CAPS LOCK key off your keyboard" - my kind of solution!
PROPZ_76 22-Jun-10 13:52pm    
I accept your point i do need to learn to touch type, however i need to improve my coding skills more so i would rather invest my time doing that at the moment. This little idea is more a chance for me to undertake a first real project that's not an exercise out of a book and has a little meaning for me. Also i could save the app to my drop box account allowing me to use it from anywhere. Still thanks for taking the time to answer, ripping the capslock key off is real tempting. i have a few things to try that will be my fall back postion.

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