the-via / keyboards

GNU General Public License v3.0
606 stars 1.01k forks source link

MAGIC_TOGGLE_GUI is not supported #1748

Open routerf opened 1 year ago

routerf commented 1 year ago

Hi there,

the QMK keycode MAGIC_TOGGLE_GUI (or the short way GUI_TOG) does not work wit VIA, although it's featured in the QMK documentation. On this page (https://docs.qmk.fm/#/keycodes_magic) it says "To use the keycodes, assign them to your keymap as you would any other keycode."

Unfortunately, I can't seem to set that up in VIA. Not using a macro, not using the ANY key. VIA always tells me that this is not a valid keycode. At the same time, it even links me to a help page in the Via Desktop app that contains exactly this keycode.

I use the latest VIA version (3.0.0) for Desktop. My keyboard is a Keychron V3 (ISO version with Knob, if that's relevant).

grisevg commented 1 year ago

This would be very useful, please could you add it. WinLock is really useful for gaming, and many other keyboards and keyboard firmwares do provide it.

routerf commented 10 months ago

Just in case someone might find it useful: There's a way for Keychron models using QMK/VIA. See this blog post: https://www.keychron.com/blogs/archived/how-to-lock-the-windows-key-on-a-keychron-qmk-via-keyboard

rjerue commented 3 months ago

I often times switch between a mac and a PC with my Maja. Decided to look into this. Saw Via is a big react app and I am good at react so yolo.

Good news, I figured this out! Via does support it, your keyboard might not though.

First off, you need to use a hex code to see if its supported. Hex codes are defined in QMK here to swap. I wanted to swap the windows key and the ctrl key.

V11+ supports it https://github.com/search?q=repo%3Athe-via%2Fapp%200x7017&type=code

I had no idea what "protocol" my keeb supported. I actually built the app and ran it and saw it was on 9. Easy way to see is to just drop a console.log(version) into https://github.com/the-via/app/blob/main/src/utils/key-to-byte/dictionary-store.ts after line 5. Though after the fact, I found it is also dumped into a console.log statement once your keeb is loaded

image

I needed up update my firmware with QMK toolkit.

image