Refactor tab cycling logic in TUI command input handling

- Simplified the condition for disabling tab cycling by checking only for the Tab key.
- Improved clarity in the command key down event handling for better user experience.
This commit is contained in:
BruceChen 2026-03-27 00:29:25 +08:00
parent fe7ab9f373
commit ac1d5c37a6

View file

@ -272,7 +272,7 @@ namespace MinecraftClient.Tui
private void OnCommandKeyDown(object? sender, KeyEventArgs e)
{
if (_tabCycling && e.Key is not (Key.Tab or Key.Up or Key.Down or Key.Escape))
if (_tabCycling && e.Key is not Key.Tab)
_tabCycling = false;
bool ctrl = (e.KeyModifiers & KeyModifiers.Control) != 0;