views:

406

answers:

4

Maybe this is an overarching question as I've seen similar bugs in Firefox and I'd like to know how to avoid coding them.

For no apparent reason, the function keys, arrow keys (de-numlocked numpad as well), the 6 keys over the arrows, and backspace stop working. Every other key seems to work leading me to think it's some sort of interrupt issue. It works again when I restart Delphi.

This is on an IBM Model M keyboard so certainly it couldn't be a hardware issue, although if someone knows better I won't be that naive, I've noticed this with different keyboards.

I'm not actually interested in a fix for Delphi, I just would like to know how to avoid keyboard input bugs. I'm most certainly debugging bug laden code. I just wonder why it causes parts of the keyboard to malfunction.

+4  A: 

I doubt that it's Delphi's fault. I'm using Delphi 7 and never had this problem. I suggest you look for another culprit.

mm2010
Oh yeah, it's definitely my own buggy code. But why does that affect delphi's ability to accept keyboard input?
Peter Turner
Don't know the why but like mj2008 stated, try pressing his key combo or I usually do CTRL+SHIFT+ESC.
TomC
We would need to see the code you are talking about.
mm2010
Hitting CTRL+SHIFT+ESC saved me from some awful sticky key mess. But not this.
Peter Turner
Your problem is keyboard FOCUS.
Warren P
+1  A: 

If this happens when in the debugger, it is possible that the message processing for a keystroke is failing to be completed. Try pressing all the Alt, shift, control, and all other such keys to see if the issue clears.

mj2008
+1  A: 

Or is it a faulty Global Keyboard Hook? Try disabling as much utilities that have global hotkeys.

Lars Truijens
A: 

Ha! I finally figured out what was doing it, I've got MadExcept installed and when I used Ctrl-Shift-C to autogenerate class functions I was getting a delphi exception. I'd get an error and it was secretly a MadExcept error. If I clicked OK it would stop me from entering some "meta"-keyboard input. If I Ctrl-Shift-C again on that stub class and the error pops up. I can hit Details, then it tells me regular MadExcept info about the error. I can hit Details and continue programming, and my IDE is fine again!

Peter Turner
MadShi would like to know about it. His site has a link to support forum..
Fabricio Araujo
Who has Focus when you have this problem?
Warren P