Skip to content

Commit af020a4

Browse files
committed
Add a Alt-Backtick as binding for startCompletion on macOS
FIX: Add Alt-Backtick as additional binding on macOS, where IME can take over Ctrl-Space. Closes codemirror/dev#1439
1 parent 0e12e7a commit af020a4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export function autocompletion(config: CompletionConfig = {}): Extension {
2929

3030
/// Basic keybindings for autocompletion.
3131
///
32-
/// - Ctrl-Space: [`startCompletion`](#autocomplete.startCompletion)
32+
/// - Ctrl-Space (and Alt-\` on macOS): [`startCompletion`](#autocomplete.startCompletion)
3333
/// - Escape: [`closeCompletion`](#autocomplete.closeCompletion)
3434
/// - ArrowDown: [`moveCompletionSelection`](#autocomplete.moveCompletionSelection)`(true)`
3535
/// - ArrowUp: [`moveCompletionSelection`](#autocomplete.moveCompletionSelection)`(false)`
@@ -38,6 +38,7 @@ export function autocompletion(config: CompletionConfig = {}): Extension {
3838
/// - Enter: [`acceptCompletion`](#autocomplete.acceptCompletion)
3939
export const completionKeymap: readonly KeyBinding[] = [
4040
{key: "Ctrl-Space", run: startCompletion},
41+
{mac: "Alt-`", run: startCompletion},
4142
{key: "Escape", run: closeCompletion},
4243
{key: "ArrowDown", run: moveCompletionSelection(true)},
4344
{key: "ArrowUp", run: moveCompletionSelection(false)},

0 commit comments

Comments
 (0)