When I found about inablilty of Spider Monkey Panel to be focused by standard Tab/Shift-Tab keys, I decided to intercept these keys with another program and move focus manually. I knew a little about AutoHotkey and chose it for implementing required behavior. AutoHotkey executable has no dependencies, is portable and can be renamed to automatically run same named scripts.
I achieved what I wanted even without intercepting keys by using AutoHotkey command
ControlSetStyle to add WS_TABSTOP style to Spider Monkey Panel control (passing string '+0x10000' as a first parameter to ControlSetStyle).
So far, so good, but targeting portability, I didn't want to register AutoHotkey for autostartup with OS. I wanted to autostart, run and terminate it when foobar2000 starts/runs/terminates. Researching existing components for dealing with external programs (foo_scheduler, foo_run) didn't lead to reasonable solutions.
Then I finally remembered, that with access to ActiveX I can run applications, so I used Spider Monkey Panel for instantiating Shell.Application and calling
ShellExecute method to autostart AutoHotkey. This left me with getting to synchronous terminating implementation.
But I found also about
AutoHotkey_H fork provided in EXE and DLL form, with DLL exporting its' methods ordinarily and in form of COM server. So Spider Monkey Panel + ActiveX + AutoHotkey_H COM server looked more and more attractive as a cleaner solution in comparison to starting and terminating external EXE.
But working as restricted user, having no administrator rights and targeting portable solution I couldn't use
regsvr32 to register AutoHotkey COM server. By further searching for documentation of Windows COM implementation, I at last found about
SxS DLL assemblies and
registration-free activation of COM components.