| 1 |
#!/usr/bin/env python3 |
| 2 |
# -*- coding: utf-8 -*- |
| 3 |
|
| 4 |
# Fenrir TTY screen reader |
| 5 |
# By Chrys, Storm Dragon, and contributors. |
| 6 |
|
| 7 |
|
| 8 |
from fenrirscreenreader.core.i18n import _ |
| 9 |
|
| 10 |
|
| 11 |
class command: |
| 12 |
def __init__(self): |
| 13 |
pass |
| 14 |
|
| 15 |
def initialize(self, environment): |
| 16 |
self.env = environment |
| 17 |
# examples: |
| 18 |
# self.key_macro = [[1,'KEY_LEFTCTRL'],[1,'KEY_O'],[0.05,'SLEEP'],[0,'KEY_O'],[0,'KEY_LEFTCTRL']] |
| 19 |
# self.key_macro = [[1,'KEY_LEFTSHIFT'],[1,'KEY_LEFTCTRL'],[1,'KEY_N'],[0.05,'SLEEP'],[0,'KEY_N'],[0,'KEY_LEFTCTRL'],[0,'KEY_LEFTSHIFT']] |
| 20 |
self.key_macro = [] |
| 21 |
|
| 22 |
def shutdown(self): |
| 23 |
pass |
| 24 |
|
| 25 |
def get_description(self): |
| 26 |
return "No description found" |
| 27 |
|
| 28 |
def run(self): |
| 29 |
self.env["runtime"]["InputManager"].send_keys(self.key_macro) |
| 30 |
|
| 31 |
def set_callback(self, callback): |
| 32 |
pass |