mirror of
https://github.com/aaru-dps/RedBookPlayer.git
synced 2025-12-16 19:24:41 +00:00
Add hardcoded navigation buttons
This commit is contained in:
16
README.md
16
README.md
@@ -3,3 +3,19 @@
|
|||||||
[Audio CD](https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio) player for [Aaru format](https://github.com/aaru-dps/Aaru).
|
[Audio CD](https://en.wikipedia.org/wiki/Compact_Disc_Digital_Audio) player for [Aaru format](https://github.com/aaru-dps/Aaru).
|
||||||
|
|
||||||
* This project is fully sponsored by the [Game Preservation Society](https://www.gamepres.org/en/).
|
* This project is fully sponsored by the [Game Preservation Society](https://www.gamepres.org/en/).
|
||||||
|
|
||||||
|
## Default Player Controls
|
||||||
|
|
||||||
|
| Key | Action |
|
||||||
|
| --- | ------ |
|
||||||
|
| `F1` | Open Settings Window |
|
||||||
|
| `F2` / `Enter` | Load New Image |
|
||||||
|
| `Space` | Toggle Play / Pause |
|
||||||
|
| `Esc` | Stop Playback |
|
||||||
|
| `→` | Next Track |
|
||||||
|
| `←` | Previous Track |
|
||||||
|
| `]` | Next Index |
|
||||||
|
| `[` | Previous Index |
|
||||||
|
| `.` | Fast Forward |
|
||||||
|
| `,` | Rewind |
|
||||||
|
| `E` | Toggle Emphasis |
|
||||||
@@ -115,11 +115,74 @@ namespace RedBookPlayer.GUI
|
|||||||
|
|
||||||
public void OnKeyDown(object sender, KeyEventArgs e)
|
public void OnKeyDown(object sender, KeyEventArgs e)
|
||||||
{
|
{
|
||||||
|
PlayerView playerView = ContentControl.Content as PlayerView;
|
||||||
|
|
||||||
|
// Open settings window
|
||||||
if(e.Key == Key.F1)
|
if(e.Key == Key.F1)
|
||||||
{
|
{
|
||||||
settingsWindow = new SettingsWindow(App.Settings);
|
settingsWindow = new SettingsWindow(App.Settings);
|
||||||
settingsWindow.Show();
|
settingsWindow.Show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Load image
|
||||||
|
else if (e.Key == Key.F2 || e.Key == Key.Enter)
|
||||||
|
{
|
||||||
|
playerView?.LoadButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Toggle playback
|
||||||
|
else if(e.Key == Key.Space || e.Key == Key.MediaPlayPause)
|
||||||
|
{
|
||||||
|
playerView?.PlayPauseButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Stop playback
|
||||||
|
else if(e.Key == Key.Escape || e.Key == Key.MediaStop)
|
||||||
|
{
|
||||||
|
playerView?.StopButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next Track
|
||||||
|
else if(e.Key == Key.Right || e.Key == Key.MediaNextTrack)
|
||||||
|
{
|
||||||
|
playerView?.NextTrackButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Previous Track
|
||||||
|
else if(e.Key == Key.Left || e.Key == Key.MediaPreviousTrack)
|
||||||
|
{
|
||||||
|
playerView?.PreviousTrackButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Next Index
|
||||||
|
else if(e.Key == Key.OemCloseBrackets)
|
||||||
|
{
|
||||||
|
playerView?.NextIndexButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Previous Index
|
||||||
|
else if(e.Key == Key.OemOpenBrackets)
|
||||||
|
{
|
||||||
|
playerView?.PreviousIndexButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Fast Foward
|
||||||
|
else if(e.Key == Key.OemPeriod)
|
||||||
|
{
|
||||||
|
playerView?.FastForwardButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Rewind
|
||||||
|
else if(e.Key == Key.OemComma)
|
||||||
|
{
|
||||||
|
playerView?.RewindButton_Click(this, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Emphasis Toggle
|
||||||
|
else if(e.Key == Key.E)
|
||||||
|
{
|
||||||
|
playerView?.EnableDisableDeEmphasisButton_Click(this, null);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|||||||
Reference in New Issue
Block a user