Comments (11)
I intentionally don't expose this in events, interpreting keycodes into actual characters according to KB layout is gray area of keyloggers. Adding them back is really trivial, you can do it in fork.
from uiohook-napi.
Hi Snos. Thanks for your reply. Still struggling with that, and I have no idea how to add them back although it looks really trivial. Could you help me out here?
from uiohook-napi.
Here I'm exposing only keycode
Lines 61 to 62 in 63745a5
But you can add another js property with keychar
You may also need to uncomment this
uiohook-napi/src/lib/uiohook_worker.c
Line 68 in 63745a5
from uiohook-napi.
Thanks a lot! I'll try to get by with that info, I'm really not familiar with C so I'll fiddle around. Thanks again, I'll reach back if I can't work this out, happy to sponsor you at a personal level if I need more help :)
from uiohook-napi.
I guess I'll have to rebuild it to see changes after I change the source files?
from uiohook-napi.
Alright @SnosMe, I'm almost there. I added the keychar, but the value is different from what ioHook sends (ioHook sends 113 for q on my keyboard while uiohook always sends 65535.
This is what I added:
napi_value e_keychar;
status = napi_create_uint32(env, event->data.keyboard.keychar, &e_keychar);
NAPI_FATAL_IF_FAILED(status, "uiohook_to_js_event", "napi_create_uint32");
from uiohook-napi.
If you uncommented line I've mentioned,
and added new if block with that event type, then idk
Line 60 in 63745a5
Oh, also if you apply my patch I remove that code for some reason π
uiohook-napi/src/libuiohook.patch
Lines 148 to 174 in 63745a5
from uiohook-napi.
I actually don't have the patch. I did everything yes, I do have warnings when doing node-gyp build:
CC(target) Release/obj.target/uiohook_napi/src/lib/addon.o
../src/lib/addon.c:305:53: warning: passing 'int32_t *' (aka 'int *') to parameter of type 'uint32_t *' (aka 'unsigned int *') converts between pointers to integer types with different sign [-Wpointer-sign]
status = napi_get_value_uint32(env, info_argv[1], (int32_t*)&tap_type);
^~~~~~~~~~~~~~~~~~~
/Users/michel/Library/Caches/node-gyp/18.12.1/include/node/js_native_api.h:140:68: note: passing argument to parameter 'result' here
uint32_t* result);
from uiohook-napi.
What's weird is the keychar is always the same value no matter which key I press: 65535
from uiohook-napi.
Alright, trying to help here, but I saw CHAR_UNDEFINED in some of the source files:
If I change this value to a fixed number, it works, BUT I don't know how to get the keychar there :|
from uiohook-napi.
from this code it looks like keycode and keychar are swapped on macOS in uiohook π
or is it you changing code to debug it
from uiohook-napi.
Related Issues (20)
- Build using unix timestamps HOT 2
- arm64 arch not work HOT 3
- App threw an error during load When I use electron-forge create a templates=webpack electron project HOT 5
- Keyboard layout ? - current US HOT 1
- windows 32-bit is not supportedοΌ HOT 1
- Add the function of displaying mouse status HOT 1
- Electron No native build was found for platform=win32 HOT 1
- No native build was found for platform=linux arch=x64 HOT 1
- keyToggle only keep some keys pressed.
- Macos 14.1 (23B74) don't work HOT 2
- Touch support HOT 2
- request to update libUIOHook HOT 3
- Adding support for relative mouse movement HOT 1
- crashes on latest version of ubuntu and fedora( linux based systems) HOT 1
- Don't work with active window HOT 5
- Can not find module "uiohook-napi" after installation .exe HOT 9
- Add NumpadEnter key HOT 1
- The Enter key is getting reported incorrectly on Windows HOT 2
- Mac OS issues with keyboard lags
- linux-arm64 prebuild is actually x64 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from uiohook-napi.