From 5564ae780c7ce339e6f344cc7518ad9717ff542c Mon Sep 17 00:00:00 2001 From: chrys Date: Mon, 4 Feb 2019 22:00:48 +0100 Subject: [PATCH] even more bits --- .../commands/vmenu-profiles/open.py | 26 ------------------- .../commands/vmenu-profiles/template.py | 14 +++++----- 2 files changed, 8 insertions(+), 32 deletions(-) delete mode 100644 src/fenrirscreenreader/commands/vmenu-profiles/open.py diff --git a/src/fenrirscreenreader/commands/vmenu-profiles/open.py b/src/fenrirscreenreader/commands/vmenu-profiles/open.py deleted file mode 100644 index bc5cfff1..00000000 --- a/src/fenrirscreenreader/commands/vmenu-profiles/open.py +++ /dev/null @@ -1,26 +0,0 @@ -#!/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 - 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 = b'' - 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) - if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: - self.env['runtime']['byteManager'].sendBytes(self.byteMakro) - def setCallback(self, callback): - pass diff --git a/src/fenrirscreenreader/commands/vmenu-profiles/template.py b/src/fenrirscreenreader/commands/vmenu-profiles/template.py index 28e62899..253e2494 100644 --- a/src/fenrirscreenreader/commands/vmenu-profiles/template.py +++ b/src/fenrirscreenreader/commands/vmenu-profiles/template.py @@ -8,20 +8,22 @@ from fenrirscreenreader.core import debug class command(): def __init__(self): - # example: - # self.keyMakro = [[1,'KEY_CONTROL'],[300,'SLEEP'],[1,'KEY_O'],[10,'SLEEP'],[0,'KEY_O'], [10,'SLEEP'],[0,'KEY_CONTROL']] - self.keyMakro = [] - self.byteMakro = [] + 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 = [] + self.byteMakro = [] def shutdown(self): pass def getDescription(self): - return 'No description found' + return 'No description found' def run(self): if self.env['runtime']['inputManager'].getShortcutType() in ['KEY']: self.env['runtime']['inputManager'].sendKeys(self.keyMakro) - if self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: + elif self.env['runtime']['inputManager'].getShortcutType() in ['BYTE']: self.env['runtime']['byteManager'].sendBytes(self.byteMakro) def setCallback(self, callback): pass