当前位置: 首页>>代码示例>>Python>>正文


Python Window.request_keyboard方法代码示例

本文整理汇总了Python中kivy.core.window.Window.request_keyboard方法的典型用法代码示例。如果您正苦于以下问题:Python Window.request_keyboard方法的具体用法?Python Window.request_keyboard怎么用?Python Window.request_keyboard使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kivy.core.window.Window的用法示例。


在下文中一共展示了Window.request_keyboard方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: initialize

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import request_keyboard [as 别名]
def initialize(self):
        
        self.targetIndicator.color   = self.data.targetInicatorColor
        self.positionIndicator.color = self.data.posIndicatorColor
        
        self.drawWorkspace()

        if self.data.config.getboolean('Ground Control Settings', 'centerCanvasOnResize'):
            Window.bind(on_resize = self.centerCanvas)

        self.data.bind(gcode = self.updateGcode)
        self.data.bind(backgroundRedraw = self.reloadGcode)
        self.data.bind(gcodeShift = self.reloadGcode)              #No need to reload if the origin is changed, just clear and redraw
        self.data.bind(gcodeFile = self.centerCanvasAndReloadGcode)
        
        global_variables._keyboard = Window.request_keyboard(self._keyboard_closed, self)
        global_variables._keyboard.bind(on_key_down=self._on_keyboard_down)
        
        self.centerCanvasAndReloadGcode() 
开发者ID:MaslowCNC,项目名称:GroundControl,代码行数:21,代码来源:gcodeCanvas.py

示例2: __init__

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import request_keyboard [as 别名]
def __init__(self, **kwargs):
        """ Use the initialize method to bind to the keyboard to enable
        keyboard interaction e.g. using shift and control for multi-select.
        """

        super(SelectableRecycleLayout, self).__init__(**kwargs)
        if str(platform) in ('linux', 'win', 'macosx'):
            keyboard = Window.request_keyboard(None, self)
            keyboard.bind(on_key_down=self.select_with_key_down, on_key_up=self.select_with_key_up) 
开发者ID:snuq,项目名称:Snu-Photo-Manager,代码行数:11,代码来源:generalelements.py

示例3: add_binding

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import request_keyboard [as 别名]
def add_binding(self,*args):
        self._keyboard = Window.request_keyboard(
            self._keyboard_closed, self, 'text')
        self._keyboard.bind(on_key_down=self._on_keyboard_down,on_key_up=self._on_keyboard_up)
        self.bind(keycode=self.trigger_hotkey)
        self.bind(modifiers=self.trigger_hotkey) 
开发者ID:deepdiy,项目名称:deepdiy,代码行数:8,代码来源:hotkey.py

示例4: __init__

# 需要导入模块: from kivy.core.window import Window [as 别名]
# 或者: from kivy.core.window.Window import request_keyboard [as 别名]
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) 
开发者ID:undercase,项目名称:FlappyKivy,代码行数:8,代码来源:FlappyBird.py


注:本文中的kivy.core.window.Window.request_keyboard方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。