Skip to content

Keyboard Shortcuts

Avo ships with a built-in keyboard shortcut system that lets users navigate and operate the admin panel without touching the mouse. Press ? at any time to open the shortcuts reference modal, which lists every shortcut available on the current page.

With no configuration, all shortcuts are enabled and each bound button or link renders a small badge — for example C on a Create button — hinting at its shortcut. Shortcuts never fire while you're typing in an input, textarea, select, or contenteditable field, so search boxes and form fields behave normally.

Configure keyboard shortcuts

Keyboard shortcuts are controlled through config.hotkeys:

ruby
# config/initializers/avo.rb
Avo.configure do |config|
  config.hotkeys = {
    enabled: true,          # master switch for all keyboard shortcuts
    show_key_badges: true   # show the inline <kbd> badges next to buttons and links
  }
end

Set enabled: false to turn the whole system off — no shortcuts fire and the key badges disappear. Set show_key_badges: false to keep the shortcuts working but hide the inline badges from the UI.

Both default to true, so you only need to set the keys you want to change.

Global shortcuts

These shortcuts are available from anywhere in the admin panel.

KeysAction
?Open/close the keyboard shortcuts modal
Cmd+K / Ctrl+KFocus the global search
Shift+\Toggle the sidebar
Shift+TFocus the page content (then Tab into it)
Shift+KToggle the shortcut key badges
BGo back
r r rReload the page (preserves scroll position)
/ Navigate options inside a modal
EscClose modal / unfocus field

Shift+K hides or shows the inline badges for the current browser (the choice is remembered). It only works when show_key_badges isn't set to false.

Appearance shortcuts

Cycle the appearance settings from any page.

KeysAction
Shift+MCycle the color scheme (auto / light / dark)
Shift+NCycle the neutral theme
Shift+ACycle the accent color

Index view

KeysAction
/Focus the resource search input
CCreate a new record
AOpen the actions menu
J / KFocus the table and move to the next / previous row
/ Navigate rows (once the table is focused)
Open the focused record
SpaceSelect / deselect the row
EscClear row focus / deselect rows
V TSwitch to table view
V GSwitch to grid view
V MSwitch to map view

Use J / K to jump into the table from anywhere on the page; the arrow keys take over once a row is focused.

Show view

KeysAction
EEdit the record
DDelete the record
AOpen the actions menu
IGo back to the index

Edit view

KeysAction
Cmd+ / Ctrl+Submit the form
IGo back to the index
EscUnfocus the current field

Action modal

KeysAction
Cmd+ / Ctrl+Run the action
EscCancel / close the modal

Assign hotkeys to the sidebar menu

The avo-menu DSL supports a hotkey: option on any item type, letting users jump straight to a sidebar section from anywhere in the admin panel.

ruby
# config/initializers/avo.rb
Avo.configure do |config|
  config.main_menu = -> {
    section "Content", icon: "tabler/outline/files" do
      resource :post, hotkey: "g p"
      resource :category, hotkey: "g c"
      link "Analytics", path: "/avo/analytics", hotkey: "g a"
    end
  }
end

The menu item automatically renders a key badge next to its label and registers the binding. Hotkey strings use @github/hotkey syntax — space-separate keys for a sequence like g p.

For resource items you can set the hotkey on the resource class instead, and it applies wherever that resource appears in the menu:

ruby
class Avo::Resources::Post < Avo::BaseResource
  self.hotkey = "g p"
end

Add your own shortcuts

Avo binds shortcuts declaratively through data-hotkey attributes, so any button or link you render in a custom tool or partial can opt in:

html
<a href="/avo/posts/new" data-hotkey="c">New post</a>

To offer platform alternatives (Mac vs. non-Mac), space-separate the variants:

html
<button data-hotkey="Meta+Enter Control+Enter">Save</button>

Bindings are re-applied on every Turbo navigation, so they survive turbo:load and turbo:frame-render without extra work.

Shortcuts hidden inside association panels

When a resource is rendered inside an association panel — as a has_many, has_one, or similar relation on another record's show page — some shortcuts are intentionally suppressed to avoid ambiguity:

  • Create (C) and Actions (A) — hidden because the show page may host several association panels, so a single C or A can't know which one to target.
  • Edit (E) and Delete (D) — hidden because they belong to the show view of the top-level record, not to an association row.