本文整理汇总了Python中gi.repository.Atspi.generate_keyboard_event方法的典型用法代码示例。如果您正苦于以下问题:Python Atspi.generate_keyboard_event方法的具体用法?Python Atspi.generate_keyboard_event怎么用?Python Atspi.generate_keyboard_event使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gi.repository.Atspi
的用法示例。
在下文中一共展示了Atspi.generate_keyboard_event方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: generateKeyboardEvent
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_keyboard_event [as 别名]
def generateKeyboardEvent(self, keycode, keysym, kind):
"""
Generates a keyboard event. One of the keycode or the keysym parameters
should be specified and the other should be None. The kind parameter is
required and should be one of the KEY_PRESS, KEY_RELEASE, KEY_PRESSRELEASE,
KEY_SYM, or KEY_STRING.
@@param keycode: Hardware keycode or None
@@type keycode: integer
@@param keysym: Symbolic key string or None
@@type keysym: string
@@param kind: Kind of event to synthesize
@@type kind: integer
"""
if not self.has_implementations:
self._set_default_registry ()
if keysym is None:
keysym = ""
Atspi.generate_keyboard_event (keycode, keysym, kind)
示例2: release_keycode
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_keyboard_event [as 别名]
def release_keycode(self, keycode):
#print("release_keycode")
Atspi.generate_keyboard_event(keycode, "", Atspi.KeySynthType.RELEASE)
示例3: press_key_string
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_keyboard_event [as 别名]
def press_key_string(self, string):
#print("press_key_string")
Atspi.generate_keyboard_event(0, string, Atspi.KeySynthType.STRING)
示例4: key_press
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_keyboard_event [as 别名]
def key_press(key_name):
key_sym = name_to_sym(key_name)
Atspi.generate_keyboard_event(key_sym,
None,
Atspi.KeySynthType.SYM)
示例5: press_keycode
# 需要导入模块: from gi.repository import Atspi [as 别名]
# 或者: from gi.repository.Atspi import generate_keyboard_event [as 别名]
def press_keycode(self, keycode):
#print("press_keycode")
Atspi.generate_keyboard_event(keycode, "", Atspi.KeySynthType.PRESS)