Python kivy.core.window.Window 模块,request_keyboard() 实例源码

我们从Python开源项目中,提取了以下10个代码示例,用于说明如何使用kivy.core.window.Window.request_keyboard()

项目:glucometer    作者:johnyburd    | 项目源码 | 文件源码
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
项目:glucometer    作者:johnyburd    | 项目源码 | 文件源码
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)
项目:glucometer    作者:johnyburd    | 项目源码 | 文件源码
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)
项目:Exode    作者:sne3ks    | 项目源码 | 文件源码
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 = {}
项目:SuperOcto    作者:mcecchi    | 项目源码 | 文件源码
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))
项目:SuperOcto    作者:mcecchi    | 项目源码 | 文件源码
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))
项目:RoboLCD    作者:victorevector    | 项目源码 | 文件源码
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))
项目:RoboLCD    作者:victorevector    | 项目源码 | 文件源码
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))
项目:RoboLCD    作者:victorevector    | 项目源码 | 文件源码
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))
项目:acchiappa    作者:la10736    | 项目源码 | 文件源码
def __init__(self, **kwargs):
        self._keyboard = Window.request_keyboard(self._keyboard_closed, self, 'text')
        self._keyboard.bind(on_key_down=self._on_keyboard_down)