Skip to content

defaultKeymap

const defaultKeymap: Record<string, EditorHotkey>

Defined in: extensions/commands/commands.ts:332

Default keymapping that includes the following commands:

  • Alt + ArrowUp: Move line up
  • Alt + ArrowDown: Move line down
  • Ctrl + ArrowUp: Scroll one line up (Windows/Linux)
  • Ctrl + ArrowDown: Scroll one line down (Windows/Linux)
  • Ctrl + PageUp: Scroll one line up (Mac)
  • Ctrl + PageDown: Scroll one line down (Mac)
  • Shift + Alt + ArrowUp: Copy line up
  • Shift + Alt + ArrowDown: Copy line down
  • Enter: Insert line and indent
  • Shift + Enter: Insert line and indent
  • Mod + Enter: Insert blank line
  • Mod + ]: Indent line
  • Mod + [: Outdent line
  • Tab: Indent line (Tab capture enabled)
  • Shift + Tab: Outdent line (Tab capture enabled)
  • Shift + Mod + K: Delete line
  • Mod + /: Toggle comment
  • Shift + Alt + A: Toggle block comment
  • Ctrl + M: Toggle tab capturing (Windows/Linux)
  • Ctrl + Shift + M: Toggle tab capturing (Mac)

Here, Mod refers to Cmd on Mac and Ctrl otherwise.