kwhat / libuiohook

A multi-platform C library to provide global keyboard and mouse hooks from userland.
Other
505 stars 124 forks source link

x86 compatibility #76

Open adamup928 opened 4 years ago

adamup928 commented 4 years ago

ARM-based devices running Windows currently require 32-bit (x86) builds.

When using libuiohook in this environment (I'm testing against ia32 architecture on win32) pVkToWcharTable is null when accessed within input_helper. I believe this is due to an issue with pointer sizes.

This Stackoverflow post seems related to what's happening here. The answer indicates that utilizing the original kbd.h would work in 32-bit environments.

I did manage to populatepVkToWcharTable by making changes to input_helper.h using the original definitions fromkbd.h, but it seems there needs to be further changes inside keycode_to_unicode to accommodate a 32-bit environment.

I hope helps. This is a bit outside my competency, but I'm happy to test and provide feedback.

kwhat commented 4 years ago

This is going to be a large undertaking and I have no way of testing it on ia32 or arm. I assume by ia32 we are not talking about i386 correct? There is a lot of hand-wavy undocumented memory magic going on in that method... Please provide your changes. The reason stuff is redefined in input_helper.h is because the kbd.h file is only able to compile with MSVC due to __ptr64 nonsense. PS, that was my question back in the day.