diff --git a/config/keyboard/desktop.conf b/config/keyboard/desktop.conf index 2725721e..23fb312b 100644 --- a/config/keyboard/desktop.conf +++ b/config/keyboard/desktop.conf @@ -125,3 +125,4 @@ KEY_FENRIR,KEY_F7=import_clipboard_from_x KEY_FENRIR,KEY_F8=export_clipboard_to_x KEY_FENRIR,KEY_CTRL,KEY_UP=inc_alsa_volume KEY_FENRIR,KEY_CTRL,KEY_DOWN=dec_alsa_volume +KEY_FENRIR,KEY_SHIFT,KEY_V=announce_fenrir_version diff --git a/config/keyboard/laptop.conf b/config/keyboard/laptop.conf index 91fa43ab..8affb134 100644 --- a/config/keyboard/laptop.conf +++ b/config/keyboard/laptop.conf @@ -125,3 +125,4 @@ KEY_FENRIR,KEY_F7=import_clipboard_from_x KEY_FENRIR,KEY_F8=export_clipboard_to_x KEY_FENRIR,KEY_CTRL,KEY_UP=inc_alsa_volume KEY_FENRIR,KEY_CTRL,KEY_DOWN=dec_alsa_volume +KEY_FENRIR,KEY_SHIFT,KEY_V=announce_fenrir_version diff --git a/src/fenrirscreenreader/commands/commands/announce_fenrir_version.py b/src/fenrirscreenreader/commands/commands/announce_fenrir_version.py new file mode 100644 index 00000000..e2a80505 --- /dev/null +++ b/src/fenrirscreenreader/commands/commands/announce_fenrir_version.py @@ -0,0 +1,27 @@ +#!/usr/bin/env python3 +# -*- coding: utf-8 -*- + +# Fenrir TTY screen reader +# By Chrys, Storm Dragon, and contributers. + +from fenrirscreenreader.core import debug +from fenrirscreenreader import fenrirVersion + +class command(): + def __init__(self): + pass + def initialize(self, environment): + self.env = environment + def shutdown(self): + pass + def getDescription(self): + return _('Present the version of Fenrir currrrently in use.') + + def run(self): + try: + self.env['runtime']['outputManager'].presentText(f'Fenrir screen reader version {fenrirVersion.version}', interrupt=True) + except exception as e: + self.env['runtime']['outputManager'].presentText(_('Version information is unavailable.'), interrupt=True) + + def setCallback(self, callback): + pass