Handling Ctrl-Space

Hey there - I’m trying to handle Ctrl-Space in a code editor component to trigger an auto-complete popup. I’m on Mac.

I’m overriding bool keyPressed(const KeyPress& key) override in my custom code editor component but this never gets called on Ctrl-Space. It seems that NSViewComponentPeer::handleKeyEvent does not forward the event because the native characters of the event is an empty string.

 bool handleKeyEvent (NSEvent* ev, bool isKeyDown)
        auto unicode = nsStringToJuce ([ev characters]);
        auto keyCode = getKeyCodeFromEvent (ev);
        if (keyCode != 0 || unicode.isNotEmpty())
            if (isKeyDown)
                bool used = false;
                // never enters loop here ...
                for (auto u = unicode.getCharPointer(); ! u.isEmpty();)

I’m obviously missing something here …

Can anybody help?

Thanks a lot,