From 4765917be41c47b54e0fa8d1a79f4cb29c0db8dc Mon Sep 17 00:00:00 2001 From: Simonas Kareiva Date: Thu, 21 May 2026 19:00:46 +0300 Subject: [PATCH] Switch to ^X as default submission key --- src/tui.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/tui.rs b/src/tui.rs index 191deb9..1b54df4 100644 --- a/src/tui.rs +++ b/src/tui.rs @@ -414,8 +414,8 @@ fn step( return Ok(true); } - // Global: Ctrl-S grades while in Game. - if ctrl && key.code == KeyCode::Char('s') && matches!(screen, Screen::Game) { + // Global: Ctrl-X grades while in Game. + if ctrl && key.code == KeyCode::Char('x') && matches!(screen, Screen::Game) { grade(editor.text(), prog, registry, log)?; if matches!(log.entries.last(), Some(LogEntry::Completed)) { *screen = Screen::Completed; @@ -659,10 +659,10 @@ fn status_text(screen: &Screen, focus: Focus) -> String { " [↑/↓] choose · [Enter] confirm · [PgUp/PgDn] scroll · [q] quit".into() } (Screen::Game, Focus::Editor) => { - " [Ctrl-S] grade · [Tab] focus log · [Esc] focus log · [Ctrl-Q] quit".into() + " [Ctrl-X] grade · [Tab] focus log · [Esc] focus log · [Ctrl-Q] quit".into() } (Screen::Game, Focus::Game) => { - " [Ctrl-S] grade · [Tab] focus editor · [↑/↓] scroll · [r] reset · [q] quit".into() + " [Ctrl-X] grade · [Tab] focus editor · [↑/↓] scroll · [r] reset · [q] quit".into() } (Screen::ResetConfirm, _) => " [y] confirm wipe · any other key cancels".into(), (Screen::Completed, _) => { @@ -773,11 +773,11 @@ fn entry_lines(entry: &LogEntry) -> Vec { "🌀 YAMLabyrinth — learn YAML by writing your way through.".to_string(), String::new(), " Each chamber reveals a target. Match it with YAML in the editor".to_string(), - " on the right, then press Ctrl-S to grade your attempt.".to_string(), + " on the right, then press Ctrl-X to grade your attempt.".to_string(), String::new(), " ⌨ Controls".to_string(), " [Tab] swap focus between log and editor".to_string(), - " [Ctrl-S] grade your YAML".to_string(), + " [Ctrl-X] grade your YAML".to_string(), " [↑/↓] scroll the log (when log is focused)".to_string(), " [PgUp/PgDn] scroll faster".to_string(), " [r] reset progress".to_string(), @@ -834,12 +834,12 @@ fn entry_lines(entry: &LogEntry) -> Vec { score * 100.0, threshold * 100.0 ), - " Refine your YAML and press Ctrl-S to retry.".to_string(), + " Refine your YAML and press Ctrl-X to retry.".to_string(), ], LogEntry::InvalidYaml { error } => vec![ " ⚠ Couldn't parse YAML".to_string(), format!(" {error}"), - " Fix it in the editor and press Ctrl-S to retry.".to_string(), + " Fix it in the editor and press Ctrl-X to retry.".to_string(), ], LogEntry::Completed => vec![ " 🏆 Labyrinth complete!".to_string(),