Introduction

The core ecosystem philosophy of DeepSeek Harness is “everything is a plugin.” In agent development or debugging scenarios, frequent approvals, plan confirmations, and repeated content entry require many mouse clicks, which can easily interrupt the workflow. To reduce reliance on the mouse and improve operational efficiency, a more fine-grained approach to input and interaction control is needed.

This introduces @zhangqingyu/dsh-keyboard-shortcuts, a client-side plugin that introduces input history restoration, approval, and plan keyboard shortcut capabilities to DeepSeek Harness through a configurable keyboard shortcut manager and persists the configuration.

Core Features

This plugin mainly provides the following capabilities:

  • Configurable keyboard shortcut manager: Allows customizing keyboard shortcuts on the settings page.
  • Settings page binding: Provides a visual keyboard shortcut recording interface.
  • Input history restoration: Supports using ArrowUp to restore the last submitted content and ArrowDown to navigate forward or return to a draft.
  • Approval and plan shortcuts: Supports quickly approving permission escalations and plan approvals.
  • Configuration persistence: Stores configuration in localStorage, keeping it effective after a page refresh.
  • Clipboard compatibility: Does not intercept system copy, cut, and paste operations; relies on the native Edit menu to handle special keyboard combinations on macOS.

Installation and Activation

After cloning the repository, use DeepSeek Harness’s command-line tool to install it.

git clone https://github.com/904915452/dsh-keyboard-shortcuts.git
cd dsh-keyboard-shortcuts
dsh plugin --profile web add "file:$(pwd)"

After installation is complete, restart the application and refresh the page. Open the “Settings” page, and you will see the new “Keyboard Shortcuts” configuration page.

Usage Instructions

The plugin provides a visual shortcut recording feature on the “Settings → Keyboard Shortcuts” page. Click the button to the right of an event and press the desired key combination to complete the binding.

Default Shortcuts

The plugin includes default shortcuts for the following events:

Event Default Shortcut Action
Previous input ArrowUp Restore the last submitted content
Next input ArrowDown Navigate forward / return to the draft being edited
Allow permission escalation Mod+Enter Approval dialog: “Allow once”
Deny permission escalation Escape Approval dialog: “Deny”
Approve plan Mod+Enter Plan approval: “Confirm execution”
Plan to chat Escape Plan approval: “Discuss in chat”

Mod represents Cmd on macOS and Ctrl on Windows/Linux.

Shortcut Recording and Conflict Handling

  • Recording: Click the button to the right of the corresponding event on the settings page and press the target key combination to complete the binding.
  • Conflict handling: Multiple events can share the same shortcut (for example, Mod+Enter can be bound to both “Allow permission escalation” and “Approve plan”). When the shortcut is pressed, the system tries to match the corresponding events in order. If the first event matches but the related dialog is not found, it continues trying the next event instead of giving up directly.

Technical Details and Limitations

  • DOM structure dependency: The shortcuts for approval and plan buttons depend on the DOM structure of the dialogs in the current version (such as [data-approval-key] / [data-plan-review-key]). If an app update changes the structure, the plugin logic needs to be adjusted accordingly.
  • Input history trigger conditions: Input history (ArrowUp / ArrowDown) is triggered only under the following conditions:
    1. The application is in an idle state (phase === "plain").
    2. The cursor is on the first line (ArrowUp) or the last line (ArrowDown).
    3. No dropdown menu is open (such as the / candidate menu or [role="listbox"]).
  • Clipboard compatibility: The plugin attaches capture-phase listeners at the document level, but it does not intercept the composer’s own clipboard events, nor does it interfere with copy buttons on messages, avoiding disruption to the native copy experience. Cmd+C/V/X/A on macOS depend on the native Edit menu for proper handling.

Conclusion

This plugin simplifies repetitive operation workflows in DeepSeek Harness through configuration persistence and fine-grained event binding. To explore more plugins or submit feedback, visit the GitHub repository.