mirror of
https://github.com/jpochyla/psst.git
synced 2026-04-27 07:25:52 +03:00
[PR #129] Store shortcuts in config #437
Labels
No labels
api
bug
build
documentation
duplicate
enhancement
good first issue
help wanted
idea
invalid
linux
lowprio
macos
pull-request
upstream
windows
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/psst#437
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jpochyla/psst/pull/129
Author: @JuliDi
Created: 8/20/2021
Status: 🔄 Open
Base:
main← Head:store-shortcuts-in-config📝 Commits (5)
21f3856first draft of kb shortcut in config89f57ddchange kbshortcuts to be stored as string for compativility with textf554d4afinish draft of settings screen for shortcuts9e10900cleanup code, add more doc6a0ef23remove souvlaki dep from git📊 Changes
10 files changed (+283 additions, -17 deletions)
View changed files
📝
Cargo.lock(+6 -6)📝
psst-gui/src/controller/input.rs(+27 -0)📝
psst-gui/src/controller/mod.rs(+2 -0)📝
psst-gui/src/controller/playback.rs(+7 -6)➕
psst-gui/src/controller/shortcut_formatter.rs(+30 -0)📝
psst-gui/src/data/config.rs(+57 -0)➕
psst-gui/src/data/kbshortcut.rs(+90 -0)📝
psst-gui/src/data/mod.rs(+5 -1)📝
psst-gui/src/ui/mod.rs(+2 -1)📝
psst-gui/src/ui/preferences.rs(+57 -3)📄 Description
This is a first attempt at storing keyboard shortcuts in the config, following up on #111.
Ideally, if you open the preferences now, there is a "shortcuts" tab with some default settings. For now, either a single character (like "+" or "-" for the volume controls) or a
Codeas defined by https://docs.rs/keyboard-types/0.6.1/keyboard_types/enum.Code.html can be entered.At the moment, the entries are only parsed and validated – I couldn't manage to get proper feedback (like an error message or so) back to the UI when the entered shortcut could not be parsed.
It doesn't seem very straightforward to implement those keyboard shortcuts and recording them by the user would be even better (and is on my todo list). Also, there are probably a lot of corner-cases that might be or become problematic.
So feedback on this is highly appreciated.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.