Skip to content

Remove vim-style keybindings (hjkl) from navigation - #32

Merged
phaax merged 1 commit into
mainfrom
claude/fix-keybind-conflicts-arej2
Apr 17, 2026
Merged

Remove vim-style keybindings (hjkl) from navigation#32
phaax merged 1 commit into
mainfrom
claude/fix-keybind-conflicts-arej2

Conversation

@phaax

@phaax phaax commented Apr 17, 2026

Copy link
Copy Markdown
Owner

This PR removes support for vim-style navigation keybindings (hjkl) across the codebase, standardizing on arrow keys and WASD for movement controls.

Summary

Vim-style keybindings (h/j/k/l for left/down/up/right navigation) have been removed from all UI components. The codebase now consistently uses arrow keys and WASD as the primary alternative navigation methods.

Key Changes

  • Menu.ts: Removed 'k' from up navigation and 'j' from down navigation. Reorganized key handling to prioritize explicit option shortcuts before navigation keys, with auto-shortcuts (first letter matching) as a fallback.
  • CharCreateScreen.ts: Removed 'k'/'j' from list navigation handlers and 'k'/'j' from skills navigation handler.
  • JukeboxScreen.ts: Removed 'k'/'K' from up navigation keybinding.
  • WorldMapScreen.ts: Removed entire vim-style movement mapping ('k', 'j', 'h', 'l').

Implementation Details

The Menu.ts refactoring also improves key handling priority:

  1. Explicit option shortcuts (highest priority)
  2. Navigation keys (arrow keys and WASD)
  3. Activation keys (Enter and Space)
  4. Auto-shortcuts based on first letter of labels (lowest priority)

This ensures that option-specific shortcuts cannot be shadowed by navigation keybindings.

https://claude.ai/code/session_01PEoMNt9CCkZeuBTjYM9Y9y

- Remove h/j/k/l as movement aliases from world map (HJKL conflicts)
- Remove j/k from Menu, charCreate list/skills navigation (HJKL; j also
  globally intercepted to open Jukebox in most game states)
- Remove k/K from Jukebox up-navigation (HJKL)
- Reorder Menu.handleKey so explicit opt.key shortcuts are checked before
  WASD navigation keys, fixing s="Save Game" being shadowed by s=move-down

https://claude.ai/code/session_01PEoMNt9CCkZeuBTjYM9Y9y
@phaax
phaax merged commit 497fcbf into main Apr 17, 2026
2 checks passed
@phaax
phaax deleted the claude/fix-keybind-conflicts-arej2 branch April 17, 2026 18:53
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.

2 participants