Skip to content

Port keyplus emulator to windows #97

@ahtn

Description

@ahtn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    WindowsemulatorEmulator driver for using keyplus on any keyboard

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions