While recording a keyboard shortcut, if BTT looses focus, stop recording the shortcut

Describe the bug
Create or edit a Keyboard Shortcut, and click into the recording field to record it.
If you click anywhere else, into the BTT window, recording the shortcut is aborted, as expected.
But if the BTT window looses focus, e.g. because you brought another window to the front (or some application did it for you), recording is not aborted. This can then lead to weird consequences, like you start typing something, and BTT decides to create a hotkey with that first letter (see also my other bug report on that).

Device information:

  • Type of Mac:
  • macOS version:
  • BetterTouchTool version: 2.835

Still present in 2.848.