Skip to content

✨ focus: navigate from keyboard events - #26

Closed
cowboyd wants to merge 1 commit into
tree-keyboardfrom
tree-focus-navigation
Closed

cowboyd wants to merge 1 commit into
tree-keyboardfrom
tree-focus-navigation

Conversation

@cowboyd

@cowboyd cowboyd commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Advancing and retreating focus are semantic tree operations, while Tab and Backtab are merely one input policy for invoking them. Keeping that policy in a small connector allows applications to replace it, omit it, or add other navigation schemes without changing focus traversal itself. It also keeps controls free to handle ordinary keys without being aware of global focus navigation.

This PR adds useFocusNavigation(), which maps Tab and Backtab keydown and key-repeat events to forward and reverse focus traversal. Navigation events are consumed, while unrelated keys and keyup events continue through KeyboardApi.

@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from 0a80766 to caa1f71 Compare August 7, 2026 06:11
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from caa1f71 to 82f73d5 Compare August 7, 2026 06:21
@pkg-pr-new

pkg-pr-new Bot commented Aug 7, 2026 •

Copy link
Copy Markdown

commit: 643e664

@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from 82f73d5 to a435d51 Compare August 10, 2026 17:30
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from a435d51 to 25aac3d Compare August 10, 2026 21:14
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from 25aac3d to ce48805 Compare August 11, 2026 04:00
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from ce48805 to 623fbf7 Compare August 11, 2026 04:27
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from 623fbf7 to 3892a8a Compare August 22, 2026 05:04
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from 3892a8a to b6cc5a5 Compare August 22, 2026 05:24
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch 2 times, most recently from 50fb758 to a116903 Compare August 23, 2026 17:28
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from a116903 to 1e7ebb1 Compare September 18, 2026 21:15
@cowboyd
cowboyd force-pushed the tree-focus-navigation branch from 1e7ebb1 to 643e664 Compare September 24, 2026 14:00
@cowboyd

cowboyd commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

closing out in favor of a DOM based substrate. See #37

@cowboyd cowboyd closed this Oct 23, 2026
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