"greaterthan": keyboard.get_typeable(char='>'), "rightangle": keyboard.get_typeable(char='>'), "rangle": keyboard.get_typeable(char='>'), "question": keyboard.get_typeable(char='?'), "equal": keyboard.get_typeable(char='='), "equals": keyboard.get_typeable(char='='), # Whitespace and editing keys "enter": Typeable(code=win32con.VK_RETURN, name='enter'), "tab": Typeable(code=win32con.VK_TAB, name='tab'), "space": Typeable(code=win32con.VK_SPACE, name='space'), "backspace": Typeable(code=win32con.VK_BACK, name='backspace'), "delete": Typeable(code=win32con.VK_DELETE, name='delete'), "del": Typeable(code=win32con.VK_DELETE, name='del'), # Modifier keys "shift": Typeable(code=win32con.VK_SHIFT, name='shift'), "control":
pkg_resources.require("dragonfly >= 0.6.5beta1.dev-r99") except ImportError: pass from dragonfly import * from natlink import setMicState import lib.sound as sound from _dragonfly_tools import show_natlink_messages_window import win32con from dragonfly.actions.keyboard import Typeable, keyboard from dragonfly.actions.typeables import typeables if not 'Control_R' in typeables: keycode = win32con.VK_RCONTROL typeables["Control_R"] = Typeable(code=keycode, name="Control_R") if not 'semicolon' in typeables: typeables["semicolon"] = keyboard.get_typeable(char=';') #--------------------------------------------------------------------------- # Here we globally defined the release action which releases all # modifier-keys used within this grammar. It is defined here # because this functionality is used in many different places. # Note that it is harmless to release ("...:up") a key multiple # times or when that key is not held down at all. release = Key( "shift:up, ctrl:up, alt:up, win:up" ) #shift ctrl alt win are dragonfly's internally defined names for those keyboard keys
# """ This file builds the mapping from key-name to Typeable instances. """ import win32con from dragonfly.actions.keyboard import keyboard, Typeable #--------------------------------------------------------------------------- # Mapping of name -> typeable. typeables = { "shift": Typeable(code=win32con.VK_SHIFT, name="shift"), "control": Typeable(code=win32con.VK_CONTROL, name="control"), "ctrl": Typeable(code=win32con.VK_CONTROL, name="ctrl"), "alt": Typeable(code=win32con.VK_MENU, name="alt"), "up": Typeable(code=win32con.VK_UP, name="up"), "down": Typeable(code=win32con.VK_DOWN, name="down"), "left": Typeable(code=win32con.VK_LEFT, name="left"), "right": Typeable(code=win32con.VK_RIGHT, name="right"), "pgup": Typeable(code=win32con.VK_PRIOR, name="pgup"), "pgdown": Typeable(code=win32con.VK_NEXT, name="pgdown"), "home": Typeable(code=win32con.VK_HOME, name="home"), "end": Typeable(code=win32con.VK_END, name="end"), "insert": Typeable(code=win32con.VK_INSERT, name="insert"), "enter": Typeable(code=win32con.VK_RETURN, name="enter"), "tab": Typeable(code=win32con.VK_TAB, name="tab"), "space": Typeable(code=win32con.VK_SPACE, name="space"),
Section, Item, Function, Dictation, IntegerRef, MappingRule, Alternative, RuleRef, Grammar, Repetition, CompoundRule) import win32con from dragonfly.actions.keyboard import Typeable from dragonfly.actions.typeables import typeables typeables["Control_R"] = Typeable(code=win32con.VK_RCONTROL, name="Control_R") import lib.config config = lib.config.get_config() if config.get("aenea.enabled", False) == True: from proxy_nicknames import Key, Text # @Reimport import aenea import lib.sound as sound import lib.format release = Key("shift:up, ctrl:up, alt:up") def cancel_dictation(text=None, text2=None): """Used to cancel an ongoing dictation.
_add_typeable(name="leftangle", char='<') _add_typeable(name="langle", char='<') _add_typeable(name=">", char='>') _add_typeable(name="greaterthan", char='>') _add_typeable(name="rightangle", char='>') _add_typeable(name="rangle", char='>') _add_typeable(name="?", char='?') _add_typeable(name="question", char='?') _add_typeable(name="=", char='=') _add_typeable(name="equal", char='=') _add_typeable(name="equals", char='=') typeables.update({ # Whitespace and editing keys "enter": Typeable(code=key_symbols.RETURN, name='enter'), "tab": Typeable(code=key_symbols.TAB, name='tab'), "space": Typeable(code=key_symbols.SPACE, name='space'), "backspace": Typeable(code=key_symbols.BACK, name='backspace'), "delete": Typeable(code=key_symbols.DELETE, name='delete'), "del": Typeable(code=key_symbols.DELETE, name='del'), # Main modifier keys "shift": Typeable(code=key_symbols.SHIFT, name='shift'), "control":