我们从Python开源项目中,提取了以下10个代码示例,用于说明如何使用kivy.core.window.Window.request_keyboard()。
def __init__(self, **kwargs): VKeyboard.draw_keys = draw_keys_improved # replaces library's function with one below that has a larger font size super(MyKeyboardListener, self).__init__(**kwargs) self._keyboard = Window.request_keyboard( self._keyboard_closed, self, 'text') if self._keyboard.widget: # If it exists, this widget is a VKeyboard object which you can use # to change the keyboard layout. vkeyboard = self._keyboard.widget print type(vkeyboard) print type(self._keyboard) vkeyboard.layout = 'numeric.json' vkeyboard.height = 350 #vkeyboard.font_size = 500 print vkeyboard.height self._keyboard.bind(on_key_down=self._on_keyboard_down) print self.size
def __init__(self, **kwargs): super(MyKeyboardListener, self).__init__(**kwargs) self._keyboard = Window.request_keyboard( self._keyboard_closed, self, 'text') if self._keyboard.widget: print type(self._keyboard.widget) print type(self._keyboard) vkeyboard = self._keyboard.widget vkeyboard.layout = 'numeric.json' # If it exists, this widget is a VKeyboard object which you can use # to change the keyboard layout. else: print 'tru' print 'tru' self._keyboard.bind(on_key_down=self._on_keyboard_down)
def __init__(self, **kwargs): super(Mcnay, self).__init__(**kwargs) if Config.getdefault('input', 'keyboard', False): self._keyboard = Window.request_keyboard( self._keyboard_closed, self, 'text') self._keyboard.bind(on_key_down=self._on_keyboard_down)
def __init__(self): App.__init__(self) self.STACK= ExdStack() self._keyboard = Window.request_keyboard(self._keyboard_closed, self) self._keyboard.bind(on_key_down=self._on_keyboard_down) self.keyEvents = {}
def _set_keyboard(self, layout): #Dock the keyboard kb = Window.request_keyboard(self._keyboard_close, self) if kb.widget: self._keyboard = kb.widget self._keyboard.layout = layout self._style_keyboard() else: self._keyboard = kb self._keyboard.bind(on_key_down=self.key_down) Logger.info('Keyboard: Init {}'.format(layout))
def __init__(self, **kwargs): self._keyboard = Window.request_keyboard(self._keyboard_closed, self, 'text') self._keyboard.bind(on_key_down=self._on_keyboard_down)