July 16, 200421 yr Commercial Member Hi again,After some hours searching and with the help from Arne, I was able to get DirectInput working and I now have a gauge which reads keyboard presses directly in FS. For some reason the inputs are read in Querty format while I have an Azerty keyboard but OK, I can live with that.Now, the gauge I am making actually has a very simple purpose, it's a gauge with 2 String elements which can contain 7 characters: the aircraft registration and the flight number. These values are written to a small text file so they don't need to be updated every time the panel is restarted. I have programmed the gauge so that when the text area is clicked it will capture the keyboard inputs and write to the string element, so far this parts works perfect but... FS continues to also monitor keyboard inputs and for instance when you type an "S" the view changes, etc...How can I temporarily stop this from happening (as long as the text is captured by my gauge) ? I would think that I somehow need to capture the keypress and send a NO_KEY in stead or something, but I have no idea how to do that. It must be possible since all those FMC gauges can do it ! Or are they using a completely different technique for keypress capture ?Thx for the help,Bj Bj
July 16, 200421 yr Sorry about the qwerty keyboard, I just use mine to determine the #defines for the keys, and aI have a qwerty keyboard. "My" way to use keys without interfering with FS is, to use key combinations like AltGr+'key'. Sufficient for FMC inputs.Arne Bartels
July 16, 200421 yr Author Commercial Member Arne, How do you read the altgr+another key ? When I look at the raw keypressed codes when both AltGr and another key is pressed then only the AltGr code is shown...Bj Bj
July 16, 200421 yr Use #define KEYB_ALTGR 0xb8....key=ReadDirectInputKeyboard( .. ,KEYB_ALTGR);Arne Bartels
July 19, 200421 yr Author Commercial Member Arne,I tried setting the SetCooperativeLevel to DISCL_EXCLUSIVE and DISCL_FOREGROUND but for some reason this doesn't work. Any ideas how this can be resolved ?Bj Bj
Create an account or sign in to comment