Is possible to make a button that import selected .ohk file with key shortcuts (without prompt, replace mode) or is that type of import possible only in Customize/Keys/File?
There may be a better was I'm unaware of, but if you don't mind restarting Opus then one way to do it would be to exit Opus, replace the config file, then re-launch Opus.
(Some config files can be replaced while Opus is still running, but not the global hotkeys one, due to how the hotkeys have to be set up.)
The second post in How to Exit Directory Opus has some commands and scripts that can be used to automate exiting and restarting Opus, and those work when launched from Opus itself (as long as they are not launched synchronously, of course).
But there is already function to import/replace key shortcuts (inside customize -> keys in "file" menu) and it works without restarting Opus (I tested it and works good). The only what is missing is to add small function to do it with commands. Function like that may be useful not only in my case. And it will be a better way because it gives possibility to change keyboard shortcuts set without break any operations and without even close any lister.
There is a function, yes, but there is not currently any command to trigger it.
It's something we could add in the future, if more people ask for it. For now, the method I described is the best way I can think of to get what you want.
Have you considered using floating toolbars instead? You can turn these on and off with a command and any hotkeys in them are global when the toolbar is on.
It works indeed. The only function I need (and I already have one) is for hide/show toolbar.
Small bug - it's not working when I have floating toolbar with menu and "Three Buttons" style button inside that menu. When I create single button it works even if function is inside menu on floating toolbar.
What exactly isn't working?
As I described - I created menu button in floating toolbar and button in "three button" mode inside. Under RMB i have notepad with SHIFT+F4 shortcut key. And is not working. It's working when it's normal button. Is not so important bug I think but still it should work.
BTW. method with floating toolbar works good.
I can't reproduce this, hotkeys assigned to three-buttons inside menus in a floating toolbar seem to work fine to me.