This answer is equally vague... but... Under Settings > Accessibility > Typing Assist, the sticky keys feature became enabled. Maybe I did this by accident, maybe it was during a system upgrade. Then it seems that somehow pressing ctrl would latch this. This may be a hw issue with my keyboard (bounce)? Or an issue with gnome, don't know. In any case, while it was clear that somehow the ctrl key was being locked, it was unclear to me where this came from.
Turning off stick keys fixed the problem.
You can check whether you have the same problem by installing xkbset
and running
xkbset q
Look out for:
Accessibility Features (AccessX) = On
Sticky-Keys = On
You can disable these like so:
xkbset -st -twokey -accessx
This command will also release any latched keys. (On another example for using xkbset
, see here: Disable Sticky Keys' "Locked After Being Successively Pressed Twice" Behavior)
However, while turning them off with xkbset
, it doesn't seem to be (immediately?) reflected in the Settings GUI.
Another thing I tried was restarting gnome shell without logging out, e.g.
busctl --user call org.gnome.Shell /org/gnome/Shell org.gnome.Shell Eval s 'Meta.restart("Restarting…")'
but this does not reset a 'stuck' key. (Unlike logging in/out, which does of course reset it.) Arguably, the above command should reset it, but it doesn't.