Comments (8)
Hello! Thanks for taking the time to help out.
Could you run the logHMI.js script once again, and be sure to also click the buttons on the xkeys, in order.
It would also help if you could note down which buttons, and in which order they where pressed.
An example for how it looks like for an xk-24 like this:
Listening to device (1):
manufacturer P. I. Engineering
product XK-24 HID
vendorId 1523
productId 1029
usage 1
// I pressed button 1 here
1 data <Buffer 01 00 01 00 00 00 00 07 30 cf 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
1 data <Buffer 01 00 00 00 00 00 00 07 31 27 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
// I pressed button 2 here
1 data <Buffer 01 00 02 00 00 00 00 07 32 4e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
1 data <Buffer 01 00 00 00 00 00 00 07 32 a3 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
// I pressed button 3 here
1 data <Buffer 01 00 04 00 00 00 00 07 33 a6 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
1 data <Buffer 01 00 00 00 00 00 00 07 33 f7 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
// I pressed button 4 here
1 data <Buffer 01 00 08 00 00 00 00 07 34 be 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
1 data <Buffer 01 00 00 00 00 00 00 07 35 15 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
// I pressed button 5 here
1 data <Buffer 01 00 10 00 00 00 00 07 36 0a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
1 data <Buffer 01 00 00 00 00 00 00 07 36 4f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>
from xkeys.
npm run2020-10-27 09:01:44.042 Listening to device (1):
2020-10-27 09:01:44.043 manufacturer P. I. Engineering
2020-10-27 09:01:44.047 product XK-16 HID
2020-10-27 09:01:44.048 vendorId 1523
2020-10-27 09:01:44.048 productId 1049
2020-10-27 09:01:44.049 usage 1
2020-10-27 09:01:46.703 1 data 00000100000003b30af800000000000000000000000000000000000000000000
2020-10-27 09:01:47.004 1 data 00000000000003b30c2500000000000000000000000000000000000000000000
2020-10-27 09:01:48.084 1 data 00000001000003b3105400000000000000000000000000000000000000000000
2020-10-27 09:01:48.396 1 data 00000000000003b3118f00000000000000000000000000000000000000000000
2020-10-27 09:01:49.723 1 data 00000000010003b316b600000000000000000000000000000000000000000000
2020-10-27 09:01:50.044 1 data 00000000000003b317f100000000000000000000000000000000000000000000
2020-10-27 09:01:50.830 1 data 00000000000103b31aff00000000000000000000000000000000000000000000
2020-10-27 09:01:51.100 1 data 00000000000003b31c0d00000000000000000000000000000000000000000000
from xkeys.
With som comment
npm run2020-10-27 09:01:44.042 Listening to device (1):
2020-10-27 09:01:44.043 manufacturer P. I. Engineering
2020-10-27 09:01:44.047 product XK-16 HID
2020-10-27 09:01:44.048 vendorId 1523
2020-10-27 09:01:44.048 productId 1049
2020-10-27 09:01:44.049 usage 1
// I pressed button 1 here
2020-10-27 09:01:46.703 1 data 00000100000003b30af800000000000000000000000000000000000000000000
2020-10-27 09:01:47.004 1 data 00000000000003b30c2500000000000000000000000000000000000000000000
// I pressed button 2 here
2020-10-27 09:01:48.084 1 data 00000001000003b3105400000000000000000000000000000000000000000000
2020-10-27 09:01:48.396 1 data 00000000000003b3118f00000000000000000000000000000000000000000000
// I pressed button 3 here
2020-10-27 09:01:49.723 1 data 00000000010003b316b600000000000000000000000000000000000000000000
2020-10-27 09:01:50.044 1 data 00000000000003b317f100000000000000000000000000000000000000000000
// I pressed button 4 here
2020-10-27 09:01:50.830 1 data 00000000000103b31aff00000000000000000000000000000000000000000000
2020-10-27 09:01:51.100 1 data 00000000000003b31c0d00000000000000000000000000000000000000000000
from xkeys.
Thanks! Just to verify, it is actually am XK-4, right? Strange that the device reports itself as a XK-16.. oh well, they're probably re-using the same chip for all of the one-row devices.
@KnutHelstad how does the library work with the XK-4 right now? As I'm adding the test, it seems like it might be already working, could you verify?
( please run the examples/xkeys.js
script and see if you get the evens in the console, as well as the blue light lit up on the button itself when you press it)
from xkeys.
on v 0.1.2 i get
PS C:\nodeProjects\inlinervision> node xkeytest
// I pressed button 1 here
Key pressed: 0
Key released: 0
// I pressed button 2 here
Key pressed: 8
Key released: 8
// I pressed button 3 here
Key pressed: 16
Key released: 16
// I pressed button 4 here
Key pressed: 24
Key released: 24
The exsact number is XKS-04-USB-R
myXkeysPanel.setBacklight(keyIndex, true) only works on index 0.
The index for the led is 0,1,2,3
from xkeys.
Yeah that seems to be right, the x-keys devices have their numbering like that; 0 being the lop-left, 1 is below it, 8 is to the right of it etc..
The indexes for your keys are actually 0, 8, 16, 24, so myXkeysPanel.setBacklight(8, true)
should work for you (?).
from xkeys.
Now.
myXkeysPanel.setBacklight(Index, true)
works when using index 0,1,2,3
from xkeys.
closing this, feel free to reopen if there are any lingering issues
from xkeys.
Related Issues (20)
- Support for XKE-64 JogT-bar HOT 2
- Log for XKE-128 HOT 1
- Discussion: Major updates to the library HOT 16
- XK-12 Joystick using wrong bits HOT 8
- XK-8 support HOT 15
- Feature: WebHID HOT 1
- Closing down neatly HOT 4
- Can XKeysWatcher handle existing connections? HOT 2
- Multiple devices HOT 6
- Backlight methods HOT 6
- Help with building HOT 8
- Any known problems with Raspberry Pi? HOT 2
- XKeys.listAllConnectedPanels is not a function HOT 9
- How to dispose of an xkeysPanel? HOT 10
- call a xkeys function out of the watcher HOT 4
- UnhandledPromiseRejectionWarning when watcher fails to open device HOT 1
- npm packages have a lot of 'junk' files HOT 1
- XK-24 EEPROM retaining code? HOT 2
- yarn build-record-test doesn't work in root of repo
- Intermittent "NotAllowedError: Failed to write the report." on Chrome v115+ HOT 6
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 xkeys.