I am using a richtextctrl that is partly read-only. So in my code, I have this
Code: Select all
//key events
void MainDialog::PressKey(wxKeyEvent &event)
{
if( event.GetKeyCode() == WXK_BACK &&
GetCaretPosition() <= lastReadyOnlyCursorPosition)
{
if( event.ControlDown() )
{
cout << "Catch control backspace!" << endl;
}
}
else
{
event.Skip();
}
}
I've tried catching it with using event.ControlDown(). That doesn't work. I've even tried event.HasAnyModifiers(), event.RawControlDown() , event.MetaDown() to even notice the control is being down. HasAnyModifiers does notice when I hold down SHIFT and ALT, but not CTRL.
Thanks for any help.
Jason