From 2c9d9f7b92b94fdd7b7933182a1aaf1c0810bff5 Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 4 Feb 2019 22:00:53 +0100 Subject: [PATCH] even more bits --- .../KEY/nano/search/template.py | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/fenrirscreenreader/commands/vmenu-profiles/KEY/nano/search/template.py diff --git a/src/fenrirscreenreader/commands/vmenu-profiles/KEY/nano/search/template.py b/src/fenrirscreenreader/commands/vmenu-profiles/KEY/nano/search/template.py new file mode 100644 index 00000000..dbf5ad48 --- /dev/null +++ b/src/fenrirscreenreader/commands/vmenu-profiles/KEY/nano/search/template.py @@ -0,0 +1,29 @@ +#!/bin/python +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from fenrirscreenreader.core import debug + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + # examples: + # self.keyMakro = [[1,'KEY_LEFTCTRL'],[1,'KEY_O'],[0.05,'SLEEP'],[0,'KEY_O'],[0,'KEY_LEFTCTRL']] + # self.keyMakro = [[1,'KEY_LEFTSHIFT'],[1,'KEY_LEFTCTRL'],[1,'KEY_N'],[0.05,'SLEEP'],[0,'KEY_N'],[0,'KEY_LEFTCTRL'],[0,'KEY_LEFTSHIFT']] + self.keyMakro = [[1,'KEY_LEFTSHIFT'],[1,'KEY_LEFTCTRL'],[1,'KEY_N'],[0.05,'SLEEP'],[0,'KEY_N'],[0,'KEY_LEFTCTRL'],[0,'KEY_LEFTSHIFT']] + self.byteMakro = [] + def shutdown(self): + pass + def getDescription(self): + return 'No description found' + def run(self): + if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: + self.env['runtime']['inputManager'].sendKeys(self.keyMakro) + elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: + self.env['runtime']['byteManager'].sendBytes(self.byteMakro) + def setCallback(self, callback): + pass