//----------------------------------------------------------------------------- int32_t CFrame::onKeyUp (VstKeyCode& keyCode) { int32_t result = -1; result = keyboardHooksOnKeyUp (keyCode); if (result == -1 && pFocusView) { if (pFocusView->getMouseEnabled ()) result = pFocusView->onKeyUp (keyCode); if (result == -1) { CView* parent = pFocusView->getParentView (); while (parent != this && result == -1) { if (parent->getMouseEnabled ()) result = parent->onKeyUp (keyCode); parent = parent->getParentView (); } } } if (result == -1 && pModalView) result = pModalView->onKeyUp (keyCode); return result; }
//----------------------------------------------------------------------------- int32_t CFrame::onKeyDown (VstKeyCode& keyCode) { int32_t result = -1; result = keyboardHooksOnKeyDown (keyCode); if (result == -1 && pFocusView) { CBaseObjectGuard og (pFocusView); if (pFocusView->getMouseEnabled ()) result = pFocusView->onKeyDown (keyCode); if (result == -1) { CView* parent = pFocusView->getParentView (); while (parent != this && result == -1) { if (parent->getMouseEnabled ()) result = parent->onKeyDown (keyCode); parent = parent->getParentView (); } } } if (result == -1 && pModalView) { CBaseObjectGuard og (pModalView); result = pModalView->onKeyDown (keyCode); } if (result == -1 && keyCode.virt == VKEY_TAB) result = advanceNextFocusView (pFocusView, (keyCode.modifier & MODIFIER_SHIFT) ? true : false) ? 1 : -1; return result; }