From c0449955e38da95a88893337bef0b004e135e177 Mon Sep 17 00:00:00 2001
From: Richard Turner <63139+zygous@users.noreply.github.com>
Date: Thu, 27 Jul 2023 09:10:40 +0100
Subject: use Ctrl-n instead of Alt-n on macOS (#1106)
* use Ctrl-n instead of Alt-n on macOS
* make ctrl-n instead of alt-n configurable
---
docs/docs/config/config.md | 9 +++++++++
docs/docs/key-binding.md | 9 +++++++++
2 files changed, 18 insertions(+)
(limited to 'docs')
diff --git a/docs/docs/config/config.md b/docs/docs/config/config.md
index 1f4e1668..209d34cd 100644
--- a/docs/docs/config/config.md
+++ b/docs/docs/config/config.md
@@ -231,3 +231,12 @@ history_filter = [
"^innocuous-cmd .*--secret=.+"
]
```
+
+## macOS Ctrl-n key shortcuts
+
+macOS does not have an Alt key, although terminal emulators can often be configured to map the Option key to be used as Alt. *However*, remapping Option this way may prevent typing some characters, such as using Option-3 to type `#` on the British English layout. For such a scenario, set the `ctrl_n_shortcuts` option to `true` in your config file to replace Alt-0 to Alt-9 shortcuts with Ctrl-0 to Ctrl-9 instead:
+
+```
+# Use Ctrl-0 .. Ctrl-9 instead of Alt-0 .. Alt-9 UI shortcuts
+ctrl_n_shortcuts = true
+```
diff --git a/docs/docs/key-binding.md b/docs/docs/key-binding.md
index 2069e250..c3931977 100644
--- a/docs/docs/key-binding.md
+++ b/docs/docs/key-binding.md
@@ -46,6 +46,15 @@ eval "$(atuin init zsh)"
You can then choose to bind Atuin if needed, do this after the call to init.
+## Ctrl-n key shortcuts
+
+macOS does not have an Alt key, although terminal emulators can often be configured to map the Option key to be used as Alt. *However*, remapping Option this way may prevent typing some characters, such as using Option-3 to type `#` on the British English layout. For such a scenario, set the `ctrl_n_shortcuts` option to `true` in your config file to replace Alt-0 to Alt-9 shortcuts with Ctrl-0 to Ctrl-9 instead:
+
+```
+# Use Ctrl-0 .. Ctrl-9 instead of Alt-0 .. Alt-9 UI shortcuts
+ctrl_n_shortcuts = true
+```
+
## zsh
If you'd like to customize your bindings further, it's possible to do so with custom shell config:
--
cgit v1.3.1