Repository navigation
Closed
Labels
Description
What
The Keybindings tab in Settings shows [unknown] for any key bound to F0 to F12, Home, End, Tab or Ins. The default Toggle Playback row reads [ ], because Space prints as a bare space. The F-key and Home/End case is worse than a bad label. The conflict check reads each row's text back as a key, "unknown" doesn't parse, so the check skips that row. I hit it by binding Help to F5, saving with Alt-s, reopening Settings and binding Search to F5 as well. There was no "already assigned" error, and after saving both actions were on F5. A config.yml with help: f1 under keybindings: shows [unknown] from the start.
Where to look
- The local
key_to_stringinsideload_settings_for_categoryinsrc/core/app/settings_schema.rs. It has no arm for Space, Tab, Home, End, Ins or F0 to F12 and ends in_ => "unknown". All thekeys.*rows use it. key_to_config_string,handle_key_editandcheck_keybinding_conflictinsrc/tui/handlers/settings.rs.key_to_config_stringis the complete mapping, used when you capture a key.parse_key/parse_key_publicinsrc/core/user_config.rs, and thekey_to_config_stringclosure inUserConfig::save_configin the same file (a third copy).- The
SettingValue::Keyarm insrc/tui/ui/settings.rsthat draws[{}].
Possible solution
- Move
key_to_config_stringfromsrc/tui/handlers/settings.rstosrc/core/user_config.rsaspub fn key_to_config_string(key: &Key) -> String, next toparse_key_public. Keep the handler's version as the body. It has no_arm, so a newKeyvariant becomes a compile error instead of another"unknown". - Call it from
handle_key_editand fromload_settings_for_category, and delete the localkey_to_string. Switching thesave_configclosure andplugin_key_stringinsrc/tui/handlers/plugin_screen.rsover to it is optional. - The shared fn must live in core, never in
tui/.settings_schema.rsbuilds on the headlesstelemetryCI leg, wheremod tuidoesn't exist.cargo clippy --no-default-features --features telemetry -- -D warningschecks that leg. settings_schema.rsis a child ofcore/app/. It opens withuse super::*;and has no other top-level imports. Call the fn by full path (crate::core::user_config::key_to_config_string(&key)) or add it to thecrate::core::user_configimport insrc/core/app/mod.rs. Don't add auseline tosettings_schema.rs.- Space will read
[space]instead of[ ]. That's intended, it's whatsave_configwrites toconfig.yml. - Tests in the
mod testsofsrc/core/app/settings_schema.rs:keybinding_rows_spell_keys_the_way_config_yml_does:App::default(), setapp.user_config.keys.help = Key::F5andapp.user_config.keys.search = Key::Home, setapp.view.settings_category = SettingsCategory::Keybindings, callapp.load_settings_for_category(). Thekeys.helprow isSettingValue::Key("f5".to_string()),keys.searchis"home", andkeys.toggle_playbackis"space".SettingValuederivesPartialEq, soassert_eq!works.every_key_row_parses_back_as_a_key: same setup. Every row whose id starts with"keys."holds a string thatcrate::core::user_config::parse_key_publicaccepts. This fails on main for the F5 and Home rows.
- In the
mod testsofsrc/core/user_config.rs:config_string_round_trips_through_parse_key. That module has nouse super::*;, so importsuper::{key_to_config_string, parse_key}andcrate::core::input::Keyinside the test liketest_parse_keydoes. ForKey::Char(' '),Char('a'),Ctrl('d'),Alt('x'),Tab,Home,End,Ins,F0,F5,F12,PageUp,DeleteandEsc,parse_key(key_to_config_string(&k)).unwrap()giveskback. Leave outKey::Unknown(it writes"unknown"on purpose). - In the
mod testsofsrc/tui/handlers/settings.rs:capturing_a_key_already_bound_elsewhere_is_refused_after_a_reload. Walk the real path with theopen_settingsandsetting_indexhelpers there. Setapp.view.settings_category = SettingsCategory::Keybindings, open Settings, selectkeys.help, callhandler(Key::Enter, &mut app)thenhandler(Key::F5, &mut app), thenapp.apply_settings_changes()andreload_category(&mut app). Now selectkeys.search, press Enter, then F5. The Search row still holds"/"andapp.api_error()contains"already assigned to Help". - Don't write
app.user_config.keys.help = ...in that handler test. Anyapp.<field> =line undersrc/tui/handlers, tests included, raisesapp_field_writes_in_tui_handlersand the gate fails. The Enter/F5 walk above avoids it. - PR fix(config): parse ctrl-- and alt-- keybindings #592 (merged) changed
parse_keyinsrc/core/user_config.rsandtools/gates.count, so start from the latest main. - Add a line under
### Fixedin the[Unreleased]section ofCHANGELOG.md. - Each new
#[test]raisestest_attribute_totalintools/gates.countby one. If the number is off,cargo testfails insrc/gates.rsand prints the right one.
Done when
cargo test --no-default-features --features telemetry,tui settingsandcargo test --no-default-features --features telemetry,tui round_trips_through_parse_keylist your new tests.cargo fmt --all -- --check,cargo clippy --no-default-features --features telemetry,tui -- -D warningsandcargo test --no-default-features --features telemetry,tuipass.
Metadata
Metadata
Assignees
Labels
Type
Fields
No fields configured for issues without a type.
Activity
spotatui commentedon Sep 26, 2026
🎧 spotatui triage
Auto-triaged with DeepSeek V4-Flash.
Label:
bugLikely area: Settings keybindings display and conflict detection
Summary
The Keybindings tab in Settings renders
[unknown]for any binding to F0–F12, Home, End, Tab or Ins, and Space prints as a blank[ ]for the default Toggle Playback row. Because the conflict check re-reads each row's displayed text as a key, the unparseableunknownstring makes it skip those rows, so the user could bind both Help and Search to F5 with no "already assigned" warning and both actions ended up on F5. Aconfig.ymlcontaininghelp: f1shows[unknown]immediately, so this affects display and conflict detection for common keys.Key points
[unknown]in the Keybindings tab[ ]"unknown"doesn't parse so those rows are skipped and conflicts go undetectedconfig.ymlwithhelp: f1underkeybindings:shows[unknown]from the startWhat would help
Possible duplicates
Compared against the 48 most recently updated open issues.
fix(cli): accept `--completions powershell`, keep `power-shell` as an…
fix(tui): honour rebound paging keys in the Help menu and episode list (
fix(settings): width-check the Playing Icon like the other fixed-cell…
fix(settings): spell every key like config.yml and check conflicts on…
fix(stats): keep Spotify artist names with "&", "and" or a comma whole (