Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the "Z" default hotkey #66

Open
WofWca opened this issue Jun 1, 2022 · 1 comment
Open

Fix the "Z" default hotkey #66

WofWca opened this issue Jun 1, 2022 · 1 comment
Labels
good first issue Good for newcomers

Comments

@WofWca
Copy link
Owner

WofWca commented Jun 1, 2022

// In case you coulnd't make it out. Practically turns on/off the extension. Why not actually turn it on/off?
// Because
// * We don't have such a hotkey action yet.
// * Hotkeys would also cease to work if we'd disable it.
// * It would create an audio glitch (at best), at worst it would remove/add audio delay (becaouse of how
// marginBefore) works.
// * It's computationally heavy.
// TODO these problems sound like then can be solved.
{
keyCombination: { code: 'KeyZ', },
action: HotkeyAction.TOGGLE_VOLUME_THRESHOLD,
actionArgument: 0,
},
{
keyCombination: { code: 'KeyZ', },
action: HotkeyAction.SET_SOUNDED_SPEED,
actionArgument: 1,
},

It's supposed to be like a quick extension toggle (without de(re)initialization). I personally set it to toggle both sounded speed and volume threshold, but the problem is if you decide to "switch off" the extension while the sounded speed is 1 alredy, it will toggle it to the previous value.

Best solution I can think of is to create a separate HotkeyAction for this instead of binding two actions (HotkeyAction.SET_SOUNDED_SPEED and HotkeyAction.TOGGLE_VOLUME_THRESHOLD) to the key.

@WofWca WofWca added the good first issue Good for newcomers label Jun 1, 2022
@WofWca
Copy link
Owner Author

WofWca commented Dec 30, 2022

While we're at it, also need to consider a hotkey to seek back and temporarily set soundedSpeed = 1; volumeThreshold = 0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant