#🤖│community_dev
1 messages · Page 20 of 1
dont @ me on "how the system works", you literally suggested RGB might be stored as a string on an MCU or "icecream cones" for all you know
if wooting gets up there to streaming media
i will ask for a change
yes
tmw someone doesnt get sarcasm
yes i storngly believe usb to be able to carry ice cream cones
and my pc to be able to produce them
i mean
why wouldnt it
tmw roblox requires more traffic than wooting
@grizzled wolf I just tried WootingAHK on FW 1.25.5 and it was fine
Have a guest tonight, so cannot really do much on it
@knotty night I'm on 1.25.6, is there an easy way to rollback to 1.25.5
Dunno, I more suspect the W1
Anyone out there with a W1 and a W2, and on Windows, and who uses AHK? Need Wooting AHK tested with the W1 to see if it works https://github.com/evilC/WootingAHK
W2 obv should be good, but tompas here seems to be having problems getting it working on W1
indeed 😃
Can test once I’m back home in a bit
ta
ta
It could also potentially be an ANSI issue I guess. I have an ISO W2, so have only tested with that
W1 ansi, the allkeytest script closes after I press go
ta
the example or simple example seem to start and then exit instantly
Alright, @fathom garnet has been warned for 'Bad word usage'.
@wet knot your bot deleted my message 
you said a bad word
box? uncheck?
Reason
Bad word usage
Channel
#woot_dev
Message
Calder is lame
???? thats not even remotely close tt what I wrote
i know the truth 👀
Anyway i fixed it
Sorry
for some reason "box" was added
if I uncheck the block keys box it doesnt close itself
``` -Quintosh
well, the deleted message was wrong anyway, it now closes itself even if I uncheck the box lul
updated firmware, same issues, I see the AHK symbol in my taskbar in the bottom right when I start simple example or example, but when I hover over them they are gone
so might be a W1 issue
Thanks @fathom garnet , it looks like the problem is as I suspected and with the Analog SDK DLL
<@&490097707487330305> are we aware of any issues with the analog API on the W1, specifically high latency in responses?
Have only tested with the .NET SDK
I am not getting anything on my W2, but @grizzled wolf is getting a large delay, in the region of ~500ms apparently
I have some sample code that just targets the .NET SDK that repros for him but not me
need me to try something from this again to double check?
I can't help you at the moment, my keyboard is still apart.
From previously running into it with Node on the W2, the delay seems to be from not reading the interface quick enough. I don't know for sure but I'd guess it's buffered and not reading it faster than it fills means you get a delay of however large the buffer is
Whether it's hidapi that buffers or OS-level drivers, I dunno. I didn't dig that far into it
I read it on a 10ms loop, and am not generating data that fast. Besides, @grizzled wolf was tapping a key, releasing, waiting, then tapping again and it would be delayed - I don't think the buffer had anything in it
It seems to either be W1 specific or maybe something environmental
@fathom garnet If you could verify whether things are delayed for you, that would be great
It doesn't matter if you press a key or not, the RAW interface will continuously send data over USB.
ah good point
It behaves differently for both of us tho, so I don't think it is an inherent issue affecting everybody
It works fine on my machine ™
What I was indicate with this is that it's possible that the buffer are full and because of this you can have the delay.
Are you beginning the reading immediately after opening the connection?
The code is above
As for a 10ms loop... try between 6 and 8 if you can
Min granularity of sleep is ~10-15ms
Ahh
not easy to do ms accuracy timers in C#
in fact from what I understand, it's a bit of a bugger on windows, period
without chewing excessive CPU that is
I think I can maybe improve it tho - use a blockingcollection or something
by pulling the polls off into a blockingcollection, I could remove the sleep
that's what I do in WootingAHK
From my testing... these are the read times I'm seeing (in ms)
8
12
12
12
16
8
8
16
8
12
16
8
(granted this is NodeJS, so the multiples-of-4ms could be Node event loop artifacting)
But for this sample code, I wanted to keep it simple
So 10-15ms might be just a tad too slow
It does not have to be super-efficient, as long as it exhibits the difference in behaviour
cos @grizzled wolf was seeing delays in the order of hundreds of ms
like 500
Yeah, because if you're only reading out 3 of every 4 inputs into the internal buffer (I'm guessing there's one), then that means 25% of the reads USB does begin filling the buffer
but the problem is that the first input is delayed
From those above samples (12 samples, total of 136ms), if you're only reading every 10-15ms, means in that amount of time you read between 9 and 13 samples
like 500ms between console.readkey seeing the key change state, and the first analog update coming through
so the buffer will be empty at that point surely?
As soon as the connection is opened, the buffer begins to fill
The keyboard is always spraying analog data over USB
but there is code pulling stuff out the buffer constantly
so if you let it start, the buffer should be essentially empty?
I suppose it depends on how the .NET wrapper works
Any delay between the creation of the HID interface (hidopen() or whatever) and you beginning to read is data into the buffer
So if you don't start reading until there's user interaction, that's going to immediately fill the buffer
no, it reads constantly
That's why I had asked if there's any delay between open and reading. Your posted code only had the reading step
while (true)
{
var val = AnalogReader.ReadAnalog(1, 1) // <-- pull from buffer
...
Yep. That's reading. But is AnalogReader initialized right before that loop?
it's static
but essentially, yeah
the analogreader is just a p/invoke
[DllImport(sdkDLL, EntryPoint = "wooting_read_analog", CallingConvention = CallingConvention.Cdecl)]
public static extern byte ReadAnalog(byte row, byte column);
so the dll loads, then it starts polling straight away
But as I said, it's not an inherent problem
works fine on my W2
no delay
so it seems to be some kind of compatibility or environmental issue
That's .. o_o Huh..
so just trying to work out what the conditions are to repro
Suspect it is W1, but cannot be sure...
Curious.. wasn't there some weirdness if you plugged a W1/W2 into a USB3 port?
I know that's one of the recommended things to check if there's fw update issues
I dunno what he was plugged into
i do have it plugged into usb 3.0 as I have no usb 2.0 ports on my laptop
i reset the keyboard firmware on a different cpu with usb 2.0 and still have the same problem anyway
so i don't think the problem is usb 2.0 specific
so far all laptops i sell and have sold still had at least 1 usb2
all business shit tho
@knotty night @boreal nest I see you guys are figuring out a puzzle. @hybrid lake might be able@to give some info on this.
Do I need any header files to use the DLLs?
Do I need any header files to use the DLLs?
@pearl tartan sorry there's no answer for you, I don't really know much
Ok. Thanks anyway.
well the question is a bit vague, what dlls do you want to use?
For example, if I wanted to use the analogue DLL in my C++ project, do I need any header files?
@fathom garnet
not really worked with dlls in c++, but I think you just declare the class and functions in a .h and that should be it?
pretty sure one of the community projects on the dev site is in c++, could check there how its done
Thank you, I will take a look.
Do I need to source code, for the header files, to use the DLL in my C++ project?
For example the Analogue SDK Source.
? no the point of dlls is to not work with the source code directly
How do i add them to my project?
Is there any way of controlling the depth of a key press for DKS? The four options are not granular enough. I've also noticed the keyboard is inconsistent with the key presses. For example I have mapped the W key to press W, when the key is fully depressed I want SHIFT W to be the key combination, and then W to be the only key pressed when I release the key from the fully depressed state. However I noticed that SHIFT stays on despite the key being released almost to it's full un-pressed state. This is inconsistent and feels like a bad polling issue? Ideally I would like to have it so that when I press a key beyond say 80% the shift key is pressed as well as the W key. One I reduce pressure to release the key under 80% the shift key is released but the W key remains pressed until the key is fully released altogether. I hope that makes sense! Thanks in advance for any assistance / advice!
@pearl tartan not necessary, you can just define the functions when you load the library in whatever language you use
This is how it can work with js
@calm dock make sure that shift is a line up to the 3rd icon. The 4th icon represent the release of the key, when it stop right before the 4th icon l, it will still stay on until key is entirely released.
Something we might need to improve in UX?
@wide nymph Thanks for the tip. Any possibility of having a variable to set the percentage or analogue input value for the additional keys to activate / deactivate? The UX and UI could be improved somewhat - but progress has been made and is greatly appreciated! Keep up the great work.
We had considered it but in practicality you’d have a hard time to control it. We felt this was easier to understand and control.
@hybrid lake Thanks. You mean in just in a header file?
Okay, fair enough. Nice to have had direct communication with you. congrats again on an awesome keyboard @mint merlin!
@wide nymph Thanks. You mean in just in a header file?
Do I need a .lib file, for example, the analogue.dll , to link against at compile time?
I still do not understand how to use just a dll file, in a VC++ project?
Would I need to use the Win32 API?
If you want to use a dll without the .lib file you'll need to use LoadLibrary and GetProcAddress (https://stackoverflow.com/questions/31708832/how-to-reference-a-dll-to-visual-studio-without-lib-file )
Or you can create the lib file from the dll as mentioned in the second answer to that stackoverflow question
But it'd probably be easier to compile the SDK yourself and then use that
wha
@fleet saffron Thank you very much.
Hey! So I got my wooting one yesterday and so far I am loving it. One thing I do miss from my last keyboard though is the ability to switch the Esc and Caps Locks keys. I know it sounds weird but as a VIM user this is just easier imo. Would there be a possibility to implement such a feature?
Sounds like an AHK thing, maybe the ahk god @knotty night is able to help you out.
Maybe even a simple macro program which is able to rebind keys is able to do that, though
There currently is no way of rebinding digital keys in the wootility, so third-party software will be needed
Ok I will try out AHK. Thanks for the tip @glacial horizon
Hmu if you need further assistance, not very good with ahk though :P
Also, when playing games, make sure to turn it off. iirc it can trigger some anti-cheat services
Okay I will note that
The First thing when I got wooting one, I disable all the RGB. The SECOND thing is to use a USB convertor to remap to Colemak layout.
Full key programmability is really needed for this GREAT keyboard.
the USB convertor use tmk from hasu, it works well for me now!
but doesnt it ruin the analog
yes, analog is not what I want.
I just want a smooth keystroke.
and of course, without the convertor, I still have the analog.
I may add the Xinput function to the convertor, so that it can also support the analog. I will look into the source code when I have time.
Full key programmability is an essential feature for me.
the kbd has xinput and dinput
but, why do you need a USB converter to change the keyboard layout? I just changed my layout in the OS
same
like i get why ud use a usb dongle for macro keyboards and use some special keys that no one ever needs
but remapping to a different layout is easy in most OS
there is colemak layouts downloadeable for windows
by the weird layout project guys
@swift raven Normal AHK might not be that great for switching those particular keys, not sure how deep it would go (AHK only sends synthetic input). I do have another library though which uses a custom keyboard driver, so can mutate input below the OS layer. See https://github.com/evilC/AutoHotInterception
You would want "Subscription Mode", not "Context Mode"
I tested it with a different macro program, not familiar with ahk, which is software input / output based and it seemed to work
Do note that the interception driver will break keyboard input when you reconnect your keyboard until you restart your PC (I have a finicky hub that tends to reconnect when a speck of dust falls on it, so I found it very annoying but your mileage may vary)
Details here: https://github.com/oblitum/Interception/issues/25
i dont think its needed in this case anyway, seems to work as expected for me
@fleet saffron Whilst I have seen similar issues, with AHI if you reconnected your keyboard, you could restart the script and it would find the new ID. If you happened to have a lot of keyboards (ie close to 10 devices) then it would break until reboot, but that's quite rare
The main time most people see it is if using hibernate
That's why I mentioned my hub. I wasn't even using it for my wooting, but for a cheap numpad I was using as a macro keyboard, and when the hub reconnected I wouldn't be able to use either anymore until I rebooted.
Having a unifying dongle in the hub probably also helped, because afaik that also creates a keyboard device
Some keyboards create 4 devices (eg some corsair one with macros out the wazoo)
Partial failure happens when you reconnect and all devices get a new ID, but if the new IDs go over 10, then the device becomes unusable, as Interception only supports 10 of each
At some point I mean to have a look at it and see if I can get it to gracefully recover - eg maybe detecting plug / replug and reloading the DLL or something may do it?
I don't think that would help, as the dev says it's done on the driver side of Interception and fixable by getting a source license for Interception
But if you get it to work I'd love it!
It's gonna be a bugger to test I think as youwould need a lot of hibernating / rebooting
Will try and find the time to take a look this weekend
Oh and FYI forget buying the source, we tried
We are in the process of trying to reverse engineer it
anyone know the phototransistors and leds used in the keyboards?
What MCU does the Wooting use?
It uses a ATxmega128A4U according to https://www.tomshardware.com/reviews/wooting-one-analog-mechanical-keyboard,5124-7.html
id guess an arm chip needs more passive components to function
could also be that a similar specced arm cpu has a higher price tag
and id guess no real benefits
sure the arm one would be 16bit
but i think the wooting doesnt do anything that would require 32bit integers
The Wooting is a device not a computer on its own. You don't have a PC into your mouse or headset or whatever just to send controls.
It's not like a TV who is a computer today...
i think he means arm as in smt32 chips
smth like that
where the cores are arm based
which like i said costs more for the same storage cap etc and would only give u 32bits instead of 16bits arithmatic
Even these types are little CPUs.
which is not useful for the kbd
so we rather save the 70cents per chip
and keep the cost down a bit
The purpose for the ATxmegas are small devices, so all you need is integrated. As far as I know for the ARM chips you need additional storage, memory and a few other things in order to work.
The ATxmegas can only do special hardcoded stuff (Harvard architecture) but on a ARM you can do enything (Von Neumann architecture).
I am talking about embedded ARM chips. They offer more power for the same price. The custom keyboard community has been moving towards ARM because it allows for more advanced firmware features.
Think tachyon mode with all the other features enabled.
Except maybe RGB animations which are useless and only slow down keyboards.
That is the only thing that gets disabled though
I mean you could have both with ARM but I just don't see the point. ;d
how do you mean both? ;)
RGB animations plus tachyon mode.
Oh right, well imo its kinda distracting in games, but could be cool
dont see myself using that though
In any case, the MCU used is still decently powerful.
Agreed, im okay with the way it functions now
@civic light an equally specced arm is pricier
why would we go even more expensive just to get rgb and tachyon
@civic light it uses the atxmega128a4u as mentioned, and a bunch of high speed analog multiplexers
this one in particular
CD74HC4067M
they use an rgb led driver for the rgb leds as well iirc
@civic light ARM is indeed great to move to in the future, we have considered it, but at the time we made the original decision, AVR was/is more accessible and easier for people to wrap their head around and sufficient for our requirements.
At that time
is it possible to individually control the brightness of each key via the rgb sdk?
e.g. if I want to smoothly pulse a colored light on a single key from 0% to 100% brightness
and if not, is it a hardware or api constraint?
looking at the api it looks like it should work if you just scale the rgb values you pass to wooting_rgb_direct_set_key but I just wanted to double check
As long as I remember it you need to adjust the colour values in order to set the brightness of the colours.
I don't think there is a parameter or function for this.
the more I think about it I think that makes sense
I just want to be able to make pretty interactive keyboard animations with lots of contrast between different colors
@civic light A little late, but here are some of the reasons. This is about 4 years ago now. With the knowledge and experience I have now I would definitely go for an ARM chip.
- The Xmega series has very fast ADC processing
- ASF has a pretty decent USB stack with out of the box support for most situations
- I used AVR before
We've noticed the trend in the keyboard community too and it makes sense. We are going to make the switch at some point in the future too. For now it's just not worth to deal with a rewrite, different versions etc and honestly the xmega has been holding up pretty well so far.
So the question will be, can the future product from Wooting with an ARM chip run Doom? 😉
using the key LEDs as the display
Of course 😊
running at 22?x6 resolution
It shouldn't have to be perfect...
actually, is it even possible to make interactive keyboard rgb animations?
e.g. when a key is pressed, the ones around it light up
I think node can listen for keyboard events globally even if there's no window to focus but just want to make sure
You mean something like this: https://discordapp.com/channels/167181566978555904/453072453435129856/453224684142460938
If you can code you can create what ever you want...
You know there are some built in RGB effects right? Some of them do the things you descibe...
yeah I work with node for web apps but I haven't done much desktop stuff with it
implementing interactive keyboard light toy programs is one of the reasons I bought a wooting lol
Doom should be doable with PC side rendering 😄
for sure
i mean someone made the chrome dino game for the twooting
u just have to deal with shitty res
@sleek grove You can use the analog portion of the SDK to listen to keys regardless of focus. As for individual key dimming, that's possible by applying an alpha blend to black with whatever the base color is. There's a slight got'cha in the array-based portion of the SDK in that you need to do a gamma correction on the input or it will show incorrect colors on the keyboard. Since you mentioned Node, I should link https://github.com/ApeironTsuka/wooting-sdk as it makes easier to do much of this (and I wrote it, so.. can't blame me for shamelessly plugging it XD)
As an example for pretty much everything above (not 100% guaranteed to work as-is, since I mostly typed this up on here, but it should barring any typos)
const { Keyboard } = require('wooting-sdk'), { Toolkit, lockLayer } = require('wooting-sdk/toolkit'), { Layer, Renderer } = require('wooting-sdk/layered');
// Begin boilerplate
let kb = Keyboard.get(), tk = new Toolkit(), renderer = new Renderer(kb);
kb.init();
kb.leds.mode = Keyboard.Modes.Array;
kb.leds.init();
kb.leds.autoUpd = true; // optional; without it you'd need to call kb.leds.updateKeyboard() every "frame"
tk.use(Toolkit.Features.AllLayered); // enables the locks layer, which is managed internally and handles managing the capslock/numlock/etc changes, enables the profile watcher, and a little clean exit helper
tk.enable();
tk.init(kb);
// End boilerplate, set up the layers
let locks = new lockLayer(tk), bgLayer = new Layer(), fadingLayer = new Layer(), alpha = 255;
// Set up the renderer
renderer.addLayer(bg); renderer.addLayer(fadingLayer); renderer.addLayer(locks);
bgLayer.setColormapNoAlpha(kb.leds.profile.map);
tk.on('profileChanged', () => bgLayer.setColormapNoAlpha(kb.leds.profile.map));
fadingLayer.fillColormap(255, 255, 255, alpha); // fill it white + opaque
renderer.init(); // updates at 10fps by default
let tmr = setInterval(() => { // watch the keyboard
let { analog, actuationPoint: ap } = kb, { Up, Down } = Keyboard.Analog; // lazy
if (analog.readKey(Up) > ap) { alpha += 10; if (alpha > 255) { alpha = 255; } fadingLayer.fillColormap(255, 255, 255, alpha); }
else if (analog.readKey(Down) > ap) { alpha -= 10; if (alpha < 0) { alpha = 0; } fadingLayer.fillColormap(255, 255, 255, alpha); }
}, 100);
// some just-in-case cleanup
process.on('SIGINT', () => process.exit());
process.on('exit', () => renderer.stop());
wow, thank you for the explanation and the example for how to use your library @boreal nest, it looks like just what I need to start with
though what did you mean by the array portion of the SDK showing incorrect colors if you need to do gamma correction?
I don't know much about gamma correction but does it not result in just different rgb values to pass to the sdk at the end of the day
also it looks like renderer.init() starts a timer that updates every 100ms by default but I should be able to make it more often by passing a smaller value
I'm also a little confused about what kb.leds.autoUpd = true; is doing, is the renderer not also doing that on every update because it calls this.kb.leds.setColormap(this.outmap) internally
@sleek grove
The API has an odd quirk where the wooting_rgb_array_set_* functions set the LEDs with inconsistent colors whereas the wooting_rgb_direct_set_* functions do not. It was figured out that this is probably because the array functions bypass some part of the firmware that does the correction internally. The SDK I linked does the correction already so it's not needed with it (ledcontroller.js, the gc() function)
Yes, you can pass a smaller value to renderer.init() to make it update above 10fps (100ms timer) but I don't recommend any smaller than 50ms or so (20fps) simply because I've not profiled how long the drawing code tends to take to run. The way PreciseTimer works is internally it uses setTimeout, and it tracks how long both its own code and the callback took to run plus the actual time since the last call (as timers in Javascript aren't guaranteed accurate) to adjust the timeout for the next run to usually be +/- ~5ms depending on callback size etc. However, if it detects that something caused a spike that caused, for this 50ms example, 120ms to pass since the last run, it will call the calback multiple times to compensate. Unfortunately if the callback is why it took so long, this can result in a runaway issue. It should be fine down as far as 20ms (50fps) because it's Node and not the browser
The things in the namespace of wooting-sdk/* are built on top of keyboard.js/ledcontroller.js. Inside of ledcontroller, the setColormap() function will automatically call updateKeyboard() if autoUpd is set. The renderer doesn't automatically set that in case you want control over when in your code it does the actual push to the keyboard, such as with an animation. Simply call kb.leds.updateKeyboard() during the animation loop
gotcha, I'm assuming the wooting sdk devs are aware of the coloring bug with the array_set functions and are hopefully working on a fix for it in the future?
that "death spiral" situation you described pops up in game simulations as well, it could probably be addressed in a similar way by clamping the max # of allowed updates per frame and logging a warning if you reach it
also looking at setInterval's poor precision in node, https://stackoverflow.com/questions/32587985/node-js-alternative-to-setinterval-which-is-more-precise-for-game-loop mentions using setImmediate (or the nanoTimer library that does it for you)
it's important to me because I want my interactive animations to be as smooth and responsive as possible
but really the crucial info is how often the wooting hardware can update its LEDs in response to the set_* function calls
i.e. what's the LED full-refresh rate of the keyboard itself
not sure if anyone here or a wooting team dev knows that from just running tests to update all LEDS as often as possible
Indeed. I don't know the refresh rate either. I know it takes a few ms to do the update itself (worst-case, for a full keyboard update, it's 5 separate buffer pushes) at the very least. I had looked at setImmediate but there didn't appear to be a way to use it for arbitrary delays as it sets a timer to be called asap. I should have it push a warning and have a maximum iteration count, you're right
another idea that could be borrowed from game update loops is passing in a delta time value for each frame to make movements update-rate independent
though that's not hard for the dev to keep track of anyway probably
If you're only updating a key or two (or a key and the surround few) it shouldn't need to push more than 2 or 3 buffers depending on how many around and if the key is on the barrier between buffer segments
it's probably gonna be several if you want to make effects that move across many keys
at least some of the ones I'm envisioning are like that
I don't have my wooting two yet but I'm guessing it should be feasible given that it ships with a moving rainbow gradient effect right?
Eh, since this is a rendering loop, it's not controlling game logic so rate-independent isn't important.
Yeah, if you're touching keys in every segment it'll be pushing 4 (on a One) or 5 (on a Two) every update
which maybe makes use of their own sdk?
The effects it ships with are implemented within the keyboard's own firmware. It should be possible to implement the same effects via the sdk
well I meant so that it's easy to work with movement speed values in terms of like units/s instead of units/update
so everything still moves at the same apparent speed regardless of what you decide to set your render update rate to
gotcha, well that gives me hope then
if theirs looks smooth out of the box then theoretically it should be doable for a dev to replicate it and be equally smooth
You can do that still. If you rely on the renderer's timer, it'll be entirely independent of your update loop, so you can update the layers as fast or slow as you want
ah, yeah I think we're saying the same thing
I didn't mean having two separate loops for updating vs. rendering
I think that's kinda overkill for this case and you could get away with just doing everything in the render loop
and multiply stuff by the render time delta to make it consistent
Basically the renderer's flow goes like this:
dev updates layers independent of any internal timings
Renderer's timer kicks in, flattens layers into its internal buffer
It then updates the sdk's buffer (since the renderer's buffer is layed out entirely differently)
If autoUpd is set, that sdk buffer update will trigger it to be pushed to the keyboard
The sdk's internal buffer is split into the segments and so only segments that actually change in some way are flagged for being pushed, so it only needs to push a subset
oh right, the dev's setInterval is completely decoupled from the renderer's own timer
hmm
Yep. You don't have to use the renderer's timer though. You can skip the init() (as all it does is set up that timer) and call the renderer.run() function manually
would it not be nice to provide a callback that runs just before the render is about to set the color map
or you could do that I guess
I didn't realize init() was literally only to setup the timer
so it's more like a start() really
e.g. you could call it again after calling stop() to start up the timer again
You can also do that callback approach by something along the lines of class customLayer extends Layer { tick() { /* update the layer in here */ } } as every layer is tick()'d before the flattening step
in fact the loop for calling the renderer's functions seems like it could be a separate responsibility since the renderer shouldn't necessarily be concerned about that
I might go with that approach
lol I'm getting too much into architecting the code for these dumb little LED toys
But the tick() approach means you're bound by the renderer's update speed. And yeah, the renderer's init() is more like a start() but it's named that way to be consistent with everything else using init() to do actual, proper initialization of stuff
yeah
imo the timer stuff and stop() isn't directly part of rendering, I guess it's there for convenience
You could even skip using layers/the renderer at all if you want. Those are there more for convenience than necessity. Layers can have transparency per-key, so it's convenient when you want to stack multiple effects (or have the capslock etc keys show on top without extra work)
yeah those abstractions make sense to me
I was trying to think of what a layer meant at first and then I realized it was like image layers that blend with each other
I like that they're customizable and like you said you provided a way to get standard things like lock colors and such
so you have the choice for whether to add them in or override them temporarily
You can have more fine control over the lock colors as well, independent of what the user's profile says, too. The Toolkit tracks caps lock, num lock, scroll lock, fn lock, and winkey lock. By default, scroll/fn/winkey use the caps lock color, but you can change each them via kb.leds.profile.fnLockColor/winLockColor/scrollLockColor (as well as the other two via capsLockColor and fnLockColor). Changing these only changes the internal stuff and doesn't affect the keyboard, so it's safe to do so
nice
But be aware that the user changing profiles (via A1/A2/A3/Mode/etc) will overwrite those changes, so you'd want to re-alter them in the profileChanged event
Not talking about the Wootility :p
There might be a better way to track the locks than what I do. Similar to the example, Toolkit watches the analog values for the locks to trigger it. This can sometimes end up triggering, for instance, capslock without triggering it on the layer if it's pressed down just far enough and the Toolkit doesn't get an analog update that says it was pressed. It's rather uncommon, but something I need to figure out a good solution for
So the layer will say caplocks is off while it's actually on, and result in it being flipped until the app is restarted. This method of tracking also means that if the app is started with any lock already changed, the Toolkit's state won't match the keyboard (it assumes all locks are in their normal off states, except numlock which it assumes is always on). If you know of a better cross-platform way to track these, let me know
can't node query the OS for this info directly
Sadly no, not that I could find
or provide a callback for the event when the state changes
weird
that's disappointing if true
Couldn't even find a Node module for querying anything about caps/scroll/numlock states
I see a keyboard.isCapsLock() in the example
given that it's 5 years old I wonder if it still works
Watching the analog should be fine, as it uses the same actuation point setting as the user has set in their profile. But race conditions and such between the keyboard's firmware and the output of the analog API can mean the firmware saw the capslock key pressed far enough while the API didn't. Forgot to mention, semi-related, that the Toolkit only updates internal states when the profile has digital keys enabled and like the keyboard's firmware, doesn't turn off lock keys in profiles that have digital keys disabled
Yeah, that's specifically Windows though. I'd need something cross-platform
oh right
well sad that webjs has a function to qiery modifiers while nodejs doesnt
best would be to build some universal external tool that outputs true or false to stdout and just get that with the nodejs process
That's a lot of effort. I'm not a Windows or Mac dev, so wouldn't know where to start. Either way I'd have to stick to the analog watching approach for fn lock and winkey lock at the very least 'cause they're in the keyboard itself
Just did some playing with the analog API and AHK, and I think maybe that previous reports some people made of "delayed" API input was erroneous
My guess as to what they were seeing was that sometimes a hook hotkey may fire before something using the analog API, if you are eg polling the API in a 10ms loop
initially I was sometimes seeing large "delays", but it turned out to be instances where the AHK hotkey fired before the analog API, and the benchmarking code was comparing to the last time the key was pressed, not the current time
microsoft is seriously getting p dope
idk what happened but for some reason they get more and more into open sourcing shit
and even a marketing video for it 
That is sick
Microsoft is doing an amazing job lately
React native for Windows too
Seems like react native has a very bright future
microsoft is cool again
@hybrid lake say that to my lost files form the windows update
or the bricked pcs' because of av software
or the people whoi failed to update because they have a usb plugged into their machine
microsoft is still not cool
They make something right and another thing false, so they become better because at least they don't do all things in a bad way. 😃
The terminal support tabs??? Never see it in action. How does it work and look like?
And the .NET stuff seems neat, can't wait for all websites to load .NET for even more memory usage..
m8 webassembly is were its at
@hearty yacht u see ure flaming on this onr product they are most known for but if u look into their github account they have a shit ton of repos of awesomeness
this is loke hating on pewdiepie for the few times he fucked up big time but never mentioning that he donated millions to charity
not saying that m$ and pewdiepie never did wrong but always just blaming them for 1 or 2 products/things they did wrong is not ok
Yes it's that fancy WASM thing
But oh well, guess not having to write JS requires sacrifice 😃
Did someone else had the problem that the LED handling breaks after sending a command to the keyboard?
I use this to change the current profile and apply its colour, but every single command kills the LED handling so I have to replug the keyboard so it can work again.
wooting_usb_send_feature(0x20, 0, 0, 0, 0); //
wooting_usb_send_feature(0x17, 0, 0, 0, 2); // ActivateProfile (use analog profile 2)
wooting_usb_send_feature(0x07, 0, 0, 0, 2); // LoadRgbProfile (use colour from analog profile 2)
Normally it should work just fine and it did before (a few weeks ago) but now it don't. Even if I only use one command of them the keyboard don't changes the colours even by changing the profiles with the shortcuts.
Never mind... I forgot that the Tachyon mode is active. But it's still strange and should work.
I was to fast, even with Tachyon disabled the LED don't work after applying the commands.
idk yesterday it worked for me when using the profile detector thingy
only crapped itself when closing cause no disconnect call
@quiet root he stopped working on it
uh....
i shall not disclose the things i know then
ill only say itll become way better soon
Nah, tiny basically has all rights to it XD I'm only going to make what he does prettier
Joint ownership 😜
If I sued him, there would be noone to update the code XD I have too many things happening 😂
Hmm... has anyone profiled how fast writes to the keyboard are? I'm seeing 7-15ms per array buffer write (averaging ~12ms/ea), for a total of 50-60ms per full keyboard refresh
I found the problem with my code, due to some test that I have done before I changed the command and don't update the comment and forgot about it. Shame on me... 😦
does anyone know if the wooting uuids are all uuid v4 values?
like it looks like idk what uuid version
The Wooting itself don't have a UUID.
the profiles i mean
Ahh, so I can't tell.
e97c2524-c7d3-c3c1-0148-8df1735dee09
this for example follows no uuid format
at all
which is what confuses me
really confused cause in the minfied source it calls a function Bi() which i cant even find anywhere else in code
usually a uuid follorws the format xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx
where M is the version (so a number from 1 to 5 currently) and N's 3 most significant bits should be the variant iirc
so either 8, 9, A or B
and thats all defined by rfc spec btw
so idk what weird generator the wootility uses
maybe @hybrid lake can shed light onto this
At first we used this one: https://www.npmjs.com/package/guid
But then they deprecated it and now we use this one: https://www.npmjs.com/package/uuid
We used V4 on both I think
It was made a long long time ago
ew the guid module
ok but at least it explains why the older GUIDs dont follow any spec thanks
On https://wooting.io/wootingone the "Analog input keys" link to "learn more" is broken (someone literally just forgot the // at the beginning of the href tag)
! Thanks
np
@hybrid lake I'm not familiar with JS, so this code is maybe not 100% correct and it's just a quick brainfuck from me...
It should fix the missed key events for the pressed keys in the Wootility. It seems to work on a normal browser, but I can't test it in the Wootility direct.
// The element for the output
const log = document.getElementById('log');
var keys = {}; // Holds all the key states
var lock = false; // Semaphore to lock the function
var change = false; // Indication if a possibile change was happen during execution
// Catch the keypresses
window.onkeydown = function(e) { keys[e.code] = true; logPrintKeys(); }
window.onkeyup = function(e) { keys[e.code] = false; logPrintKeys(); }
// Logging the pressed keys to the output element
async function logPrintKeys() {
var pressedKeys = "";
// Allow only one active instance
if (true == lock) {
// Mark that a possible change is occured
change = true;
// Let the main instance do the work
return;
}
// Lock the function
lock = true;
// Handle every possibile additional change after the main instance has already started
do {
// Reset everything
change = false;
pressedKeys = "";
// Only add the current pressed keys
for (var key in keys) {
if (keys[key] == true) {
pressedKeys += key + " ";
}
}
// Print out the pressed keys
log.innerText = pressedKeys;
}
while (true == change);
// Unlock the function
lock = false;
}
So what happens when it misses? I saw your other message and it doesn't involve a delay, it sets a timeout
Meaning it will execute that function after a delay
So too fast presses it might miss the keyup event right?
Nvm, I see what happens
The up handling is delayed, so if there's a down in between it will just get removed again
or const but when in doubt, let is simpler.
na u use const when u know.ure not reassigning the value of the var
?
common knowledge
const whenever u dont reassign the value
let for everything else
and var only if u really really need it and know what ure doing
I mean using const if you dont reassign the value is something you hear in the first 5 lections of C++
Yeah probably, although the let and var thing was new to me, seems like let is the way to go because var has braindamaged scoping
@fathom garnet not like it's going to let you compile it anyways 

@balmy iron exactly and many dont know about the scoping part
and then they wonder why shit breaks if the put a var in an if and try to use the same var outside and the value is some garbage they dont expect
thats why u only use var if u actually know what ure doing
var if function scoped no matter in what block it is inside the function
let is block scoped and can only be accessed in deeper blocks
@hybrid lake Why do you have an additional CRC checking on the configuration & RGB interface? Because this interface is based on an interrupt endpoint, so the error checking is already done by the controller. As far as I know only on an isochronous endpoint a custom error handling should be done.
The original USB interfaces were not done by me, so I'm not a 100% sure. I think it's because the guy that did it has an embedded background, where it's normal practice
I think we'll remove it at some point
Yo, is anyone aware of a way to figure out the mapping the OS uses to translate the keyboard HID keys to the locale based keycode/scancode?
I've tried VkKeyScanExA, GetKeyNameTextW and MapVirtualKeyA but none of them work for me for getting the locale based key for the code I give
i.e. I'm looking for something that'll allow me to make a mapping from HID Q -> Keycode A in the French layout.
In theory I guess it works something like this.
You have the key code, you need to get the current locale layout which is set in the OS and make your own mapping for the character you want.
You don't have an locale scan code, the scan code is universal, you only have an different key for it depending on the locale settings.
I don't know if there are some specific reserved scan codes for some keys or how it's handled for the nKRO keyboard interfaces.
But for last one I guess it works the same, so the key naming for the bits are just an representing for the standard layout names.
Hmmmm
Hmmmmm
El Hmmmm
What I'm trying to do is to be able to be given the key that inputs Q, and get the HID code that would've sent that
As Q can't just be always mapped to the location of Q on the standard layout, as it depends on the locale setting
So if you're using a french layout, pressing Q is the A key on the standard layout, which is what I'm trying to find, so I need some way of getting which physical key has to be pressed to get a particular input
But I'm struggling to find anything that can help with this
At least for windows
Okay, looks like I've found something. For those curious, using MapVirtualKeyEx(key, MapvkVkToVsc, layout), with layout obtained from GetKeyboardLayout, it seems to do the job for getting the scan code pointing to the physical key that input that key
I don't know there you are, like the language, which libraries you use and what the function is.
I would expect if you have a function which returns a scan code for the current pressed keys, that these are the scancodes from the keyboard which are send over USB, like before the locale thing is applied. If you get a key character it's most likely that the locale is applied.
If you want to get the scancode out of a pressed key you can create a reverse map for the locale.
Yeah, what I've found should allow me to find out what HID/USB keycode the keyboard sent to the OS to produce the particular VirtualKey
The scan codes aren't identical to the HID ones, but it's easy to make a mapping between them
Anyone who uses the Analog SDK, do you use the read_full_buffer function, if so, for what purpose?
@placid ledge I have been doing some work in this area, see https://github.com/evilC/WootingAHK/blob/master/WootingAHK/WootingCodeLookup.cs
I don't use the read_full_buffer tho
That code attempts to translate wooting row/column to ScanCode
There's also code in that project which should in theory be able to get localized key name from ScanCode
Cool, thanks
If you want I can send you the code snippet I've got which can translate the Windows VirtualKey to the scan code independent of locale
If you didn't see, I'm redesiging the Analog SDK, so if you've got anything you want to see lemme know
The code snippet I mentioned I've got should solve the locale issues I think, at least for Windows. WIll take a bit more work for other platforms
Hey everyone, I've made an issue over on the Analog SDK repo with the proposed SDK design. All feedback is appreciated! https://github.com/WootingKb/wooting-analog-sdk/issues/15
good guess, this is looking solid
not familiar with rust so I like still having other options to use it, while it will use the most efficient language
It's not looking to me that it will support multiple keyboards yet or how would you handle it?
I'm confused how you want to identify the keys, by scan code or by a charachter?
There???
I don't see such a paragraph.
@chilly oar Multiple devices are able to be connected with this design, but you wouldn't be able to interface with them individually
You wrote about key code, scan code and character. The key code is bad because it only rely on the manufactor. Normally the OS identifys a key on the keyboard by the scan code (6KRO) or the HID keyboard usage definition (nKRO) which I refer here as scan code too. So you don't really need to look up for the key for a character at all, because you have access to the key. So you only need to get the character for a scan code to display the key for the binding, so only for UI.
The problem is that games mostly rely on the abstraction layer of the OS, so they normally use characters instead of scan codes. So do you want to use scan code or characters to differ keys, or both?
How you want to handle and differ multiple keyboards? There should be an option to address them.
For identifying the keys it's HID code by default
So please add the support for multiple simultaneous keyboards.
Also, it'd be cool if you post on the issue as well so your thoughts on the matter don't get lost to the discord history
With what you're talking about with the keycodes is what I discussed in the "Differing keyboard layouts" section if I understand what you're saying correctly
And have a look at the 'keycode' enum in the 'Proposed API' section
For the multiple simultaneous keyboards, are you talking about if you wanted to inteface with multiple different Wooting Ones(for example) individually?
I think that could probably be solved by having an optional parameter to the read function which is the device id and include device id in the device info struct?
You need to add an identification value. So the first point is the serial number value from the USB enumeration (for the Wooting the serial number WOOT_00X_SERIAL_A-XXX), then or as an alternate an individual differentiation by the manucfactor (like the serial number from the API or the firmware version so a differentiation can be done by some characteristics on the device) and by last at the ID (position) at the eneration.
Multiple Wooting and other keyboards mixed up.
Okay, I think I see what you're on about. You're saying you'd want to see any of those as an option to indentify the device you want to directly interface with?
There should be an identification value on the struct device_info, so the plugin can / has to provide it. I don't really know how you would handle multiple ABI at once or multilpe access to it. But for the current SDK I would add the keyboard handle to every function.
Okay, sounds good
Did the bit I said related to the keycodes sound about right or is there a bit more that I'm not getting from what you said?
And would read_analog & read_full_buffer be enough for adding the keyboard handle param? or would you want it on other functions/how would you want it to work on those?
For the current SDK I thought about a function which gives me all the serial numbers from the USB information (hidapi is capable of it). Then I changed the connection function so it returns the keyboard handle. So I call every function with the handle for the keyboard I want so use.
The whole stuff can still be complicated to understand... I think the best thing is to make more diagrams on the meta layer how things should work and which are the goals.
Personally I would love to see an API like DirectInput. So you can see which controller is connected and that the capability of them are, like the precision, the range and number of keys.
Right now I don't rely know how the link looks like. I assume the SDK looks at a special possition on the RAM.
And which module runs at which time? How are the plugins loaded and which module should be loaded at whcih time?
Even the term key code is different depending about the current scope. So a defination is necessary in my opinion.
For me the key code is the number / identification on the Wooting keyboard for the key. The scan code is the universal code for every keyboard the same.
That's a good point including the capabilities of the devices in the device information. If you seen the wee comment I made on the struct definition it should be easy enough to add more information to the struct, so we can add that kinda information without breaking anything down the line
The wrapper loads the sdk from the system and the sdk loads the plugins when it's initialized
Yeah the keycode term can mean so many things. As I mentioned in the post and earlier the HID usage keys are the way to interact with it, and you can see the other sets that I mentioned which are all universal ones and not specific to wooting
With the basic proof of concept I've written already I'm using a different firmware version which reports the codes as HID usage codes rather than that specific wooting scan code set which it was before
Something else you should consider is how a single keyboard might control multiple applications cleanly. For example, it would be useful to be able to query the keyboard for the currently selected keyboard "profile". This would allow a user to be able to control one application while using "Profile 1" and control another application with the same analog keys while using "Profile 2" for example.
This should be done in the Plugin in some way and transparent to the SDK.
Hmmmm, that's a good point. It'd definitely be worthwhile to have the profiles interact with the SDK in some way
Off the top of my head, I think it could potentially be done nicely by having the intialize function include or get the process name, and the plugin can use that to switch to a profile that is linked to that name potentially?
Considering the fact that the Profiles are not likely to be always supported by the hardware, I'll have to have a think about how it could be integrated nicely into the SDK
It's also important to consider the fact that at the moment, the profiles don't change anything for the analog information given by the keyboard atm (afaik)
What I was thinking was some value that the SDK can manage like "slot" or "profile" so that it would be possible to hide the analog values from applications that may want to share the keyboard. Hypothetically, let's say I am a Power user that uses CAD and Photoshop and I need to use both software at the same time. I want to use WASD to manipulate a 3D object and I want to use W/S to change the brush size in Photoshop. But, I also want to use WASD as normal digital key presses. The user is likely going to need to control when they are using WASD for analog functions or for digital functions manually because it would be difficult for each application to know the intent of the user. This is currently done by profile switching on the keyboard. If this information is communicated to the SDK then the application can be informed that the device is using "slot" 0 and to ignore any analog values, but as soon as the device is using "slot" 1 it will read in the analog values and control what the application has been configured for. Likewise, having this type of value would prevent interaction in other applications. Unless the SDK is going to only send analog values to the currently active application (which could be a good thing or a bad thing for some users), then you could run into situations where two applications are up on two monitors and the user presses the analog "W" key and it simultaneously manipulates two things in both applications at the same time. However, if the user controls the active profile then application 1 would only respond to analog values if the SDK is configured with "slot" 1 and application 2 would only respond to analog values if the SDK is configured with "slot" 2. I can see this type of scenario being used with music applications and video editing applications used at the same time for example.
I understand the usecase you're describing here, but I don't think it necessarily makes sense for this to be the SDK's job. As theoretically we're talking about something which doesn't apply unanimously to all keyboards (as this SDK is for all analog keyboards, not just Wooting). So I think that it is something that should either be handled by the keyboards software, switching profile when a certain application is in the foreground, or, which might actually make a bit more sense, it's handled by the Application itself. Presumably you're going to be configuring how the analog keyboard works in the particular application, inside that application, as it is the one that integrates the SDK, so it is the one where you configure how it acts for that specific application, rather than switching keyboard profiles
I think a scope handling to differ multiple access to the SDK should be a part of the SDK, the question is in which way.
So what should happen if multiple (different) application are using the SDK? Should only one program at the time have access to the inputs (the current active one) or all? Should it be possible that a program can claim a dedicated unique access, so it can get inputs alone even if another program is active and want access too?
I can't think of a reason why you'd want to have a dedicated unique access for the SDK. Why would you want to prevent access by other applications? For multiple access, theoretically it should just work fine as all that's being done is reading the usb usage report, Jeroen said he tested it on the existing SDK and multiple apps could access without an issue.
I won't, I just ask for which circumstances you are prepared off and how you would handle it.
But yes a unique access isn't normally a good behaviour and the application should handle on its own if its want to register inputs even if it's not active.
It should not be required for the hardware to use profiles, but I think the SDK should be able to provide this information to an application if the hardware provides this information to the plugin. All the analog keyboards on the market now support hardware profiles. If future analog keyboards don't, then just pass a "0"to the application. Look at the MIDI standard for reference. A single hardware device can provide multiple unique "analog" values provided by the same knob or dial of the hardware to different applications using "channels"
What is the thing you actually want to achieve with the hardware profiles though? All the keyboards may support them, but what they do on the different keyboards may not necessarily be the same. Right now the profiles don't change the behaviour of the Analog SDK at all. given te fact that the keyboard profiles may work differently, wouldn't it make sense for any profile/application specific configuration you want, to be done on the application side so that the behaviour is consistent across all analog keyboards?
What I'm proposing is that you provide a way in the SDK to help applications be aware of what is happening at the hardware/plugin level so that unintended actions don't happen in applications. I'm not proposing that hardware profiles change the behavior of the Analog SDK. I'm proposing that in addition to the analog data you also send some kind of profile/channel/slot indicator to the Analog SDK wrapper. This way, the Analog SDK wrapper can be configured so that if it receives analog data it can determine if the application uses or ignores the analog data. For simplicity let's just say the users presses "W" 75% of the way down generating a .750 value for the "W" key. There are two applications that are configured to process this "Analog W" signal and both are currently running. Does the user want this action to make a change in Application 1, in Application 2, or both, or maybe they really just want to send a "W" key press? How can we determine user intent? By adding a "channel" value it at least gets close to understanding the intent. For example a channel value of "0" could mean both applications would process this change. If the "channel" was "1" then only application 1 will process this change, and if it is "2" only application 2 will process the change, and if it is value 255 then the analog value would not be processed by any applications and would instead just send the "W" key press to the OS. The user could control this through hardware profile changes themselves, or the plugin could be configured to monitor which application is "active" and send this information to the SDK to be passed through to the appropriate application.
Shouldn't the application reacting to the input be completely based on whether the application is focused or not? When would an application in the background be using it? And if it needs to use it then it can use it, if it doesn't then it can just use it when it is in the foreground. If we were to pass this 'channel' information, how would the application know how to react to which number? Configuration in the application? If that's the case, why doesn't the application just configure itself to handle it whether it is the in the foreground or not? That's how input is usually handled, background applications don't normally get key presses unless they go out of their way to get them.
You're going to need to give me a real world use case which wouldn't be achieved nicely through the existing design for me to understand the necessity for something like this
The descibed channel isn't a good thing in my mind too, but to provide the current profile like descibed at first maybe not. But I can't think of a big feature so this should be a must have to implement.
If an application registered with the Analog SDK to receive key events, it should decide itself whether to process them if/when they happen
I don't really see the need for profiles at an SDK level
However, saying that, I do see a use-case for there to be some link between the analog SDK and digital key events. eg it would be cool if the analog SDK could be instructed to block the digital version of the key
Or at least for there to be a digital SDK that understands same keycodes as analog SDK
So eg if writing a remapping app using the SDK, the remapping app can decide "Analog mode for W key is on, so I want to suppress the digital version of the W key so the game does not see it"
You should be able to easily toggle it on and off tho, so eg if the user opens a chat box, you want to re-enable digital W so they can type
Hmmm, that sounds like something that could just be done on the application side, if it is reading analog input for keys it shouldn't be reacting to the digital version of that key
I don't think to disable the digital keys via the SDK it a good thing at all. It would take away the control from the user that don't like. You can't make sure that every application takes care of it in a good way. The user should decide if he wants to enable the digital keys on the keyboard or not (like by choosing a profile regardless if it's set manually or via an automated profile loader). So even if the game only uses the analog values, the OS should handle the digital keys in the background after all, as long as the user has enabled them.
So I think the game should handle the analog values independent fom the digital ones, like some games do it today with the Xbox controller. To have a different binding set for digital keys and analog keys, there only the bindings for one of them are active / used for the input at the same time. So as long as the app registers the last command as analog, even if there was a digital key send or not, it should still using the analog set. But if there was a digital key registered without the analog value, the game should change the mode. Like the games there you can't use a Xbox controller side by side with a mouse. It would not be a problem to forget or handle the inputs wrong between a change of the input modes.
Even in the analog set, the app should have no problem to handle typing, because if the game registers the chat key it can activate the digital keys from the OS again or handle it via the analog value itself.
Was analog SDK changed in a breaking fashion?
I received reports that GInput Wooting stopped working ¯_(ツ)_/¯
Analog SDK hasn't been changed yet
@lofty thistle The firmware was changed, it now expose the serial number via the USB device describtor. But this shouldn't break anything.
Because of that there are now two different sets of device informations in the Registry, but this should not break anything either.
Good to know - I don't own the keyboard so I can't test it, just relaying the info I got
So as long as you didn't have changed the SDK, it should be fine.
??? As long as Wooting don't changes the firmware in a way which breaks the current SDK it doesn't matter that there will be a completely different version comming.
So now you will do...
It was wrong and I pointed it out. So you are welcome 😀
Play nice children
😢
Whether Russian layout is possible on this keyboard?
If you're just switching keycaps then yes.... Other than that I have no idea what a "Russian layout"
Also I think this is the wrong channel for that type of question
also asked in like 4 channels
But he ignored the right one (question_answers).
Excuse if strongly disturbed someone)
@chilly oar The firmware will be changed in a breaking way (for the old sdk) for the new sdk, as it needs a slightly different analog report
@placid ledge The change on the SDK which breaks it was long time ago and Silent should only has used the newer verson, because at the time the code challenge was on, the SDK was already changed.
If I'm right the reason was because the usage (page) number was changed. It used a reserved number, like the configuration interface still do.
Well, all I'm saying is that the firmware is going to change in the future for the new sdk, I don't know what the story is with Silent's situation
Now it uses the order of the interfaces and no usage number, so it works with both versions.
Maybe, we will see...
To be honest, I don't really see a reason why the firmware should be changed for the new SDK. The current SDK will just become the plugin for it. The Wooting uses it's own index for the keys, so I don't see any problem.
I don't really think to change the index to a scan code is really better, because the index for it should be distinct anyway and not rely on the binding of the keys at all.
Also this is probably the best place to ask it evenif not directly related, in order for Aurora SDK to work Aurora app needs to be installed?
or the SDK also wraps to other vendors so eg. having only Logitech Gaming Software installed it'd still work?
is there a way to add custom RGB fx that will show up in the wootility?
seems unlikely but thought I'd ask
not in the wootility directly but you can use the sdk to make your own rgb effects
yeah I guess I'll go with that approach
there are already some ways to use the aurora project simon made to, maybe thats enough for what you want
I looked at it briefly but it seemed designed for infrequently changing color layouts for games
but I should look again
is there an ETA on a wooting two-compatible version of the SDKs? i was able to get them to work decently by changing the PID and rebuilding, but there are some slight issues (in particular, RGB seems unable to set the colors of the "extra" keys)
@glossy dagger in aurora we're using this and afaik it works pretty well https://github.com/WootingKb/wooting-rgb-sdk/pull/10
Not sure about the analog one though but that's being reworked atm
When I run the basic node example, it is saying "Keyboard not connected" (but it is connected). I tried reconnecting it, and running it with Wootility both opened and closed. Maybe I am missing something
@spare cosmos If you have a W2 I would bet that the dll that you are using can't handle it and only support the W1.
Oh that makes sense. Is the RGB SDK not available yet for W2?
The whole SDK thing will be re-created at the moment.
So, as loong as you don't want to build it by your own you must wait.
There are some folks for the SDK which addresses the W2 connection already.
Just have a look on it:
https://github.com/WootingKb/wooting-analog-sdk
I checked it, the code is updated for using the W2 but you need to build it.
I am using the DLL that I built from https://github.com/WootingKb/wooting-rgb-sdk
So maybe only the analog is updated, but not yet for the RGB
Yes, there isn't the PID included for the W2 in the RGB SDK.
Just change the 0xFF01 to 0xFF02 at https://github.com/WootingKb/wooting-rgb-sdk/blob/d2b5dcc6a45dcb37c66f03bb76cbcfefe0d9a6a4/src/wooting-usb.c#L16
Aha, perfect! Thank you :)
The only thing that isn't working is the last 4 columns (numpad area)
@spare cosmos pretty sure those last columns work if you merge this in https://github.com/WootingKb/wooting-rgb-sdk/pull/10
they do in aurora afaik
Exactly what I needed. Thank you!
👌
We're thinking about setting up a static website generator (i.e. jekyll, hugo) for our help docs, so people can add / edit docs on github. Anybody got some tips about best framework, setup for help docs etc?
Goal is to just have a bunch of markdown files
Maybe this: https://github.com/facebook/docusaurus
Automate building, versioning, and hosting of your technical documentation continuously on Read the Docs.
Can someone help me with analysing USB data with "Microsoft Message Analyzer"? I can only see the logs but not the actual USB data. And unlike the instruction video, I can't expand the fields I want to investigate, because they don't even have the expland symbol on it.
@quiet root Are there any fixed variables in the tool? Or regardless of registered devices it will remove them all.
it will remove the woot devices
well any device that starts with VID_03EB&PID_FF0
this is a quick write up mainly to get the ball rolling in terms of making this troubleshooting option easier
still have to test the deleting part
moved here for sake of validation etc
@clear hedge
And @hybrid lake to double check.
i think i brainfarted this
welp am not home anymore
?
TinyVampAFK confirmed 😛 @quiet root
why
im not sure if the only thing im missing was a proc.StartInfo.Verb = "runas";
because devcon tries to remove em but it always fails for some reasob
reason*
anyway i can work on this in 3 weeks or so when im back home
maybe even making a gui app with multiple troubleshooting buttons
@clear hedge sorry dad
@quiet root I will write the guide up without using that program for now, if thats ok ❤
would be great, so those who arent happy playing with regedit, a program to do it for them would be great 😛
ya
@Devs would it be possible to make a sleep mode app for Wooting?
context: https://discordapp.com/channels/167181566978555904/590898276182523955/611758759248920577
Yes it would be possible, kind of.
Not a real sleep mode but it would be possible to create a program as a service which reduces or disables the backlight LEDs, like when the monitor goes to sleep to.
And of course specific for the OS it's created for. As far as I know you can't register the screen suspend with JavaScript directly, so this feature can't be implemended directly in the Wootility and it would need external utilities to archive this.
https://github.com/WootingKb/wooting-analog-sdk The new Analog SDK is out on an MVP status, would be nice to get some feedback from you guys!
Nice work!
Thanks!
might take a stab at it after devcom/gamescom week is over
it's build with rust? cool, what's the advantage of using rust for an sdk like that?
It's the hot new trendy thing to write everything in because it's ~safe~
compiling rust code takes ages.. but oh well, if it does perform better i won't care too much
just curious if there might be a more specific reason for it
imo rust has: memory safety, pretty fast and isn't a complete mess like c/c++ as it has a consistent, modern, x-plat standard libs
Initial compile for rust projects takes a bit of time, as it has to compile all the dependencies, but any subsequent compiles are pretty speedy
if you work with a package manager this must not hold true (subsequent compiles) as the sourcefiles will get deleted
I was talking more from a dev working on it perspective
but ok, the 'usual' arguments 🙂 I will try to compile it on crux (linux derivat) later today
Noice, let me know how it goes
will do
any plans on including rgb sdk in there at some point? that's what I'm more interested in tbh 🙂
I'm really not a fan of the micropackage trend, adding one dependency and wham your cargo build now pulls in 400 crates yaaayyy
The rgb sdk is intentionally separate as it's for just wooting, whereas the analog sdk is for more than just wooting kbs
for me, that issue is fairly minor compared to the amount of things that rust does better imo
It's not perfect, I've ran into some headaches, but I've found it to be one of the better overall development experiences I've had
so, any plans to rustify the rgb sdk? from what i read on github, it's not really working on linux as of now?
i haven't tried it out yet, tbh
It'd be nice to do the rgb sdk in rust, but it's in need of it's whole own restructuring so the language might end up being whatever makes sense for the setup it ends up in
The rgb sdk should work on linux, I think the main thing was not having makefiles for linux
there was a pull request for that, i would try that approach
Yeah, there's two linux related prs
but i am not sure yet if i have the time to work with it.. i am not skilled anyhow, so this would be novice project at best anyway
exactly
while i like the wootility, i don't like having to use an appimage really. that's why i wanted to try and make something with ruby/gtk3 to control rgb lighting, but who knows how well this could work out
Ah, one thing to note is that wootility saves the kb lighting to the firmware, whereas the rgb sdk just sets them temporarily
ah, haven't thought about that, but for a script solution i think i like that better anyhow
replugging should reboot the board to a known good state, right?
Yeah, afaik
Or if shits real fucked then you can reset it through the steps in wootility
@placid ledge "test result: ok. 0 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out" 😄 but it builds, not the test app though, since I don't have dotnet-core
/tmp/wooting-analog-sdk/target/debug$ ./wooting_analog_sdk-08ee5889b73d9052 | dpaste -> http://dpaste.com/15G3WNY
Ya, there aren't many tests, difficult to do unit tests on something which depends on plugins, and the plugins depend on physical hardware
i see, cool anyway! great work man
Thanks!
@placid ledge hi,when can SDK support Velocity-Sensitive?
Iike this:
Aimpad - Analog Gaming Keyboard Technology https://aimpad.com/
https://thumbs.gfycat.com/VelvetyFirmGallowaycow-mobile.mp4
......
You can control variable MIDI musical devices,
If a low amount of light is reflected we know that the key is at its highest point.
If a higher amount of light is reflected, we know that the key is moving closer to the sensor.
Control the loudness of a note based off how quickly the key is pressed
Thanks alot!
Ultimately, it's up to the device manufacturer to support the SDK, as we don't have access to the inner workings of the device to be able to support it
@placid ledge hello, I have bought a wooting two and I want to play piano music with Velocity-Sensitive on it.
Is Velocity-Sensitive an application or something? I can't find much information about it
Application support isn't really in the scope of the project atm, as we're still working on getting it ready for a full release
Keyboard expression - Wikipedia https://en.wikipedia.org/wiki/Keyboard_expression
and the soft : play piano or other musical instrument with freepiano
Free Piano download | SourceForge.net https://sourceforge.net/projects/freepiano/
download:
FreePiano | Advanced virtual MIDI keyboard https://freepiano.tiwb.com/en/
FreePiano is an opensource software that can let you play music with your computer keyboard.
Please download it and try playing with wooting two an wooting two lekker.
Just think of it as a music game.
Each key is required to support analog input for the sound sources .
Keyboard expression is the ability of a keyboard musical instrument to respond to change tone or other qualities of the sound in response to velocity, pressure or other variations in how the performer depresses the keys of the musical keyboard. Expression types include:
Velo...
@old reef There are a few (proof of concept) projects out there for the Wooting keyboards (maybe the W2 isn't supported for all) to control MIDI with the old SDK.
https://dev.wooting.io/spotlight/woot-midi-mania-by-yoshihiro/
https://dev.wooting.io/spotlight/wooting-piano-by-microdee/
Someone needs to create a project to use the analog signal of a Wooting and convert it to a common MIDI command, if you want to use the Wooting for music programs.
@chilly oar free piano is an opensource software that can let you play pinao or other musical instruments with your computer keyboard.
we just need to know the speed of the key-press :
The piano, being velocity-sensitive, responds to the speed of the key-press in how fast the hammers strike the strings, which in turn changes the tone and volume of the sound. Several piano predecessors, such as the harpsichord, were not velocity-sensitive like the piano. Some confuse pressure-sensitive with velocity-sensitive. To avoid this confusion, pressure sensitivity is often, perhaps usually, called aftertouch. The MIDI standard supports both velocity and aftertouch.
In general, only high-end electronic keyboards implement true pressure sensitivity, while most professional-quality electronic keyboards support velocity sensitivity. Most inexpensive electronic keyboards, such as toy electronic keyboards and basic learning keyboards manufactured by Casio and Yamaha in the US$100 price range, do not have velocity sensitivity, but instead a manually-adjusted note volume.
@old reef I can't do anything with this information and I don't even care. I don't thing the analog values from a W1 and W2 is good enough to use it for this kind of purpose. It would be just a gimmik but without any real world value I guess. The analog range is only from 1.5 up to 3.6 mm, which isn't optimal for it. Maybe it's different with the Lekker edition.
With a precise analog value together with the time it should be possible to emulate both velocity and aftertouch. But I guess to create a good emulation your knowlegde of coding and music making must be good. So I think it's unlikely that Wooting will come up with a MIDI support anytime soon nor a community member.
Videos, Play music with keyboard :
we need every key to suport velocity-sensitive.
it just needs to konw the time from 3.6mm-1.5mm,when you press a key.
https://www.bilibili.com/video/av59241788?from=search&seid=12334673118849138525
https://www.bilibili.com/video/av26913503
Is there a way I can custom the wooting firmware or change the register values etc?
take things out I don't need or add things I want
I mean is wooting f/w open source or proprietary atm?
Shame. I Would be very interested to learn to program firmware and pull out things I dont need and try to optimize it for latency
https://github.com/WootingKb/wooting-analog-sdk/releases/tag/v0.1.0
https://github.com/WootingKb/wooting-analog-plugin/releases/tag/v0.1.0
There are now installers for the new Analog SDK and required Wooting plugin if you want to get stuck in!
To get started, install both the SDK & Plugin and get the SDK tar for your platform and use the wrapper library & headers included to start developing with the Analog SDK!
The APIs aren't final, so don't be surprised if breaking changes are made before the full v1.0.0 release. However, I don't see the API changing drastically atm unless we get some feedback that require some breaking changes
If you care about the design & future of the Analog SDK, this is the best time to get stuck in as we're currently in a position where big changes can be made. Once v1.0.0 comes out, it'll be harder to make substantial design or API changes
I'm here to help out or answer any questions,
ohai, can I get beta access to the wootility so I can get the latest firmware?
#archived_wootility_beta_feedback check the pin
Thanks
Beta firmware seems like it is much faster. Is the inclusion of 2 bytes per key code an indicator of future products? ^^
I mean.. #archived_the_lekker_switch
The analog protocol coming from the newest firmware uses two bytes per keycode instead of the old single byte, indicating there might be more than 256 keys or analog input sources. Will the Lekker have that many?
@meager seal I'm writing an SDK in C.
The rust interop doesn't work for my project, violates some guarantees that need to be met.
So I'm writing an HID wrapper myself.
I mean given that you have a longer range with the lekker switch I don't know how else you'd cover that aside from increasing the ammount of data transfered
What do you mean longer range?

The lekker switches will have a cleaner signal but it looks like they still only report 8 bits worth of analog information.
well the lekker switch starts earlier than the flaretech switch, which starts at 1.4 mm (or 1.5 or so idk)
where the lekker switch can start at 0.1mm
Yeah that's very neat
However still not addressing the 2 bytes 😅
two bytes per key code, one byte for the analog value
which is the same as the old firmware but means that Wooting suspects there will be more than 256 different key codes potentially.
@hybrid lake probably best to just ask him directly before we speculate as I obviously also dont know for sure
Does the lekker have that many keys? o-o
v strange. would be really cool if they were pulling a fast one and were just reserving the byte for a higher accuracy with the lekker switches. If you got 16 bits of analog information that'd be really impressive.
would already help with small thing like not needing a perfect button press to gain 100% value but still maintain a nice curve etc.
For other uses of a keyboard it would make a lot of sense. For gaming, you're probably right.
It's 2 bytes because the first 255 values are for HID USB key codes, anything above it is for keycodes for keys not defined in the spec, like fn key, mode key, etc
How were they handled before then @placid ledge? I noticed the codes changed entirely, too (e.g. ESC was 0 in the older firmware)
Were those proprietary?
Before It was using a scan code enum which had no relevance to anything else
@blissful willow What are the guarantees that the sdk doesn't have which you need?
@placid ledge No disk access - the plugin system isn't necessary for this project and we don't want to support it.
I'm curious what this project is where this is the case
Mainly just want direct access without loading arbitrary binaries as it would be a vector for malware or hacks.
Right now, the SDK blindly dlopen()'s any so/dylib in the given folder, which we view as a security concern.
Well, it doesn't necessarily need to remain like that
Sure, of course
However we tried to shim the rust build into our own build system and cargo was causing issues (as cargo does..) so we decided to wrap the libusb fork of hidapi and pull the analog values ourselves 🙂
Since it appears the latest version of rust's hidapi uses an older fork, too.
I think they may have updated the hidapi-rs to use the libusb fork
Hmm, maybe not actually, just checked and must've been the issue that was opened about it that gave me that impression
Don't think it has been done yet
https://github.com/ruabmbua/hidapi-rs/tree/master/etc nope still uses signal11's.
Yeah :/
now I am curious as to what you are making, since it doesn't seem to be a small personal thing if you care about attack vectors
..are you by any chance developing that with one other dev and are currently not finding artists for the project?
I have another dev (kind of) but we don't need artists, no.
you dont need any or you couldnt find any? because I know someone who is(was) making an mmo with someone else and couldn't find artists for the project lmao
Don't need them haha - probably wasn't me ^^
okay just wondering because that would've been funny 
Every dev is always looking for artists 🙄 bane of development.
2 things:
With the attack vector stuff, that is a fairly genuine concern and implies a problem that needs fixed in the sdk
You shouldn't have needed to shim the rust build into yours, all you need to use is the prebuilt wrapper dll
You're not going to be the only one who has that concern, so it's something that will need to be dealt with in the sdk
@blissful willow
Yeah, especially since there's no standard place to install them and right now it appears that a user-accessible directory is the default, which means little chance of blocking a user-land script from dropping a .so file into a directory under ~
Do you think having the SDK & plugins being installed in Program Files (on Windows) for example, would help? And making sure plugins are only loaded from root/admin paths?
The latter is more important.
I don't remember if on windows whether or not Program Files is locked down or requires admin privileges.
But e.g. VSTs for audio development have a specified place where they are located
Yep, looks like it: C:\Program Files\VSTPlugins is the standard VST directory where plugins are installed.
Would make sense to put them in C:\Program Files\AnalogInputPlugins on Windows, /Library/AnalogInputPlugins on MacOS and there can be a number of places where they live on Linux, depending on the system. Most likely somewhere under /usr/local/share
With potentially the exception of Windows, the other two require admin privileges in most cases - especially for end users.
Yeah, that sounds like a good idea
I'll sort that out tomorrow
If that's sorted would you use the SDK?
I'd reconsider it. Still makes things hard to build. We pin submodules with git and like to build ourselves to prevent surprises. Not critical but it'd be one more thing to integrate cargo.
With the architecture of the SDK all you need is the wrapper, which should be updated manually. I don't think you need to do a submodule
for this particular case
The wrapper is still a static lib that needs to be built though. Unfortunately cross platform builds aren't really possible and we don't like keeping binary assets checked in.
Hmmmm, okay. If you try getting it building, make sure you only build the wrapper rather than the entire thing
Let me know if you need any help or if you have any further thoughts, as I am making the SDK for devs like you, so would like to make it as good as possible
@blissful willow In the dev branch I've made it only load from sub directories of Program Files\WootingAnalogPlugins, /usr/local/share/WootingAnalogPlugins and /Library/WootingAnalogPlugins
When to expect an SDK update for the Wooting two?
I tried to changed the productid in the sdk to the wooting two pid, but had no success. wooting_rgb_kbd_connected still returns 0. There seems to be more low level changes I have no idea about
@prisma night https://github.com/WootingKb/wooting-rgb-sdk/pull/10
oh thanks, I totally overlooked that pr
Dear Devs, can anyone look into this issue:
@upbeat citrus I don't think it's an Aurora problem at all. Wooting can't even help you with that, because Aurora has nothing to do with Wooting, so they can't gave support for it officially.
If you really mean shutdown and not a standby or suspend it's because that the Wooting missed the sleep command and your BIOS is set to still provide Power on USB after a shutdown.
I'll try that
@upbeat citrus it's definitely an issue with aurora as I said in the gh issue. If I stop the wooting integration manually the lights turn off fine
It happens becaus Aurora doesn't close the hid connection properly before shutting down
On other devices it's not really a problem because most of them have the manufacturer's software making the actual connection and aurora just connects to that
But he must still has enable the USB power, because otherwise the mainboard would just unnpower everything included the Wooting.
After a quick glance on my BIOS, no option for Power on USB to be found.
Normally the mainboard should power off the whole system.
So if your system don't power off everything it's an option in the BIOS and I don't think this option is missing on your BIOS.
I didn't realize the bios was supposed to power off everything. I'll see if mine has that
It's an option to still provide power to USB device even when the PC is fully off.
Like Deep Power Off. Maybe is something like a Win quick start (standby mode, energy saving mode) so the PC isn't even turned off.
Maybe he needs to update the BIOS.
But either way, in some way or another the OS should tell the devices that Windows is shutting down, so the devices can enter sleep mode. I know there are still some problem related to the sleep mode with the Wooting which aren't fully fixed.
Hey all, looking to use Lekker switches for a project. Was there ever any published documentation on the hardware implementation of the Lekker switch?
I know they're like not out yet but still
Thanks
hello, i want to run the node basic-example.js from the https://dev.wooting.io/wooting-analog-sdk-guide/reading-analog-value-in-node/ tutorial, but everytime I launch it I get this error message :"Error: Cannot find module 'ffi'"
did u run npm install
it returns an error, i am looking at it
give the error
this : gyp ERR! build error
gyp ERR! stack Error: C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\MSBuild.exe failed with exit code: 1
gyp ERR! stack at ChildProcess.onExit (C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\lib\build.js:262:23)
gyp ERR! stack at ChildProcess.emit (events.js:198:13)
gyp ERR! stack at Process.ChildProcess._handle.onexit (internal/child_process.js:248:12)
gyp ERR! System Windows_NT 10.0.18362
gyp ERR! command "C:\Program Files\nodejs\node.exe" "C:\Program Files\nodejs\node_modules\npm\node_modules\node-gyp\bin\node-gyp.js" "rebuild"
gyp ERR! cwd C:\Users\M8\Documents\Wooting_ReadValue\wooting-analog-example\node_modules\ffi
gyp ERR! node -v v10.16.3
gyp ERR! node-gyp -v v3.8.0
gyp ERR! not ok
npm WARN wooting-analog-example@1.0.0 No repository field.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! ffi@2.2.0 install: node-gyp rebuild
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the ffi@2.2.0 install script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\M8\AppData\Roaming\npm-cache_logs\2019-10-03T21_18_14_123Z-debug.log
send the entire error log
yes
1moment
pasting trhe file to not drown the text channel into unnecesairy stuff
im not great at typing
do you have python 2.7 installed?
then python is not in path
f
add it to ur path variable
where did u install python to
standard location
this is startiong to go hacker-like lmao
as i have my windows in french i can't find the first one
nevermind found it
just returns an empty line
did u edit it yet
hey folks, can anyone tell me if keystrokes are sent on actuation or release on the wooting keyboard? i'm trying to do some input latency testing (software side) using my wooting one
i don't see the RGB effect occur until key release, would like to know if RGB lights up at the same time input is sent from keyboard to PC, so that i can use that as a marker for when input is sent
wha
i'm trying to use the wooting keyboard to determine software side input latency
we have a 1000fps camera to measure from RGB activation to when action occurs on screen
but i'm not sure if input is sent from the keyboard on key press or key release
"we have a 1000fps" -whoa
the RGB effect doesn't appear to pop until key release, but i don't know if that's the moment the input is being sent by the keyboard
(it's actually just a Sony Cybershot mk.IV, it has a 1000fps capture mode for ~2s captures
you can use DKS to get the input when you want, so you could have it be either way
the input is sent on key down
^
standard digital is key down
and key up
cause windows has both events
its software dependant on if they react on key down or key up
Without knowing anything about Wooting's special sauce, standard HID should just send the state. There's no "Key down" or "key up"; just when the key is polled "What state is the key currently at?"
well that'll be fun trying to figure out who here in my office knows which we use, haha
yes so key down is when its pressed which it is once it passes actuation point
and its released when it passed it again from the otherside (going up)
Once it passes the actuation point and gets polled again
the rest is win specific and fires both at key down and key up
gotcha, the RGB effect appears to be tied specifically to the key release from what i'm seeing?
thats controlled by the mcu onboard
@quiet root im stupid because i did not place everythin in the same folder
It could also just be delay
A good test is to just hold the key down instead of tapping it
^
ok
good call @gleaming cove
i'll have to poke at that, but that should at least answer that question for me
if u really want to test input latency id advise using tachyon mode 
sends me keyboard not connected now
w2?
idk what that mewans
wooting 2
yes
ya need a fixed sdk
yesysesyes
I'd recommend to sacrifice a spare switch and solder an LED to it for accurate measurement
@quiet root not sure how i could use Tachyon for this specifically, as we're using the RGB to key our counting forward from activation (hard to discern the exact ms actuation occurs otherwise)
lmao thanks for the help btw man, really appreciate it 👌 👍
it looks like it'd be a more accurate measurement, but harder to actually measure in practical terms with no RGB effect to queue from for our "start"
goodnight everybody
@sage igloo we've considered that, but i'm hoping i don't have to do that to my wooting (i love this keyboard)
the rgb effects dont tell u the input latency tho cause they literally happen even without a pc attached
i think they even made a piece on latency
and what goes into it
oh they did, i've read it a few times now 🙂
ya
Don't you get like 4 spare switches?
the RGB just gives me a visual marker to begin counting ms between input and on-screen change
u do get them xeanoa
def didnt fuck that name up
@icy needle i might PR a change to use the new sdk
Oh yeah don't use RGB as a visual marker lmao
Realistically, the least latent you can get is a single LED inline with the switch electrically
idk wehat PR means
Pull Request
may have to do that, we've already got a 1ms polling rate mouse we've done that with
pull request as in make the example work and then ask if they adopt my change into the github repo
might i ask what u wanna do cause it seems you are not experienced with this at all
just make a setup similar to what people use to show mouse latency, with a single led over the screen as a point for activation time
no i am definetly not
then i would advise to actually learn nodejs and git before doing this
ohohh
its not the wisest to start full blown with some sdk thats pulled from git and uses like other external deps
start small and work your way up
so my goal is just to have a qtcreator window that shows the value of the keys
and i dunno where im going
yeah, i will probably have to do that @fathom garnet, we were excited just to find a 1ms polling rate keyboard to do comparison against, was hoping i could lean on the RGB w/ the wooting keyboard
why qtcreator tho
@green solstice Rule of thumb is to not use RGB as a marker. There can be latency between interpreting a keystroke and outputting the right color on the LED
It could be inherent in the communication protocol like with WS2812 or just how the firmware is architected since you generally don't want your eye candy running prioritized over input latency
yeah, i'll have to grab our dev who dabbles in mechanical keyboard making on the side and have him rig something up on my wooting
i mean i'd use VS if that's a requierment
i think the most accurate way to get latency is to interecpt the usb packets and then count from there
That's not end to end though
@icy needle you know that qtcreator plugins are written in c++ right?
End to end begins at the keystroke and ends at the screen, which is what slipper is looking for iirc
well thatll be hard tho
It's very doable
@quiet root Absolutely not
it's not very hard if i know the point at which my keypress is sent as input
is it a problem ?
qtcreator has a built in way to create plugins for it (which is what you want)
but you cant use nodejs for it
it's the entire reason we've got a 1000fps capture, we can decode it into screenshots which each represent 1ms in time, and we have known values for the display latency of the displays we're using
and since lovely folks have done the benchmarking for the hardware input latency on the wooting, that's a known value as well
You generally want a higher speed camera than your polling rate
what's the simpliest way to make a preogramm which shows values coming from the keyboard ?
so our primary issue is identifying the moment teh input occurs
yeah, 1:1 is the best we're going to do for now, i don'thave the budgets to get truly high speed cameras on this team, at least for now
Yeah you need a higher speed for that
@icy needle nodejs but it only runs on a pc with nodejs and the other requisits to compile ffi etc
Ah gotcha
with the new sdk im not sure if @placid ledge made examples for it
cause best bet is just a VS solution that compiles to exe
isn't there a dll for it tho ?
nodejs cant use dlls. it compiles them to have node hooks which then can be used
but thats what ffi is for
like this weird bridge
between 2 worlds
1000fps measurements will do for now, i can be accurate within a few ms if i'm accurately determining the input point, if we prove this testing out in terms of results it will be much easier to get the purse strings to open for a true high speed camera
(and franky a few ms is accurate enough, since we're really looking to determine the # of frames of delay here, so sub 16ms we at least have a range of 1 frame)
Yeah for sure
@icy needle i mean just check out the sdk itself
man im so lost rn
i have to go to bed, it's midnight here and i have school tomorrow, thanks for the help, might come back tomorrow
just realized that ffi doens't support nodejs 12.x, took me some hours ffs
well there is a branch for node12
currently working on a node wrapper for the new analog sdk
already got most of it implemented just testing today
building ffi failed for me because the example code requests ffi version 2.2.0 and for some reason only 2.3.0 works for me
i've got no clue either why it is "working" now, still cant find the keyboard
as mentioned old sdk
not supporting wooting 2 yet
will try finishing the rewrite today
am working on the new sdk examples
I'm ill rn so been doing some digging into using the sdk, as i#ve only gotten my kb this tuesday
yeah, still figuring out how to use that dll tho
What are you struggling with?
including the "wooting_analog_sdk.dll" file into qtcreator
Are you trying to use the old sdk?
this one
You should be using the 'wooting_analog_wrapper.dll' that you download from here: https://github.com/WootingKb/wooting-analog-sdk/releases
Not the old sdk which it looks like you're using