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

Port keyplus emulator to windows #97

Open
ahtn opened this issue Jun 4, 2019 · 0 comments
Open

Port keyplus emulator to windows #97

ahtn opened this issue Jun 4, 2019 · 0 comments
Labels
emulator Emulator driver for using keyplus on any keyboard Windows

Comments

@ahtn
Copy link
Owner

ahtn commented Jun 4, 2019

Two approaches that might work:

Method 1 - Input APIs

  • Raw Input to read HID codes from devices
  • BlockInput to prevent the original behaviour of keys being generated
  • SendInput to generate new keyboard/mouse events.

Pros:

  • runs in user-space
  • should be easy to implement.

Cons:

  • BlockInput and SendInput don't work when a UAC prompt is active, nor when Ctrl+Alt+Del combination is used.
  • BlockInput blocks all input devices, so need to forward events of all devices that we aren't remapping.
  • Might not work correctly with some applications depending on how they handle keyboard input.

Method 2 - Filter driver

Write a Keyboard and Mouse Filter Drivers.

Pros:

  • The OS should treat the virtual keyboard and mouse the same way as real hardware.
  • Should work in UAC and when Ctrl+Alt+Del is pressed.

Cons:

  • Filter drivers run in kernal-space, so harder to work with. A driver crash means the OS crashes, aka BSOD.
  • A user-space program to communicate with the driver will be needed, so more complexity.
  • Might be harder to install??

Other considerations

Microsoft's C compiler MSCV only has partial support for C99, so some keyplus code may not compile. To work around, will need to either rewrite some code, or compile it as C++ code.

@ahtn ahtn added Windows emulator Emulator driver for using keyplus on any keyboard labels Jun 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
emulator Emulator driver for using keyplus on any keyboard Windows
Projects
None yet
Development

No branches or pull requests

1 participant