Re: Esc and other key woes.... (a possible solution for you guys)


[ Follow Ups ] [ Post Followup ] [ Build Your Own Arcade Controls message board ] [ FAQ ]

Posted by Howard Casto on 23, 2001 at 2:04 AM:

In Reply to: Re: Esc and other key woes.... (a possible solution for you guys) posted by Cryofax on 23, 2001 at 12:45 AM:

In VB a form or acitve x app sut be in "keypreview" mode in order to catch keypresses before they go to the object/app that's in focus...
unfortunately this only works about 95% as some progs hook and key input before it slips into another progs

the api call i use revolves around:....

Private Declare Sub keybd_event Lib "user32.dll" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)

there's of course more to it than that, but to be honest im too lazy to look right now....
if your really interested on working on it yourself then i hunt up the documentation, ect for you...

but i'll probably get around to making it one of these years

:)

i have hunch that many emulators might do this as they use direct input, but it's not confirmed yet...

: Why would some keys "slip out"? Are you using a timer to poll the keyboard? Which API function are you using? I am interested in something like this but haven't gotten around to taking a crack at writing it, being busy with my own front-end project. So if you have something working :)

: - Cryo

:
: : However..... the nifty little api that i have put in the RD simulates keypresses regardless of what has focus and with a little work i could mod it to be used as a button remapper....

: : there would be some limitations however...
: : 1. VB can't tell the diff between lshift and rshift, ect...
: : 2. If I got it to work, a shift function would be very buggy if I could implient it at all.
: : 3. Even though I could trap most of the "original" keypresses, a few would be bound to leak out... (not a big deal unless you reassign your action button to esc or something silly like that)

: : 4. Another stand alone prog to deal with, and thus another thing to add to you bat file or startup folder.
: : :(

: : would there be any interest in this type of prog?
: : if i get enough responses i'll add it to my ever-increasing pile of "emulation stuff to do"
: : :)




Follow Ups:



Post a Followup

Name:
E-Mail:

Subject:

Comments:

Optional Link URL:
Link Title:
Optional Image URL:


[ Follow Ups ] [ Post Followup ] [ Build Your Own Arcade Controls message board ] [ FAQ ]