Quantcast
Channel: Windows Desktop Development for Accessibility and Automation forum
Viewing all articles
Browse latest Browse all 585

Override Applications inputs with SendInput. Some Apps local handlers seem to override. Any advice?

$
0
0

Hey there,

I have a pastebin of my c# code. I hope this is the right forum category.
http://pastebin.com/Zw50s5rE

My goal is to use SendInput and user32.dll (if appropriate) to re-write keyboard mappings.
Right now, in the example code, if the user presses 'b' it returns 1 rather than calling 'CallNextHookEx'. This stops the 'b' data from acctually getting sent to the application. Since lParam (or wParam?) is read only, I can't seem to re-write the actual key data coming from the keyboard (why not?).
So I resort to SendInput to send new key data. I found virtual key presses are not what I want, so I use scan codes. Which I think is sending raw input data and kind of works better.
Now my problem is, the particular application (Nestopia) I want to send key inputs to seems to have its own handler that overrides my global hook. I can't find anything about this application or how it does it.
So, I suppose theres a few things I'd like to try and get more information on. My ultimate goal is create a program that overrides the keyboard mapping so that it is listened to over the applications desires.
Mainly setting up my own control scheme for games and emulators.

When windows does the on screen keyboard, that seems to be different from the actual keyboard, yet works fine with other applications like Nestopia. Is there a way to mimic that?

When Data comes in from a USB from an input device like a mouse or keyboard, is there a way to grab that data on the lowest level and alter it, to give me as an admin of a machine 'full control', despite the security risks?

I'd really like to just be able to fully control my inputs. SendInput works for the most part, but for the few applications that seem to have something else going on. Perhaps this is because my hooks are global? Is there a way to write application specific hooks for applications that I didn't code?

On another note, I'd like to re-map an Xbox 360 inputs as well. But that might be for a different post. Unless there's a universal way to edit raw input data, re-written at the lowest layer to run across the system? (master remapping of some sort).

Would there be a book on this type of information? Do these types of questions fall under a field I can study more into?


Viewing all articles
Browse latest Browse all 585

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>