-
-
Notifications
You must be signed in to change notification settings - Fork 17
[Fix] require hotkey to be pressed once #75
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
base: main
Are you sure you want to change the base?
Conversation
Domi0503
commented
Aug 28, 2025
- Fixed the issue triggering the overlay and recording shortut only on second press
- The Hotkey now requires both ctrl and alt to be pressed. Previously it was possible to open the overlay just by ctrl + f10
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, thanks for the PR!
It looks alright and I'll merge it, but I wanted to ask first how first how familiar do you feel with c#. This library actually borks debug, once you set a breakpoint with the library enabled the pc just dies.. that's the reason I only enabled it when dev=false.
I was thinking about implementing it directly on the native side and communicate via pipes/socket
| else -> null | ||
| } | ||
| event?.let { _channel.trySend(it) } | ||
| event?.let { _channel.trySend(it) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe it's not working because the channel initialisation is wrong or the other side collecting it is converting to a flow with wrong parameters?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check this answer from Claude
https://claude.ai/share/5fc461d3-d2e2-4753-a706-9ec03b67ddb9
Maybe option 2 is a better alternative?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did try the first suggestion with an unlimited channel already, but it didn't work and also seems like a dirty fix.
The second one looks surprisingly good. I will try another approach and update this PR once done. I don't like duplicating this line either 😂
Hey! I have only little experience with C# particularly in Unity. I come from a web developer background and some experience in Android Development with Jetpack Compose. I found out that this project uses KMP and I wanted to get my hands dirty on that for the first time. I did notice degraded performance when trying to debug with breakpoints to narrow down this overlay issue. Good to know that this might be the implementation of the library! I didn't look on this site of things. But if I understand correctly, you've implemented the hardware monitor in kotlin and want to rewrite this in c#? |
No, not at all! The monitor itself is written in C# and uses LibreHardwareMonitor as a replacement for third party software. Initially I was using sockets to IPC but sockets require network usage consent so I swapped to pipes. The reason I ask is because maybe we could use the same IPC strategy for the monitoring to implement the hotkey. But since you said you're not familiar with C# we can fix this issue and then I try to implement it on the C# side when I have some time |
|
Hey so the solution was to make the flow a hot flow b719f4a |