From abcdeb01e9dc3d2b4e670ec407986b059980bd9c Mon Sep 17 00:00:00 2001 From: Jeremy O'Brien Date: Fri, 31 Jan 2020 11:05:40 -0500 Subject: [PATCH 1/3] Fix defaultkeys help doc to match reality --- runtime/help/defaultkeys.md | 16 ++++++++-------- runtime/help/keybindings.md | 12 ++++++------ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/runtime/help/defaultkeys.md b/runtime/help/defaultkeys.md index b2d4790a..be20b711 100644 --- a/runtime/help/defaultkeys.md +++ b/runtime/help/defaultkeys.md @@ -21,10 +21,10 @@ can change it! |--------------------------- |------------------------------------------------------------------------------------------ | | Arrows | Move the cursor around | | Shift+arrows | Move and select text | -| Home or Ctrl+LeftArrow | Move to the beginning of the current line | -| End or Ctrl+RightArrow | Move to the end of the current line | -| Alt+LeftArrow | Move cursor one word left | -| Alt+RightArrow | Move cursor one word right | +| Home or Alt+LeftArrow | Move to the beginning of the current line | +| End or Alt+RightArrow | Move to the end of the current line | +| Ctrl+LeftArrow | Move cursor one word left | +| Ctrl+RightArrow | Move cursor one word right | | Alt+{ | Move cursor to previous empty line, or beginning of document | | Alt+} | Move cursor to next empty line, or end of document | | PageUp | Move cursor up one page | @@ -62,10 +62,10 @@ can change it! | Key | Description of function | |------------------------------------ |------------------------------------------ | -| Alt+Shift+RightArrow | Select word right | -| Alt+Shift+LeftArrow | Select word left | -| Shift+Home or Ctrl+Shift+LeftArrow | Select to start of current line | -| Shift+End or Ctrl+Shift+RightArrow | Select to end of current line | +| Ctrl+Shift+RightArrow | Select word right | +| Ctrl+Shift+LeftArrow | Select word left | +| Shift+Home or Alt+Shift+LeftArrow | Select to start of current line | +| Shift+End or Alt+Shift+RightArrow | Select to end of current line | | Ctrl+Shift+UpArrow | Select to start of file | | Ctrl+Shift+DownArrow | Select to end of file | | Ctrl+X | Cut selected text | diff --git a/runtime/help/keybindings.md b/runtime/help/keybindings.md index 305e04a8..b81668c6 100644 --- a/runtime/help/keybindings.md +++ b/runtime/help/keybindings.md @@ -404,13 +404,13 @@ MouseWheelRight "AltRight": "WordRight", "AltUp": "MoveLinesUp", "AltDown": "MoveLinesDown", - "AltShiftRight": "SelectWordRight", - "AltShiftLeft": "SelectWordLeft", - "CtrlLeft": "StartOfLine", - "CtrlRight": "EndOfLine", - "CtrlShiftLeft": "SelectToStartOfLine", + "CtrlShiftRight": "SelectWordRight", + "CtrlShiftLeft": "SelectWordLeft", + "AltLeft": "StartOfLine", + "AltRight": "EndOfLine", + "AltShiftLeft": "SelectToStartOfLine", "ShiftHome": "SelectToStartOfLine", - "CtrlShiftRight": "SelectToEndOfLine", + "AltShiftRight": "SelectToEndOfLine", "ShiftEnd": "SelectToEndOfLine", "CtrlUp": "CursorStart", "CtrlDown": "CursorEnd", From 23544129228fedc666346e0a59a2125d4d7b4689 Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Fri, 7 Feb 2020 20:14:35 -0500 Subject: [PATCH 2/3] Add mac keybinds --- runtime/help/defaultkeys.md | 44 ++++++++++++++++++++----------------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/runtime/help/defaultkeys.md b/runtime/help/defaultkeys.md index f8b4f097..d13975fd 100644 --- a/runtime/help/defaultkeys.md +++ b/runtime/help/defaultkeys.md @@ -17,22 +17,24 @@ can change it! ### Navigation -| Key | Description of function | -|--------------------------- |------------------------------------------------------------------------------------------ | -| Arrows | Move the cursor around | -| Shift+arrows | Move and select text | -| Home or Alt+LeftArrow | Move to the beginning of the current line | -| End or Alt+RightArrow | Move to the end of the current line | -| Ctrl+LeftArrow | Move cursor one word left | -| Ctrl+RightArrow | Move cursor one word right | -| Alt+{ | Move cursor to previous empty line, or beginning of document | -| Alt+} | Move cursor to next empty line, or end of document | -| PageUp | Move cursor up one page | -| PageDown | Move cursor down one page | -| Ctrl+Home or Ctrl+UpArrow | Move cursor to start of document | -| Ctrl+End or Ctrl+DownArrow | Move cursor to end of document | -| Ctrl+L | Jump to a line in the file (prompts with #) | -| Ctrl+W | Cycle between splits in the current tab (use `> vsplit` or `> hsplit` to create a split) | +| Key | Description of function | +|---------------------------- |------------------------------------------------------------------------------------------ | +| Arrows | Move the cursor around | +| Shift+arrows | Move and select text | +| Alt(Ctrl on Mac)+LeftArrow | Move to the beginning of the current line | +| Alt(Ctrl on Mac)+RightArrow | Move to the end of the current line | +| Home | Move to the beginning of the current line | +| End | Move to the end of the current line | +| Ctrl(Alt on Mac)+LeftArrow | Move cursor one word left | +| Ctrl(Alt on Mac)+RightArrow | Move cursor one word right | +| Alt+{ | Move cursor to previous empty line, or beginning of document | +| Alt+} | Move cursor to next empty line, or end of document | +| PageUp | Move cursor up one page | +| PageDown | Move cursor down one page | +| Ctrl+Home or Ctrl+UpArrow | Move cursor to start of document | +| Ctrl+End or Ctrl+DownArrow | Move cursor to end of document | +| Ctrl+L | Jump to a line in the file (prompts with #) | +| Ctrl+W | Cycle between splits in the current tab (use `> vsplit` or `> hsplit` to create a split) | ### Tabs @@ -62,10 +64,12 @@ can change it! | Key | Description of function | |------------------------------------ |------------------------------------------ | -| Ctrl+Shift+RightArrow | Select word right | -| Ctrl+Shift+LeftArrow | Select word left | -| Shift+Home or Alt+Shift+LeftArrow | Select to start of current line | -| Shift+End or Alt+Shift+RightArrow | Select to end of current line | +| Ctrl(Alt on Mac)+Shift+RightArrow | Select word right | +| Ctrl(Alt on Mac)+Shift+LeftArrow | Select word left | +| Alt(Ctrl on Mac)+Shift+LeftArrow | Select to start of current line | +| Alt(Ctrl on Mac)+Shift+RightArrow | Select to end of current line | +| Shift+Home | Select to start of current line | +| Shift+End | Select to end of current line | | Ctrl+Shift+UpArrow | Select to start of file | | Ctrl+Shift+DownArrow | Select to end of file | | Ctrl+X | Cut selected text | From 674258787ee238275afee7753cdff1db12fb592a Mon Sep 17 00:00:00 2001 From: Zachary Yedidia Date: Fri, 7 Feb 2020 20:16:59 -0500 Subject: [PATCH 3/3] Add Mac special cases --- runtime/help/keybindings.md | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/runtime/help/keybindings.md b/runtime/help/keybindings.md index dad1e2a7..afdb7123 100644 --- a/runtime/help/keybindings.md +++ b/runtime/help/keybindings.md @@ -392,6 +392,10 @@ MouseWheelRight # Default keybinding configuration. +A select few keybindings are different on MacOS compared to other +operating systems. This is because different OSes have different +conventions for text editing defaults. + ```json { "Up": "CursorUp", @@ -406,13 +410,19 @@ MouseWheelRight "AltRight": "WordRight", "AltUp": "MoveLinesUp", "AltDown": "MoveLinesDown", - "CtrlShiftRight": "SelectWordRight", - "CtrlShiftLeft": "SelectWordLeft", + "CtrlShiftRight": "SelectWordRight", + "CtrlShiftLeft": "SelectWordLeft", "AltLeft": "StartOfLine", "AltRight": "EndOfLine", + "AltShiftRight": "SelectWordRight", (Mac) + "AltShiftLeft": "SelectWordLeft", (Mac) + "CtrlLeft": "StartOfText", (Mac) + "CtrlRight": "EndOfLine", (Mac) "AltShiftLeft": "SelectToStartOfLine", + "CtrlShiftLeft": "SelectToStartOfText", (Mac) "ShiftHome": "SelectToStartOfLine", "AltShiftRight": "SelectToEndOfLine", + "CtrlShiftRight": "SelectToEndOfLine", (Mac) "ShiftEnd": "SelectToEndOfLine", "CtrlUp": "CursorStart", "CtrlDown": "CursorEnd",