07-13-2008 11:14 AM
07-13-2008 12:13 PM
07-13-2008 02:12 PM
07-14-2008 09:36 AM
07-14-2008 11:10 AM
Hi smercurio,
It is definitely a keyboard event!
When I open the keyboard properties (control panel) I see the effect of a press
on the button (for example when I program the button to the function
"q" I see a "q" when pressing the button).
But there are some differences with this button and a normal keyboard (both on
the tablet PC, when using an external keyboard).
Pressing and holding down a key on a normal keyboard results in continuously
generating "q" (I'm still in the keyboard properties field). Pressing
and holding down the button results in only one "q". I first have to
release the button and pressing it again to get a second "q".
I don't know if this has anything to do with the problem I'm dealing with, but it might be so...
This may also explain why the event structure works fine (only when the
VI is active of course) and the Input Device Control you
mentioned before doesn’t (however this works great with a normal keyboard,
whether the VI is active or not..)...
The event structure waits for the event and the Input
Device Control is placed in a normal while loop (with a high looprate of 1ms).
The Input Device Control will probably miss most of the button actions because pressing
the butting will result in only one character.
This is the tablet PC: http://www.fieldworks.nl/xploretech/XploreiX104DFullRuggedTablet/Afbeelding3.html
07-14-2008 11:49 AM
07-14-2008 03:16 PM
Hi smercurio,
I tried the example user32.dll, but this give the same
result as the Input Device Control VI’s (with a normal keyboard it works fine,
but on my tablet PC it works poor.)
This doesn’t surprise me too much,
because these VI’s use the same dll’s.
I placed the user32.dll in the same
VI in a separate while loop with runs at a looprate of 1 ms.
I think it is still the same problem
as I described above….
07-16-2008 04:55 AM
I finally solved the problem using the user32.dll.
When pressing a key on a normal key-board I read this data:
no key is pressed => 0
pressing and holding down the key => 127
releasing the key => 1
pressing and holding down the key again => 128
On my tablet PC the 127 and 128 don’t show up every time a press the button (this explains why it only worked after pressing the key for many times). I changed the way the key is triggerd by only watching the 0 en 1. Now it works great!
Everybody thanks for al the support!
Khs