Keybon icon indicating copy to clipboard operation
Keybon copied to clipboard

for keybon companion app, be able to disable switch layouts when window focus changes

Open b4wii opened this issue 2 years ago • 8 comments

trying to use this as a custom streamdeck, to be used with obs. but as the current iteration of keybon, there is no way to change the default screen, except changing the sketch in the Arduino ide, and there is no way to have the companion not switch layouts when the focus of the current window changes.

would be nice to have a toggle function to keep a certain layout active full-time, regardless of what window is active. I'd edit the companion app myself, but I do not know enough c# to be able to add this functionality.

I realize that this is not a use for what keybon was originally intended for, but I think it could be used like a stream deck, just without all the fancy features of a stream deck. implemented. I just would like to be able to have it send a few certain button presses for hotkeys for OBS Studio, but with the current version of keybon this is pretty much impossible without doing some major coding on my part.

b4wii avatar Dec 26 '23 21:12 b4wii

That's a good idea. I never really thought about that but it would make sense. Have you already built a working Keybon?

CoretechR avatar Dec 27 '23 09:12 CoretechR

Yes. And when trying to set up companion it was kinda frustrating having it switch layouts all the time.

Ooops didn't mean to close this.

b4wii avatar Dec 27 '23 16:12 b4wii

keybon companion b4wii.zip I made some quick changes to allow modifying the default page. Could you try and see if that works for you?

CoretechR avatar Dec 28 '23 00:12 CoretechR

okay, while it does let me make changes on the default screen, I don't seem to be able to make it function with the F13-F24 keys, even though sendkeys supports those keys. and that is what my hotkeys are set up for in my different programs.

b4wii avatar Dec 28 '23 00:12 b4wii

That's strange. The function keys seem to work for me using {F5} for example. Can you try with this version again, please? keybon companion b4wii.zip

CoretechR avatar Dec 28 '23 16:12 CoretechR

okay, in testing, it seems to stop at F16. anything beyond for the f17-f24 does not work.

https://learn.microsoft.com/en-us/previous-versions/troubleshoot/winautomation/product-documentation/best-practices/valid-key-codes-for-the-send-keys-action

supposedly these are supported according to these tables. unless I am reading wrongly.

b4wii avatar Dec 28 '23 22:12 b4wii

Oh, I thought all the function keys don't work. I must have misread that. Depending on where you look, the documentation lists F16 as the last working function key with the sendkeys method: https://learn.microsoft.com/en-us/dotnet/api/system.windows.forms.sendkeys.send?view=windowsdesktop-8.0

CoretechR avatar Dec 29 '23 10:12 CoretechR

That could be the case and makes sense. Kinda disappointed that send keys only seems to support up to f16.

b4wii avatar Dec 29 '23 19:12 b4wii