0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-22 15:25:05 +01:00
Micah Kepe 0cabec3cfa refactor(shortcuts): decouple keyboard shortcut mechanism into generic kbd handler
Move data-global-keyboard-shortcut from <input> to <kbd> elements so the
shortcut hint itself declares the shortcut key. The generic handler in
observer.ts now manages everything: focusing the sibling input on shortcut
key press, toggling kbd visibility on focus/blur, and clearing+blurring
on Escape.

This removes the element-specific initRepoCodeSearchShortcut function and
Vue v-show logic in favor of a fully decoupled approach. Any input can now
gain keyboard shortcut support by placing a sibling
<kbd data-global-keyboard-shortcut="key"> element.

Adds a devtest page at /devtest/keyboard-shortcut for manual testing.
2026-02-14 22:43:52 -08:00
..