Modifier keys sticking in keypress

I’m having a maddening problem when creating keypress events. If I map modifiers to a keypress, they sometimes (but not always) get “stuck” after the keypress finishes.

For example, if I map a key to “Ctrl+Alt+Super+1”, when I press that key sometimes the OS sees Super as still being held after the event. If I map “Ctrl+Alt+Shift+1”, Ctrl or Alt will sometimes still be “held” after the keypress.

This happens regardless of the physical key(s) I map on the keyboard. E.g. mapping on the main layer vs. a Fn/Mod layer doesn’t change this.

When this happens I can tap the “stuck” modifier (e.g. Super) and it will release and everything then behaves normally. (But often I’ve started typing something else by this point and things go off the rails.)

I’ve seen this on multiple firmware versions, I’ve replaced the USB cable… basically this seems to be happening regardless.

Has anyone seen this?

Does this happen also if you connect your UHK to other computers, and on all the USB ports of your computer? I’ve never seen such behaviour, and I am wondering if it’s caused not by the keyboard, but by something on your host computer.

That’s strange. Sounds like sticky modifiers, which are a regular feature, but those should affect only arrows, tab and tilde.

As with all strange issues, please narrow down the problem according to Fixing misbehaving keys - Ultimate Hacking Keyboard