diff --git a/internal/action/defaults_darwin.go b/internal/action/defaults_darwin.go index 44b4fcc1ae..b0c98eafa9 100644 --- a/internal/action/defaults_darwin.go +++ b/internal/action/defaults_darwin.go @@ -28,9 +28,8 @@ var bufdefaults = map[string]string{ "Alt-{": "ParagraphPrevious", "Alt-}": "ParagraphNext", "Enter": "InsertNewline", - "CtrlH": "Backspace", + "CtrlH": "ToggleKeyMenu", "Backspace": "Backspace", - "OldBackspace": "Backspace", "Alt-CtrlH": "DeleteWordLeft", "Alt-Backspace": "DeleteWordLeft", "Tab": "Autocomplete|IndentSelection|InsertTab", @@ -65,7 +64,6 @@ var bufdefaults = map[string]string{ "ShiftPageUp": "SelectPageUp", "ShiftPageDown": "SelectPageDown", "Ctrl-g": "ToggleHelp", - "Alt-g": "ToggleKeyMenu", "Ctrl-r": "ToggleRuler", "Ctrl-l": "command-edit:goto ", "Delete": "Delete", diff --git a/internal/action/events.go b/internal/action/events.go index aa99d8af30..2c47ecead1 100644 --- a/internal/action/events.go +++ b/internal/action/events.go @@ -75,7 +75,10 @@ func (k KeyEvent) Name() string { } ok := false - if s, ok = tcell.KeyNames[k.code]; !ok { + if k.code == tcell.KeyCtrlH { + s = "Ctrl-h" + ok = true + } else if s, ok = tcell.KeyNames[k.code]; !ok { if k.code == tcell.KeyRune { s = string(k.r) } else { diff --git a/runtime/help/help.md b/runtime/help/help.md index 185e953ac0..1e6074bc34 100644 --- a/runtime/help/help.md +++ b/runtime/help/help.md @@ -10,7 +10,7 @@ display. From now on, when the documentation shows a command to run (such as For a list of the default keybindings, run `> help defaultkeys`. For more information on keybindings, see `> help keybindings`. -To toggle a short list of important keybindings, press Alt-g. +To toggle a short list of important keybindings, press Alt-g (Ctrl-h on macOS). ## Quick-start diff --git a/runtime/help/keybindings.md b/runtime/help/keybindings.md index 50dc4057c4..3650b9b7b8 100644 --- a/runtime/help/keybindings.md +++ b/runtime/help/keybindings.md @@ -593,7 +593,7 @@ conventions for text editing defaults. "ShiftPageUp": "SelectPageUp", "ShiftPageDown": "SelectPageDown", "Ctrl-g": "ToggleHelp", - "Alt-g": "ToggleKeyMenu", + "Alt-g": "ToggleKeyMenu", (Ctrl-h on Mac) "Ctrl-r": "ToggleRuler", "Ctrl-l": "command-edit:goto ", "Delete": "Delete", diff --git a/runtime/help/options.md b/runtime/help/options.md index 4d086698b7..c50f8c5f2b 100644 --- a/runtime/help/options.md +++ b/runtime/help/options.md @@ -224,8 +224,8 @@ Here are the available options: default value: `false` * `keymenu`: display the nano-style key menu at the bottom of the screen. Note - that ToggleKeyMenu is bound to `Alt-g` by default and this is displayed in - the statusline. To disable the key binding, bind `Alt-g` to `None`. + that ToggleKeyMenu is bound to `Alt-g` (`Ctrl-h` on macOS) by default and this is displayed in + the statusline. To disable the key binding, bind `Alt-g` (or `Ctrl-h` on macOS) to `None`. default value: `false`