| 1 |
#!/usr/bin/env python |
| 2 |
# -*- encoding: utf-8 |
| 3 |
|
| 4 |
|
| 5 |
from fenrirscreenreader.core.i18n import _ |
| 6 |
|
| 7 |
|
| 8 |
class command: |
| 9 |
def __init__(self): |
| 10 |
pass |
| 11 |
|
| 12 |
def initialize(self, environment): |
| 13 |
self.env = environment |
| 14 |
self.key_macro = [ |
| 15 |
[1, "KEY_LEFTCTRL"], |
| 16 |
[1, "KEY_S"], |
| 17 |
[0.05, "SLEEP"], |
| 18 |
[0, "KEY_S"], |
| 19 |
[0, "KEY_LEFTCTRL"], |
| 20 |
] |
| 21 |
|
| 22 |
def shutdown(self): |
| 23 |
pass |
| 24 |
|
| 25 |
def get_description(self): |
| 26 |
return "Save your work." |
| 27 |
|
| 28 |
def run(self): |
| 29 |
self.env["runtime"]["OutputManager"].present_text( |
| 30 |
"Okay, you will now be asked to save your work.", interrupt=True |
| 31 |
) |
| 32 |
self.env["runtime"]["InputManager"].send_keys(self.key_macro) |
| 33 |
|
| 34 |
def set_callback(self, callback): |
| 35 |
pass |