Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: [Feature request] Advanced Shortcuts (Read 3592 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[Feature request] Advanced Shortcuts

Hi everybody,

1. AFAIK, when we create a keyboard shortcut (Preferences > Keyboard Shortcuts > Add new), we see a list of all available actions, so we can pick one action and assign it to the shortcut.
However, would there be a way to assign several actions to the same shortcut ?
Example : be able to activate several dockable panels with just one keypress. Biography View, Peakmeter Spectrum, Lyrics Show Panel, etc.
If there's no way yet, then I'd like to submit this feature request.

2. AFAIK, in the above-mentioned list of available actions we can't assign the activation of a given tab to a shortcut.
Example : be able to activate tab named {name of the tab}
We can already switch between tabs with CTRL+Tab, but this isn't useful when you've got a lot of tabs and you want to activate a given one with only your keyboard.
So can this be marked too as a feature request ?

What do you think ?

Thanks.

[Feature request] Advanced Shortcuts

Reply #1
As a workaround for your problem, you can use foo_uie_tabs in Dockable panel in DUI and put your favourite CUI panels in it.
Assigning keyboard shortcuts for tabs is possible in CUI, but it seems that you can't assign them for tabs in Dockable panel although they exist in Keyboard Shortcuts in preferences and as menu actions (i.e. View > Tabbed Panel > Select Tab > Biography) they work OK

[Feature request] Advanced Shortcuts

Reply #2
Thanks 2E7AH. That surely is a workaround, but I guess I can't be satisfied with it, hence my current request :

- If I understand well, your first workaround will allow to assign foo_uie_tabs to a shortcut, but I will only be able to display one CUI panel at a time (one for each tab, right ?), not all of them at the same time as I'd like to (each one of them having a precise screen position).

- As for the second workaround, like you said it is only possible in CUI but not in DUI (I believe there was a previous discussion about this). I don't see any reason why this couldn't/shouldn't be allowed in DUI. Maybe a dev could give his advice on this ?

In foobar there are often "workarounds", some of them simple, some of them quite complicated. I just hope DUI will allow users to do this, without having once again to go to CUI. I'd like to stick with DUI for obvious reasons. So, does my request look reasonable or not ?

Oh, one last thing : this whole topic would be probably useless if 3rd-party components like Biography View, Peakmeter Spectrum, Lyrics Show Panel, etc., could be developed for DUI (no need for Dockable Panels anymore). However correct me if I'm wrong, but I think the current SDK ( http://www.foobar2000.org/?page=SDK ) still doesn't allow 3rd-party devs to develop DUI components. Only "privileged ones" like Frank Bicking, foosion, etc., seem to be able to develop DUI components such as Facets or Text Display. So I just wonder if there's a reason for that, and it other devs may be able to develop DUI components one day... or not.

 

[Feature request] Advanced Shortcuts

Reply #3
Well, for viewing multiple CUI panels in Dockable panel you can use PSS (foo_uie_panel_splitter)
And I can say something about CUI panels/DUI elements, but I won't

[Feature request] Advanced Shortcuts

Reply #4
Another workaround could be to use Autohotkey whose basic functionallity to enable you to trigger any kind of action (i.e. keyboard actions, launching applications, manipulating windows, ...) with a freely defineable keyboard shortcut. However, it might be overkill for you..

Appetizer: I use Ctrl+4 to launch the files properties window, select a custom field named REVIEW and press F2 to activate editing:
Code: [Select]
; [snippet from my autohotkey script-file]
; foobar2000-specific shortcuts
; the freeky Identifier is automatically retreived by a helper application
#IfWinActive ahk_class {97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}

^4::  ; Ctrl+4: execute the following section until the return statement
send ^1 ; Ctrl+1: configured to open file properties window in fb2k
sleep 50
send r ; set selection to rEVIEW
sleep 50
send {F2} ; start editing
return

[Feature request] Advanced Shortcuts

Reply #5
Thanks to both of you. I'll have to experiment all this and report.

Sure, a panel splitter might be a good solution if it works the same way as DUI splitters do.

I had also thought about automation software already. That's a good idea, it works, plus there are plenty of automation software out there. However, I'd like to avoid adding one more element to my software chain, if possible.

Does foo_uie_panel_splitter require the "real" Columns UI component, or can it work with Dockable Panels like most other CUI components do ?

PS : all of these solutions are complicated, too complicated for the average user. Hence my feature request. I think it makes sense.

[Feature request] Advanced Shortcuts

Reply #6
Quote
Sure, a panel splitter might be a good solution if it works the same way as DUI splitters do.

Put PSS in Dockable panel and "right click > add panel". Do that for as many panels as you need. They are placed horizontally and spread equally by default, but that can be changed in "Splitter settings..."

[Feature request] Advanced Shortcuts

Reply #7
Don't multiple actions work anymore? I have an older version of fb2k in which I have assigned a shortcut to multiple actions. Fb2k reports a conflict, but it works. Idea about the Tab activation: There are two "startup playlist"/functionality plugins. One from foosion (foo_utils?) and another one here at HA. Together with the native command line interface or foo_runcmd you will probably be able to change playlists by a Windows shortcut .lnk (which you can assign a global hotkey).

[Feature request] Advanced Shortcuts

Reply #8
Hi everybody,

I've finally played around with AutoHotkey, as I was sure to get exactly what I needed in the end.

Easiest thing in the world  : in minutes I had a script running that will change tabs (by simulating mouse clicks) and show/hide all the relevant docked panels accordingly, all with a single keypress.

The result is awesome, even if there are some display errors due to the docked panels not being a "real" part of the DUI. Too bad DUI isn't more open, really.

To wet your appetite, have a peek at my second tab for instance :

Code: [Select]
$F2::; SECOND TAB
WinActivate ahk_class {97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}
send !f; Peakmeter SMALL
send !g; Lyric Show Panel
send !h; Biography View
send !j; Spectrum L
send !k; Peakmeter LR
send !l; Spectrum R
send !m; Chronflow
click 99, 70
send ^g; Lyric Show Panel
WinActivate ahk_class {97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}
send ^h; Biography View
WinActivate ahk_class {97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}
return


[Feature request] Advanced Shortcuts

Reply #9
Just an update to say that "run" commands (controlling foobar from the commandline) seem to work much better than the "send" shortcut commands (there's a topic about that : http://www.hydrogenaudio.org/forums/index....t=0#entry644197 ), so I have integrated them in a new AutoHotKey script. The new commands simply call the "View > Dockable Panels > Activate > Panelnumber - Panelname" and "View Dockable Panels > Collapse > Panelname" menu commands. The final result is simpler and more effective than before.

The previous second tab becomes as follows :

Code: [Select]
$F2::; SECOND TAB
WinActivate ahk_class {97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}
Run C:\Program Files\foobar2000\foobar2000.exe "/command:Peakmeter SMALL" "/command:Spectrum LEFT" "/command:Peakmeter BIG" "/command:Spectrum RIGHT" "/command:Chronflow" "/command:2 - Lyric Show" "/command:5 - Biography"
MouseGetPos, Xpos, Ypos
click 99, 70
MouseMove %Xpos%, %Ypos%, 0
WinActivate ahk_class {97E27FAA-C0B3-4b8e-A693-ED7881E99FC1}
return

Besides, no need for all the CTRL-g, ALT-g, CTRL-h, ALT-h, CTRL-j, ALT-j, CTRL-k, ALT-k, CTRL-l, ALT-l, CTRL-m and ALT-m shortcuts anymore. Only F1-F4 remain of course.