Skip to content

Feature: Add keyboard shortcuts for repository file and code search #36417

@micahkepe

Description

@micahkepe

Feature Description

Add GitHub-like keyboard shortcuts to repository pages for quick access to search functionality:

  • T key: Focus the "Go to file" search input
  • S key: Focus the "Search code" input
  • Escape key: Clear and unfocus the currently focused search input

Visual Indicators

Display keyboard hint badges (kbd elements) inside each search input showing the available shortcut key. The hints automatically hide when:

  • The input is focused
  • The input contains text

Implementation

The shortcuts are disabled when:

  • The user is typing in an input field, textarea, or contenteditable element
  • Modifier keys (Ctrl, Meta, Alt) are pressed

Related PR

Implementation: #36416

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions