From b808a2820da3a2c1f5cba7cf23212e35a38cb33b Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Sun, 8 Mar 2026 11:42:23 -0400 Subject: [PATCH] anagrams: Allow pressing Enter to start a claim If claiming letters from the center, the user can just start typing. But for a steal, they need another keybinding to initiate the claim phase and Enter seems like a reasonable option for this. --- anagrams/anagrams.jsx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/anagrams/anagrams.jsx b/anagrams/anagrams.jsx index 3ad6970..09e5f04 100644 --- a/anagrams/anagrams.jsx +++ b/anagrams/anagrams.jsx @@ -601,11 +601,15 @@ class Game extends React.Component { return; } - /* Enter: submit word during claim. */ - if (key === "ENTER" && this.state.claim_active) { + /* Enter: submit word during claim, or start a claim. */ + if (key === "ENTER") { e.preventDefault(); - if (this.state.claim_rack.length >= 4) { - this.submit_word(); + if (this.state.claim_active) { + if (this.state.claim_rack.length >= 4) { + this.submit_word(); + } + } else if (!this.state.claiming && !this.state.claim_player) { + this.start_claim(); } return; } -- 2.45.2