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)
| 114 | // after this function has completed. |
| 115 | // (at most this function just does a ModifyState for the keyup) |
| 116 | bool 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 | |
| 131 | enum CursorDirection { |
| 132 | DIRECTION_LEFT = -1, |
no test coverage detected