for example when I'm in firefox I would like to press Alt+T and have chosen sidebar opened (in menu View -> Sidebar -> name of sidebar)
Is there any application that can do it?
P.S. I have used firefox as example.
On Windows there is not really a standard way (that i know of, at least) to modify a given application's keyboard shortcuts. Instead it depends on the software:
Microsoft Office will let you change its programs' shortcuts via Options > Customize.
Photoshop and certain other Adobe products will let you change their shortcuts via Edit > Preferences or Edit > Keyboard Shortcuts.
... And so on
I do recall, in my dark Windows-using days several years ago, that keyboard shortcuts could be modified by using a resource editor (like this)... but i don't know if that still applies to most modern applications, and anyway it's pretty inconvenient and occasionally risky in general. :/
Keyboard shortcuts (and many other things) can also be overridden by AutoHotkey scripts... but i've found this to be somewhat unreliable.
There is no standard solution in Windows, so one has to use a third-party product.
One solution I can propose it to use AutoHotkey, with which you can automate whatever keyboard shortcut you want, conditional on the executable being used, by translating it to whatever keystrokes and mouse clicks are required. Virtually any key, button, or combination can become a hotkey.
It might be a little overkill, but AutoIt can do that (and a lot more) if you are willing to play with a Basic-like language.