AgentSkillsCN

hyper-keybindings

当用户询问“Hyper 键绑定”、“Hyper 键”、“Hyper 快捷键”、“自定义 Hyper 键”、“Hyper 键盘映射”、“Hyper 分割窗格”,或提及 Hyper 终端中的键盘快捷键与键位自定义时,应使用此技能。

SKILL.md
--- frontmatter
name: hyper-keybindings
description: This skill should be used when the user asks about "hyper keybindings", "hyper keys", "hyper shortcuts", "customize hyper keys", "hyper keymap", "pane splitting hyper", or mentions keyboard shortcuts and key customization in Hyper terminal.
version: 0.3.5

Hyper Keybindings

Configure keyboard shortcuts and keymaps in Hyper terminal.

Keymap Configuration

Define custom keybindings in the keymaps section of .hyper.js:

javascript
module.exports = {
  config: {
    // ... other config
  },

  keymaps: {
    // Window management
    'window:devtools': 'cmd+alt+o',
    'window:reload': 'cmd+shift+r',
    'window:reloadFull': 'cmd+shift+f5',
    'window:preferences': 'cmd+,',
    'window:new': 'cmd+n',
    'window:minimize': 'cmd+m',
    'window:close': 'cmd+shift+w',
    'window:toggleFullScreen': 'cmd+ctrl+f',

    // Zoom
    'zoom:reset': 'cmd+0',
    'zoom:in': 'cmd+plus',
    'zoom:out': 'cmd+minus',

    // Tabs
    'tab:new': 'cmd+t',
    'tab:next': 'cmd+shift+]',
    'tab:prev': 'cmd+shift+[',

    // Panes
    'pane:splitVertical': 'cmd+d',
    'pane:splitHorizontal': 'cmd+shift+d',
    'pane:close': 'cmd+w',

    // Editor
    'editor:copy': 'cmd+c',
    'editor:paste': 'cmd+v',
    'editor:selectAll': 'cmd+a',
  },
};

Available Actions

Window Actions

ActionDefault (macOS)Description
window:devtoolscmd+alt+iOpen DevTools
window:reloadcmd+shift+rReload window
window:preferencescmd+,Open preferences
window:newcmd+nNew window
window:closecmd+shift+wClose window
window:toggleFullScreencmd+ctrl+fToggle fullscreen

Tab Actions

ActionDefault (macOS)Description
tab:newcmd+tNew tab
tab:nextcmd+shift+]Next tab
tab:prevcmd+shift+[Previous tab

Pane Actions

ActionDefault (macOS)Description
pane:splitVerticalcmd+dSplit vertically
pane:splitHorizontalcmd+shift+dSplit horizontally
pane:closecmd+wClose pane

Editor Actions

ActionDefault (macOS)Description
editor:copycmd+cCopy selection
editor:pastecmd+vPaste clipboard
editor:selectAllcmd+aSelect all

Platform Differences

Use platform-appropriate modifiers:

  • macOS: cmd, alt, ctrl, shift
  • Windows/Linux: ctrl, alt, shift
javascript
// Platform detection in config
const isMac = process.platform === 'darwin';

keymaps: {
  'tab:new': isMac ? 'cmd+t' : 'ctrl+t',
}

Key Syntax

  • Single keys: 'a', '1', 'f5'
  • With modifiers: 'cmd+c', 'ctrl+shift+r'
  • Multiple modifiers: 'cmd+alt+i', 'ctrl+shift+alt+n'

Reload After Changes

After modifying keymaps:

  • macOS: Cmd+Shift+R
  • Windows/Linux: Ctrl+Shift+R