MCPcopy Create free account
hub / github.com/OGRECave/ogre-next / keyReleased

Method keyReleased

Samples/2.0/Common/src/System/Desktop/UnitTesting.cpp:346–375  ·  view source on GitHub ↗

-------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

344 }
345 //-------------------------------------------------------------------------
346 void UnitTest::keyReleased( const SDL_KeyboardEvent &arg )
347 {
348 if( !mParams.isPlayback() )
349 {
350 if( arg.keysym.sym == SDLK_F12 || arg.keysym.sym == SDLK_PRINTSCREEN )
351 {
352 if( mFrameActivity.empty() || mFrameActivity.back().frameId != mFrameIdx )
353 mFrameActivity.push_back( FrameActivity( mFrameIdx ) );
354
355 mFrameActivity.back().screenshotRenderWindow = true;
356 }
357 else if( shouldRecordKey( arg ) )
358 {
359 if( mFrameActivity.empty() || mFrameActivity.back().frameId != mFrameIdx )
360 mFrameActivity.push_back( FrameActivity( mFrameIdx ) );
361
362 KeyStroke keyStroke;
363 keyStroke.keycode = arg.keysym.sym;
364 keyStroke.scancode = arg.keysym.scancode;
365 keyStroke.bReleased = arg.type == SDL_KEYUP;
366 mFrameActivity.back().keyStrokes.push_back( keyStroke );
367 }
368 }
369
370 if( !mBlockInputForwarding )
371 {
372 // Forward to application
373 mRealKeyboardListener->keyReleased( arg );
374 }
375 }
376 //-------------------------------------------------------------------------
377 void UnitTest::mouseMoved( const SDL_Event &arg )
378 {

Callers

nothing calls this directly

Calls 5

FrameActivityClass · 0.85
isPlaybackMethod · 0.80
emptyMethod · 0.45
backMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected