Preface

In DeepSeek Harness (DSH), interactive panels such as approvals, tool prompts, and plan reviews all feature Confirm and Cancel buttons. dsh-approval-hotkeys is used to reduce repetitive clicking: Enter triggers the Confirm button, and Esc triggers the Cancel button. It brings the common Confirm/Reject habits from Claude Code to DSH panels, handling only DSH-rendered interactive panels with buttons.

Positioning

  • Plugin Name: dsh-approval-hotkeys
  • Maintainer: SiriLee
  • Type: DeepSeek Harness client plugin
  • License: MIT
  • Purpose: Provides unified Enter/Esc hotkeys for approval panels, question/selection panels, and plan review panels

Core Features

Below introduces keybinding behavior by panel type.

Panel Enter Esc
Approval Panel Allow once Reject
Question/Selection Panel Submit / Next Discard the group
Plan Review Panel Approve Decline; if no Decline, then Discuss

These hotkeys apply to DSH-rendered interactive panels with buttons, including edit approval, privilege elevation, tool prompts, and plan review. The plugin has no configuration options and no settings page.

Installation and Enablement

First, install the plugin:

dsh plugin --profile web add dsh-approval-hotkeys

This command installs the plugin to the web profile. After installation, restart dsh web; if there is no change on the host side, since this plugin is a pure browser-side plugin, you can also simply refresh the page. After the above steps, Enter and Esc can be used once the panel appears.

Typical Usage

After the panel appears, the keybinding rules are as follows:

Enter → Panel's primary button / confirm action
Esc   → Panel's cancel button / cancel action

Specifically for panels:

  1. Approval Panel: Enter selects Allow once, Esc selects Reject.
  2. Question/Selection Panel: Enter selects Submit / Next, Esc selects Discard the group.
  3. Plan Review Panel: Enter selects Approve, Esc selects Decline; if the panel has no Decline action, then Discuss is selected.

Working Mechanism

This plugin is a pure browser-side plugin, with a no-op stub on the host side. All behavior comes from a document-level keydown listener, which is responsible for finding the current panel and clicking the corresponding button.

Button resolution is based on position rather than stable semantic attributes: the confirm button takes the primary button in the panel’s action row, and the cancel button takes the corresponding Reject, Discard, Decline (or Discuss). Therefore, it relies on DSH panel layout conventions.

To avoid false triggers, the plugin skips the following cases:

  • Pressing keys inside input, textarea, select, or contentEditable;
  • Focus is already on the button when Enter is pressed, to avoid repeated triggering;
  • Ctrl / Meta / Alt modifier keys and long-press repeat keys;
  • Pressing Esc when there is no panel.

When there is no panel, Esc is left as-is for the browser or DSH to handle. The plugin will not stop or pause the agent.

Plugin Boundaries

If other plugins inject non-action buttons into interactive panels (e.g., decorative controls, collapse buttons), it is recommended to mark that button:

<button data-hotkey="none">Collapse diff</button>

dsh-approval-hotkeys will skip buttons marked with data-hotkey="none" when parsing confirm/cancel buttons. This is a cooperative opt-out convention, not a hard guarantee: if other plugins do not mark buttons, or inject truly clickable action buttons, or the DSH panel layout changes, the hotkeys may still be affected by button order.

Developer Installation Notes

When installing from a local checkout or a fixed commit, you can use:

dsh plugin --profile web add /path/to/dsh-approval-hotkeys

Or:

dsh plugin --profile web add github:SiriLee/dsh-approval-hotkeys#<sha>

Some git installation methods require adding an allowBuilds key to pnpm-workspace.yaml in the current profile before the first run. After configuration, enable the plugin using the installation command above.

Applicable Scenarios and Notes

Suitable for DSH users who wish to reduce mouse clicks in approval, question selection, and plan review panels. It is a pure browser-side plugin with an empty stub on the host side; behavior is limited to browser-side keydown listening and clicking existing panel buttons; it does not initiate network requests, access files, or read credentials.

However, the plugin still runs within the web client context started by the current dsh process and relies on the DOM access capabilities of that page context. Before installation, check the source code and MIT license to confirm the current DSH environment, profile, and dependency versions meet expectations.

Conclusion

The value of dsh-approval-hotkeys lies in fixing DSH interactive panel confirm and cancel actions to Enter/Esc, making approval, selection, and plan review closer to keyboard operation habits.

  • GitHub: https://github.com/SiriLee/dsh-approval-hotkeys
  • DSH Community Directory: Search for plugin name dsh-approval-hotkeys