Skip to content

Fix arrow keys not moving units (secondary accelerators never bound) - #164

Open
KevinGriffin-new wants to merge 1 commit into
FreeCol:sf-auto-mergefrom
KevinGriffin-new:fix-arrow-key-movement
Open

Fix arrow keys not moving units (secondary accelerators never bound)#164
KevinGriffin-new wants to merge 1 commit into
FreeCol:sf-auto-mergefrom
KevinGriffin-new:fix-arrow-key-movement

Conversation

@KevinGriffin-new

Copy link
Copy Markdown

The secondary MoveAction constructor never calls setCanvasKeyBinding(true), so the arrow/Home/End/PgUp/PgDn accelerators from FreeColMessages.properties are never installed in the Canvas input map. Numpad works, arrows do nothing. Found on a laptop with no numpad, where there is currently no keyboard movement at all. One line.

Canvas only installs input-map bindings for actions with
isCanvasKeyBinding(). The secondary MoveAction constructor — carrying the
moveAction.<D>.secondary accelerators (UP/DOWN/LEFT/RIGHT, HOME/END,
PGUP/PGDN) — never set the flag, so arrow-key movement was dead on every
platform; numpad-less laptops had no keyboard movement at all.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant