MCPcopy Create free account
hub / github.com/audacity/audacity / OnlyHandleKeyUp

Function OnlyHandleKeyUp

src/menus/SelectMenus.cpp:116–129  ·  view source on GitHub ↗

If this returns true, then there was a key up, and nothing more to do, after this function has completed. (at most this function just does a ModifyState for the keyup)

Source from the content-addressed store, hash-verified

114// after this function has completed.
115// (at most this function just does a ModifyState for the keyup)
116bool OnlyHandleKeyUp( const CommandContext &context )
117{
118 auto &project = context.project;
119 auto evt = context.pEvt;
120 bool bKeyUp = (evt) && evt->GetEventType() == wxEVT_KEY_UP;
121
122 if( ProjectAudioIO::Get( project ).IsAudioActive() )
123 return bKeyUp;
124 if( !bKeyUp )
125 return false;
126
127 ProjectHistory::Get( project ).ModifyState(false);
128 return true;
129}
130
131enum CursorDirection {
132 DIRECTION_LEFT = -1,

Callers 6

OnSelExtendLeftMethod · 0.85
OnSelExtendRightMethod · 0.85
OnSelContractLeftMethod · 0.85
OnSelContractRightMethod · 0.85
OnCursorLeftMethod · 0.85
OnCursorRightMethod · 0.85

Calls 3

GetFunction · 0.85
IsAudioActiveMethod · 0.45
ModifyStateMethod · 0.45

Tested by

no test coverage detected