Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input key issue with Omsi 2 #7

Plaigon opened this Issue Aug 19, 2016 · 2 comments


None yet
2 participants
Copy link

commented Aug 19, 2016

Hello, I try to get input keys coming from the game Omsi 2, especially one in particular: the touch 6. Everything works very well if I am on google chrome, my desktop or even in a folder, but as soon as Windows is on Omsi 2 (fullscreen mode or not), the console (in eclipse ide) indicates me nothing more :/
Thank you in advance =)

PS = My code if necessary :


This comment has been minimized.

Copy link

commented Aug 20, 2016

Hello, this is what I was able to adjust since the last time.
Then I managed to run well the API, only it turns out that if I launch Omsi 2 either the same Photofiltre, or even Google Chrome or any other programs as administratordirector, then the console does not receive any more the inputs. Is there a solution for this ?


This comment has been minimized.

Copy link

commented Aug 28, 2016

Hello Plaigon, not sure if I can support your here. Generally a lot of games are using low-level keyboard hooks themselfs to catch keyboard input. Or they even go "one level deeper" and use raw-input to receive keyboard events.

Generally the way low-level hooks work, is that one hook is called after another. Each hook has to call the next hook by invoking CallNextHookEx. If one hook doesn’t call CallNextHookEx, the “next” program will, for example, not get the keyboard event. Every hook should call CallNextHookEx, but especially for a game like Omnibus Simulator, I can imagine they havn't tested this all too well. So if they don't call CallNextHookEx, your hook won't get notified, because it might got registred with a lower priority.

Hook priorities are based on the order in which the hooks are installed. The hook installed latest, has the highest priority. This means you’d have to ensure that the low-level hook is installed after the game was started, to check if they actually don't call CallNextHookEx. Please do also see the KeyboardHook.c implementation.

Last but not least, if they are grabbing the input, e.g. using raw input, they might forcefully prevent other programs from getting any input events. Again bad design, but likely you won't find a way to outsmart this.

Hope this helps. Regards, Kristian

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.