Hi Jules!
I want to be able to apply my own modifier keys (e.g. for Cmd-V etc.) when the keyboard focus is on a slider control. This is fine when the keyboard focus is owned by a button sub-component of the slider.
However, when the focus is owned by the slider’s underlying text editor component, I can’t seem to prevent the text editor that is owned by the slider grabbing the Cmd-V key, and using it for its own end (e.g. to paste current text). That’s a shame, as I really need instead to perform a higher-level action in reponse to Cmd-V…!
Can I please ask if there is some way that for sliders, there could be a method I could call that would pass-on a request to the underlying text editor to ignore command modifiers?
Or perhaps a hook I could apply to components that allow patching-in of key handling, where I can do something like this (that I’m already doing with my text editor components)…? That would be very powerful.
virtual bool keyPressed (const KeyPress &key)
{
if (key.getModifiers().isCommandDown())
{
return false;
}
return TextEditor::keyPressed(key);
}
Thanks in advance,
Pete