-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How much more work would it be to translate to keyboard presses? (in WIndows environment) #1
Comments
Sorry just realized this is Android based, so probably will need a big redo, but still I kept this question in case you are familiar with Windows programming. |
Hi @Jouzer I do happen to have been a Windows desktop C# developer slightly longer than I've been an Android one. I've never directly made a HID and think there are probably challenges to that. The encryption libraries should be standard and accessible to a .NET application. I've spent a lot more time failing to emulate a Zwift Play device, so will probably have a look when I have a spare day... |
I'm currently doing my first steps with the controllers on Windows. Maybe I'll post an update once I'm confident it's worth to share. |
I've just added my initial effort to get this working in windows.
@ollypsilon hopefully you have had more luck! |
Cool to see you progress, I’ve been way too busy to get into it. Looking
good!
su 10.12.2023 klo 18.25 ajchellew ***@***.***> kirjoitti:
… Cracked it, switching to BouncyCastle for the key exchange made things a
whole lot easier.
image.png (view on web)
<https://github.com/ajchellew/zwiftplay/assets/17216760/9324b208-303e-4c0f-a69f-726d4dddee24>
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AH3ULW37ZLTU3CELJDY7D7LYIXO67AVCNFSM6AAAAABAFSJCXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNBZGAYTCNBZGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
I looked through the code and it's beautiful simple, my code would not be so concise :D edit; I earlier had a link to a StackExchange where there was advice for using windows.forms sendkey but I already realized it's probably not good, https://github.com/michaelnoonan/inputsimulator utilizes it and it states that it's limited to WPF, Forms, console so not a very good one I work with a lot of languages but never with C#, I'll try to find time to set up the environment and test this, try some things out, thanks alot for the effort! |
@Jouzer just committed a change that seems to work with sending key presses to whatever is in focus. It looks like using this method that it only sends normal keys once, so might need to send loops. but control keys do down/up as expected. |
I got it running, works like a charm. Thanks again! I might try to do the UCR plugin for kicks and learning, whenever I find time. I exchanged a word with the dev and he said it'd be a good fit. Unless of course you think it's not something you want to be done with your work You probably already figured it out but UNKNOWN_NAME somethingValue is actually when you crush the paddle instead of tilting it, pretty neat feature but dunno why it's so poorly documented, it took me days to figure out it even existed |
I had no idea! Its good they've packed in buttons that they aren't using though, shows they've thought about future expansion over immediately selling the new version. |
Hi @ajchellew , I'm sorry, I didn't do anything yet as I'm on vacation 😄 |
I just want to add some motivation: |
Just chiming in here that I implemented a basic version of something similar for a Zwift Click using Python here: https://github.com/jat255/zwift_click_handling I'm using it to control the "virtual shifting" feature in indieVelo. I couldn't get the encryption piece working, so it's using the un-encrypted method, but I don't think that's too much of a danger... |
How do you send the feedback to indievelo?
Roberto Viola
Software engineer and open source enthusiast
http://robertoviola.cloud
Il giorno lun 13 mag 2024 alle 21:28 Joshua Taillon <
***@***.***> ha scritto:
… Just chiming in here that I implemented a basic version of something
similar for a Zwift Click using Python here:
https://github.com/jat255/zwift_click_handling
I'm using it to control the "virtual shifting" feature in indieVelo
<https://indievelo.com/about/>. I couldn't get the encryption piece
working, so it's using the un-encrypted method, but I don't think that's
too much of a danger...
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALYWGHVVWY3V66H4L4XXTZCEH6HAVCNFSM6AAAAABAFSJCXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYGY2DGNJVGQ>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
@cagnulein I'm using the https://github.com/boppreh/keyboard library to simulate presses of the |
Hah Ok thanks
Roberto Viola
Software engineer and open source enthusiast
http://robertoviola.cloud
Il giorno lun 13 mag 2024 alle 21:56 Joshua Taillon <
***@***.***> ha scritto:
… @cagnulein <https://github.com/cagnulein> I'm using the
https://github.com/boppreh/keyboard library to simulate presses of the -
and + keys on the keyboard, which indieVelo already uses as shortcuts to
control their virtual gearing.
—
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAALYWHLMKZATNHCKP2EHRLZCELHFAVCNFSM6AAAAABAFSJCXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBYGY4DMOJWGQ>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
- Added throttling to BLE characteristic processing. - Optimized encrypted data processing, reuse buffers instead of creating new arrays. - Implemented batch processing for controller notifications - Implemented a dedicated processing queue with a single worker thread
Hey, I'm looking at possibly coding myself a program that would pick up from here and translate Zwift Play buttons to keyboard presses. I'm not familiar with coding drivers, so I was hoping it could just be a program, maybe leveraging https://github.com/Snoothy/UCR or similar if necessary
That way you could control almost anything in a Windows interface, control music player, play indieVelo or many other games, etc.
However since I'm not familiar with this coding language and modern I/O stuff is something I'll have to learn, I imagine this same idea has popped your head. How much more work on this would it be to achieve it, do you have any idea? Do you already happen to know is there going to be some hard wall or a tedious long struggle? I've come to notice in late projects that in some cases Windows 10 has implemented difficult hurdles in security sensitive areas, which HID emulating might fall into
The text was updated successfully, but these errors were encountered: