views:

36

answers:

1

Firstly some background information...

I have a C# .NET application that runs on a slate pc i.e. no physical keyboard. We are using the on-screen keyboard built into Windows XP Tablet edition to populate TextBox controls on a form. There is no special key press handling for the form (although other components of the UI do handle key presses).

Occasionally the on-screen keyboard will stop registering some key presses. The form still has focus and the cursor remains in the text box. Repeatedly tapping a key will eventually cause the character to be displayed. Our application uses a number of busy processing threads however it is far from 100% CPU utilisation.

When this behaviour occurs it remains that way until our application is restarted, after which the keyboard behaves normally. The problem does not occur at all when a USB keyboard is attached and used for input.

I'm interested in what differences there are between physical and programmatic key presses? Do programmatic key presses generate hardware interrupts as a physical keyboard would? Could .NET be handling each type differently?

Any suggestions that could help debug the problem would be much appreciated!

A: 

I've never worked with the tablet version of the XP OSK, but I have used the XP Embedded version. As far as I could tell the Windows API was sending key presses to .NET and MFC applications the same way. In fact, if I recall correctly, there was no way for us to tell the difference between the two programatically. As far as I know an OSK will not cause a hardware interrupt, however the virtual-key code will be sent to application-level programs in the exact same manner as a physical one.

Unless you are running a custom driver or something (that has access to the hardware layer), it sounds like it may not be your application that is causing the problem.

If you haven't already, I would check that the touchscreen has the latest drivers and is properly calibrated. I'd also check that the OSK has all the latest updates from Microsoft.

adam