From 646aabd616608bc90de91487f0f90e9263eac81f Mon Sep 17 00:00:00 2001 From: Alexandre Magno Date: Tue, 23 Apr 2013 08:20:33 -0300 Subject: [PATCH] Rotation of Window simulating Android on win, linux and macosx Update modules/keybinding.py --- kivy/modules/keybinding.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/kivy/modules/keybinding.py b/kivy/modules/keybinding.py index 09e850e13..ff435c07b 100644 --- a/kivy/modules/keybinding.py +++ b/kivy/modules/keybinding.py @@ -9,6 +9,8 @@ This module force the mapping of some keys to functions: ''' +from kivy.utils import platform + __all__ = ('start', 'stop') @@ -16,7 +18,12 @@ def _on_keyboard_handler(instance, key, scancode, codepoint, modifier): if key == 293: # F12 instance.screenshot() elif key == 292: # F11 - instance.rotation += 90 + if not platform() in ('win', 'linux', 'macosx'): + instance.rotation += 90 + else: + w, h = instance.size + w, h = h, w + instance.size = (w, h) def start(win, ctx):