#🤖│community_dev

1 messages · Page 2 of 1

teal hare
#

ok ill update it and give it a try

fiery breach
#

not sure if this has been reported, but I'm having an issue where if I have a second function layer nested under another:

Hold FN1 & Hold FN2 to get to layer 2, press a key
Let go of FN2 with FN1 still being held I expect it to still be in layer 1, but it reverts back to the main layer
is this intended?

quiet root
#

this channel is for creations of the community with the sdks we release

fiery breach
#

oop

grizzled wolf
#

where can I download the docs for the wooring-rgb-sdk and wooting plugin sdk since the dev portal has been offline for months ?

strong siren
placid ledge
#

yeah, that is the entry point for things, SDK documentation should all be available on the SDK's repos

normal pewter
#

Hi guys, I had this idea of displaying a digital clock with my Wooting 2 HE's RGB. I downloaded Artemis but didn't find a straightforward way to make that happen. Anyone has suggestions on how I might achieve this?

#

I've tried drawing numbers manually with the keyboard RGB in Artemis and it kinda works, but can't figure out how to automate it

quiet root
#

if you wanna use artemis youd prob need to make your own plugin

#

if you wanna do it in general the wooting rgb sdk (linked in the github above) is your way to the goal

normal pewter
quiet root
#

we do have a .net wrapper for use in c#

#

which would be closer to python although nothing really is close to python as the syntax is different by a lot due to indent based coding

normal pewter
placid ledge
normal pewter
#

Oh good to know!

placid ledge
#

The .NET wrapper bundles in the different platform builds automatically, so should be easier to get going cross platform I think

#

(although I need to check that it's up to date)

normal pewter
#

Another question: do we (Wooting customers) have the ability to run arbitrary code on the keyboard given that there's an ARM chip inside? wooting-rgb is nice but I also have to run something in the background, so I can't program on-board RGB effects or macros.

placid ledge
#

Here's the repo: https://github.com/simon-wh/Wooting.NET
Scratch what I said before about it bundling, I think I was confusing it with my .NET wrapper for the analog sdk.
Nuget has the latest code changes, all you should need to do is dump the relevant rgb sdk library in the build output folder and it should pick it up the right one automatically

GitHub

Wooting RGB control .NET wrapper. Contribute to simon-wh/Wooting.NET development by creating an account on GitHub.

placid ledge
# normal pewter Another question: do we (Wooting customers) have the ability to run arbitrary co...

Ye as Tony said, there's no arbitrary code execution and I don't think there will ever be. At most some basic scripting thing, but in general RGB effects are good to have on OS side as many times you need some OS info.
Like in your case with wanting to do a digital clock, at some point you'll want to have something running OS side to sync the clocks, so may as well render the effect OS side as well

quiet root
#

idk if the rgb couldnt be send over webhid like wootility communicates with the board

#

so a website in a chrome/chromium based browser could use rgb

placid ledge
quiet root
#

ah crap

#

would have been such a good solution

placid ledge
#

Although, if it doesn't fully block it, that idea would be pretty awesome

normal pewter
#

Yes, I agree. I don't suppose a keyboard should or could get info from the OS by itself such as system clock. For that I'll need a program running on the computer anyway. Just curious though, mainly because Wootomation does not has MacOS support yet and I'd like to have some on-board macros

strong siren
#

what kind of clock are you looking for exactly? do you have an example?

quiet root
#

artemis man himself appeared

placid ledge
strong siren
#

what tony said, an artemis plugin would do this, depends what you want exactly :p

normal pewter
#

Like e.g. a clockface that can show time, date, and e.g. weather or temperature

quiet root
strong siren
quiet root
#

on a w2 you could use the f row for hours and the numrow for the tens of minutes and numpad for the single minutes

normal pewter
#

Yes. Yes. Macros are kinda the secondary thing for me though, since Wootomation should suffice other than lack of MacOS support. Just thought it'd be nice to have on-board macros so it's not OS dependent (though the actual shortcuts are).

quiet root
#

would sorta make it a weird clock though

normal pewter
strong siren
#

I've seen a digital clock on the numpad before

#

which doesn't look great either to be fair

#

analog* clock sorry

normal pewter
#

Yeah. With the default keycaps the LED diffuses so it's hard to read. I've tried to print 2 1 3 but it doesn't work well.

normal pewter
#

If there were no keycaps or they're translucent/transparent I can see it working though. Another method would be to use a more visible encoding like binary or lighting up 1-9 LEDs

#

It'd be surreal if I can display time and temperature on my keyboard [so I can decide whether to touch grass]

quiet root
#

spell out the words

strong siren
#

temp like weather temp?

#

that you can, i think. there's (was?) a plugin for it

normal pewter
#

Yeah outside temperature. My bad I'll try to find it. If there's already a plugin in Artemis then awesome

#

Is there any documentation for controlling the Wooting with WebHID? I want to experiment with that too

quiet root
#

no

normal pewter
#

Unfortunate

uneven fable
#

hey @everyone can someone explain me how to deinstall the wootility-lekker programm the correct way with no folders etc. left?

quiet root
#

everyone mentions dont work, this is the channel for community members who develop stuff with our public sdks AND uninstall like normal and just remove the single folder that it had in (i think) %localappdata%

uneven fable
#

@quiet root okay sorry about that but whats the name of the support channel i cant find it

balmy iron
grizzled wolf
#

hello, how can i contribute to translating

quiet root
#

apply on crowdin

grizzled wolf
#

ok wait a minute

#

if the language is not there what should i do

#

idk man i dont want to ping him 💀

#

ok i submitted it

#

waiting time

final compass
#

Uhh, so I don't really know where I should post this, as it's more of a request since I know nothing about programming keyboards. Essentially I wish there was a way that I could use rapid trigger, but only when I toggle a layer. For example, for the arrow keys, I have them in the first fn layer, so when I press the fn key, I can use my wasd keys as arrow keys. However, I am unable to use rapid trigger with the arrow keys unless I enable it for wasd when the fn layer is turned off. So what I want to do is turn on rapid trigger for those keys ONLY when those layers are toggled. If anyone could help me get started or even code it for me that would be great just lmk. Also if there is a specific channel for software requestslike this lmk, too. Thanks

quiet root
#

thats more a #archived_feed_us_back as its a feature request to basically allow separate layers to have separate Rapid Trigger states

final compass
#

I see. Thank you, I'll move my request over there.

cyan saddle
#

Huh, the documentation website doesn't appear to work.

quiet root
#

check this channels description @cyan saddle

cyan saddle
cyan saddle
#

Wild, the API trusts Rust with "sensitive" information but not the C API.

quiet root
balmy iron
#

Rust is safe and thus it can handle sensitive stuff safely without bugs

placid ledge
# cyan saddle

I've fixed it now so that the Analog SDK repo documentation section just points to the local documentation in the repo (which is what the website docs were based off of anyway)

cyan saddle
placid ledge
#

Pure Rust (without unsafe usage) is immensely safer than C, if it's a Rust library that's consuming a C library then you could make that argument as Rust can't do much if the C is unsafe 😛
Although it somewhat depends on what you define as "safe", not sure what the context was of your message before, but "sensitive" information would likely have similar "safety" in both C and Rust, unless you take into account security holes from memory safety issues, in which case you'd have to consider Rust as safer for "sensitive information"

cyan saddle
#

C is pretty safe now, it has built in bounds checking and that's where most issues come from. You compare that to Rust where it blows itself up when you fork/clone and can corrupt mutable strings as it prints them, C is much safer.

#

Like, the big three C issues are bounds checks, null dereference and stale pointers. The first two are pretty much non issues now and that's great.

#

The asinine syntax is another issue entirely, better left out of this discussion...

cyan saddle
#

My guess is that the length arguments are not byte-wise but element-wise?

warm mica
cyan saddle
#

I don't know, ask Rust's println!.

warm mica
#

wait is ! a part of the function

cyan saddle
#

It's part of the macro name.

warm mica
#

i don't know rust but its very confusing coming from C lol

cyan saddle
#

Yeah Rust is asinine.

#
26: 0.0    4: 0.0    22: 0.0    7: 0.0    
4: 0.043137256    4: 0.0    22: 0.0    7: 0.0    
4: 0.20784314    4: 0.0    22: 0.0    7: 0.0    
4: 0.2784314    4: 0.0    22: 0.0    7: 0.0    
4: 0.2784314    4: 0.0    22: 0.0    7: 0.0    
4: 0.0    4: 0.0    22: 0.0    7: 0.0    
4: 0.0    4: 0.0    22: 0.0    7: 0.0    
7: 0.4117647    4: 0.0    22: 0.0    7: 0.0    
7: 0.4392157    4: 0.0    22: 0.0    7: 0.0    
7: 0.4745098    4: 0.0    22: 0.0    7: 0.0    
7: 0.0    26: 0.26666668    22: 0.0    7: 0.0    
26: 0.8235294    26: 0.26666668    22: 0.0    7: 0.0    
26: 0.0    7: 1.0    22: 0.0    7: 0.0    
22: 0.31764707    7: 0.0    22: 0.0    7: 0.0    
26: 0.4117647    22: 0.0    22: 0.0    7: 0.0    
7: 1.0    26: 0.0    22: 0.0    7: 0.0    
4: 1.0    7: 0.0    22: 0.0    7: 0.0    

Neat.

cyan saddle
#

Why on earth can I not use virtual keys on Linux?

placid ledge
#

The Virtual keycodes are a Microsoft 'standard' and the sdk uses win apis to convert them. It does that instead of mapping table as it allows you to have more control over the behaviour of how it's converted with regards to the keyboard language

cyan saddle
#

It's not Windows exclusive though.

orchid falcon
#

That reminds me of one nice to have on the analog sdk is that with the sdk you dont know the users keyboard layout.
It would be nice if the analog sdk could pull the key board layout with function layers and maybe also be able to pull if a function key is pressed.
On virtual keycodes the closest thing i could find for linux is evtest
but that does not change when i changed layout

quiet root
#

if linux has a standardized api for this wed be glad to support it

balmy iron
#

Eh, scancode1 mostly matches what evdev gives you, could just make a quick lookup table for the few keys that don't match

quiet root
#

well there is no lookup table rn for VK

#

the difference is that some languages have these mapped in their runtimes

#

GCC/Rust doesnt map them

balmy iron
quiet root
#

thats not virtual keys

#

its essentially the same but well not the same

#

is what we use on windows

#

the issue is that the specific mention was about virtual keys in JAVA

#

and java just maps it in their runtime

#

im unsure why you cant use those key defines as the dev of some app that uses the analog sdk

#

seems like you just include the header and use the scancode mode with those keys

#

so what currently happens is you either use scancode mode or vk mode basically

#

virtual keys have their own list of definitions cause microsoft

#

wed basically need to manually make magic tables for linux and macos key defines to work in VK mode

balmy iron
#

Java always uses virtualkeys instead of adapting to platform? Sounds blursed

quiet root
#

well how else do you go crossplatform

#

you have a static VK table that maps to the right keys in the platform specific runtime

balmy iron
#

Or rather, then it's on the language or framework whatever to convert from OS to whatever the lang uses

#

And expose that to apps

quiet root
#

the only real issue is that this means we need to keep track of os changes of said map

#

which is why windows is nice.. it has api calls to get the vk for a scancode or the other way around

strong siren
#

i spent a lot more time on this than i'd like for Artemis. Making sure inputs translate correctly to keys (for rgb purposes, not input) is a bit annoying with some keys

#

for example left and right ctrl have the same scancode, but we need to differentiate for rgb effects

quiet root
#

it being a mess or not (and yes i feel you especially with NumEnter and Enter) but the point is we dont use a static magic table for VK translation on windows. we ask windows

#

i think the only thing we do is override some specific VK

balmy iron
#

It really is a mess, i gave up on giving my macropad functionality on windows when I saw it'd require me to grab all keyboard input to then match on device and such aaargh

placid ledge
#

windows is pain

#

but it does seem like it'd be worthwhile to have the option for hid codes -> vk mapping table for non-windows so it can work decently in Java

#

iirc C# also has their key code type based on VK codes?

quiet root
#

yes the runtime supplies it

cyan saddle
#

So it's a pain in the butt? You'd think Linux and OSX would have APIs for this.

quiet root
#

well linux would have the kernel headers but i dont know if those map to actual scancodes of the keys

quiet root
#

meaning theres be no translation need if it just maps to scancodes unless you use a framework like c#, java or another lang like JS, python etc

#

even the java VK doesnt line up 100% with the windows one

cyan saddle
#

It doesn't? Which ones are different?

quiet root
#

what jumped out to me was 1-3

#

which in the key events isnt left, right, middle mouse

cyan saddle
#

It looked like those just weren't used in Java, but other than meta keys that don't actually exist I didn't see any differences.

quiet root
#

well what makes comparing hard is that their docs list them alphabetically

#

not by value

#

i think java also has keys here

cyan saddle
#

It's super easy to dump the Java fields by name, give me a few.

quiet root
#

a list sorted by value would make comparing a whole lot easier

cyan saddle
#

Oh there we go.

quiet root
#

unless the java list i found is wrong

#

quite a few differences

cyan saddle
#

Fair enough.

quiet root
#

so ya theres blocks that do match

#

but in general different lists

cyan saddle
#

I wonder why such big chunks are the same.

quiet root
#

usually cause they are a cluster

#

like it makes sense to have F1-F12 as 1 cluster

#

and logically its also sensible to have number/letters first

#

then other stuff

#

in my own opinion this is best solved by just having scancodes be used

#

ull always need some complete magic table otherwise

#

but if simon wants to solve this i cant stop him anyway

cyan saddle
#

I'm going to just dump the HID values into a sealed interface and call it a day.

#

Might be cool to do tables for a couple of big targets like Java virtual keys and GLFW virtual keys.

#

Honestly I might try to add it myself if Rust wasn't such a pain in the butt.

cyan saddle
#

Is there an easy to copy and paste list of the HID codes anywhere?

cyan saddle
#

Eh, nevermind. What in the world are the keys [non-US-1, Alt+SysRq, Ctrl+Break]?

#

@glass radish You nitro spam.

glass radish
quiet root
#

so the one to the right of left shift

cyan saddle
#

Z?

quiet root
#

nono

#

on iso

#

theres an extra key there

#

its why the left shift is shorter on iso

cyan saddle
#

Sheesh, how much money is China funneling into advertising for Temu?

quiet root
#

example

#

the label depends on the language

#

thats why its just non-us

cyan saddle
#

So it's essentially where backslash goes with the giant enter key, funky.

quiet root
#

technically \ to the left of enter is also non-us

#

but non-us-2

#

many keyboards just map it as the same key that ansi has above enter though

cyan saddle
#

Man, HID is just weird.

quiet root
#

the 2 keys im pointing at are non-us-1 on the left and non-us-2 on the right

#

but the non-us-2 is so rarely used

cyan saddle
#

I was looking at DuckDuckGo images...

quiet root
#

its often mapped to the exact scancode ansi uses for \ i believe above enter

cyan saddle
#

I suppose as long as I don't bugger up my keyboard support too bad it shouldn't matter too much for this project.

quiet root
#

it wouldnt be the end of the world even if its widely used

#

its a simple fix of changing a number

#

stuff like this is why dev for keyboard scancode stuff is... shit

cyan saddle
#

Hrm, my IDE is drunk right now...

#

None of that error message is correct...

#

What happens when the SDK can't see a Wooting keyboard and wai is called?

quiet root
#

wai?

cyan saddle
#

wooting_analog_initialise

quiet root
#

it returns an error code if i recall right

cyan saddle
#

I suppose one way to find out is to throw a Thread.sleep in and unplug my keyboard.

#

It does not return an error code, it returns 0.

#

I suppose I miss read the docs, woops.

#

I suppose now that I have this stuff implemented and I understand how it works I will go hide again. :V

#

Oh that's weird, the SDK doesn't know the name/vendor of my keyboard but it does know the vid/pid.

#

How do I stop the console output in the SDK?

cyan saddle
quiet root
#

we use 31E3

#

so you have a list of VID/PID

#

only note is legacy w1 and w2 which is before we had a VID

cyan saddle
#

Why does the API give me that VID then?

quiet root
#

good question

cyan saddle
#

Also the Wootility can access the keyboard just fine, so that shouldn't be the issue.

#

Maybe the layout for the structure is wrong in my wrapper.

#

OH

#

I'm stupid.

cyan saddle
#
Found 1 Wooting compatible keyboard:
Wooting: WootingTwoHE (31E3:1220)

There we go.

quiet root
#

wrong layout?

cyan saddle
#

I missremembered something, I thought arguments were Type*, int but it was Type**, int.

warm dagger
#

idk if this the right channel to ask this, but is it possible to have the caps lock indicator work without any other led's kept on?

#

I prefer to keep the lighting off, but the downside of that is the caps lock indicator not working at all with my current config

balmy iron
#

Not really the right channel but just set all the keys to black. That should do it!

bleak oyster
#

im trying to compile wooting-analog-virtual-control, and i get this error:

thread 'main' panicked at 'Failed to open SharedMem...', wooting-analog-virtual-control\src\main.rs:289:17```
it expects a file `%TEMP%\wooting-test-plugin.link` to exist, which doesnt seem to be created anywhere. can some1 explain whats the deal with that file?
placid ledge
subtle lark
#

not sure if correct place to post this

but i recently found a conflict with
wooting_analog_sdk running in background
with
Device: Gladiator NXT (joystick)
company: VKB

i would think it would effect most of there products as they tend to use same ARM chip / firmware

Problem in question: (video/Picture of problem included)
every so often it would send a Bump to joystick analog axis X-Y-Z witch for my joystick is read by the main board
the joystick has more analog axis but they are read/translated on daughterboard then sent to main board

Testing:

  1. running Artimis 2 RGB
    Wooting Plugin [Wooting Devices]
    Enabled = Problem
    Disabled = No problem
    with the help of one of the Artemis developer narrowed it down to the plugin features that use wooting SDK

  2. Running software Woot-Verlay
    when using the Wrapper that uses Wooting SDK problem occurs

quiet root
#

thats odd because the analog SDK only connects and sends data to our known VID/PID combinations and i think it also has a usage page specified

#

also odd that the spikes dont happen when the axis stays at 0

#

looks more like the stick is rebooting than it receiving some bumps or something

subtle lark
#

video it dose it just has a deadzone
Image is deadzone 0%

quiet root
#

that just reconfirms the SDK shouldnt connect to it at all

#

because the VID is already not matching.

#

the only operation the sdk does on all devices is enumerate them

#

but also shouldnt do it constantly

subtle lark
#

is there any testing i could do to help identify problem

for me its no deal just need to not run Woot a lay overlay or Atemis rgb when joysticks are in use

for references
wooting-analog-sdk V 0.7.3

quiet root
#

u have 2 sticks right. can you check if you get bumps if you dump the USB info of the sticks

subtle lark
#

Yes 2 joysticks Left-Right

by dump info ?
do you want me to run Wooting SDK with the Software i used to get the Device tree viewer at the same time?
sorry bit confused

quiet root
#

nono no sdk use

#

hold the stick to some degree (idk how you do the graph but thats also helpful)

#

and then start the USB info dump tool

#

and see if you also get a spike

subtle lark
#

ahh see if it is isolated to test software ?

quiet root
#

because the dump tool basically does what the SDK does to find keyboards

#

its the only thing we do to non wooting devices

#

its basically to check if its the SDK or some issue with the sticks on a more fundamental level

subtle lark
#

Software used to watch/record joystick inputs
VKB_JoyTester
https://www.vkbcontrollers.com/pages/downloads

testing
Artemis 2 Plugin enabled

Left side of green line is with
Wooting Analog module (enabled)

Right Side of green line
wooting analog Module (disabled)

(notes)
1.this version of wooting plugin is i think an unreleased version the was
was hot patched last night (12-14Hours ago)

  1. the bumps are less than before as dead zone is still set
quiet root
#

have you tried the usb tool thing?

#

also cant find a build that new for the analog plugin/sdk

#

unless simon send you one he hasnt put onto GH yet at all

subtle lark
quiet root
#

ok. then you will actually have to wait for simon

subtle lark
#

diogotr7 User was the one that helped me on the atrimis discord finding the problem

the Wooting plugin beta patch just fixed turning on wooting Analog SDK if the feature was turned off

Default (and i think currently)
[wooting Devices] plugin enabled
it would also enabled the analog sdk
even when the feature that used it
[Wooting analog Module]
was turned off

the new patch only enables the SDK if
Feature [Wooting Analog Module]
is enabled

verison of what i am using
#392094276122574848 message

quiet root
#

ah so an artemis patch

subtle lark
#

sorry if i wasnt clear on that

quiet root
#

na it is sort of confusing at this level because theres the wooting analog plugin which is used by the analog sdk which is used by artemis wooting analog module

subtle lark
#

last part ill add
triggering the bug with joystick by
wootalay

subtle lark
# quiet root have you tried the usb tool thing?

ok did some further testing
image (0% dead zone)
pressing (F5) on Device tree viewer to (refresh) Alot
and then causing the the Bumps in picture the Bump tend to line up when i press F5

First test i did was close/relaunching witch was not the best to spot

quiet root
#

that would indicate the sticks not handling something correctly

subtle lark
#

not the best with software or coding but would that indicate that it is pinging devices for Device info and causing that sutter
and that the Wooting SDK is doing the same ?

quiet root
#

ya it looks like the sticks have some issue with repeated reading of usb data

subtle lark
#

ahh so the problem lies with the devices in question
so sending a bug report to you doesn't really help you
in future trouble shooting / fixing possible bug
this more lies with the VKB company

quiet root
#

ya if it spikes just in a device tree view and refreshing devices (without any of the wooting sdk using programs) its related to the devices themselves

subtle lark
#

thanks for your assistance
ill send a bug report to there discord of the issue and cause
they even sent me a replacement board because of this
should of done more trouble shooting my side
than testing both computers
should of ran one in safe mode to eliminate all software interference

quiet root
#

ya just give them reproduction steps and also confirm it does happen in safe mode

#

because if it does it just cements that its the sticks

#

but i assume they also offer firmware upgrades

subtle lark
#

yea they do them pretty frequent there devs even modified there firmware for me after i spotted a bug and sent beta firmware over withen 30-40 mins

balmy iron
#

Indeed I've also seen them modify firmware to remove the fancy copyright symbol from device name since broken software couldn't handle that

quiet root
#

ya so just report it to them with clear steps so they can confirm. ofc best if it does work in safe mode

strong siren
#

FYI all I did to the Artemis plug-in was make the analog stuff only actually enable itself if you're using it. I'm the current release version it listens for analog data even if you're not using that data for anything

quiet root
#

apparently not cause by the wooting sdk directly anyway

strong siren
#

Ah I see just refreshing the USB view causes it. Interesting

subtle lark
limber owl
#

Is there any updated documentation for the hid protocol used by wooting? So far I found https://gist.github.com/PastaJ36/04b82556bde3cd49183e913c833988ec but I notice there is a lot more to the protocol in the wooting rgb sdk. Would be really nice to have some documentation on the purpose of de conmands and reports and what parameters can and should be used. Any other suggestions than reverse engineering wootility for me? @hybrid lake

Gist

GitHub Gist: instantly share code, notes, and snippets.

quiet root
#

reverse engineer wootility

#

i dont see much of a reason personally to document it outside of having the SDKs open source

#

is there a reason you need a documentation outside how the SDKs use the commands?

limber owl
quiet root
#

in general youre tagging the wrong person for this

#

Jeroen doesnt really have the most most insight anymore. Simon is working on the firmware most of the time

limber owl
placid ledge
#

What are you trying to achieve?

quiet root
#

they just dont wanna go through the c lib for smth they do in python with hidraw

quiet root
#

from way before i worked at wooting

cyan saddle
quiet root
#

cavegame?

#

u mean the forest?

nocturne jackal
#

SteamOS 3.5 almost to the standard beta branch

#

I can confirm Wooting keyboards and Wootility both work great!

cyan saddle
#

The forest?

limber owl
# placid ledge What are you trying to achieve?

Hi Simon, thanks for your reply! Actually I want to do anything and more, but to be a bit more concrete some examples. I'd like to write a small daemon which updates my rgb profiles during the day (every minute or so). I also switch digital/analog profiles during the day and the RDG SDK calls disables the RGB switching. Anyway, also the RGB SDK documentation is very minimal (for example it doesn't explain that it disables the digital/analog rgb profile switching, in what order calls need to be made, rgb profile and rgb brightness support isn't implemented, hardware support (timing etc). I fully understand Wooting has limited resources and providing the SDK is a major feat for hacking your keyboard, my preference would be documentation as I think it's a much lower effort from your side with much higher impact for hacking your keyboard. I hope this helps, keep up the good work, I really like my wootinb keyboard!

cyan saddle
#

Worst case run Wootility without a window/with a hidden window/whatever Chrome junk you would need to do and script it from there.

quiet root
#

you can just do an rgb reset which loads the profile rgb

bleak oyster
#

over the past few days i read through most of the SDK code because i wanna improve (or maybe even rewrite) it. however there's one thing i dont understand:

the SDK is written in rust, then exported to C ABI, which is then again re-wrapped in rust. i understand that exporting to C ABI is necessary to allow the SDK to be wrapped in other languages, but why re-wrap it in rust instead of just exposing the SDK directly and making the ffi a separate project?

bleak oyster
#

also, since keycode conversion is done in the sdk (rather than keyboard firmware) why is the keyboard reporting 2 bytes per keycode when 1 would suffice?

placid ledge
# bleak oyster over the past few days i read through most of the SDK code because i wanna impro...

The main reason I created the wooting-analog-wrapper rather than just doing dynamic loading, was to make it a bit simpler for consumers of the SDK to handle the case where the SDK isn't present (and give a nice error for it), as we as more dynamically handling future version compatibility with giving nicer errors for when the installed sdk is too old and doesn't have the targeted function. In summary, error handling.

placid ledge
#

The overall project structure is a bit of a mess and could do with a cleanup, it was my first project in Rust and I haven't done any significant changes to it since I initially made it

bleak oyster
bleak oyster
placid ledge
# limber owl Hi Simon, thanks for your reply! Actually I want to do anything and more, but to...

The RGB SDK documentation is very minimal as it's intended to just serve the purpose of controlling the LEDs from a custom application. Any other control was not part of the initial scope of the project, that's why it's so barebones/undocumented for those things. In general, the SDK doesn't get much love because userspace code in C is a pain and it can't share any code with any of our other projects (everything else uses either Typescript or Rust).
We are working on a more general minimal background service for handling device communication, which a new RGB SDK would be based on / more general purpose SDK options. With the current stuff, you're not going to get very far, as most profile data is communicated via protobuf, so you'd only easily get away with doing basic profile changes. What would you want to do with "updates my rgb profiles during the day (every minute or so)"?

placid ledge
bleak oyster
#

is there any reason you chose buffer size 48 specifically?

placid ledge
#

48/3 = up to 16 keys being reported at once. Prob would be good to have more, can't remember exactly why we ended up with that number

placid ledge
subtle lark
# placid ledge Could you open your issue on here: https://github.com/WootingKb/wootility-issues...

i have contacted the VKB company about the issue don't think there is much to be done on Wooting side

but to summery of the problem

When [Wooding-analog-sdk] was active by any apps below
Artemis RGB (wooting Plugin/Feature Analog)
Wooting analog Midi
Woot-Verlay

**Theory of the problem **
USB [Device Descriptor Request]
i think is what was the cause or what ever was causing Wooting-SDK to Ping the Devices rapidly causing a bug to happen to
VKB devices

limber owl
strong siren
#

You could do this with Artemis as well if you want to run a separate program. You could also write a simple app targeting the rgb sdk that does this.

quiet root
#

unless they are on anything but windows

#

or was artemis cross platform

strong siren
#

Artemis is cross platform

#

For that use case I would write a smaller thing though, Artemis is overkill.

bleak oyster
#

a few more questions to the sdk design before i start changing/rewriting:

  1. is this sdk supposed to be vendor agnostic? if yes, why is the name "wooting" all over it? if no, what is the purpose of the plugin system?

  2. how acceptable are breaking changes?

  3. what is the point of the SDKResult type? why not use Result<T, WootingAnalogResult> directly?

  4. why the global mutex? isnt synchronization the job of the consumer?

quiet root
#

its not vendor agnostic

#

it only works with our firmware

limber owl
#

Can Wooting share the protobuf .proto file(s) for the HID reports? I'm working on a python package to generate the payloads with documentation, I will open source it on GitHub. A simple yes, no or maybe would be great. Please let me know if I can do anything to make this happen.

placid ledge
# bleak oyster a few more questions to the sdk design before i start changing/rewriting: 1. is...
  1. The plugins are intended to allow other vendors to hook into it and supply data to the SDK. The wooting naming is just how we name projects

  2. The main thing with breaking changes is on the ABI front, it should still provide the same API

  3. It was down to some particular issues I ran into at the time with the typings, I think I needed it to implement some of the traits I wanted to have for converting it into a number for the C ABI and such. Might not be necessary anymore

  4. Global mutex to make the consumption of the api simpler / to make a clean C ABI. Not sure what other approach you'd do that would retain a simple C ABI, I'm curious if you got ideas on that front

placid ledge
#

With what you want to do, with changing the colours. The RGB SDK approach should handle that fairly well, although, if you want to kinda preserve all the other behaviours of the RGB on the keyboard like the Lock indicators and such, you could send the rgb profile colours. It would kinda mimick what Wootility does when you change the per key colours, Wootility sets the colours temporarily without saving

bleak oyster
# placid ledge 1. The plugins are intended to allow other vendors to hook into it and supply da...
  1. why isnt the wooting plugin statically linked (or just part of the sdk) ?

  2. is breaking the rust wrapper fine then? cause i'd really like to get rid of SDKResult<T> (and maybe do some other minor changes)

  3. im pretty sure we can make it work with regular Result<T, WootingAnalogResult>

  4. i'd simply remove it. if the consumer wants to access the sdk concurrently within the same program, then it is their job to prevent races. in pure rust this is enforced by the borrow checker anyway

placid ledge
# bleak oyster 1. why isnt the wooting plugin statically linked (or just part of the sdk) ? 2....
  1. It probably should be now, I initially tried to keep it separate to ensure that the plugin set-up always worked (as it'd always being used). But it started getting too annoying, so I merged the plugin into the main repo with the idea that I'd prob merge it directly into the sdk

2/3. Yeah that's fine, I'd like it if it didn't have the annoying wrapper type like now, as it does cause some annoyances

  1. But how does that work with the C ABI though? You have to initialise it somewhere, for Rust SDK consumers having the full type is fine and letting it determine how it should be shared between threads and such. But non-rust consumers will need to handle it differently
bleak oyster
# placid ledge 1. It probably should be now, I initially tried to keep it separate to ensure th...
  1. im not a C programmer so maybe im just not familiar with its conventions, but i'd expect multithreaded C applications to use their own locks, just like rust consumers handle synchronization themselves. the only mutations we have are changing the callback , which already has its own mutex, and loading/unloading, which is pretty obvious to cause problems when you do it will reading at the same time.

the main benefit here would be that this would prevent unnecessary lock acquisitions, especially for single threaded consumers where literally every single acquisition is useless, which i'd expect the vast majority of consumers to be. but there's also stuff like the ability to use an RwLock instead, in case the consumer is multithreaded but can guarantee that writer starvation wont be a problem. or just opting not use one at all and instead ensuring manually that the sdk isnt unloaded while other threads still read from it. i honestly see no good reason to keep it

balmy iron
#

Correct, just say the analog SDK isn't thread safe so only access it from one thread or have a lock

#

And if program is singlethreaded there's nothing to worry about and the mutex just eats cycles pointlessly

#

Oh wait the SDK spawns threads doesn't it?

bleak oyster
#

yes it does

bleak oyster
#

theres another design decision i find difficult to work around without breaking the c abi:

currently, to read data from a specific device, the sdk needs to go through all registered plugins to find the one that manages the specified device. id much rather have plugins register devices in the sdk with an adapter so the sdk can check itself whether that device exists and then access it directly. we might even be able to make it semantically impossible to request data from a non-existing device, which is a big + from sdk consumer perspective. unfortunately this would require major changes to the plugin structure, removing the read functions and instead adding a device registration mechanism, as well as a device adapter template

are breaking changes really not an option?

#

actually i'm just gonna do it now, for demonstration purposes. if the answer is "no" in the end thats fine and i'll try again

delicate spade
#

I am have not really read all the documentation but is there a way to use the sdk to send analogue stick inputs to the keyboards virtual controller?

#

So far all I read seems to indicate I can only read

delicate spade
#

nvm I'm just stupid so I guess I need to make my program send inputs from the same hid as the wooting controller then?

limber owl
quiet root
#

linux has no mouse emulation for joysticks natively?

limber owl
#

only using specific tools I guess (kernel can't do it nor wayland, looks like Xorg has a module for it but I'm on wayland).

placid ledge
placid ledge
# delicate spade nvm I'm just stupid so I guess I need to make my program send inputs from the sa...

Are you trying to combine gamepad output from something else with the wooting gamepad? What exactly are you trying to do it with?
tbh, I think your best bet to do something like that would be to disable the onboard gamepad, then create your own virtual gamepad using https://github.com/ViGEm . Then you could use the Analog SDK to create gamepad outputs for on-board keys and mix in whatever other stuff you want to.
Here's an example of something similar: https://github.com/WootingKb/wooting-double-movement This uses ViGEm for a virtual controller and also pulls in analog SDK data to be the input for the gamepad output

GitHub

Projects devoted to USB input device emulation and game peripherals reverse engineering. - Virtual Gamepad Emulation Framework

GitHub

One-click install for getting double movement in Fortnite. - GitHub - WootingKb/wooting-double-movement: One-click install for getting double movement in Fortnite.

#

Then the main tricky thing you'd get into would be naturally mirroring the on-board gamepad bindings. That would be a lot trickier to do seamlessly, although not impossible, but would be more likely to pull off later with some of the things we're working on

placid ledge
#

Although, I'm a lot more interested in controlling mouse scrolling with analog rather than mouse movements 😛 it's something I'd like to make happen on-board at some stage

limber owl
placid ledge
bleak oyster
limber owl
#

I've implemented hires scrolling which is quite new in Linux. For example the lenovo trackpoint sends multiple scroll reports to increase the scrolling speed.

junior kettle
#

@placid ledge Can you add me into the translation group? You haven't reply me on Crowdin👀

grand flax
#

Copy and save presets as well as now u can use the page over LAN for people who want an external source for fun or streamers who use a 2nd pc for streaming :)

bleak oyster
# placid ledge Breaking changes on the plugin side of things is completely fine atm imo. We don...

should i assume all devices to be HID devices? in theory one could make a plugin for any arbitrary device (e.g. network, serial, virtual, etc), and it doesnt make much sense for such devices to have a DeviceInfo_FFI struct which mostly represents HID metadata. but then again the struct is already exposed in the public API (via wooting_analog_get_connected_devices_info() ) which shouldnt receive any breaking changes, so now i'm not sure what to do

placid ledge
# bleak oyster should i assume all devices to be HID devices? in theory one could make a plugin...

Hmmm, good point. Although, I feel like the only things in DeviceInfo that are really specific, are the vendor/product id, as those are USB things. The rest can be easily interpreted in a more generic device context. If you wanted to make a more generic structure, you could theoretically go for the approach of building those internally, but then for that specific API you just convert it into the DeviceInfo struct and leave irrelevant properties blank. Then an additional API function could be created that exposes the new data struct for the device info

#

Then the existing device info api could be marked as deprecated and eventually removed in favour of the new one

#

So there are avenues for adapting the existing C ABI, while still preserving the requirements of it continuing to work the same for existing SDK consumers

delicate spade
#

so what you are suggesting is I basically need to combine the wooting output with the one of my mouse and make a new virtual controller

#

so I'd basically have to remake the wootility gamepad section and then some

placid ledge
#

@delicate spade Yeah kinda, you'd have to remake it, or do a minimal version based on what you need. Although, this kinda set-up is something that has been on my mind to implement properly, so at some point you may be able to do it

bleak oyster
# placid ledge So there are avenues for adapting the existing C ABI, while still preserving the...

i've been working on this for a few days now, and no matter how often i rethink and retry, i keep arriving at the same conclusion: enabling 3rd parties to hook into an sdk that is primarily focused on a specific vendor just doesnt work well:

the problem

any vendor specific concept we want to expose either breaks this idea, or imposes very questionable requirements on plugins

an example

consider the aforementioned HID metadata: if we want to keep the plugin system, then we essentially have 2 options:

  1. force non-HID devices to supply arbitrary data
  2. remove HID specific data
    the former is weird from a plugin development perspective, and gets worse with every wooting specific concept we might want to expose in the future

the latter implies breaking changes to the API, and effectively prevents us from ever exposing anything wooting specific at all

a potential middle ground

we could use deprecation to make all wooting specifics optional, and simply tell 3rd parties that they simply cannot expose any of their own specifics with this sdk. but this solution would require us to go through this process again and again every time something wooting-exclusive is added, which is not future-proof. also, from a consumer perspective, optionality is just noise if you're not going to use this sdk with 3rd party devices, which i'd expect to be by far the most common scenario

my proposal

split the SDK into 2: 1 wooting specific, 1 vendor agnostic. the latter would depend on the former. this allows us to expose anything and everything wooting specific in the former (e.g. RGB controls), while being as compatible as possible in the latter (e.g. non-HID devices). this split can be done without any breaking changes

limber owl
#

FYI, previously I used a Razer Huntsman Mini Analog and the current analog SDK is totally incompatible with it. The Razer Huntsman Analog functionality can only be used if you switch the keyboard in a "driver" mode. Then it ONLY sends a HID reports containing the values of the pressed keys, a driver needs to implement a virtual keyboard to translate these values to inputs.

#

quick question: thanks for the hint that protobuf is used, there are some nice tools to get the used proto for data samples.
using this I found that wootility uses report d0 da 0e and d0 da 0f to set the RGB values. How are these RGB values encoded?
somehow 1f is blue and ffff03 is white... how??

bleak oyster
bleak oyster
limber owl
bleak oyster
placid ledge
# bleak oyster i've been working on this for a few days now, and no matter how often i rethink ...

The Analog SDK isn't really intended to have anything wooting-specific added. That's why there's a separate RGB SDK and any other SDK bits would also be kept separate as we don't want that to pollute the analog sdk. The primary scope is to just provide the analog signals for keys and that's kinda it. So that may help when it comes to dealing with the tricky design decisions you're running into

bleak oyster
limber owl
bleak oyster
quiet root
#

ideally if theyd use an existing standard dinput

#

more universal and it can have theoretically unlimited controls i believe

#

ok not unlimited ```
XInput supports maximum of 4 axes, 10 buttons, 2 triggers and 8-direction digital pad per controller, compared to DirectInput's support for 8 axes, 128 buttons, and full-range POV. (The number of axes, buttons and triggers XInput supports corresponds directly to the Xbox 360 controller.

bleak oyster
#

also wooting keyboards already support both of those, so im not sure this is what @limber owl is suggesting

quiet root
#

prob that in general analog devices should go through some existing standard

bleak oyster
#

i think we're already doing that as much as possible

limber owl
limber owl
#

Allright, I can do this... 💪

    def test_one_is_more_encode():
        # green
>       assert bin(struct.unpack("H", d0da.helper.one_is_more_encode(struct.pack("H", int('11111100000',2))))[0]) == b'1110000000001111'
E       AssertionError: assert '0b11111100000' == b'1110000000001111'
E        +  where '0b11111100000' = bin(2016)
limber owl
quiet root
#

nope

#

as long as it doesnt use our branding or copyrighted stuff its free game

limber owl
#

Awesome! Just to be sure, I'm planning to name the package d0da, is that in any way copyrighted? Makes me think of tweety from looney tunes 😆

limber owl
quiet root
#

btw a byte doesnt change how many bits it has.a 16bit system or value always takes up 2 bytes

#

in general the explanation seems confusing in my opinion

limber owl
opaque fox
#

Does anyone know what's up with the arrow keys in VK mode? When reading the full buffer, they seem to appear correctly as 0x25-0x28 but when reading directly, they get the values from the numpad (4,8,6,2). I have the Wooting Two and I haven't tested on any other HW.

limber owl
#

What is VK mode?

opaque fox
#

Virtual Key. The key codes from winuser.h

#

Used by Windows

quiet root
#

maybe some issue with the sdk

#

id open an issue on github about it

unborn sluice
#

team - I am looking to write code to change my 60HE's profile

#

can this be achieved?

#

can't see it anywhere in the sdk, but may have missed something..

#

must be possible somehow since it can be done from a browser on wootility?

#

just want to jump between these

crisp schooner
#

it seems that wootiltiy sends ActivateProfile to change the profile

#

it's command id 23

quiet root
#

shows how to use it

floral crane
#

I've been thinking about remaking that in Rust, not sure if I should make it a new project or make it v2 and move the old one to a v1 branch

I could either use json and maybe keep compatibility with the old configs, or switch to toml which is typically used in rust and I prefer as it's more readable and less prone to bad syntax

There's already a cross platform lib for window title so I don't gotta handle any of that, I wanna handle swapping inactive profiles if I can figure it out, and maybe add a gui (probably egui, I'm not good at web and its not needed for such a simple UI) to create/delete rules, assist in process name and profile selection, etc

crisp schooner
#

you planning on making it open source? might be a nice opportunity to give rust a second chance... or i could try and rewrite my wooting software in rust 😄 ugh, idk how im gonna draw the keyboard preview, it's been tough with .net to make it layout exactly how i wanted it to

#

also inactive profiles are stored in local storage, so you will have to find a way to dig them out of wootility to upload them to the keyboard and switch to them

floral crane
#

Yeah still open source, I don't plan on making or updating the wooting sdk bindings though, analog SDK already has official bindings, and RGB is easy enough to use unsafe.

The program doesn't use much of RGB SDK if I remember right, it used reverse engineered HID from wootility, which is why it doesn't work with wootility open (same reason some modules from Artemis don't work with wootility open)

strong siren
#

would be great to have a general service like the analog one for other things

quiet root
#

we are trying to PepeHands

strong siren
#

rgb and profile status/switching being the main ones, properly synced with wootility ideally

floral crane
#

That would be cool, I was thinking just disabling my program while wootility is focused would be a good solution for now

balmy iron
unborn sluice
quiet root
#

only reason it would crash is other software talking to the wooting

#

like rgb software

#

or other analog/rgb sdk consumers in general

strong siren
#

how does one install the analog sdk on arch? is there any AUR package for this?

floral crane
#

I'm not sure, I've never used the analog sdk, just the gamepad mapping

unborn sluice
#

nada

#

might be because im using the 32x instead of 64

#

nmake failed for 64 not sure why

#

forgor

floral crane
#

I forked the old wooting-sdk/wooting-rgb-sdk-sys and removed the analog bindings/module https://github.com/ShayBox/Wooting-RGB hopefully someone finds it useful. now I can work on remaking Wooting Profile Switcher

floral crane
#

I still need to clean up the code, the error type is never used in the library so I'm sure it crashes if the keyboard is disconnected, I wanna add a static compiling feature. it currently uses the submodule, I'm gonna put that in a vendor feature that's default and add an env to manually set your own path and disable the vendor feature, let me know of anything else I should do. Time for bed

limber owl
floral crane
floral crane
quiet root
#

yes it does a magic check of the 5th byte and then uses the 6th to determine which profile its in

#

dont ask me how i came up with the magic check

floral crane
#

Heh all that code you wrote for windows and mac, the entire program for windows mac and linux comes out to 100 lines in rust pepesweatexcluding the config file code

#

never touching c again in my life

strong siren
#

@floral crane the correct check to make is to see if the keyboard is using the v2 interface or not, and getting the profile from array index 4 or 5. you can see how artemis does this here: https://github.com/Artemis-RGB/Artemis.Plugins/blob/0664beeb423ded5d438c3c3361a3a2428cbd8c4f/src/Devices/Artemis.Plugins.Devices.Wooting/Services/ProfileService/WootingSdk.cs#L22

GitHub

Repository containing official Artemis plugins. Contribute to Artemis-RGB/Artemis.Plugins development by creating an account on GitHub.

quiet root
#

that was it

strong siren
#

i was also confused by the logic in your switcher when i was implementing mine

quiet root
#

well not like anyone should still have a v1 interface firmware

strong siren
#

still, not hard to handle it. the value is in wooting_usb_meta

quiet root
#

ye

quiet root
#

@floral crane thanks for re-reminding me of the gist

#

updated it and also made it public

floral crane
#

when using wooting_usb_send_feature_with_response what length for the buffer should I allocate and what should I pass as the len, I've been using the u8 max which is 255 but I see artemis uses 256

#

oh I guess index 0, u8 would be length of 256 🧠

floral crane
#

I've released v1.0.0 of WootingProfileSwitcher, and it has binaries now so it's usable https://github.com/ShayBox/WootingProfileSwitcher

The next improvements are to expand the rule abilities to things like full process path, window title, regex, wildcard, etc. Then for v2 add a frontend to help configure the rules/system tray to run the program in the background

GitHub

Automatically switch Wooting keyboard profiles based on focused window - GitHub - ShayBox/WootingProfileSwitcher: Automatically switch Wooting keyboard profiles based on focused window

#

Tested on Windows and Linux but if someone could test macOS I'd appreciate it

devout flame
quiet root
#

multiple fonts i assume

floral crane
#

Or maybe azeret mono

unborn sluice
#

also this one doesn't go back to the default profile once the game is closed, which is a shame/would be a nice new feature

floral crane
#

I'll look into that bug, it is supposed to reset on close

I'll add that feature, it would be useful to have a default profile for non-matching applications (probably just a profile with all null values)

unborn sluice
floral crane
#

I had already added the feature and released a build before you made that lol, but I forgot to add the actual logic to fallback blobfacepalm

unborn sluice
#

dangit lol that was quick

floral crane
#

I'm also soldering new batteries in a can opener

unborn sluice
floral crane
#

I think my next improvement is going to be adding Tauri but without a GUI for now, so I can add a system tray icon to close the program

I could use a simpler tray icon library but I already plan on adding a GUI to help configure rules and wanted to use Tauri anyway

That also means I can switch to Tauri's GitHub action workflows and bundler to build Windows Installers (msi/exe), Linux Packages (deb), and macOS Images (app/dmg), but I still want to keep the portable standalone binaries as an option

quiet root
#

have fun fixing that for macos

#

closeable gui but running software is a pain in the but in macos specifically

#

requires the stuff that does the lifting to be a service and the configuration frontend is a different app

#

this is also why wootomation doesnt exist on macos

floral crane
#

I assume Tauri handles that, but I haven't looked into it

quiet root
#

doesnt for us

floral crane
quiet root
#

hmmm

#

i can test builds no problem if you need me to

floral crane
#

Wootomation isn't open source is it?

quiet root
#

it is

floral crane
#

If Wootomation had a trigger for active window and action to change the profile it would basically replace WPS 🤔 but active window monitoring isn't really a macro and profile changing would be Wooting keyboard specific

quiet root
#

correct

#

well and its not macos compatible at all

floral crane
#

plugin system when

#

yeah true

barren galleon
#

Macos 🤬

floral crane
#

Tauri build system is in place, windows installers, macos images, and linux appimage are available hyper_wah

#

next is a tauri tray icon to pause/close the program

quiet root
#

@floral crane if you need macos tests done just lemme know

floral crane
balmy iron
#

Great, now it's a total of 565 crates so building it generates over a gig of crap (and takes a while).
Anyway, forgot to mention earlier but for me it immediately craps out with "Keyboard not connected." Old W2, RGB SDK does work in my own test projects, Linux

quiet root
#

just a general tip maybe just build the universal dmg

#

not split between the 2

#

also why the heck is the appimage 70mb

#

holy moly

balmy iron
#

Because it now includes a web browser (WebKit)

quiet root
#

the fuck

floral crane
#

aarch64 is the apple M series processors, they're arm aarch64

quiet root
#

ye but it deffo doesnt boot

floral crane
#

rip

quiet root
#

it complains as if its wrong code and goes on about damaged binaries or dmg file

#

but ya just do the universal

#

easier for everyone as its 1 file with both intel and arm code

floral crane
#

🤔 universal builds

quiet root
#

it should be a tauri option as well

#

pretty sure thats what we do with woot

#

oop no we dont

#

but its definitely a thing

floral crane
#

oh hmm, I guess its just an app with both binaries and it launches the right one

#

that's cool, I'll have to switch to that

quiet root
#

ye its really nice for small apps

balmy iron
#

Good old fat binaries

floral crane
#

but also gotta figure out why it doesn't work on aarch64, cause that won't fix it

quiet root
#

well macos is only 2mb builds

#

so it isnt fat at all

#

if it was 70mb per build id prob also not suggest it

balmy iron
#

Won't fit on a floppy so p fat

quiet root
#

macs doesnt have a floppy slot

floral crane
#

and yeah appimage includes webkit unfortunately, I'm not sure if I can remove, I don't actually use the webkit part

#

you can install and use the deb package without webkit installed as a package on your system, windows 8+ comes with webkit, and the installer installs it on 7

#

I don't think tauri is designed to be used as a bundler without webkit/GUI

quiet root
#

windows bundles webkit?

floral crane
#

yeah since 8

#

its used by tauri and electron these days

quiet root
#

i thought electron uses the edge webview

#

just like tauri does for our wootomation

floral crane
#

oh maybe

#

you can use edge with tauri 🤔

balmy iron
#

Electron is bundled Chromium, don't think it has ever used anything from the system

quiet root
#

edge webview 2 is a really stripped down chromium

floral crane
#

oh I see webview is windows's webkit, they don't have webkit on windows

quiet root
#

webkit is different from chromium

#

webkit, chromium and quantum are basically the only browser engines out there now

#

webkit being safari and embedded devices running any *nix, quantum being firefox and the rest is chromium usually

balmy iron
#

But if it does start pulling from the system then thank fuck for that, hopefully electron apps won't be as dummy thicc filesize wise then

quiet root
#

i think they started toying with allowing exclusion and pulling from installed webview

#

at least for windows

#

would be a nice start to not have massive 200mb binaries

floral crane
#

That's easy, tauri added a universal-apple-darwin target

#

I'm gonna try not installing webkit as a package and just the dependencies of it, maybe that'll not put it in the appimage 🤔

floral crane
#

Nope, webkit is a build dependency of wry which is a dependency of tauri, I can't remove webkit as a dependency in the appimage, you could extract, remove, and compress it, but I can't do that cause tauri signs the builds. maybe a tauri v2 improvement to remove webkit from appimage builds, since it works fine in runtime without the dependency

floral crane
#

@quiet root latest macOS universal build is available, not sure it'll work on aarch64 still though, I might need errors or something to figure out what's going on, universal is still just x86_64 and aarch64 binaries in a single bundle

quiet root
#

runs fine

floral crane
#

wat

quiet root
#

so its only the tray menu indicator for selected profile and maybe trying to fix that the app shows as actively running in a window

floral crane
#

wym for selected profile

quiet root
#

no idea which ones selected

#

im hovering on quit

floral crane
#

Oh I see, yeah I didn't add any feedback for that, I should do that, those buttons just manually switch the profile right now

#

maybe dynamic icon for the selected profile instead of a static one too

quiet root
#

also this needs to be fixed id hate for it to show as having an open window when its just in tray

floral crane
#

yeah I'll try and fix that

floral crane
#

@quiet root latest release should fix the dock and add active state to the tray items

balmy iron
#

But isn't that a MacOS thing that apps show as running in the dock with no visible windows? Or is it only for those not in tray

quiet root
#

its those not in tray only. if its in tray you are very much allowed to hide the indicator

#

i have one app that runs from tray but insists on shopwing the indicator despite having no window open.... and i sadly dont have a better replacement

verbal atlas
#

i'm testing the waters to see if it's feasible to use the analog sdk to accomplish something like this: https://ultimatehackingkeyboard.com/manuals/uhk60/mouse#:~:text=Hold the Mouse key%2C and,operating system and its settings.
in conjunction with a rust mouse control library to move the cursor relative positions based on analog strength of a key press on an fn layer.

#

i am reading through the documentation for the sdk ofc

#

from what I understand there doesn't appear to be any reason this can't be done with a windows service that waits for codes for fn + movement keys to be pressed and reads their analog strength to then move the mouse in whatever direction.

balmy iron
#

Indeed, I did a while back a quick little thing that let me analogely mouse around with the arrow keys. For Linux of course because it's so much easier to do this kind of thing there

verbal atlas
#

Well it's good to know it's doable. just a manner of relearning rust and learning how to work with windows stuff.

verbal atlas
balmy iron
#

Nah, not even sure where I left the code

verbal atlas
#

fair enough

balmy iron
#

But the analog SDK is giga simple to use

#

Basically you just init and then it gives you analog input buffers on demand

verbal atlas
#

Yeah i'm sure I'll figure it out once I dive into it. Biggest hurdle is going to be relearning rust. I'm a c# dev so I have smol brain 😆

barren galleon
#

Probably bigger brain than me, don't worry

balmy iron
#

Ah, you want to do it in Rust because you're seeing other development here in that lang and you want to see what the hype is all about?

verbal atlas
#

I haven't look much into it. I see sdk is written in rust so I assume it's simpler to just use rust for everything. I see some c# wrappers for one of the plugins too but I don't mind using rust since I think borrowing and stuff is cool even if lifetimes still confuse me a tad

balmy iron
#

Yeah SDK exposes a C API so you can use it from pretty much any language

verbal atlas
#

oooo. well in that case i might do it in c# just so I don't go insane.

#

like i'm not going to write it to be cross platform anyways so might as well .net it

#

ill probs have more solid plans on what im going to do whenever I get around to doing it. I can't go back to the UHK after using this baby and analog mouse control is a strict upgrade from the uhk's 3 mouse speed states

#

I was goofing around with wiring up the keyboard to a steam input controller using it as a mouse and it's already really nice to use - current limitations with wootility and using gamepad bindings on a function layer only

quiet root
#

we even have official c# or well .net wrappers made by simon himself

verbal atlas
strong siren
#

Artemis uses this and it works as far as I can tell

#

That is just [Dllimport] stuff for the native analog sdk dll

verbal atlas
#

oh that just happened to be the page I was looking at. figured if I wasn't going to use a wrapper id have to learn how the api is actually getting ran. if I can just use this api and get what I need that should make this about 20 times easier lol

verbal atlas
#

im playing around with the wrapper test and it's working great. this is perfect. it seems like it is showing the output character scancode or something with a float representing analog intensity.

quiet root
#

you can set which mode it outputs

#

it also supports virtual keys

verbal atlas
#

is there any reason why Item1 here would output a different... i'm assuming key code when I press the same key down. For instance F15 will read 0x0066 sometimes and 0x006A other times.

#

this likely comes down to me not understanding what virtual keys are

#

oh I think the answer is to use virtualkeys

#

it's just a way of expressing keycodes it seems and appears to support more

#

woo i got it and it works amazingly using a bit of integer interpolation to make the analog transfer to relative cursor movements

#

this weekend I'll try and clean up this code, add some acceleration and put it on git and maybe the next person who gets the impulse can hook this up to a functional UI

strong siren
#

input is a mess on windows with scancodes and VKs and whatever the hell else

#

stuff changes with ctrl and alt as well depending on what you used

#

and keys like prtscr and pause/break dont emit a scancode in some circumstances

#

also distinguishing between numpad and non-numpad keys can be annoying

verbal atlas
#

right now i'm just using virtual keys for the keys i'm binding and it is consistent. I had to go through and change the scanmodes to virtual keys and everything seems to work now. I even hooked up mouse scrolling to some of my keys on my mouse layer.

verbal atlas
#

probs yoinking that down the line

strong siren
#

that code is for windows rawinput

#

not sure how much it relates to how wooting handles it

verbal atlas
#

oh lol. looked like a headache so I just assumed it addressed the switching behavior i noticed

verbal atlas
verbal atlas
#

it really takes a bit of practice not to just full hog every key I press when in mouse mode. Been using a different keyboard's mouse mode for about 2 years and having analog movement is far smoother when I have the hang of it, but i still catch myself stutter pressing for smaller movements when I can just ease off the key instead

#

when just reading analog from the sdk does it bypass the actuation point for sending a character in wootility?

#

also not able to use the mouse when task manager is highlighted which is annoying.

verbal atlas
#

oh you can fix this by just running wootingCursor as an admin wo

quiet root
#

@floral crane GUI for profile switcher when

floral crane
#

Soon maybe, when I find time and motivation to do it
probably in the next week

floral crane
#

How are inactive profiles stored, locally in Wootility then when swapped the old one is downloaded to Wootility and new one uploaded to that slot?

quiet root
#

they are just in a json in the wootility folder

#

ah no we switched to local storage files of chromium

#

so that web wootility and installed wootility work the same

#

the files in there store the persist:root data wootility uses. dont ask me how exactly cause i actually believe that every .ldb has its own profile inside

#

it's %appdata%\wootility-lekker\Local Storage\leveldb for windows

#

and the way inactive profiles get sent to the keyboard when selected is a special preview command that loads em into memory but doesnt store em on the keyboard

floral crane
#

Oh I wasn't gonna support swapping to inactive profiles because It was writing to flash but if there's a command to only do it in memory, though reading that data in storage will be a little more difficult

This is the progress I made tonight

quiet root
#

na the wootility has a realtime preview that doesnt overwrite flash which is whats used to preview inactive profiles and non saved changes

floral crane
#

does everything get applied though, like the profile can completely be used in-memory without having to write to the keyboard flash?

quiet root
#

pretty sure ye

#

i mean

#

all profiles run from memory anyway

#

the flash just stores em for loading into memory

floral crane
#

cool, writing a profile to flash every time you click a new window sounds like a good way to wear out flash, I guess that's gonna be part of the next update too

quiet root
#

prob yeah. the flash has a min write/erase cycle of 100k

floral crane
#

I figured out how to read the leveldb and get the persist:root key/value pair, but the returned bytes aren't utf8 parse-able after 22k characters POG but it's a bunch of stringified json that should be utf8 🤔

#
let options = Options {
    // compression_type: CompressionType::CompressionSnappy,
    create_if_missing: false,
    ..Default::default()
};

let mut db = DB::open("leveldb", options)?;
if let Some(value) = db.get("_file://\0\u{1}persist:root".as_bytes()) {
    println!("Value: {:?}", String::from_utf8(value));
};
floral crane
#

It seems there's null (00) bytes between every character, this might not be utf8 even though leveldb only supports u8 bytes (utf8), maybe this is u16 but split into two, this doubles storage for the couple weird non-latin characters being stored in this json

floral crane
#

Yep this is utf16 be/le, I need a third-party library to decode this POG

floral crane
#

I got json! still invalid json, profiles contains unescaped control characters, but it's progress

floral crane
#

It looks like UTF16BE but doesn't parse the non-null bytes correctly, so maybe not
EDIT: It looks like it's just utf8 but every even byte is null (00) except a few (less than 10), which are two utf8 characters side by side, for some reason...

floral crane
#

I think the javascript in wootility/chrome just got confused and tried to encode utf8 stringified json as utf16 because a few of the characters encode as valid utf16le 🤔 best theory

floral crane
#

wait does wooting actually use the dc4 character or just another bug, it can't be stored in json but the control character makes sense for a keyboard 🤔 

floral crane
floral orchid
#

Is there a place for people to upload/share software for wooting?

quiet root
#

right here

#

wed like it to be opensource if possible and to avoid uploading executeable files directly to discord

floral orchid
#

Ah, alrighty. I was just curious. I'll scroll through

floral crane
#

@quiet root where's the wootility-lekker/Local Storage/leveldb folder on macOS?

#

also is wootility-lekker and wootility-lekker-beta the only releases now? wasn't there an alpha

floral crane
#

now I just gotta figure out the commands to send the profile to memory

floral crane
#

I'll need help with that, I have no idea how to figure that out :)

quiet root
#

i wouldnt worry about alpha and beta as we do not recommend to run them as a daily driver due to the infrequent updates they get

floral crane
#

I have both installed but there's no noticeable difference besides the newer firmware version right now, wps will check in order: stable > beta > alpha just so it still works if you only have beta/alpha installed, but will use stable, purely because the format might change and break parsing, so targeting should work longer

floral crane
#

I have learned more about the encoding format chrome uses for local storage

/// https://github.com/cclgroupltd/ccl_chrome_indexeddb
fn decode_string(bytes: &[u8]) -> Result<Cow<'_, str>> {
    let prefix = bytes.first().ok_or(anyhow!("No prefix found"))?;
    match prefix {
        0 => Ok(UTF_16LE.decode(&bytes[1..]).0),
        1 => Ok(WINDOWS_1252.decode(&bytes[1..]).0),
        _ => bail!("Invalid prefix"),
    }
}

It was very simple, I made it way more complicated than it needed to be

quiet root
#

shortens to ~/Library/Application Support

#

i think theres a cocoa (macos ui framework) way to fetch this without hardcoding the path

floral crane
#

pog I don't have to write platform code, it's relative to dirs::config_dir for all platforms (unless you wanna read an actual browser for wootility web, but I'm not doing that)

quiet root
#

yes

#

i was about to say there should be some way in rust as well as its the default folder

floral crane
#
pub fn get_path() -> Result<PathBuf> {
    ["", "-beta", "-alpha"]
        .into_iter()
        .map(|path| format!("wootility-lekker{path}/Local Storage/leveldb"))
        .map(|path| dirs::config_dir().unwrap().join(path))
        .find(|path| path.exists())
        .ok_or(anyhow!("Could not find Wootility path"))
}
floral crane
#

I figured out how to show verbose logs and get this when loading an inactive profile in-memory in wootility

floral crane
#

I learned RgbProfileColorsPart 1/2 are a vertical split of the keys

I also learned Wootility doesn't detect you're using an in-memory non-0-3 profile at startup so it thinks digital is loaded, you have to select a different profile first to then actually load the digital profile

#

I would have expected a different placeholder profile index like 4 or 255 so it can be detected, but it's 0

floral crane
#

I also learned the report id is not the same as the command feature code, numbers do not match. I have report json and order of the commands but I'm still unsure how to supply data to the commands with only 4 u8 parameters while the report json has buffers of u8

#

This may require sending hid rather than using the rgb sdk to send feature codes

Yes, the rgb sdk send feature just constructs a hid buffer, wootility is sending data over hid that none of the sdks can do, gotta figure out what these buffers are so I can construct them myself

#
getBuffer() {
    var e;
    let t = new Uint8Array(257);
    return t[0] = 0,
    t.set(Nt(this.magicWord, 2), 1),
    t[3] = this.reportId,
    this.profileReport ? (t[4] = (this.profileReport.save ? 1 : 0) | (null !== (e = this.profileReport.profileIndex) && void 0 !== e ? e : 0) << 1,
    void 0 !== this.profileReport.param1 ? (t[5] = this.profileReport.param1,
    t[6] = 0,
    t[7] = 0,
    t[8] = this.body.length,
    t.set(this.body, 9)) : (t[5] = this.body.length,
    t.set(this.body, 6))) : t.set(this.body, 4),
    t
}

stare_smug

floral crane
#

🤔 what are these hidden wootility settings

balmy iron
#

Probably meant for the Razer Chroma stuff

quiet root
quiet root
paper crow
#

I think that gif is from Silence in the Library

quiet root
#

no the spoiler

paper crow
#

Oh I dunno, that's your department. I'm just stoking mystery and confusion. 😛

quiet root
#

🚪 🏃

quiet root
placid ledge
#

Yeah, it's just for Razer Chroma stuff, we only ever want it to start on boot when it's enabled

#

wootingService being the Razer Chroma service

floral crane
#

ah, less eventful than I thought, I thought wootility had a secret service

floral crane
#

last thing is to switch to hidapi instead of my wooting-rgb crate SadBOYE

quiet root
#

gamepicker that automatically reads steam library when

floral crane
#

im gonna kill you

quiet root
#

why

#

should be easy as steam has a central file for it

floral crane
#

I think I already know how to do that

#

vdf file iirc 🤔

quiet root
#

ye

floral crane
quiet root
#

just read the vdf files ez pz

floral crane
quiet root
#

i assume it parses the vdf internally

#

as it supprots game states for steam

floral crane
#

probably

#

does the vdf even list games, last I messed with it I only used it to make my account switcher, which steam has built-in now

quiet root
#

over 1 year ago

#

uh oh

floral crane
#

yeah it might not work, but maybe I can update it

quiet root
#

or it works and no changes were needed for a year

floral crane
#

with rust you never know

#

looks like it uses reg and sqlite on windows

quiet root
#

i mean would be a cool feature for sure to have a game list for non technical people

floral crane
#

yeah, thats on my list

#

I just realized I have no button to add or remove rules

quiet root
#

app image still massive

floral crane
#

that would be part of the adding rule setup/wizard

quiet root
#

also how is win portable like 8 times the size of the setup version

floral crane
#

I can't shrink it, technically you can extract and recompress it without webkit but actions signs it so I can't modify it

#

dev build probably

quiet root
#

hm weird they dont let you exclude webkit

#

especially since the deb file seems fine

floral crane
#

its usually part of the os or a dependency with the deb, but appimage has to include all the deps, and tauri doesn't have a way to exclude webkit cause tauri-egui is the only native ui that doesn't use webkit

wheat coral
#

Hullo, I'm more interested in the hardware mods rather than the software side, but I still would like to understand the wooting60he's software side. is the sensor interpretation analog in the sense that it can detect absolute position, or is it digital in the sense that it can only detect up/down?

quiet root
#

the voltage changes depending on the magnetic field

wheat coral
#

when I'm describing up/down, I dont' mean purely digital like a traditional leaf spring system

#

Yes

#

i understand hall-effect sensors

quiet root
#

then i dont understand the question

wheat coral
#

is the interpretation of the voltage simply, when it goes up, we know it goes up, but by how far we dont' know/care, or is it a measurement like, 0-255?

quiet root
#

its measured and not just 255 steps

#

pretty sure we get a full 10 or 12 bits

#

ofc some of the last bits will fluctuate too much

wheat coral
#

apologies for my illiteracy, but I don't quite understand what a bit is.

quiet root
#

a bit is a 0 or 1

#

its how digital data works

#

8 bits make a byte

wheat coral
#

i don't understand it in the context of the sentence

#

Like, 10 or 12 bits as in a 10 or 12 digit binary number?

quiet root
#

yes

#

that is what bits are

#

im just not sure how many bits the ADC actually spews out and how many we use

wheat coral
#

so you get 2^10 levels of resolution?

quiet root
#

at least

#

i think i heard simon say we use 12 but im not sure

#

so its either a thousand or 4thousand steps in theory

wheat coral
#

how does the wooting software handle the output?

#

no sensor gives stable outputs right? there has to be attunement

#

at least at this precision

quiet root
#

its not stable at tahcyon speeds

#

there is a bit or 2 loss i believe

wheat coral
#

as in data is cut or data is lost in transmission

quiet root
#

its there but fluctuates a lot

wheat coral
#

I mean, does data get cut out by software (ie pruned) or is it lost by interference

quiet root
#

no

#

we even inform users about the instability

#

the actuation is chosen so this doesnt matter in most cases but some users barely get the firmware to switch states for a keyswitch

#

and then the fluctuation can cause side effects like rapid reactuation due to the signal instability

#

we have plans to fix it though without loss of accuracy

#

or not losing too much accuracy

#

theres only 40 states the actuation point can ever be in which gets spread over the entire range of analog values

#

you can probably see how this already makes it quite stable

#

not that the curve of the sensor is linear anyway

#

looks something like this (not the actual curve for our sensors but close)

#

hope this answers your question @wheat coral

wheat coral
#

oop I had to step away for a moment.

wheat coral
quiet root
#

dont confuse this with we could only ever have 40 states

#

its just the best tradeof for useability and stability

wheat coral
#

It leads to further questions though. is it possible to tune the number of states?

quiet root
#

no

wheat coral
quiet root
#

the main issue if you look at the graph is that the force doesnt need to increase much at the end

#

or well the press depth i should say

#

just like with a real magnet where it doesnt pull on smth with the same force at every distance but stronger the closer you are

#

im unsure if our firmware dev has ideas or plans to maybe increase the points for actuation without sacrificing stability or usability

#

but probably needs a better sensor first

wheat coral
#

is the interpretation of the sensor output (the graph above) preset? as in do y’all use a precalculated range for each level, or calculate the actual distance using physics/math? this is just out of pure curiosity

quiet root
#

the sensor comes with a definition of magnetic force to V

#

so a relative change in magnetic force acting on it always results in the same voltage change

#

4 mV/Gs at 5 V i believe

#

@floral crane how far is game detection lul

#

also @wheat coral i hope this helped you

wheat coral
#

12 bit resolution condensed down to 40 levels of actuation.

quiet root
#

well its a bit more complicated than that as explained

wheat coral
#

of course, but this is the key performance metric I was originally looking for

quiet root
#

if you also wanna know its technically 255 steps internally

#

but only 40 selectable

wheat coral
#

bruh

quiet root
#

similar to the w1 and original 2

wheat coral
#

Ohh

#

I c

quiet root
#

the internal steps are more interesting for analog usage

#

in which case its not 40 steps

#

but i believe still 255 steps

wheat coral
#

So is it configured at hardware level?

quiet root
#

firmware

wheat coral
#

oh bruh

#

so wootings firmware specifically chose 40/255 actuation points for stability in digital usage? why only 40

quiet root
#

no point in smaller divisions

wheat coral
#

Ahhhhh

quiet root
#

people already barely can tell the .1mm steps

wheat coral
#

but what if I needed these 255

quiet root
#

use the analog output

#

the analog sdk always gives you the full steps

wheat coral
#

I have yet to use the kbd, hasn’t shipped yet 😭

#

oh sdk

quiet root
#

the analog sdk gives you a 0-1 value

#

for each key

wheat coral
#

yeah

quiet root
#

if you dont wanna make your own program you can use the xbox output and just use a stick on a key like left stick up

#

and get values that way

wheat coral
#

with 255 steps yes?

quiet root
#

you should also get full range on those

wheat coral
#

0-1

#

kk I ynderstand

quiet root
#

oh no most axis are .5

#

cause you always have a + and -

#

although i could misremeber and its 0 and then -1 to 1

wheat coral
#

I don’t really care for the 0-1 or -1 to 1, I wanna know if its split into 255 steps between those numbers

#

I don’t really do analog stuff but I’d assume its done that way

quiet root
#

well it maps the output value from the full 0-255 range

#

there is a deadzone and curve you can configure for this in wootility

wheat coral
#

got it

quiet root
#

deadzone and curve only apply to controller output

#

sdk always gets raw analog data

#

well digitized analog data

wheat coral
#

Ok this is much more interesting

#

Has anyone ever considered trying to make a custom steering wheel that interfaces with the wooting :))

#

If there’s an existing effort I would like to be pointed in that direction

#

this is just for fun, not because its practical

#

unless it is becomes practical at some point 💀

quiet root
#

not that i know of

#

mainly because the springs are usually rather weak so finely controlling analog isnt all too possible

wheat coral
#

I mean, I'll probably find a way :) it won't be pretty but I have a fun idea

floral crane
floral crane
#

I still gotta finish the gui and switch lib, gonna be a bit until the update drops, but game scanning is next unless some bugs come up

limber owl
rugged wind
quiet root
#

how are you using the sdk

#

and what sdk

rugged wind
#

just in a binary target, I just do this

balmy iron
#

Yeah that might use a very old version of the SDK that might not be fully compatible

rugged wind
#

I updated the submodules to use the latest version of the SDK

#

all it does is generate C bindings and make a small wrapper over it

quiet root
rugged wind
#

uhhh this is awkward

verbal atlas
# limber owl Nice project! You might be interested how I solved the scaling for better precis...

oh this is sweet. this was the exact kind of stuff I was looking for. I'll check it out now. I was having issues with smoothness vs precision, since I essentially had it running in a loop with a threat sleep at the end. the best way I could think of at the time to have both the smoothness ( lower sleep time ) with the precision is to have hold onto the values across loop and increment every few times dependong on the analog value.

#

the issue is this means while it's kind accurate at lower presses, it stutters

#

is there any halting in this main loop? I had to use sleep so the mouse wouldn't fly around

verbal atlas
#

i'm probably doing this wrong, but I can't get this implementation to do granular movement. ill check it out later

limber owl
verbal atlas
#

I tried getting gamepad input working on an fn layer but they don't work like that unfortunately

quiet root
rugged wind
quiet root
#

the rgb sdk

floral crane
#

I updated the old rgb rust bindings a few weeks ago, it works but I'm probably not gonna put much work into the lib beyond what is already there, it should do everything the rgb sdk can do with the unsafe sys crate though

#

white stroke for selected rule 🤔 good color/thickness

floral crane
#

Should I justify the buttons horizontally to make them all the same width, and if so, do I align the text left or center

balmy iron
#

The rules? That ought to be a listbox instead of a lot of buttons tbh

quiet root
#

also why is profile index a slider

#

lol

#

make it a radio button group

#

i would have done smth like this

#

and when inactive is selected you can use the dropdown combo box to select any inactive profile found

verbal atlas
#

yeah im using the analog sdk and it lets me not have to turn keys into dedicated gamepad outputs. gamepad buttons don't respect function layers unfortunately

quiet root
#

theres the overall issue that not all gamepad buttons have analog output... only axis

floral crane
#

lots to do still, also still waiting to see if there's a way to start the window not shown and re-show it when clicking the tray icon, so far no dice

balmy iron
#

if (showWindowOnStartup) { createMainWindow(); }?
Unless whatever frameworktoolkit whatever you use forces you into a certain kind of design

floral crane
#

yeah that doesn't work, main window can only be constructed within the tauri app builder once, and it doesn't seem to add a window to the tauri app windows list like tauri does

#

but they made a 0.22 branch a couple days ago so now I'm updated to tauri alpha instead of tauri 1.2 and egui 0.22 instead of 0.19, maybe they'll get back to me and tell me how or add a way to do that

floral crane
#

I may have figured out a way, currently re-writing the project from scratch to use tauri v2 including cli from tauri instead of clap and a few other plugins, what Launcher type should I use for autostart on mac, LaunchAgent or AppleScript, I don't know the difference if there is one

quiet root
#

launchagent

#

its what any respectable app uses

#

also pretty sure its the recommended way

floral crane
#

woah great error, many help

quiet root
#

u dont speak exit codes?

floral crane
#

I guess this is bad, though it worked before, and if I have artemis open it causes it to crash with a memory error

#

I wonder what comes first, .run() or .setup() cause I think moving tray init to setup means tray isn't ready for run, or maybe it's an issue with threads

#

TIL you can have multiple tray icons per application, I'm not sure I've ever seen that done

quiet root
#

ive seen it but usually youd not need it

floral crane
#

stare what, this makes no sense

#

OH, I moved both background thread tasks to start together and I think getting device info in both threads at the same time is causing this

#

now my keyboard has some stuck key when i press space it shows powertoys fancy zones like im moving a window, i think i broke something

#

maybe a reboot will fix it, replugging the keyboard didn't

floral crane
#

I wish I knew what was at that address lol

quiet root
#

rust not memory safe smh

balmy iron
#

Debugger could tell you, maybe

floral crane
#

wooting rgb not memory safe, bindings are unsafe code

#

I can't use debugger unless I get clion or switch to vsc, but I don't know how to use a debugger anyway

I narrowed it down manually, moving the first task into the run causes it

balmy iron
#

Usually a case of just choosing to run your thing in the debugger, and then when you screw up it points you where exactly you screwed up

#

Although I don't know much about WIndows debugging

#

Other than VS being pretty neat when debugging

floral crane
#

I love moving one piece of code causing memory access violations in the rgb sdk

#

the one im moving doesn't even use the rgb sdk, it just updates the tray items

balmy iron
#

Also, are threads even necesssary here?

floral crane
#

afaik they are

#

main thread is blocked handling tauri/egui, I need to poll the app state to update the tray items selected status, and poll for a new active window

balmy iron
#

Wait really, it doesn't even let you have a main loop kind of thing that lets you hook up callbacks to events and such?

floral crane
#

main handles events

#

thats the main loop

#

you can spawn sync threads with std or async threads with exposed tokio runtime from tauri

balmy iron
#

Granted maybe I've been doing too much Linux stuff lately.. where everything is fds that I can just poll in my mainloop and react appropriately when specific fds are readable

quiet root
floral crane
#

I guess I can merge the two into one task, maybe that'll fix it

balmy iron
#

C stuff is always sus and unless you know it's safe you should only use a specific C lib in the same thread

floral crane
#

I need a break for now, I guess even released v1.6 crashes after a few minutes, not for the same access violation/heap corruption, just dies with nothing

I don't know if this is ever gonna work reliably, might just need a secondary restart loop to restart the first process when it dies

balmy iron
#

Ah, the classic temporary fix

floral crane
#

temporarily forever

grizzled wolf
#

where can I make suggestions features request for the wootility software ?

barren galleon
# grizzled wolf where can I make suggestions features request for the wootility software ?

Either in #archived_feed_us_back or perhaps you'd like to make an issue here with the enhancement tag https://github.com/WootingKb/wootility-issues

GitHub

A place to report issues with the Wootility and help with feedback on existing issues - GitHub - WootingKb/wootility-issues: A place to report issues with the Wootility and help with feedback on ex...

#

Formatting is definitely easier with the latter 🙂

floral crane
#

I figured out the problem, app.run is an event handler, I was spawning a new thread many times a second vrcFPaulSip

#

it makes sense why spawning thousands of threads sending commands to the keyboard would cause crashes lol

crisp schooner
floral crane
#

hmm interesing, ill have to try that

floral crane
#

Is it possible to send an inactive profile with the rgb sdk? I can't tell and I don't want to remake parts of the sdk using hidapi if I don't need to

I know the commands used (RgbProfileColorsPart1, RapidTriggerProfile, GamepadProfile, GamepadMapping, AKCProfile, RgbProfileColorsPart2, KeyboardProfile, and RgbProfileCore) but not what format the data is in for each request, I just have the internal json local storage from Wootility

quiet root
#

i will tactically tag @placid ledge as hed know best

placid ledge
#

It is possible, but it's not going to be easy. All the parts of the profile use protobuf definitions and custom convertors to convert between wootility representation and protobuf. It will get simpler at some stage, but right now I don't think it would be worth your time to dig into it too deeply. We'll hopefully have an updated way of doing it which is easier in the not too distant future 😁

quiet root
#

copy it out of wootility. ez fix

floral crane
#

Chatgpt convert it, this is the future of coding

#

give chatgpt the firmware and tell it to make rust library, ez

#

but wait if you have protobuf for everything that makes it ez, you can just generate the code for it

#

the entire process from wootility json to hidapi buffers can be almost completely done using serde + serde_json + prost + prost-build

scenic axle
#

hello, I just got my keyboard yesterday and it's great overall and honestly very comfortable, however I have a small problem which is that when I have it plugged in I can't seem to launch OBS anymore, I have already tried resetting it and even pushing my laptop top it's limit to see if anything else does it [unpluggged the keyboard for this part] and that is not the case, once that was done I tried to uninstall the Wootility app and SDK, plugged in the keyboard and nothing changed. I did plug in my old keyboard and the problem was not there. Is there something I can do about it and if so what would it be?

#

oh, I forgot to mention, I did try the troubleshooting but it didn't change much and the bootloader isn't wanting to read and i don't know why.

quiet root
#

please post that in #1019755933959733258 as this channel is for the community developing things with the sdk

scenic axle
#

thank you

floral crane
#

@quiet root v1.9 GUI update is out, lmk of any bugs to fix

v2 will include an update to Tauri v2 alpha which removes the built-in basicUi updater dialog, I'll be adding the update dialog to the GUI and adding an option to auto-update, confirm to update, or don't ask. And adding auto-start, single-instance, and updating to egui 0.22 whenever tauri-egui releases that update.

#

I also noticed the installer default installs to user appdata but when the update dialog updates the program it installs to program files which leads to duplicate installs. This is a Tauri issue though

#

v2 will also include a rename to Wooting-Profile-Switcher (repo) wooting-profile-switcher (bundle) Wooting Profile Switcher (name/title) to fix the issue with the linux bundles having a different name than the windows and mac bundles, and separate the words for the window/app name

nocturne jackal
#

I got tired of waiting for SteamOS 3.5 and started working on my own replacement

#

Naturally wooting is supported OOTB, same is true with all ublue-os OCIs

#

udev rules are built in so you can just load up wootility and go

nimble kelp
#

@chilly oar sorry for the late tag, I couldn't friend / add you and you helped me a lot in general and I wanted to share some happiness with you 🙂

#🎮│game message

chilly oar
#

@nimble kelp The device power consumption mainly depends on the LED color and brightness. When all three colors parts are used at 100% (white) they should consume the most.
Here is my data.

#

W60HE (AMR)

#

W2 HE (AMR)

nimble kelp
chilly oar
#

@nimble kelp So as which device is your adapter detected on the PS5? I would assume only as a regular keyboard because I don't think you cracked the controller handshake.

nimble kelp
chilly oar
#

Hmm, I remember that I read a long time ago that there was a way to extract the key of the DS4 controller somehow so another device can act like one. Unless you are very experienced with such things I don't think you can actually attack it. For PS4 games adapter typically rely on an original controller where the security staff is just passed over and the inputs are injected. This don't work for PS5 games because there the input data of a DualSense is signed, so injecting inputs don't work. Adapter for that are working by utilizing the remote protocol and due to this they have an ethernet port to connect the adapter to the console over the network.

nimble kelp
#

I found a website with a DS4 private key - was going to try my luck using that and see if the PS is happy with my outputs

chilly oar
#

If that key isn't blocked yet it should work.

#

But I assume Sony blocks keys which are available publicly.

#

Sony wanted to get rid of all the adapter user on the PS5. 🙂

tropic tiger
#

would there be a way to change the actuation point of the 2nd and third dks binding?

#

because i want to beable to actuate 2 keys before i bottom out the keystroke and then have another bind when the key bottoms out

#

and having keys beable to be deactivated at a choosen distance

quiet root
#

no

#

not currently possible

tropic tiger
#

would there be a possibility of these setting being in the software in the future?

umbral walrus
remote junco
#

in the future i should be able to give a better answer once i get a better look at it

umbral walrus
limber owl
# quiet root why not read with the analog sdk?

With my current implementation I just handle the received gamepad input. To use the analog SDK I have to know the mode of the keyboard (so I can disable the digital keys and start sending mouse events) but his can only be done with polling, polling together with wootility confuses/crashes the keyboard so I don't prefer that. It would have been nice to receive some event in case the mode changed.

quiet root
#

we do want to make it possible to have multiple things use the keyboard and send data to it

#

soon ™️

limber owl
#

I wish I could help ™️

quiet root
#

well it would mainly be modifying the current SDKs

limber owl
#

Really? I think the usb protocol doesn't support it, for this reason razer chroma had a transaction id for all communications

quiet root
#

well all the outside apps use the sdks

#

if those have queueing and some smart management it would solve the issue

#

rn the sdk just sends the commands willy nilly when requested and if 10 apps run at the same time they all use a separate sdk instance

#

the main idea is having a minimal sdk service running that can interact with the keyboard and then apps interact with that

#

meaning we have full control over the flow of data from and to the keyboard

#

it would basically be razer chroma but not really

limber owl
#

Hmm interesting idea, what kind of IPC are you thinking of to communicate with the SDK service?

placid ledge
#

Baseline we'll have will be gRPC, but we may use different IPC for the SDKs

limber owl
#

Hmm gRPC doesn't seem possible from a web browser (for wootility). How would this SDK implement digital/analog mode switching?

strong siren
#

I think lghub communicates via protobuf on a websocket. Corsair does window named pipes, LGS did too. I'm not sure what cross platform solutions are there for this exactly.

limber owl
#

I think the best solution would be to extend the hid api to support many analog buttons.

meager rose
#

This might seem like a dumb question, but I was thinking about making a project and I just wanted to see if it was possible first, but can I use the analog SDK without interfering with the keyboard being a keyboard?

quiet root
#

or usb spec not sure which one its part of

limber owl
#

"As mentioned, we are constantly working towards our ultimate goal of making analog input an industry standard" .. if wooting isn't going to do it who will (propose an rfc)..

quiet root
#

well if we would have someone with the time to writeup a good rfc we would but... we dont. thus its not up to us

#

maybe one day

limber owl
#

🤞 I'm planning to do a post on the linux-input how they think analog keyboards should be implemented.

placid ledge
placid ledge
meager rose
#

oh cool

#

I just have one question

placid ledge
meager rose
#

There's no way I'm doing this right

#

.0? for SDKResult

placid ledge
#

Yeaaa, that's kinda nasty but also part of how it works atm. I had to wrap the Result type to get some additional functionality on it and it left it like that sadly

meager rose
#

I see

#

alright, thanks

placid ledge
#

@bleak oyster was working on a rewrite and that was one of the things he was tackling. How's it going btw?

bleak oyster
meager rose
#

I was honestly expecting this to be a bit more difficult but... I made an overlay for the Z and X keys which I think would be cool to see on osu streams.

bleak oyster
#

at first i just wanted to do some code quality improvements in pure rust, and now the task has evolved into "full rewrite with C interop"

#

i should probably start with just a pure rust wooting lib, which could later on be wrapped to build a plugin for the generic sdk. if there's interest in this it could give me the motivation to finish what i started

#

oh yeah another reason the project became daunting is that hidapi (which is pretty much the only relevant rust lib for interfacing with hid devices directly) has some very strange design decisions as well, so i fell down the rabbit hole of wanting to fix that as well... perfectionism only leads to misery