Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 06-09-2012, 09:45 PM
sprocket sprocket is offline
Junior Member
Join Date: Feb 2011
Posts: 12
Default Pressing Caps-lock generates multiple events...

With Delphi 7, if I create a new application, create an OnKeyDown event on the main form, and set a breakpoint there, I notice that whenever Caps-Lock is pressed there are two events generated for a single-keypress - is this by design?

Where this (maybe) became an issue was with a little editor-app of mine where I was using the Shift key in conjunction with the 'Insert' key to differentiate between either inserting a comma or a period in the text. Whenever pressing Shift had immediately been preceded by a Caps-On, the Shift key was not registering as 'Shift' for that key-press - which I presumed had something to do with the multiple Caps-lock OnKeyDown events. It took a ugly piece of code to get around this. Ironically, the same code, but without this 'bodge' works perfectly when running on Linux Wine, so it appears to me that this has something to do with WinXP.

Just wondering if anyone has ever come across the same problem.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 08:58 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.