fix: Q returns to lobby instead of killing SSH session
Pressing Q in game now cleans up the session and returns to lobby, instead of calling tea.Quit which terminates the SSH connection and shows "Connection lost" on web. Only Ctrl+C force-quits now. Also cleans up room on exit so abandoned rooms don't persist in lobby. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -94,6 +94,10 @@ func isQuit(key tea.KeyMsg) bool {
|
||||
return isKey(key, "q", "ctrl+c") || key.Type == tea.KeyCtrlC
|
||||
}
|
||||
|
||||
func isForceQuit(key tea.KeyMsg) bool {
|
||||
return isKey(key, "ctrl+c") || key.Type == tea.KeyCtrlC
|
||||
}
|
||||
|
||||
func isUp(key tea.KeyMsg) bool {
|
||||
return isKey(key, "up") || key.Type == tea.KeyUp
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user