I’ve added quite a bit of API-based modifications to my ST environment recently, including some listener functionality. Some of my changes produces a funny artefact (I have difficulties tracing it, as it occurs rather rarely, once in a few days).
Let me list some symptoms.
- The keyboard becomes “typing disabled”: I can use it to invoke (apparently, all) modifier-key-accompanied keyboard shortcut, but regular “typing attempts” are just ignored. This occurs both in the text- editing area and in the buffer.
- Even while ST is stuck in that state, other applications are not affected. Other windows of ST, I think, are (I may have to double-check this next time).
- I tried the “usual suspects”: pressing the modifier keys (both single and combinations); physical disconnecting, then reconnecting the external keyboard – each of these things can help sometimes, but not always.
- Usually after a minute of two of playing with random keys everything returns to normal.
- Something that might give a good hint: when pushing random keys leads to eventual restoration, the first typed character is some unusual symbol: usually a latin letter with some exotic accent (I can post some examples when this happens again).
This might be related to undo/redo – either to the “native” operations themselves or to the API activity of my command listeners (some of them react to undo/redo commands only).
It feels more feasible to try and recognise the keyboard symptoms (rather then to start some fuzzy debugging of this hard-to-reproduce behaviour).
Any thought would be appreciated!