Play/Stop from position shortcut?

Started by Elvisish, July 28, 2022, 23:52:52

Previous topic - Next topic

Elvisish

Is there a way of setting up a shortcut to toggle between play and stop, but return to the starting position it was at? Play/pause and play/stop returning to the beginning seem possible, but not stopped and starting from the same point?

Saga Musix

Unfortunately there is no single built-in shortcut that can accomplish this. What you could try is turning on the hidden setting Misc.AllowMultipleCommandsPerKey, and then map both the Stop command and the Play/pause command to the same key. I should add that I haven't tried it myself and it could very well be that this doesn't work, because the stop command might trigger after the play pause command instead of before. Another option could be to map the Stop command to the "key down" action of a key and the "Play/Pause" command to the "key up" action of that key, to guarantee that stop is always executed first.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Elvisish

Quote from: Saga Musix on July 30, 2022, 17:57:24
map both the Stop command and the Play/pause command to the same key.
This actually seems to block all playing (I guess because it's done at the same time).
Quote from: Saga Musix on July 30, 2022, 17:57:24
Another option could be to map the Stop command to the "key down" action of a key and the "Play/Pause" command to the "key up" action of that key
This means I have to hold the key, which isn't preferable, haha. I've opened an FR: https://bugs.openmpt.org/view.php?id=1619 - I've never opened one before so I'm not too sure if I need to add much more detail to it or not.

Thanks again for the suggestions!

Saga Musix

No matter how long you press a key, it should always generate a key-down and key-up event, so you wouldn't need to hold it any longer than normal. But having a dedicated command might make more sense in the long run, so that feature request is a good idea. It's fine as it is.
» No support, bug reports, feature requests via private messages - they will not be answered. Use the forums and the issue tracker so that everyone can benefit from your post.

Elvisish

Quote from: Saga Musix on July 31, 2022, 21:04:15
No matter how long you press a key, it should always generate a key-down and key-up event, so you wouldn't need to hold it any longer than normal. But having a dedicated command might make more sense in the long run, so that feature request is a good idea. It's fine as it is.
I did actually try it, the key needed to be held down to play and when I released, it stopped. I also tried flipping the keys around and it didn't play at all.