# ########################################################################### # # Frequent keys for quicker code writing, in particular # # ^l = Left bracket. The application should auto-close this and move the # cursor over for this to actually be useful # # ########################################################################### # # Need to hijack the path here to include my stuff modules import sys sys.path.append('/home/andres/autokeymodules/terminalshortcuts') import assets assets.scopeAutoKeyMods(keyboard=keyboard) winClass = window.get_active_class() # => Pretty straight forward, if the window that fired this action is # included, send the keyboard shortcut if (assets.applicationIsIncluded(winClass) is True): assets.doKeyShortcut('l') else: keyboard.send_keys('<ctrl>+l')
# ########################################################################### # # Enable common Emacs style terminal shortcuts in applications, in particular # # ^e = End of line, equivalent to hitting the End key # # ########################################################################### # # Need to hijack the path here to include my stuff modules import sys sys.path.append('/home/andres/autokeymodules/terminalshortcuts') import assets assets.scopeAutoKeyMods(keyboard=keyboard) winClass = window.get_active_class() # => Pretty straight forward, if the window that fired this action is not # excluded, send the keyboard shortcut if (assets.applicationIsExluded(winClass) is not True): assets.doKeyShortcut('e') else: keyboard.send_keys('<ctrl>+e')
# ########################################################################### # # Enable common Emacs style terminal shortcuts in applications, in particular # # ^a = Front of line, equivalent to hitting the Home key # # ########################################################################### # # Need to hijack the path here to include my stuff modules import sys sys.path.append('/home/andres/autokeymodules/terminalshortcuts') import assets assets.scopeAutoKeyMods(keyboard=keyboard) winClass = window.get_active_class() # => Pretty straight forward, if the window that fired this action is not # excluded, send the keyboard shortcut if (assets.applicationIsExluded(winClass) is not True): assets.doKeyShortcut('a') else: keyboard.send_keys('<ctrl>+a')
# ########################################################################### # # Enable common Emacs style terminal shortcuts in applications, in particular # # ^d = Delete character, equivalent to hitting the Del key # # ########################################################################### # # Need to hijack the path here to include my stuff modules import sys sys.path.append('/home/andres/autokeymodules/terminalshortcuts') import assets assets.scopeAutoKeyMods(keyboard=keyboard) winClass = window.get_active_class() # => Pretty straight forward, if the window that fired this action is not # excluded, send the keyboard shortcut if (assets.applicationIsExluded(winClass) is not True): assets.doKeyShortcut('d') else: keyboard.send_keys('<ctrl>+d')
# ########################################################################### # # Enable common Emacs style terminal shortcuts in applications, in particular # # ^h = Backspace, equivalent to hitting the Backspace key # # ########################################################################### # # Need to hijack the path here to include my stuff modules import sys sys.path.append('/home/andres/autokeymodules/terminalshortcuts') import assets assets.scopeAutoKeyMods(keyboard=keyboard) winClass = window.get_active_class() # => Pretty straight forward, if the window that fired this action is not # excluded, send the keyboard shortcut if (assets.applicationIsExluded(winClass) is not True): assets.doKeyShortcut('h') else: keyboard.send_keys('<ctrl>+h')