<s> '''<STR_LIT>''' <EOL> from kivy . utils import platform <EOL> __all__ = ( '<STR_LIT:start>' , '<STR_LIT>' ) <EOL> def _on_keyboard_handler ( instance , key , scancode , codepoint , modifiers ) : <EOL> if key == <NUM_LIT> and modifiers == [ ] : <EOL> instance . screenshot ( ) <EOL> elif key == <NUM_LIT> and modifiers == [ ] : <EOL> instance . rotation += <NUM_LIT> <EOL> elif key == <NUM_LIT> and modifiers == [ '<STR_LIT>' ] : <EOL> if platform in ( '<STR_LIT>' , '<STR_LIT>' , '<STR_LIT>' ) : <EOL> instance . rotation = <NUM_LIT:0> <EOL> w , h = instance . size <EOL> w , h = h , w <EOL> instance . size = ( w , h ) <EOL> def start ( win , ctx ) : <EOL> win . bind ( on_keyboard = _on_keyboard_handler ) <EOL> def stop ( win , ctx ) : <EOL> win . unbind ( on_keyboard = _on_keyboard_handler ) </s>
