Setting autocomplete on Ctrl+ Space

Hello!
I would like to modify the default autocomplete to bring up completions by ‘Ctrl+Space’. According to docs, it should be as simple as setting ‘activateOnTyping:false’ config. While it disables the activation on typing, the assigned keyboard shortcut does not activate the autocomplete.
Simplified snipped based on code example from docs:

import {basicSetup, EditorView} from "codemirror"
import {
    defaultKeymap
} from '@codemirror/commands';

import {autocompletion, completionKeymap} from "@codemirror/autocomplete"

import {
    keymap
} from '@codemirror/view';

// Our list of completions (can be static, since the editor
/// will do filtering based on context).
const completions = [
  {label: "panic", type: "keyword"},
  {label: "park", type: "constant", info: "Test completion"},
  {label: "password", type: "variable"},
]

function myCompletions(context) {
  let before = context.matchBefore(/\w+/)
  // If completion wasn't explicitly started and there
  // is no word before the cursor, don't open completions.
  if (!context.explicit && !before) return null
  return {
    from: before ? before.from : context.pos,
    options: completions,
    validFor: /^\w*$/
  }
}

let view = new EditorView({
  doc: "// Type a 'p'\n",
  extensions: [
    basicSetup,
     keymap.of([
                ...defaultKeymap,
                ...completionKeymap
            ]),
    autocompletion({activateOnTyping: false, override: [myCompletions]})
  ],
  parent: document.body
})

Your exact code works for me :thinking:
Codemirror Sandbox

Interesting! Think it’s worth then adding that my setup is macOS + Chrome latest…

Same.

The editor in the link I sent isn’t working for you?

Finally found the culprit!
macOS Ventura by default has mappings for those keys ( Input Sources → Select the previous input source). removed them and viola - back to normal.
@Michiel Thank you for helping troubleshoot this issue!