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


Python Actions.handle_key_press方法代码示例

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


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

示例1: _handle_key_press

# 需要导入模块: import Actions [as 别名]
# 或者: from Actions import handle_key_press [as 别名]
	def _handle_key_press(self, widget, event):
		"""
		Handle key presses from the keyboard and translate key combinations into actions.
		This key press handler is called prior to the gtk key press handler.
		This handler bypasses built in accelerator key handling when in focus because
		* some keys are ignored by the accelerators like the direction keys,
		* some keys are not registered to any accelerators but are still used.
		When not in focus, gtk and the accelerators handle the the key press.
		@return false to let gtk handle the key action
		"""
		if not self.get_focus_flag(): return False
		return Actions.handle_key_press(event)
开发者ID:Jhr-Ronyo,项目名称:gnuradio-1,代码行数:14,代码来源:ActionHandler.py

示例2: _handle_key_press

# 需要导入模块: import Actions [as 别名]
# 或者: from Actions import handle_key_press [as 别名]
 def _handle_key_press(self, widget, event):
     """
     Handle key presses from the keyboard and translate key combinations into actions.
     This key press handler is called prior to the gtk key press handler.
     This handler bypasses built in accelerator key handling when in focus because
     * some keys are ignored by the accelerators like the direction keys,
     * some keys are not registered to any accelerators but are still used.
     When not in focus, gtk and the accelerators handle the the key press.
     
     Returns:
         false to let gtk handle the key action
     """
     # prevent key event stealing while the search box is active
     if self.main_window.btwin.search_entry.has_focus(): return False
     if not self.get_focus_flag(): return False
     return Actions.handle_key_press(event)
开发者ID:36V3mA21Hz,项目名称:gnuradio,代码行数:18,代码来源:ActionHandler.py


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