marktext/docs/KEYBINDINGS.md
Felix Häusler 1ab8388c1d Cycle through tabs (#1283)
* Cycle through tabs

* Add cycle backwards alias
2019-08-19 19:06:27 +08:00

12 KiB

Key Bindings

All key bindings can be overwritten with the keybindings.json file. The file is located in the application data directory. Each entry consists of a id/accelerator pair in JSON format.

Here is an example:

{
  "fileSave": "CmdOrCtrl+Shift+S",
  "fileSaveAs": "CmdOrCtrl+S"
}

Available modifiers

  • CmdOrCtrl
  • Cmd on macOS
  • Ctrl
  • Alt/AltGr or Option on macOS
  • Shift
  • Super on Linux and Windows

Available keys

  • 0-9, A-Z, F1-F24 and punctuations
  • Plus, Space, Tab, Backspace, Delete, Insert, Return/Enter, Esc, Home, End and PrintScreen
  • Up, Down, Left and Right
  • PageUp and PageDown
  • Empty string "" to unset a accelerator

Available id's

Mark Text menu (macOS only):

Id Default Description
mtHide Command+H Hide Mark Text
mtHideOthers Command+Alt+H Hide all other windows except Mark Text
filePreferences Command+, Open settings window
fileQuit Command+Q Quit Mark Text

File menu:

Id Default Description
fileNewFile CmdOrCtrl+N New file
fileNewTab CmdOrCtrl+T New tab
fileOpenFile CmdOrCtrl+O Open markdown file
fileOpenFolder CmdOrCtrl+Shift+O Open folder
fileSave CmdOrCtrl+S Save
fileSaveAs CmdOrCtrl+Shift+S Save as...
filePrint Ctrl+P Print current tab
filePreferences Ctrl+, Open settings window (Linux/Windows only)
fileCloseTab CmdOrCtrl+W Close tab
fileCloseWindow CmdOrCtrl+Shift+W Close window
fileQuit CmdOrCtrl+Q Quit Mark Text (Linux/Windows only)

Edit menu:

Id Default Description
editUndo CmdOrCtrl+Z Undo last operation
editRedo CmdOrCtrl+Shift+Z Redo last operation
editCut CmdOrCtrl+X Cut selected text
editCopy CmdOrCtrl+C Copy selected text
editPaste CmdOrCtrl+V Paste text
editCopyAsMarkdown CmdOrCtrl+Shift+C Copy selected text as markdown
editCopyAsPlaintext CmdOrCtrl+Shift+V Copy selected text as plaintext
editSelectAll CmdOrCtrl+A Select all text of the document
editDuplicate CmdOrCtrl+Shift+P Duplicate the current paragraph
editCreateParagraph CmdOrCtrl+Shift+N Create a new paragraph after the current one
editDeleteParagraph CmdOrCtrl+Shift+D Delete current paragraph
editFind CmdOrCtrl+F Find information in the document
editFindNext CmdOrCtrl+Alt+U Continue the search and find the next match
editFindPrevious CmdOrCtrl+Shift+U Continue the search and find the previous match
editReplace CmdOrCtrl+Alt+F Replace the information with a replacement
editAidou CmdOrCtrl+/ Show Aidou dialog
editScreenshot Command+Alt+A Get the screenshot (macOS only)

Paragraph menu:

Id Default Description
paragraphHeading1 CmdOrCtrl+1 Set line as heading 1
paragraphHeading2 CmdOrCtrl+2 Set line as heading 2
paragraphHeading3 CmdOrCtrl+3 Set line as heading 3
paragraphHeading4 CmdOrCtrl+4 Set line as heading 4
paragraphHeading5 CmdOrCtrl+5 Set line as heading 5
paragraphHeading6 CmdOrCtrl+6 Set line as heading 6
paragraphUpgradeHeading CmdOrCtrl+= Upgrade a heading
paragraphDegradeHeading CmdOrCtrl+- Degrade a heading
paragraphTable CmdOrCtrl+T Insert a table
paragraphCodeFence CmdOrCtrl+Alt+C Insert a code block
paragraphQuoteBlock CmdOrCtrl+Alt+Q Insert a quote block
paragraphMathBlock CmdOrCtrl+Alt+M Insert a math block
paragraphHtmlBlock CmdOrCtrl+Alt+J/H Insert a HTML block (J on macOS, H otherwise)
paragraphOrderList CmdOrCtrl+Alt+O Insert a ordered list
paragraphBulletList CmdOrCtrl+Alt+U Insert a unordered list
paragraphTaskList CmdOrCtrl+Alt+X Insert a task list
paragraphLooseListItem CmdOrCtrl+Alt+L Convert a list item to a loose list item
paragraphParagraph CmdOrCtrl+0 Convert a heading to a paragraph
paragraphHorizontalLine CmdOrCtrl+Alt+- Add a horizontal line
paragraphYAMLFrontMatter CmdOrCtrl+Alt+Y Insert a YAML frontmatter block

Format menu:

Id Default Description
formatStrong CmdOrCtrl+B Set the font of the selected text to bold
formatEmphasis CmdOrCtrl+I Set the font of the selected text to italic
formatUnderline CmdOrCtrl+U Change the selected text to underline
formatInlineCode CmdOrCtrl+` Change the selected text to inline code
formatInlineMath CmdOrCtrl+Shift+M Change the selected text to inline math
formatStrike CmdOrCtrl+D Strike through the selected text
formatHyperlink CmdOrCtrl+L Insert a hyperlink
formatImage CmdOrCtrl+Shift+I Insert a image
formatClearFormat CmdOrCtrl+Shift+R Clear the formatting of the selected text

Window menu:

Id Default Description
windowMinimize CmdOrCtrl+M Minimize the window

View menu:

Id Default Description
viewToggleFullScreen F11 Toggle fullscreen mode (or Ctrl+Command+F on macOS)
viewSourceCodeMode CmdOrCtrl+Alt+S Switch to source code mode
viewTypewriterMode CmdOrCtrl+Alt+T Enable typewriter mode
viewFocusMode CmdOrCtrl+Shift+F Enable focus mode
viewToggleSideBar CmdOrCtrl+J Toggle sidebar
viewToggleTabBar CmdOrCtrl+Alt+B Toggle tabbar
viewDevToggleDeveloperTools CmdOrCtrl+Alt+I Toggle developer tools (debug mode only)
viewDevReload CmdOrCtrl+R Reload window (debug mode only)

Misc

Id Default Description
tabsCycleForward CmdOrCtrl+Tab Cycle through tabs
tabsCycleBackward CmdOrCtrl+Shift+Tab Cycle backwards through tabs
tabsSwitchToLeft CmdOrCtrl+PageUp Switch tab to the left
tabsSwitchToRight CmdOrCtrl+PageDown Switch tab to the right