upvote
GP’s point is that many keyboards these days come with a Mac/Windows switch, and one of the things that switch does is swap the keycodes sent by the Alt and Win keys—the “Mac” behaviour is exactly what you’re describing. (The other thing it does is toggle FnLock for the F-keys.) So if I had a problem like yours with my keyboard I’d think that the Mac/Win switch were in the wrong position. If I’m reading page 9 of the manual[1] right, on the K4 the switch in question is right next to the USB-C port.

[1] https://www.keychron.com/pages/k4-keyboard-user-manual

reply
Are you sure you don't have a tiny switch on the side? The manual indicates it should have one -

https://www.keychron.com/pages/k4-user-manual

reply
I do, but when on the windows mode the keys mentioned are in the wrong positions.

--

Edit and if i switch to the macOS mode. The right alt-gr key is not mapped correctly.

reply
On macOS:

I use my Keychron C3 in Windows mode because the macOS mode ain't right with the bottom left corner keys.

Maybe placement of Control/Option/Command aren't similar enough to the MacBook Pro keyboard for me.

Been meaning to figure this out and fix it... swapping physical keycaps or remapping in software or replacing the keyboard...

reply
Waiting for it to die and will not buy another of theirs. Piece of shit.
reply
Just remap it! If you're on Windows, SharpKeys will do that for you. https://github.com/randyrants/sharpkeys
reply
I have autohotkey for remapping. The issue is when i boot into a rpi with a new build, i don't want to pollute it with custom xbind mappings.
reply