def on_key_press(self, symbol, modifiers):
        delta = 20
        if modifiers & key.MOD_SHIFT:
            delta = -delta
        if symbol == key.X:
            self.width += delta
        elif symbol == key.Y:
            self.height += delta
        self.w.set_size(self.width, self.height)
        print 'Window size set to %dx%d.' % (self.width, self.height)
dataset/ETHPy150Open ardekantur/pyglet/tests/window/WINDOW_FIXED_SET_SIZE.py/WINDOW_FIXED_SET_SIZE.on_key_press/original