diff options
| author | Paul Buetow <paul@buetow.org> | 2026-01-21 21:53:56 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-01-21 21:53:56 +0200 |
| commit | ed8925801c251f6efdc595badb66b6774cc72c68 (patch) | |
| tree | 1e3e95624081434e4e58030a32d63b0443b63000 /internal | |
| parent | f3ddb7a1a486e8e3c905a556ebb00e8323b42021 (diff) | |
improve: Space hotkey for back audio and consistent button icons
- Add Space key as primary hotkey to play back audio (bg-bg cards only)
More intuitive than Shift+P for playing the second audio
- Change back audio button icon from MediaSkipNextIcon to MediaPlayIcon
Both front and back buttons now use the same play icon for consistency
- Update hotkeys help dialog to document Space key
Mark P/П as legacy (kept for backward compatibility)
This makes the UI more consistent and the Space key is more natural
for playing the back audio without using Shift.
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/gui/app.go | 12 | ||||
| -rw-r--r-- | internal/gui/audio_player.go | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/internal/gui/app.go b/internal/gui/app.go index cb0a4fe..03d45aa 100644 --- a/internal/gui/app.go +++ b/internal/gui/app.go @@ -1536,8 +1536,9 @@ func (a *Application) onShowHotkeys() { **r/р** Regenerate all ## Playback -**p/п** Play audio (front for bg-bg) -**P/П** Play back audio (bg-bg only) +**p/п** Play front audio (or audio for en-bg) +**Space** Play back audio (bg-bg only) +**P/П** Legacy: Play back audio (bg-bg only, use Space instead) **u/у** Toggle auto-play ## Export & Archive @@ -2592,11 +2593,16 @@ func (a *Application) handleShortcutKey(key fyne.KeyName) { } a.onNextWord() - case fyne.KeyP: // Play audio + case fyne.KeyP: // Play front audio if a.currentAudioFile != "" { a.audioPlayer.Play() } + case fyne.KeySpace: // Play back audio (for bg-bg cards) + if a.currentAudioFileBack != "" { + a.audioPlayer.PlayBack() + } + case fyne.KeyX: // Export to APKG a.onExportToAnki() diff --git a/internal/gui/audio_player.go b/internal/gui/audio_player.go index f9d0ad7..4846615 100644 --- a/internal/gui/audio_player.go +++ b/internal/gui/audio_player.go @@ -51,7 +51,7 @@ func NewAudioPlayer() *AudioPlayer { p.playButtonLabel.TextStyle = fyne.TextStyle{Bold: true} p.playBackButton = ttwidget.NewButton("", p.onPlayBack) - p.playBackButton.Icon = theme.MediaSkipNextIcon() + p.playBackButton.Icon = theme.MediaPlayIcon() // Same icon as front button p.playBackLabel = widget.NewLabel("") p.playBackLabel.TextStyle = fyne.TextStyle{Bold: true} |
