mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Add modifiers for keyboard volume changes
This commit is contained in:
@@ -21,4 +21,9 @@
|
||||
| **Numpad +** | Volume Up |
|
||||
| **Numpad -** | Volume Down |
|
||||
| **M** | Mute |
|
||||
| **E** | Toggle Emphasis |
|
||||
| **E** | Toggle Emphasis |
|
||||
|
||||
For both Volume Up and Volume Down:
|
||||
- Holding **Ctrl** will move in increments of 2
|
||||
- Holding **Shift** will move in increments of 5
|
||||
- Holding both will move in increments of 10
|
||||
@@ -181,13 +181,25 @@ namespace RedBookPlayer.GUI
|
||||
// Volume Up
|
||||
else if(e.Key == App.Settings.VolumeUpKey || e.Key == Key.VolumeUp)
|
||||
{
|
||||
playerView?.VolumeUpButton_Click(this, null);
|
||||
int increment = 1;
|
||||
if(e.KeyModifiers.HasFlag(KeyModifiers.Control))
|
||||
increment *= 2;
|
||||
if(e.KeyModifiers.HasFlag(KeyModifiers.Shift))
|
||||
increment *= 5;
|
||||
|
||||
App.Settings.Volume += increment;
|
||||
}
|
||||
|
||||
// Volume Down
|
||||
else if(e.Key == App.Settings.VolumeDownKey || e.Key == Key.VolumeDown)
|
||||
{
|
||||
playerView?.VolumeDownButton_Click(this, null);
|
||||
int decrement = 1;
|
||||
if(e.KeyModifiers.HasFlag(KeyModifiers.Control))
|
||||
decrement *= 2;
|
||||
if(e.KeyModifiers.HasFlag(KeyModifiers.Shift))
|
||||
decrement *= 5;
|
||||
|
||||
App.Settings.Volume -= decrement;
|
||||
}
|
||||
|
||||
// Mute Toggle
|
||||
|
||||
Reference in New Issue
Block a user