Author Topic: Issue pressing Shift key on startup  (Read 1578 times)

stax76

  • Jr. Member
  • **
  • Posts: 28
I use a Cherry Stream keyboard and AutoHotkey for global shortcut keys using Shift+Ctrl+F1, Shift+Ctrl+F2, Shift+Ctrl+F3 etc.

Unfortunately, with MusicBee this will not work because it shows a dialog for library selection, maybe you can change it to show the library selection dialog only when Shift is pressed without Ctrl? That would be a great help for me, otherwise I will have to start MusicBee with Flow Launcher, which is slightly more inconvenient.

phred

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 9299
maybe you can change it to show the library selection dialog only when Shift is pressed without Ctrl?
There's nothing that needs to be changed because that's the way it works now. Just holding down the shift key while start MB brings up the 'choose library' dialog.
Download the latest MusicBee v3.5 or 3.6 patch from here.
Unzip into your MusicBee directory and overwrite existing files.

----------
The FAQ
The Wiki
Posting screenshots is here
Searching the forum with Google is  here

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
I'm probably missing your intention or usage here; my MusicBee performs no action at all when pressing the key combinations that you mention?

stax76

  • Jr. Member
  • **
  • Posts: 28
It seems you don't understand what I'm asking for. Shift without Ctrl isn't equal to Shift+Ctrl, I'm asking to not show the library dialog when Shift+Ctrl is pressed while startup.

ma_t14

  • Sr. Member
  • ****
  • Posts: 2493
Seems like a sensible request.

Though for me, I only manage to reproduce the issue if I hold onto the key combination for longer than otherwise natural. Not sure if it has something to do with my machine's speed and the time it needs to start MB.

EDIT

Makes me wonder if the op is using the key combination to run multiple programs in succession. So in practice keeps ctrl+shift pressed and then goes through the Function keys. If that's the case then I can see how it could be a problem. Yeah, changing it so that MB brings up the libarary selection dialog if the shift key is the only key being pressed makes sense and it wouldn't impact the existing functionality in any way.
Last Edit: February 14, 2022, 10:27:25 AM by ma_t14

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
It seems you don't understand what I'm asking for.
Probably because you don't really explain what you are using these shortcuts for, and what sequence of actions you are trying to have performed. (or are performing)

stax76

  • Jr. Member
  • **
  • Posts: 28
I use the shortcuts for global keys defined in AutoHotkey.

Code
+^F11::Run "C:\Program Files (x86)\MusicBee\MusicBee.exe"

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
I use the shortcuts for global keys defined in AutoHotkey.
Code
+^F11::Run "C:\Program Files (x86)\MusicBee\MusicBee.exe"
Without you providing the rest of your script this is still a guessing game.
I'm pretty sure you could solve it by editing your AHK script.
Changing the commands a bit, adding a 'sleep' (timer) function, changing the order of actions, etc.


edit:
I now see what you mean.
That's probably not solvable by editing the AHK script.
What I don't understand is why the [Shift] key seems registered as being pressed after MusicBee.exe was triggered.
Last Edit: February 14, 2022, 01:15:33 PM by hiccup

stax76

  • Jr. Member
  • **
  • Posts: 28
There is the concept of key up and key down event, when MB starts the key is still pressed, a workaround is to release the keys quickly.

hiccup

  • Sr. Member
  • ****
  • Posts: 7781
There is the concept of key up and key down event, when MB starts the key is still pressed, a workaround is to release the keys quickly.
Ah, so it pretty much boils down to Digito Latency. (slow fingers ;-)
Try this?:

Code
+^F11::
    Sleep 1000
    Run "C:\Program Files (x86)\MusicBee\MusicBee.exe"
return
Instead you could also force a Send {Shift up} immediately after MusicBee.exe was triggered.
But there could be a risk of the system remembering an incorrect key state after you released the key yourself after that.
(I recall sometimes running into such problems when using specific {up} and {down} commands.
But you could give it a try as an alternative.
Last Edit: February 14, 2022, 05:43:13 PM by hiccup

stax76

  • Jr. Member
  • **
  • Posts: 28
Following works well:

Code
+^F10::
while GetKeyState("LControl")
{
    Sleep, 50
}
Run "C:\Program Files (x86)\MusicBee\MusicBee.exe"
return