Keyboard Simulation not working with Keyboard hook for modifier keys
Posted
by
Eduardo Wada
on Stack Overflow
See other posts from Stack Overflow
or by Eduardo Wada
Published on 2014-05-29T21:23:01Z
Indexed on
2014/05/29
21:24 UTC
Read the original article
Hit count: 523
I have a piece of software that is being used to simulate a certain device on a touchscreen, this device already runs an application that receives keyboard input from the device.
My software (reffered to as simulator) displays a virtual keyboard and runs the application.
Thus, the simulator sends keys with input simulator: http://inputsimulator.codeplex.com/
And the applciation listens to keys with the following keyboard hook: https://svn.cyberduck.io/tags/release-4-1/source/ch/cyberduck/core/GlobalKeyboardHook.cs
My problem is, what some keys from the device's hardware actually do is to sent a key combination (ex: left-alt + 1) to the application and a weird scenario is occurring:
- The application listens to normal keyboard inputs
- The simulator sends keys to other applications (ie: visual studio responds to the keys sent when debugging)
- The simulator can send single keys to the application (I can type)
- The simulator CANNOT send key combinations to the application (alt+1 is received as just 1 in the application)
This started happenning when we imported the application's dll into the same process from the simulator.
Could there be any reason why I can't simulate key combinations for a hook in the same process? Is there any easy fix for this?
© Stack Overflow or respective owner