Code Monkey home page Code Monkey logo

Comments (5)

solderzzc avatar solderzzc commented on August 20, 2024 6

libuiohook is using Key Number of Linux Keycode Table

from iohook.

WilixLead avatar WilixLead commented on August 20, 2024 3

This data generate libuiohook try ask this question in this repo.
I don't control this data in my module. I think, it relate by OS and locale settings.

PS. This is key definition. Try research this file. May be it help you.

from iohook.

samylaumonier avatar samylaumonier commented on August 20, 2024

In the README, when you press "d" the keycode is 46:
{ keychar: 'd', keycode: 46, rawcode: 8, type: 'keydown' }

When I press "d", the keycode I get is 32:
{ keycode: 32, rawcode: 2, type: 'keydown' }

Why? How can I convert a keycode or a rawcode to a char? Here is the values I have: (KC for keycode, RC for rawcode)

# KC RC
a 16 12
b 48 11
c 46 8
d 32 2
e 18 14
f 33 3
g 34 5
h 35 4
i 23 34
j 36 38
k 37 40
l 38 37
m 39 41
n 49 45
o 24 31
p 25 35
q 30 0
r 19 15
s 31 1
t 20 17
u 22 32
v 47 9
w 44 6
x 45 7
y 21 16
z 17 13

Thanks!

from iohook.

WilixLead avatar WilixLead commented on August 20, 2024

In future I plan add matching table for different OS's in node.js side.
If anybody what to help me, pull-request welcome :)

from iohook.

wurikiji avatar wurikiji commented on August 20, 2024

Though this thread is closed, I really thank @solderzzc for giving us a real keycode table. I appreciate it.
Now, I could build my keyboard/mouse event hooker.
Love you @WilixLead for implementing this fantastic iohook npm library.

from iohook.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.