Skip to content

Commit

Permalink
Add a Alt-Backtick as binding for startCompletion on macOS
Browse files Browse the repository at this point in the history
FIX: Add Alt-Backtick as additional binding on macOS, where IME can take over
Ctrl-Space.

Closes codemirror/dev#1439
  • Loading branch information
marijnh committed Sep 14, 2024
1 parent 0e12e7a commit af020a4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export function autocompletion(config: CompletionConfig = {}): Extension {

/// Basic keybindings for autocompletion.
///
/// - Ctrl-Space: [`startCompletion`](#autocomplete.startCompletion)
/// - Ctrl-Space (and Alt-\` on macOS): [`startCompletion`](#autocomplete.startCompletion)
/// - Escape: [`closeCompletion`](#autocomplete.closeCompletion)
/// - ArrowDown: [`moveCompletionSelection`](#autocomplete.moveCompletionSelection)`(true)`
/// - ArrowUp: [`moveCompletionSelection`](#autocomplete.moveCompletionSelection)`(false)`
Expand All @@ -38,6 +38,7 @@ export function autocompletion(config: CompletionConfig = {}): Extension {
/// - Enter: [`acceptCompletion`](#autocomplete.acceptCompletion)
export const completionKeymap: readonly KeyBinding[] = [
{key: "Ctrl-Space", run: startCompletion},
{mac: "Alt-`", run: startCompletion},
{key: "Escape", run: closeCompletion},
{key: "ArrowDown", run: moveCompletionSelection(true)},
{key: "ArrowUp", run: moveCompletionSelection(false)},
Expand Down

0 comments on commit af020a4

Please sign in to comment.