Jump to content
The simFlight Network Forums

FSUIPC keycode proccessing


Recommended Posts

Is there any way for me to send keycodes to FSUIPC for it to process through its keypress routines?

By "keypress routine", do you mean the facilities to program those to send FS controls? If so, why not simply send the controls instead (offset 3110).

Alternatively if you want to send keystrokes to FS, use offset 3200. If these are then re-programmed in FSUIPC they will be intercepted on arrival again, but this seems an odd circuitous route.

Pete

Link to comment
Share on other sites

Thanx for the reply Peter.

I built the LPTSwitch (on the web) which gives you 40 switches on your parallel port.

My idea was to centralize all keyboard/key code activity in FSUIPC.

So, when a switch on the LPT port was detected as going high/low, my code would etermine what the action should be and post the key/character to FSUIPC, which would then do it's bit.

Of course, I may be totally confused at this point :?

ThanX.

Ben

Link to comment
Share on other sites

So, when a switch on the LPT port was detected as going high/low, my code would etermine what the action should be and post the key/character to FSUIPC, which would then do it's bit.

Ah, you mean rather than program the keys to give specific FS controls in your own program, perhaps via an INI or CFG file, you are going to generate FIXED keypresses instead and send them to FSUIPC?

Really this is the same as sending keypresses to FS. The FSUIPC Keys programming facility intercepts keys going to FS's window. The facility to send FS key presses, at 3200, would do this. But it just seems a bit, well, circuitous.

But by all means try it and see. Really I think you'd be better associating an FS control (with parameter where needed) with each of your buttons, and sending that by the facility at 3110. You only need a list of button=control numbers in your CFG file or whatever.

Messing with keypresses can get a bit fraught, since you have to deal with KEYDOWN, KEYUP, and combinations of keys can get horrible. Timing problem can arise, interactions with the real keyboard, and shift states can get stuck.

Regards,

Pete

Link to comment
Share on other sites

ThanX Pete, I'll play some more.

The reason for being circuitous, was I thought that by centralising all key code handling in FSUIPC it would save time. Rather than having lists of keys in FSUIPC and in some other program.

I'll try your way first and see how I get on.

Thanx for the speedy replies, much appreciated :D

Regards,

Ben

Link to comment
Share on other sites

The reason for being circuitous, was I thought that by centralising all key code handling in FSUIPC it would save time. Rather than having lists of keys in FSUIPC and in some other program.

Well if emulating keyboard actions was easy you might be right, but in the end I think you'd find it more problematic, a lot more programming, and still quite unsatisfactory when you've done it. The direct FS controls route is far preferable.

Regards,

Pete

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.