This is a proof-of-concept Windows application to interact with some custom QMK functions on my Sinc keyboard using raw HID reports. It uses .NET 5.0, relying on Device.Net to interact with the keyboard.
I made this because I use my keyboard with both Windows and Mac systems. I want the left modifier keys to be in the "correct" (idiomatic for the platform) order on the platform I'm currently using. I had configured layer 0 as the default/Windows order, and added layer 1 to rearrange the modifier keys for Mac, with one of the macro keys configured to toggle layer 1 on and off.
However, I kept hitting the layer-toggle key. And I realized I don't really need that key other than one time at startup. It would be way better if my computers just set the correct configuration when the keyboard was connected, and disabled the key. So I wrote this, and its companion Mac application, to accomplish that.
This codebase assumes:
- your keyboard is running QMK firmware with an implementation which responds to the raw HID reports this application sends, and sends its own events on layer changes
- layer 0 is configured as your "Windows" layer
- layer 1 is configured as your "Mac" layer
You can, of course, make any modifications to this or your keyboard firmware to do whatever you want. This is just what works for me.
- Run this application.
- Connect a keyboard running the QMK firmware you modified to implement the keyboard end of things.
The application will then disable the TG(1)
keycode (i.e., it will intercept it in the keyboard firmware and replace it with a no-op), and ensure that layer 1 is disabled. You can control all of this behaviour by right-clicking on the system tray icon.
Assuming everything is in place firmware-wise, you'll receive system notifications on state changes (including those triggered by the TG(1)
keycode as events generated by the keyboard, if that hasn't been disabled). As well, the tray icon will change to indicate which state is active:
- a "Windows" logo for the Windows/layer 0 mode
- a "Command" symbol for the Mac/layer 1 mode
- an "Option" symbol when the keyboard is disconnected
So long as the application exits normally, the TG(1)
keycode will be automatically re-enabled on exit. This will also be re-enabled by disconnecting and reconnecting the keyboard, assuming your firmware is implemented appropriately for that to happen.
You should be able to open the project in VS2019 and build and publish using FolderProfile. If this doesn't work, please open an issue to let me know.
This application is provided under the MIT license. Icon and library attribution is detailed in that file as well.