Jump to content
The simFlight Network Forums

Mapping keys


Recommended Posts

Hello, I apologize if this item has already been covered, but I was unable to find a solution to my problem in the forum.

Here it is:

I'd like to be able to map one key to send to send another. For example, I'd like to be able to send a SHIFT-CTRL-K when I simply push the K key on the keyboard.

The reason I'd like to do this is because I have the Reality-XP GNS 530 Gauge installed and with keyboard shortcuts turned on, the reprogrammed keys are trapped at all time. I can't use FSCopilot chat because the gauge traps the keys. I can't even enter a filename to save my flight (unless I use SHIFT) or enter text in notepad. If an airplane with the gauge is loaded, whatever keys have been programmed belong to it. There is something called "keyon focus" that is supposed to only trap keys when the focus in on FSX, but I've had no luck with it whatsoever (and Reality-XP's solution, after a week of waiting, was essentially "it should work.").

Seeing how FSUIPC "plays nice" with the keyboard (i.e. let's other apps access mapped keys), having it send keystrokes that I am unlikey to use would be an adequate solution. I know I can do it with buttons (i.e. a button sends a keystroke), but I don't know how, or if, I can do it with keys.

If anyone has a solution, I'd greatly appreciate it. This has turned an awesome GPS into one that I can only use off-line (unless I want to start clicking with the mouse which I don't).

Thanks,

Dave

P.S. Oh, by the way, I'm running FSX on vista-64.

Link to comment
Share on other sites

I'd like to be able to map one key to send to send another. For example, I'd like to be able to send a SHIFT-CTRL-K when I simply push the K key on the keyboard.

There's no direct way to do that. It's really a waste of time simply replacing one windows message with another. you might as well send the one you want in the first place.

The reason I'd like to do this is because I have the Reality-XP GNS 530 Gauge installed and with keyboard shortcuts turned on, the reprogrammed keys are trapped at all time. I can't use FSCopilot chat because the gauge traps the keys. I can't even enter a filename to save my flight (unless I use SHIFT) or enter text in notepad. If an airplane with the gauge is loaded, whatever keys have been programmed belong to it.

But that would happen still if one key was mapped to another. It wouldn't help at all.

Regards

Pete

Link to comment
Share on other sites

Hello Pete, Thanks for your quick reply.

The reason I'd like to do this is because I have the Reality-XP GNS 530 Gauge installed and with keyboard shortcuts turned on, the reprogrammed keys are trapped at all time. I can't use FSCopilot chat because the gauge traps the keys. I can't even enter a filename to save my flight (unless I use SHIFT) or enter text in notepad. If an airplane with the gauge is loaded, whatever keys have been programmed belong to it.

But that would happen still if one key was mapped to another. It wouldn't help at all.

Regards

Pete

Yes, but I wouldn't care if it (the gauge) were trapping a CTRL-SHIFT-K, since I'm never going to type that combination in anywhere. If I pushed a 'K', the gauge would only respond if FSUIPC (or something similar) sent out a CTRL-SHIFT-K. As far as I can tell, FSUIPC only traps the keyboard when the FSX/FS9 windows is active. Therefore, pushing a 'K' at any other time would result in only a 'K' and the gauge wouldn't respond at that point.

Well, it unfortunate that FSUIPC can't do this. I think there was another user who managed to get a mouse macro working (something that I was not able to do for this gauge). I'll have to ask him how he did it. Thanks for a wonderful product, none the less.

Dave

Link to comment
Share on other sites

Yes, but I wouldn't care if it (the gauge) were trapping a CTRL-SHIFT-K, since I'm never going to type that combination in anywhere. If I pushed a 'K', the gauge would only respond if FSUIPC (or something similar) sent out a CTRL-SHIFT-K. As far as I can tell, FSUIPC only traps the keyboard when the FSX/FS9 windows is active. Therefore, pushing a 'K' at any other time would result in only a 'K' and the gauge wouldn't respond at that point.

FSUIPC doesn't "trap" keys as such, it intercepts the keyboard messages arriving in FS -- the main FS Window, class "FS98MAIN", is where all messages (FS controls, keys, everything) are "intercepted". Unless this gauge of yours is a separate process, not part of the FS process, FSUIPC sees all keypresses sent to it.

The job of mapping buttons to keypresses, for instance, requires FSUIPC to re-create the exact same conditions in the FS process as would occur if the real keys were used. This actually results in those mapped keypresses being interceptible by FSUIPC! So the facility you appear to want would change K to CTRL+SHIFT+K which would arrive just like the K did.

If the gauge is in-process, in FS, then the only other possibility is that the gauge is not using the Windows message system to intercept the keypresses, but the Windows-wide "hot key" system. If it were using this then it would act on the key combination even if FS were minimised and you were using some other program at the time. Is that so?

The problem then is that FSUIPC is not creating keypresses from the keyboard, but only the resulting Windows messages arriving in FS -- so it still wouldn't work.

Well, it unfortunate that FSUIPC can't do this.

Well, you could do it indirectly -- assigning the keypress to toggle a virtual button (FSUIPC offset 3340), then programming that button to send a KeyPress. It would need to be done by INI file editing because the button won't toggle whilst in the FSUIPC options.

Even if you did this, I've a strong feeling that it still wouldn't do what you think it would do, for the reasons stated. You actually want a keyboard emulation for the keypress, which needs low level privileged hooks into Windows (i.e. a windows driver or service).

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.