3 Commits

Author SHA1 Message Date
Storm Dragon f462ca7990 Merge branch 'testing' minor settings file update. 2025-12-03 16:25:47 -05:00
Storm Dragon e62b887e9c Some socket improvements for remote manager I thought should make it into this release. 2025-12-03 12:20:14 -05:00
Storm Dragon c66a9ba9c2 Problems with voice selection fixed.: 2025-12-02 18:38:06 -05:00
57 changed files with 387 additions and 432 deletions
+99 -141
View File
@@ -24,12 +24,12 @@ volume=0.7
# fenrirFrequence = the frequency to play # fenrirFrequence = the frequency to play
# fenrirDuration = the duration of the frequency # fenrirDuration = the duration of the frequency
# the following command is used to play a soundfile # the following command is used to play a soundfile
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
#the following command is used to generate a frequency beep #the following command is used to generate a frequency beep
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
# Enable progress bar monitoring with ascending tones by default # Enable progress bar monitoring with ascending tones by default
progress_monitoring=True progressMonitoring=True
[speech] [speech]
# Turn speech on or off: # Turn speech on or off:
@@ -45,7 +45,7 @@ rate=0.5
# Pitch controls the pitch of the voice, select from 0, lowest, to 1.0, highest. # Pitch controls the pitch of the voice, select from 0, lowest, to 1.0, highest.
pitch=0.5 pitch=0.5
# Pitch for capital letters # Pitch for capital letters
capital_pitch=0.9 capitalPitch=0.9
# Volume controls the loudness of the voice, select from 0, quietest, to 1.0, loudest. # Volume controls the loudness of the voice, select from 0, quietest, to 1.0, loudest.
volume=1.0 volume=1.0
@@ -65,10 +65,10 @@ volume=1.0
#language=en #language=en
# Read new text as it happens? # Read new text as it happens?
auto_read_incoming=True autoReadIncoming=True
# Speak individual numbers instead of whole string. # Speak individual numbers instead of whole string.
read_numbers_as_digits = False readNumbersAsDigits = False
# genericSpeechCommand is the command that is executed for talking # genericSpeechCommand is the command that is executed for talking
# the following variables are replaced with values # the following variables are replaced with values
@@ -81,130 +81,105 @@ read_numbers_as_digits = False
# fenrirVolume = is replaced with the current volume # fenrirVolume = is replaced with the current volume
# fenrirPitch = is replaced with the current pitch # fenrirPitch = is replaced with the current pitch
# fenrirRate = is replaced with the current speed (speech rate) # fenrirRate = is replaced with the current speed (speech rate)
generic_speech_command=espeak-ng -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText" genericSpeechCommand=espeak-ng -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText"
# min and max values of the TTS system that is used in generic_speech_command # min and max values of the TTS system that is used in genericSpeechCommand
fenrir_min_volume=0 fenrirMinVolume=0
fenrir_max_volume=200 fenrirMaxVolume=200
fenrir_min_pitch=0 fenrirMinPitch=0
fenrir_max_pitch=99 fenrirMaxPitch=99
fenrir_min_rate=80 fenrirMinRate=80
fenrir_max_rate=450 fenrirMaxRate=450
[screen] [screen]
# Screen driver: vcsaDriver (Linux TTY/virtual console), ptyDriver (terminal emulation)
driver=vcsaDriver driver=vcsaDriver
# Text encoding: auto (auto-detect), utf-8, latin1, etc.
encoding=auto encoding=auto
# Delay in seconds between screen updates (lower = more responsive, higher = less CPU) screenUpdateDelay=0.05
# Recommended: 0.05 for most systems ignoreScreen=7
screen_update_delay=0.05 autodetectIgnoreScreen=True
# TTY number to completely ignore (e.g., 7 for X11/graphical login screen)
ignore_screen=7
# Automatically detect and ignore graphical TTYs (X11, Wayland sessions)
autodetect_ignore_screen=True
[keyboard] [keyboard]
driver=evdevDriver driver=evdevDriver
# filter input devices NOMICE, ALL or a DEVICE NAME # filter input devices NOMICE, ALL or a DEVICE NAME
device=ALL device=ALL
# gives Fenrir exclusive access to the keyboard and lets it control keystrokes. # gives Fenrir exclusive access to the keyboard and lets it control keystrokes.
grab_devices=True grabDevices=True
ignore_shortcuts=False ignoreShortcuts=False
# the current shortcut layout located in /etc/fenrirscreenreader/keyboard # the current shortcut layout located in /etc/fenrirscreenreader/keyboard
keyboard_layout=desktop keyboardLayout=desktop
# echo chars while typing. # echo chars while typing.
# 0 = None # 0 = None
# 1 = always # 1 = always
# 2 = only while capslock (not compatible with capslock as fenrir key) # 2 = only while capslock (not compatible with capslock as fenrir key)
char_echo_mode=1 charEchoMode=1
# echo deleted chars # echo deleted chars
char_delete_echo=True charDeleteEcho=True
# echo word after pressing space # echo word after pressing space
word_echo=False wordEcho=False
# interrupt speech on any keypress # interrupt speech on any keypress
interrupt_on_key_press=True interruptOnKeyPress=True
# you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys) # you can filter the keys on that the speech should interrupt (empty = all keys, otherwhise the given keys)
interrupt_on_key_press_filter= interruptOnKeyPressFilter=
# timeout for double tap in sec # timeout for double tap in sec
double_tap_timeout=0.2 doubleTapTimeout=0.2
[general] [general]
# Debug levels: 0=DEACTIVE, 1=ERROR, 2=WARNING, 3=INFO (most verbose) # Debug levels: 0=DEACTIVE, 1=ERROR, 2=WARNING, 3=INFO (most verbose)
# For production use, WARNING (2) provides good balance of useful info without spam # For production use, WARNING (2) provides good balance of useful info without spam
debug_level=2 debugLevel=2
# debugMode sets where the debug output should send to: # debugMode sets where the debug output should send to:
# debugMode=File writes to debug_file (Default:/tmp/fenrir-PID.log) # debugMode=File writes to debugFile (Default:/tmp/fenrir-PID.log)
# debugMode=Print just prints on the screen # debugMode=Print just prints on the screen
debug_mode=File debugMode=File
debug_file= debugFile=
punctuation_profile=default punctuationProfile=default
punctuation_level=some punctuationLevel=some
respect_punctuation_pause=True respectPunctuationPause=True
# Replace undefined punctuation with spaces instead of removing them # Replace undefined punctuation with spaces instead of removing them
# This improves readability of text with punctuation like [X]mute, IP addresses, etc. # This improves readability of text with punctuation like [X]mute, IP addresses, etc.
replace_undefined_punctuation_with_space=True replaceUndefinedPunctuationWithSpace=True
# Pause speech briefly at newline characters for better readability newLinePause=True
new_line_pause=True numberOfClipboards=50
number_of_clipboards=50
# used path for "export_clipboard_to_file" # used path for "export_clipboard_to_file"
# $user is replaced by username # $user is replaced by username
#clipboardExportPath=/home/$user/fenrirClipboard #clipboardExportPath=/home/$user/fenrirClipboard
clipboard_export_path=/tmp/fenrirClipboard clipboardExportPath=/tmp/fenrirClipboard
# Convert text emoticons like :) to descriptive text (e.g., "smiling face")
emoticons=True emoticons=True
# Define the Fenrir modifier key(s) - used to trigger Fenrir commands # define the current Fenrir key
# Examples: KEY_KP0 (numpad 0), KEY_META (Super/Windows), KEY_INSERT fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
# Multiple keys: KEY_KP0,KEY_META,KEY_INSERT scriptKeys=KEY_COMPOSE
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT timeFormat=%%I:%%M%%P
# Script key - used to execute custom scripts in script_path dateFormat=%%A, %%B %%d, %%Y
script_keys=KEY_COMPOSE autoSpellCheck=True
# Time format using Python strftime codes (https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior) spellCheckLanguage=en_US
# Default: %%I:%%M%%P (12-hour format, e.g., "06:38pm") # path for your scripts "scriptKeys" functionality
# 24-hour format: %%H:%%M (e.g., "18:38") scriptPath=/usr/share/fenrirscreenreader/scripts
# Common codes: %%I=12hr hour, %%H=24hr hour, %%M=minute, %%S=second, %%P=am/pm lowercase, %%p=AM/PM uppercase # overload commands, and create new one without changing Fenrir default
time_format=%%I:%%M%%P commandPath=
# Date format using Python strftime codes #fenrirBGColor = the backgroundcolor
# Default: %%A, %%B %%d, %%Y (e.g., "Tuesday, December 10, 2024") #fenrirFGColor = the foregroundcolor
# ISO format: %%Y-%%m-%%d (e.g., "2024-12-10") #fenrirUnderline = speak the underline attribute
# Common codes: %%A=weekday name, %%B=month name, %%d=day, %%Y=year with century, %%m=month number #fenrirBold = speak the bold attribute
date_format=%%A, %%B %%d, %%Y #fenrirBlink = speak the blink attribute
# Automatically spell check words when reviewing character-by-character #fenrirFont = the font
auto_spell_check=True #fenrirFontSize = the fontsize
# Language for spell checking (format: language_COUNTRY, e.g., en_US, en_GB, es_ES) attributeFormatString=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
spell_check_language=en_US # present indentation
# path for your scripts "script_keys" functionality autoPresentIndent=False
script_path=/usr/share/fenrirscreenreader/scripts # speak is only invoked on changeing ident level, sound always
# Override default commands or add custom commands without modifying Fenrir installation # 0 = sound and speak
# Leave empty to use default commands only # 1 = sound only
command_path= # 2 = speak only
# Format string for announcing text attributes (colors, formatting) autoPresentIndentMode=1
# Available variables: # play a sound when attributes change
# fenrirBGColor = the background color hasAttributes=True
# fenrirFGColor = the foreground color # shell for PTY emulatiun (empty = default shell)
# fenrirUnderline = speak the underline attribute
# fenrirBold = speak the bold attribute
# fenrirBlink = speak the blink attribute
# fenrirFont = the font name
# fenrirFontSize = the font size
attribute_format_string=Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize
# Automatically announce indentation level changes (useful for Python, YAML, etc.)
auto_present_indent=False
# How to present indentation changes:
# 0 = sound and speak (both audio feedback and voice announcement)
# 1 = sound only (just play a tone)
# 2 = speak only (just voice announcement)
auto_present_indent_mode=1
# Play a sound when text attributes (color, bold, etc.) change
has_attributes=True
# Shell to use for PTY emulation mode (empty = use system default shell)
# Examples: /bin/bash, /bin/zsh, /usr/bin/fish
shell= shell=
[focus] [focus]
# Follow and announce text cursor position changes #follow the text cursor
cursor=True cursor=True
# Follow and announce highlighted/selected text changes (useful in menus) #follow highlighted text changes
highlight=False highlight=False
[remote] [remote]
@@ -216,52 +191,40 @@ driver=unixDriver
# tcp port # tcp port
port=22447 port=22447
# socket filepath # socket filepath
socket_file= socketFile=
# allow settings to overwrite # allow settings to overwrite
enable_settings_remote=True enableSettingsRemote=True
# allow commands to be executed # allow commands to be executed
enable_command_remote=True enableCommandRemote=True
[barrier] [barrier]
# Enable barrier detection - automatically detects table/box borders for improved navigation
enabled=False enabled=False
# Characters that represent left-side barriers/borders (for table/box detection) leftBarriers=│└┌─
left_barriers=│└┌ rightBarriers=│┘┐
# Characters that represent right-side barriers/borders (for table/box detection)
right_barriers=│┘┐─
[review] [review]
# Announce line breaks during review mode lineBreak=True
line_break=True endOfScreen=True
# Announce when reaching the end of screen during review # leave the review when pressing a key
end_of_screen=True leaveReviewOnCursorChange=True
# Exit review mode when cursor position changes (e.g., when typing) # leave the review when changing the screen
leave_review_on_cursor_change=True leaveReviewOnScreenChange=True
# Exit review mode when switching to a different TTY/screen
leave_review_on_screen_change=True
[promote] [promote]
# Enable promoting (announcing) important text updates automatically
enabled=True enabled=True
# Seconds of inactivity before promoting text updates (prevents spam during active typing) inactiveTimeoutSec=120
inactive_timeout_sec=120
# Comma-separated list of text patterns to promote when detected
# Leave empty to disable pattern-based promotion
list= list=
[menu] [menu]
# Custom path for VMenu (virtual menu) profiles vmenuPath=
# Leave empty to use default location (/etc/fenrirscreenreader/vmenu-profiles/) # quickMenu: Semicolon-separated list of settings for quick adjustment
vmenu_path=
# Quick menu: Semicolon-separated list of settings for rapid adjustment via VMenu
# Access with Fenrir+F10, navigate to "Quick Settings"
# Format: section#setting;section#setting;... # Format: section#setting;section#setting;...
# Supported settings: # Supported settings:
# - speech#rate, speech#pitch, speech#volume (0.0-1.0) # - speech#rate, speech#pitch, speech#volume (0.0-1.0)
# - speech#module, speech#voice (speechdDriver only, auto-added) # - speech#module, speech#voice (speechdDriver only, auto-added)
# Note: speech#module and speech#voice are automatically added when # Note: speech#module and speech#voice are automatically added when
# speechdDriver is active. Do not add them manually. # speechdDriver is active. Do not add them manually.
quick_menu=speech#rate;speech#pitch;speech#volume quickMenu=speech#rate;speech#pitch;speech#volume
[prompt] [prompt]
# Custom prompt patterns for silence until prompt feature # Custom prompt patterns for silence until prompt feature
@@ -279,32 +242,27 @@ quick_menu=speech#rate;speech#pitch;speech#volume
# For "[user@hostname ~] $" use: \[.*@.*\s.*\]\s*[$#>]\s* # For "[user@hostname ~] $" use: \[.*@.*\s.*\]\s*[$#>]\s*
# For custom prompts ending with specific strings, use patterns like: .*your_prompt_ending$ # For custom prompts ending with specific strings, use patterns like: .*your_prompt_ending$
# For custom package manager prompts: .*your_package_manager.*\[[YyNn]/[YyNn]\].* # For custom package manager prompts: .*your_package_manager.*\[[YyNn]/[YyNn]\].*
custom_patterns= customPatterns=
# Specific prompt strings to match exactly (useful for very specific custom prompts) # Specific prompt strings to match exactly (useful for very specific custom prompts)
# Format: exact_matches=prompt1,prompt2,prompt3 # Format: exactMatches=prompt1,prompt2,prompt3
# Examples: # Examples:
# exact_matches=[storm@fenrir ~] $,[root@fenrir ~] #,Continue installation? [Y/n] # exactMatches=[storm@fenrir ~] $,[root@fenrir ~] #,Continue installation? [Y/n]
exact_matches= exactMatches=
[time] [time]
# Enable automatic time announcements # automatic time announcement
enabled=False enabled=False
# Announce the current time # present time
present_time=True presentTime=True
# Announce the date (only when it changes, e.g., at midnight) # present date (on change)
present_date=True presentDate=True
# Announce time every N seconds (0 = disabled) # present time after a given period of seconds
# If delay_sec > 0, on_minutes is ignored delaySec=0
delay_sec=0 # present time after to given minutes example every 15 minutes: 00,15,30,45
# Announce time at specific minutes of each hour (comma-separated) # if delaySec is >0 onMinutes is ignored
# Examples: onMinutes=00,30
# 00 = Only on the hour (1:00, 2:00, 3:00, etc.) # announce via soundicon (not interrupting)
# 00,30 = On the hour and half-hour (1:00, 1:30, 2:00, 2:30, etc.)
# 00,15,30,45 = Every 15 minutes
# Note: This is ignored if delay_sec > 0
on_minutes=00,30
# Play a sound icon before time announcement (non-interrupting)
announce=True announce=True
# Interrupt current speech to announce time immediately # interrupt current speech for time announcement
interrupt=False interrupt=False
+35 -35
View File
@@ -1105,7 +1105,7 @@ the word "Chrys" appears after 120 Seconds of inactivity:
.... ....
[promote] [promote]
enabled=True enabled=True
inactive_timeout_sec=120 inactiveTimeoutSec=120
list=Chrys list=Chrys
.... ....
@@ -1286,8 +1286,8 @@ Enable remote control in settings.conf:
[remote] [remote]
enable=True enable=True
driver=unixDriver driver=unixDriver
enable_settings_remote=True enableSettingsRemote=True
enable_command_remote=True enableCommandRemote=True
.... ....
==== Using socat with Unix Sockets ==== Using socat with Unix Sockets
@@ -1317,13 +1317,13 @@ echo "setting set focus#highlight=True" | socat - UNIX-CLIENT:/tmp/fenrirscreenr
echo "setting set speech#rate=0.8" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set speech#rate=0.8" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Change punctuation level (none/some/most/all) # Change punctuation level (none/some/most/all)
echo "setting set general#punctuation_level=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set general#punctuationLevel=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Voice and TTS control # Voice and TTS control
echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Multiple settings at once # Multiple settings at once
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuation_level=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuationLevel=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Reset all settings to defaults # Reset all settings to defaults
echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
@@ -1394,8 +1394,8 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
* `+speech#module=module_name+` - TTS module (e.g., "espeak-ng") * `+speech#module=module_name+` - TTS module (e.g., "espeak-ng")
*General Settings:* *General Settings:*
* `+general#punctuation_level=none/some/most/all+` - Punctuation verbosity * `+general#punctuationLevel=none/some/most/all+` - Punctuation verbosity
* `+general#auto_spell_check=True/False+` - Automatic spell checking * `+general#autoSpellCheck=True/False+` - Automatic spell checking
* `+general#emoticons=True/False+` - Enable emoticon replacement * `+general#emoticons=True/False+` - Enable emoticon replacement
*Sound Settings:* *Sound Settings:*
@@ -1407,11 +1407,11 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
* `+focus#highlight=True/False+` - Follow text highlighting * `+focus#highlight=True/False+` - Follow text highlighting
*Keyboard Settings:* *Keyboard Settings:*
* `+keyboard#char_echo_mode=0-2+` - Character echo (0=none, 1=always, 2=capslock only) * `+keyboard#charEchoMode=0-2+` - Character echo (0=none, 1=always, 2=capslock only)
* `+keyboard#word_echo=True/False+` - Echo complete words * `+keyboard#wordEcho=True/False+` - Echo complete words
*Screen Settings:* *Screen Settings:*
* `+screen#ignore_screen=1,2,3+` - TTY screens to ignore * `+screen#ignoreScreen=1,2,3+` - TTY screens to ignore
==== settings.conf syntax ==== settings.conf syntax
@@ -1511,14 +1511,14 @@ frequencies.
sound file. sound file.
.... ....
generic_play_file_command=<your command for playing a file> genericPlayFileCommand=<your command for playing a file>
.... ....
`+genericFrequencyCommand+` defines the command that is used playing `+genericFrequencyCommand+` defines the command that is used playing
frequencies. frequencies.
.... ....
generic_frequency_command=<your command for playing a frequence> genericFrequencyCommand=<your command for playing a frequence>
.... ....
The following variables are substituted in `+genericPlayFileCommand+` The following variables are substituted in `+genericPlayFileCommand+`
@@ -1532,13 +1532,13 @@ and `+genericFrequencyCommand+`:
Example genericPlayFileCommand (default) Example genericPlayFileCommand (default)
.... ....
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
.... ....
Example genericFrequencyCommand (default) Example genericFrequencyCommand (default)
.... ....
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
.... ....
==== Speech ==== Speech
@@ -1579,7 +1579,7 @@ Values: Range Minimum:`+0.0+` is lowest, Maximum:`+1.0+` is highest.
A Pitch for capital letters can be set. A Pitch for capital letters can be set.
.... ....
capital_pitch=0.9 capitalPitch=0.9
.... ....
Values: Range Minimum:`+0.0+` is lowest, Maximum:`+1.0+` is highest. Values: Range Minimum:`+0.0+` is lowest, Maximum:`+1.0+` is highest.
@@ -1681,7 +1681,7 @@ the pico module:
language=de-DE language=de-DE
.... ....
Read new text as it occurs auto_read_incoming=True Values: on=`+True+`, Read new text as it occurs autoReadIncoming=True Values: on=`+True+`,
off=`+False+` off=`+False+`
==== Screen ==== Screen
@@ -1711,7 +1711,7 @@ Values:`+cp850+` is used for Western languages like USA or Europe.
The driver updates Fenrir with changes on the screen. The driver updates Fenrir with changes on the screen.
.... ....
screen_update_delay=0.05 screenUpdateDelay=0.05
.... ....
Values: in Seconds Values: in Seconds
@@ -1776,7 +1776,7 @@ Gives Fenrir exclusive access to the keyboard and lets it control
keystrokes. This is needed to intercept Fenrir related shortcuts. keystrokes. This is needed to intercept Fenrir related shortcuts.
.... ....
grab_devices=True grabDevices=True
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1785,7 +1785,7 @@ The following makes sense if you are using a second screenreader and
want to have some hooked events. Fenrir ignores all shortcuts then. want to have some hooked events. Fenrir ignores all shortcuts then.
.... ....
ignore_shortcuts=False ignoreShortcuts=False
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1793,7 +1793,7 @@ Values: on=`+True+`, off=`+False+`
The current keyboard layout used for shortcuts. The current keyboard layout used for shortcuts.
.... ....
keyboard_layout=desktop keyboardLayout=desktop
.... ....
Values: An absolute Path to a Keyboard definition file or a Filename Values: An absolute Path to a Keyboard definition file or a Filename
@@ -1810,7 +1810,7 @@ Values: on=`+True+`, off=`+False+`
Announce deleted characters Announce deleted characters
.... ....
char_delete_echo=True charDeleteEcho=True
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1818,7 +1818,7 @@ Values: on=`+True+`, off=`+False+`
Announce word after pressing space Announce word after pressing space
.... ....
word_echo=False wordEcho=False
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1826,7 +1826,7 @@ Values: on=`+True+`, off=`+False+`
Interrupt speech on any keypress Interrupt speech on any keypress
.... ....
interrupt_on_key_press=False interruptOnKeyPress=False
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1834,7 +1834,7 @@ Values: on=`+True+`, off=`+False+`
You can filter the keys that speech should interrupt You can filter the keys that speech should interrupt
.... ....
interrupt_on_key_press_filter= interruptOnKeyPressFilter=
.... ....
Values: (List) empty = all keys, otherwise interrupt with specified keys Values: (List) empty = all keys, otherwise interrupt with specified keys
@@ -1842,7 +1842,7 @@ Values: (List) empty = all keys, otherwise interrupt with specified keys
The timeout that is used for double tap shortcuts The timeout that is used for double tap shortcuts
.... ....
double_tap_timeout=0.2 doubleTapTimeout=0.2
.... ....
Values: Seconds Values: Seconds
@@ -1862,7 +1862,7 @@ Values: off=0, error=1, warning=2, info=3
the current punctuation and dict file in use: the current punctuation and dict file in use:
.... ....
punctuation_profile=default punctuationProfile=default
.... ....
Values: Text, see available profiles in `+/etc/fenrir/punctuation+` or Values: Text, see available profiles in `+/etc/fenrir/punctuation+` or
@@ -1871,7 +1871,7 @@ in `+sourceTree/config/punctuation+`
The current punctuation level in use: The current punctuation level in use:
.... ....
punctuation_level=some punctuationLevel=some
.... ....
Values: Text, See available levels in the used punctuation file. Values: Text, See available levels in the used punctuation file.
@@ -1879,7 +1879,7 @@ Values: Text, See available levels in the used punctuation file.
Respect pause for punctuations: Respect pause for punctuations:
.... ....
respect_punctuation_pause=True respectPunctuationPause=True
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1887,7 +1887,7 @@ Values: on=`+True+`, off=`+False+`
Add a pause on Line break: Add a pause on Line break:
.... ....
new_line_pause=True newLinePause=True
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1905,7 +1905,7 @@ Values: Text, Systemfilepath
The number of available clipboards: The number of available clipboards:
.... ....
number_of_clipboards=10 numberOfClipboards=10
.... ....
Values: Integer, 1 - 999 Values: Integer, 1 - 999
@@ -1921,7 +1921,7 @@ Values: on=`+True+`, off=`+False+`
Define the current Fenrir keys: Define the current Fenrir keys:
.... ....
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
.... ....
Values, Text list, separated by comma. Values, Text list, separated by comma.
@@ -1955,7 +1955,7 @@ https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior[d
Enable or Disable spellcheck whilst typing: Enable or Disable spellcheck whilst typing:
.... ....
auto_spell_check=True autoSpellCheck=True
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -1963,7 +1963,7 @@ Values: on=`+True+`, off=`+False+`
The use of the dictionary with spellcheck: The use of the dictionary with spellcheck:
.... ....
spell_check_language=en_US spellCheckLanguage=en_US
.... ....
Values: Text, see aspell dictionary's. Values: Text, see aspell dictionary's.
@@ -2044,7 +2044,7 @@ Values: on=`+True+`, off=`+False+`
Leave the review mode when changing the screen (From TTY3 to TTY4): Leave the review mode when changing the screen (From TTY3 to TTY4):
.... ....
leave_review_on_screen_change=True leaveReviewOnScreenChange=True
.... ....
Values: on=`+True+`, off=`+False+` Values: on=`+True+`, off=`+False+`
@@ -2064,7 +2064,7 @@ The minimum time interval of inactivity to activate promoting. By
default it promotes after 120 Seconds inactivity: default it promotes after 120 Seconds inactivity:
.... ....
inactive_timeout_sec=120 inactiveTimeoutSec=120
.... ....
Values: in Seconds Values: in Seconds
+11 -11
View File
@@ -102,17 +102,17 @@ volume=0.7
[keyboard] [keyboard]
driver=evdevDriver driver=evdevDriver
keyboard_layout=desktop keyboardLayout=desktop
[screen] [screen]
driver=vcsaDriver driver=vcsaDriver
ignore_screen= ignoreScreen=
[remote] [remote]
enable=True enable=True
driver=unixDriver driver=unixDriver
enable_settings_remote=True enableSettingsRemote=True
enable_command_remote=True enableCommandRemote=True
``` ```
## Remote Control ## Remote Control
@@ -126,8 +126,8 @@ Enable remote control in settings:
enable=True enable=True
driver=unixDriver # or tcpDriver driver=unixDriver # or tcpDriver
port=22447 # for TCP driver port=22447 # for TCP driver
enable_settings_remote=True # allow settings changes enableSettingsRemote=True # allow settings changes
enable_command_remote=True # allow command execution enableCommandRemote=True # allow command execution
``` ```
### Basic Usage with socat ### Basic Usage with socat
@@ -155,14 +155,14 @@ echo "setting set speech#pitch=0.6" | socat - UNIX-CLIENT:/tmp/fenrirscreenreade
echo "setting set speech#volume=0.9" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set speech#volume=0.9" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Change punctuation level (none/some/most/all) # Change punctuation level (none/some/most/all)
echo "setting set general#punctuation_level=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set general#punctuationLevel=all" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Voice and TTS control # Voice and TTS control
echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set speech#voice=en-us+f3" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
echo "setting set speech#module=espeak-ng" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set speech#module=espeak-ng" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Multiple settings at once # Multiple settings at once
echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuation_level=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting set speech#rate=0.8;sound#volume=0.7;general#punctuationLevel=most" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
# Reset all settings # Reset all settings
echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock echo "setting reset" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-deamon.sock
@@ -208,11 +208,11 @@ echo "command quitapplication" | socat - UNIX-CLIENT:/tmp/fenrirscreenreader-dea
- `command resetvmenu` - Reset virtual menu - `command resetvmenu` - Reset virtual menu
**Key Settings You Can Change:** **Key Settings You Can Change:**
- Punctuation level: `setting set general#punctuation_level=all` - Punctuation level: `setting set general#punctuationLevel=all`
- Speech parameters: `setting set speech#rate=0.8;speech#pitch=0.6` - Speech parameters: `setting set speech#rate=0.8;speech#pitch=0.6`
- Voice selection: `setting set speech#voice=en-us+f3` - Voice selection: `setting set speech#voice=en-us+f3`
- Character echo: `setting set keyboard#char_echo_mode=1` - Character echo: `setting set keyboard#charEchoMode=1`
- Screen ignore: `setting set screen#ignore_screen=1,2,3` - Screen ignore: `setting set screen#ignoreScreen=1,2,3`
### Scripting Integration ### Scripting Integration
+32 -32
View File
@@ -735,7 +735,7 @@ you can define a list of words which you want to hear a sound icon for after a p
Example if the word "Chrys" appears after 120 Seconds of inactivity: Example if the word "Chrys" appears after 120 Seconds of inactivity:
[promote] [promote]
enabled=True enabled=True
inactive_timeout_sec=120 inactiveTimeoutSec=120
list=Chrys list=Chrys
See section [[#Promote|Promote]] in ''settings.conf'' for more information. See section [[#Promote|Promote]] in ''settings.conf'' for more information.
==== Punctuation ==== ==== Punctuation ====
@@ -867,9 +867,9 @@ Values: ''0.0'' is quietest, ''1.0'' is loudest.
The generic sound driver uses shell commands for play sound and frequencies. The generic sound driver uses shell commands for play sound and frequencies.
''genericPlayFileCommand'' defines the command that is used to play a sound file. ''genericPlayFileCommand'' defines the command that is used to play a sound file.
generic_play_file_command=<your command for playing a file> genericPlayFileCommand=<your command for playing a file>
''genericFrequencyCommand'' defines the command that is used playing frequencies. ''genericFrequencyCommand'' defines the command that is used playing frequencies.
generic_frequency_command=<your command for playing a frequence> genericFrequencyCommand=<your command for playing a frequence>
The following variables are substituted in ''genericPlayFileCommand'' and ''genericFrequencyCommand'': The following variables are substituted in ''genericPlayFileCommand'' and ''genericFrequencyCommand'':
* ''fenrirVolume'' = the current volume setting * ''fenrirVolume'' = the current volume setting
@@ -878,9 +878,9 @@ The following variables are substituted in ''genericPlayFileCommand'' and ''gene
* ''fenrirDuration'' = the duration of the frequency * ''fenrirDuration'' = the duration of the frequency
Example genericPlayFileCommand (default) Example genericPlayFileCommand (default)
generic_play_file_command=play -q -v fenrirVolume fenrirSoundFile genericPlayFileCommand=play -q -v fenrirVolume fenrirSoundFile
Example genericFrequencyCommand (default) Example genericFrequencyCommand (default)
generic_frequency_command=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence genericFrequencyCommand=play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence
==== Speech ==== ==== Speech ====
Speech is configured in section ''[speech]''. Speech is configured in section ''[speech]''.
Turn speech on or off: Turn speech on or off:
@@ -910,7 +910,7 @@ Pitch controls the pitch of the voice.
Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest. Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest.
A Pitch for capital letters can be set. A Pitch for capital letters can be set.
capital_pitch=0.9 capitalPitch=0.9
Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest. Values: Range Minimum:''0.0'' is lowest, Maximum:''1.0'' is highest.
The Volume controls the loudness of the voice. The Volume controls the loudness of the voice.
@@ -931,7 +931,7 @@ Select the language you want Fenrir to use.
Values: Text, see your TTS synths documentation what is available. Values: Text, see your TTS synths documentation what is available.
Read new text as it occurs Read new text as it occurs
auto_read_incoming=True autoReadIncoming=True
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
=== Generic Driver === === Generic Driver ===
@@ -948,16 +948,16 @@ The following variables are substituted in ''genericSpeechCommand'':
* ''fenrirRate'' = is replaced with the current speed (speech rate) * ''fenrirRate'' = is replaced with the current speed (speech rate)
Example genericSpeechCommand (default): Example genericSpeechCommand (default):
generic_speech_command=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText" genericSpeechCommand=espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"
These are the minimum and maximum values of the TTS system used in genericSpeechCommand. They are needed to calculate the abstract range in volume, rate and pitch 0.0 - 1.0. These are the minimum and maximum values of the TTS system used in genericSpeechCommand. They are needed to calculate the abstract range in volume, rate and pitch 0.0 - 1.0.
FenrirMinVolume=0 FenrirMinVolume=0
fenrir_max_volume=200 fenrirMaxVolume=200
fenrir_min_pitch=0 fenrirMinPitch=0
fenrir_max_pitch=99 fenrirMaxPitch=99
fenrir_min_rate=80 fenrirMinRate=80
fenrir_max_rate=450 fenrirMaxRate=450
The current volume, pitch and rate is calculated like this The current volume, pitch and rate is calculated like this
value = min + [volume,pitch,rate] * (min - max ) value = min + [volume,pitch,rate] * (min - max )
@@ -1033,7 +1033,7 @@ The encoding of the screen
Values:''cp850'' is used for Western languages like USA or Europe. Values:''cp850'' is used for Western languages like USA or Europe.
The driver updates Fenrir with changes on the screen. The driver updates Fenrir with changes on the screen.
screen_update_delay=0.05 screenUpdateDelay=0.05
Values: in Seconds Values: in Seconds
If you want Fenrir to not be active on any screen for various reasons. Maybe an X server or Wayland is running on that screen. You can make Fenrir ignore it or multiple screens seperated by '','' with: If you want Fenrir to not be active on any screen for various reasons. Maybe an X server or Wayland is running on that screen. You can make Fenrir ignore it or multiple screens seperated by '','' with:
@@ -1064,15 +1064,15 @@ Values:
* ''<Device Name>'' just use the device with the given name. * ''<Device Name>'' just use the device with the given name.
Gives Fenrir exclusive access to the keyboard and lets it control keystrokes. This is needed to intercept Fenrir related shortcuts. Gives Fenrir exclusive access to the keyboard and lets it control keystrokes. This is needed to intercept Fenrir related shortcuts.
grab_devices=True grabDevices=True
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
The following makes sense if you are using a second screenreader and want to have some hooked events. Fenrir ignores all shortcuts then. The following makes sense if you are using a second screenreader and want to have some hooked events. Fenrir ignores all shortcuts then.
ignore_shortcuts=False ignoreShortcuts=False
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
The current keyboard layout used for shortcuts. The current keyboard layout used for shortcuts.
keyboard_layout=desktop keyboardLayout=desktop
Values: An absolute Path to a Keyboard definition file or a Filename without extension located in ''/etc/fenrir/keyboard'' Values: An absolute Path to a Keyboard definition file or a Filename without extension located in ''/etc/fenrir/keyboard''
Announce characters while typing. Announce characters while typing.
@@ -1080,23 +1080,23 @@ Announce characters while typing.
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
Announce deleted characters Announce deleted characters
char_delete_echo=True charDeleteEcho=True
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
Announce word after pressing space Announce word after pressing space
word_echo=False wordEcho=False
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
Interrupt speech on any keypress Interrupt speech on any keypress
interrupt_on_key_press=False interruptOnKeyPress=False
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
You can filter the keys that speech should interrupt You can filter the keys that speech should interrupt
interrupt_on_key_press_filter= interruptOnKeyPressFilter=
Values: (List) empty = all keys, otherwise interrupt with specified keys Values: (List) empty = all keys, otherwise interrupt with specified keys
The timeout that is used for double tap shortcuts The timeout that is used for double tap shortcuts
double_tap_timeout=0.2 doubleTapTimeout=0.2
Values: Seconds Values: Seconds
==== General ==== ==== General ====
Overall settings can be configured from the section ''[general]''. Overall settings can be configured from the section ''[general]''.
@@ -1106,19 +1106,19 @@ Set the current debug level:
Values: off=0, error=1, warning=2, info=3 Values: off=0, error=1, warning=2, info=3
the current punctuation and dict file in use: the current punctuation and dict file in use:
punctuation_profile=default punctuationProfile=default
Values: Text, see available profiles in ''/etc/fenrir/punctuation'' or in ''sourceTree/config/punctuation'' Values: Text, see available profiles in ''/etc/fenrir/punctuation'' or in ''sourceTree/config/punctuation''
The current punctuation level in use: The current punctuation level in use:
punctuation_level=some punctuationLevel=some
Values: Text, See available levels in the used punctuation file. Values: Text, See available levels in the used punctuation file.
Respect pause for punctuations: Respect pause for punctuations:
respect_punctuation_pause=True respectPunctuationPause=True
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
Add a pause on Line break: Add a pause on Line break:
new_line_pause=True newLinePause=True
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
Specify the path where the clipboard should be exported to. Specify the path where the clipboard should be exported to.
@@ -1128,7 +1128,7 @@ The variable ''$user'' is replaced by the current logged username.
Values: Text, Systemfilepath Values: Text, Systemfilepath
The number of available clipboards: The number of available clipboards:
number_of_clipboards=10 numberOfClipboards=10
Values: Integer, 1 - 999 Values: Integer, 1 - 999
Replace emoticons like :) or ;) with text insertions: Replace emoticons like :) or ;) with text insertions:
@@ -1136,7 +1136,7 @@ Replace emoticons like :) or ;) with text insertions:
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
Define the current Fenrir keys: Define the current Fenrir keys:
fenrir_keys=KEY_KP0,KEY_META,KEY_INSERT fenrirKeys=KEY_KP0,KEY_META,KEY_INSERT
Values, Text list, separated by comma. Values, Text list, separated by comma.
Define the current script keys: Define the current script keys:
@@ -1152,11 +1152,11 @@ The date format to be used for (date command) output:
Values: see python specification for [[https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior|datetime.strftime]] Values: see python specification for [[https://docs.python.org/3/library/datetime.html#strftime-and-strptime-behavior|datetime.strftime]]
Enable or Disable spellcheck whilst typing: Enable or Disable spellcheck whilst typing:
auto_spell_check=True autoSpellCheck=True
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
The use of the dictionary with spellcheck: The use of the dictionary with spellcheck:
spell_check_language=en_US spellCheckLanguage=en_US
Values: Text, see aspell dictionary's. Values: Text, see aspell dictionary's.
Folder Path for your scripts "scriptKey" functionality: Folder Path for your scripts "scriptKey" functionality:
@@ -1197,7 +1197,7 @@ Leave the review mode when pressing a key:
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
Leave the review mode when changing the screen (From TTY3 to TTY4): Leave the review mode when changing the screen (From TTY3 to TTY4):
leave_review_on_screen_change=True leaveReviewOnScreenChange=True
Values: on=''True'', off=''False'' Values: on=''True'', off=''False''
==== Promote ==== ==== Promote ====
"Promoted Lists" are configured in the section ''[promote]''. "Promoted Lists" are configured in the section ''[promote]''.
@@ -1207,7 +1207,7 @@ Values: on=''True'', off=''False''
The minimum time interval of inactivity to activate promoting. The minimum time interval of inactivity to activate promoting.
By default it promotes after 120 Seconds inactivity: By default it promotes after 120 Seconds inactivity:
inactive_timeout_sec=120 inactiveTimeoutSec=120
Values: in Seconds Values: in Seconds
Define a list of promoted words comma seperated: Define a list of promoted words comma seperated:
@@ -22,7 +22,7 @@ class command:
self.env["runtime"]["MemoryManager"].add_index_list( self.env["runtime"]["MemoryManager"].add_index_list(
"clipboardHistory", "clipboardHistory",
self.env["runtime"]["SettingsManager"].get_setting_as_int( self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "number_of_clipboards" "general", "numberOfClipboards"
), ),
) )
@@ -36,11 +36,11 @@ class command:
def update_spell_language(self): def update_spell_language(self):
self.spellChecker = enchant.Dict( self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
) )
self.language = self.env["runtime"]["SettingsManager"].get_setting( self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
def run(self): def run(self):
@@ -48,7 +48,7 @@ class command:
return return
if ( if (
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
!= self.language != self.language
): ):
@@ -59,7 +59,7 @@ class command:
def run(self): def run(self):
current_layout = self.env["runtime"]["SettingsManager"].get_setting( current_layout = self.env["runtime"]["SettingsManager"].get_setting(
"keyboard", "keyboard_layout" "keyboard", "keyboardLayout"
) )
# Extract layout name from full path if needed # Extract layout name from full path if needed
@@ -83,7 +83,7 @@ class command:
# Update setting and reload shortcuts # Update setting and reload shortcuts
self.env["runtime"]["SettingsManager"].set_setting( self.env["runtime"]["SettingsManager"].set_setting(
"keyboard", "keyboard_layout", next_layout "keyboard", "keyboardLayout", next_layout
) )
# Reload shortcuts with new layout # Reload shortcuts with new layout
@@ -26,7 +26,7 @@ class command:
def run(self): def run(self):
clipboard_file_path = self.env["runtime"][ clipboard_file_path = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("general", "clipboard_export_path") ].get_setting("general", "clipboardExportPath")
clipboard_file_path = clipboard_file_path.replace( clipboard_file_path = clipboard_file_path.replace(
"$user", self.env["general"]["curr_user"] "$user", self.env["general"]["curr_user"]
) )
@@ -26,7 +26,7 @@ class command:
def run(self): def run(self):
clipboard_file_path = self.env["runtime"][ clipboard_file_path = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("general", "clipboard_export_path") ].get_setting("general", "clipboardExportPath")
clipboard_file_path = clipboard_file_path.replace( clipboard_file_path = clipboard_file_path.replace(
"$user", self.env["general"]["curr_user"] "$user", self.env["general"]["curr_user"]
) )
@@ -18,7 +18,7 @@ class command:
self.env["runtime"]["MemoryManager"].add_index_list( self.env["runtime"]["MemoryManager"].add_index_list(
"clipboardHistory", "clipboardHistory",
self.env["runtime"]["SettingsManager"].get_setting_as_int( self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "number_of_clipboards" "general", "numberOfClipboards"
), ),
) )
@@ -18,17 +18,17 @@ class command:
def initialize(self, environment): def initialize(self, environment):
self.env = environment self.env = environment
# Use commandBuffer like other commands # Use commandBuffer like other commands
if "progress_monitoring" not in self.env["commandBuffer"]: if "progressMonitoring" not in self.env["commandBuffer"]:
# Check if progress monitoring should be enabled by default from # Check if progress monitoring should be enabled by default from
# settings # settings
try: try:
default_enabled = self.env["runtime"][ default_enabled = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_bool("sound", "progress_monitoring") ].get_setting_as_bool("sound", "progressMonitoring")
except Exception as e: except Exception as e:
# If setting doesn't exist, default to False # If setting doesn't exist, default to False
default_enabled = False default_enabled = False
self.env["commandBuffer"]["progress_monitoring"] = default_enabled self.env["commandBuffer"]["progressMonitoring"] = default_enabled
self.env["commandBuffer"]["lastProgressTime"] = 0 self.env["commandBuffer"]["lastProgressTime"] = 0
self.env["commandBuffer"]["lastProgressValue"] = -1 self.env["commandBuffer"]["lastProgressValue"] = -1
@@ -40,12 +40,12 @@ class command:
def run(self): def run(self):
# Check if commandBuffer exists # Check if commandBuffer exists
if "progress_monitoring" not in self.env["commandBuffer"]: if "progressMonitoring" not in self.env["commandBuffer"]:
self.env["commandBuffer"]["progress_monitoring"] = False self.env["commandBuffer"]["progressMonitoring"] = False
self.env["commandBuffer"]["lastProgressTime"] = 0 self.env["commandBuffer"]["lastProgressTime"] = 0
self.env["commandBuffer"]["lastProgressValue"] = -1 self.env["commandBuffer"]["lastProgressValue"] = -1
if self.env["commandBuffer"]["progress_monitoring"]: if self.env["commandBuffer"]["progressMonitoring"]:
self.stop_progress_monitoring() self.stop_progress_monitoring()
self.env["runtime"]["OutputManager"].present_text( self.env["runtime"]["OutputManager"].present_text(
_("Progress monitoring disabled"), interrupt=True _("Progress monitoring disabled"), interrupt=True
@@ -57,17 +57,17 @@ class command:
) )
def start_progress_monitoring(self): def start_progress_monitoring(self):
self.env["commandBuffer"]["progress_monitoring"] = True self.env["commandBuffer"]["progressMonitoring"] = True
self.env["commandBuffer"]["lastProgressTime"] = time.time() self.env["commandBuffer"]["lastProgressTime"] = time.time()
self.env["commandBuffer"]["lastProgressValue"] = -1 self.env["commandBuffer"]["lastProgressValue"] = -1
# Don't control speech - let user decide with silence_until_prompt # Don't control speech - let user decide with silence_until_prompt
def stop_progress_monitoring(self): def stop_progress_monitoring(self):
self.env["commandBuffer"]["progress_monitoring"] = False self.env["commandBuffer"]["progressMonitoring"] = False
# Don't control speech - progress monitor is beep-only # Don't control speech - progress monitor is beep-only
def detect_progress(self, text): def detect_progress(self, text):
if not self.env["commandBuffer"]["progress_monitoring"]: if not self.env["commandBuffer"]["progressMonitoring"]:
return return
# Skip progress detection if current screen looks like a prompt # Skip progress detection if current screen looks like a prompt
@@ -36,11 +36,11 @@ class command:
def update_spell_language(self): def update_spell_language(self):
self.spellChecker = enchant.Dict( self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
) )
self.language = self.env["runtime"]["SettingsManager"].get_setting( self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
def run(self): def run(self):
@@ -51,7 +51,7 @@ class command:
return return
if ( if (
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
!= self.language != self.language
): ):
@@ -36,11 +36,11 @@ class command:
return return
self.spellChecker = enchant.Dict( self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
) )
self.language = self.env["runtime"]["SettingsManager"].get_setting( self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
def run(self): def run(self):
@@ -51,7 +51,7 @@ class command:
return return
if ( if (
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
!= self.language != self.language
): ):
@@ -25,15 +25,15 @@ class command:
def run(self): def run(self):
self.env["runtime"]["SettingsManager"].set_setting( self.env["runtime"]["SettingsManager"].set_setting(
"general", "general",
"auto_present_indent", "autoPresentIndent",
str( str(
not self.env["runtime"]["SettingsManager"].get_setting_as_bool( not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "auto_present_indent" "general", "autoPresentIndent"
) )
), ),
) )
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "auto_present_indent" "general", "autoPresentIndent"
): ):
self.env["runtime"]["OutputManager"].present_text( self.env["runtime"]["OutputManager"].present_text(
_("autoindent enabled"), sound_icon="", interrupt=True _("autoindent enabled"), sound_icon="", interrupt=True
@@ -25,15 +25,15 @@ class command:
def run(self): def run(self):
self.env["runtime"]["SettingsManager"].set_setting( self.env["runtime"]["SettingsManager"].set_setting(
"speech", "speech",
"auto_read_incoming", "autoReadIncoming",
str( str(
not self.env["runtime"]["SettingsManager"].get_setting_as_bool( not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "auto_read_incoming" "speech", "autoReadIncoming"
) )
), ),
) )
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "auto_read_incoming" "speech", "autoReadIncoming"
): ):
self.env["runtime"]["OutputManager"].present_text( self.env["runtime"]["OutputManager"].present_text(
_("autoread enabled"), sound_icon="", interrupt=True _("autoread enabled"), sound_icon="", interrupt=True
@@ -24,15 +24,15 @@ class command:
def run(self): def run(self):
self.env["runtime"]["SettingsManager"].set_setting( self.env["runtime"]["SettingsManager"].set_setting(
"general", "general",
"auto_spell_check", "autoSpellCheck",
str( str(
not self.env["runtime"]["SettingsManager"].get_setting_as_bool( not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "auto_spell_check" "general", "autoSpellCheck"
) )
), ),
) )
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "auto_spell_check" "general", "autoSpellCheck"
): ):
self.env["runtime"]["OutputManager"].present_text( self.env["runtime"]["OutputManager"].present_text(
_("auto spellcheck enabled"), sound_icon="", interrupt=True _("auto spellcheck enabled"), sound_icon="", interrupt=True
@@ -25,7 +25,7 @@ class command:
if self.env["runtime"]["PunctuationManager"].cycle_punctuation(): if self.env["runtime"]["PunctuationManager"].cycle_punctuation():
self.env["runtime"]["OutputManager"].present_text( self.env["runtime"]["OutputManager"].present_text(
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "punctuation_level" "general", "punctuationLevel"
), ),
interrupt=True, interrupt=True,
ignore_punctuation=True, ignore_punctuation=True,
@@ -23,7 +23,7 @@ class command:
def run(self): def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "interrupt_on_key_press" "keyboard", "interruptOnKeyPress"
): ):
return return
if self.env["runtime"]["InputManager"].no_key_pressed(): if self.env["runtime"]["InputManager"].no_key_pressed():
@@ -37,13 +37,13 @@ class command:
# if the filter is set # if the filter is set
if ( if (
self.env["runtime"]["SettingsManager"] self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interrupt_on_key_press_filter") .get_setting("keyboard", "interruptOnKeyPressFilter")
.strip() .strip()
!= "" != ""
): ):
filter_list = ( filter_list = (
self.env["runtime"]["SettingsManager"] self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interrupt_on_key_press_filter") .get_setting("keyboard", "interruptOnKeyPressFilter")
.split(",") .split(",")
) )
for currInput in self.env["input"]["currInput"]: for currInput in self.env["input"]["currInput"]:
@@ -24,7 +24,7 @@ class command:
def run(self): def run(self):
# enabled? # enabled?
active = self.env["runtime"]["SettingsManager"].get_setting_as_int( active = self.env["runtime"]["SettingsManager"].get_setting_as_int(
"keyboard", "char_echo_mode" "keyboard", "charEchoMode"
) )
# 0 = off # 0 = off
if active == 0: if active == 0:
@@ -26,7 +26,7 @@ class command:
def run(self): def run(self):
# is it enabled? # is it enabled?
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "word_echo" "keyboard", "wordEcho"
): ):
return return
# is navigation? # is navigation?
@@ -39,23 +39,23 @@ class command:
return return
self.spellChecker = enchant.Dict( self.spellChecker = enchant.Dict(
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
) )
self.language = self.env["runtime"]["SettingsManager"].get_setting( self.language = self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
def run(self): def run(self):
if not initialized: if not initialized:
return return
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "auto_spell_check" "general", "autoSpellCheck"
): ):
return return
if ( if (
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "spell_check_language" "general", "spellCheckLanguage"
) )
!= self.language != self.language
): ):
@@ -23,7 +23,7 @@ class command:
def run(self): def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "char_delete_echo" "keyboard", "charDeleteEcho"
): ):
return return
# detect typing or chilling # detect typing or chilling
@@ -46,7 +46,7 @@ class command:
# echo word insteed of char # echo word insteed of char
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "word_echo" "keyboard", "wordEcho"
): ):
if ( if (
abs( abs(
@@ -55,17 +55,17 @@ class command:
self.lastIdent = curr_ident self.lastIdent = curr_ident
do_interrupt = True do_interrupt = True
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "auto_present_indent" "general", "autoPresentIndent"
): ):
if self.env["runtime"]["SettingsManager"].get_setting_as_int( if self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "auto_present_indent_mode" "general", "autoPresentIndentMode"
) in [0, 1]: ) in [0, 1]:
if self.lastIdent != curr_ident: if self.lastIdent != curr_ident:
self.env["runtime"]["OutputManager"].play_frequence( self.env["runtime"]["OutputManager"].play_frequence(
curr_ident * 50, 0.1, interrupt=do_interrupt curr_ident * 50, 0.1, interrupt=do_interrupt
) )
if self.env["runtime"]["SettingsManager"].get_setting_as_int( if self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "auto_present_indent_mode" "general", "autoPresentIndentMode"
) in [0, 2]: ) in [0, 2]:
if self.lastIdent != curr_ident: if self.lastIdent != curr_ident:
self.env["runtime"]["OutputManager"].present_text( self.env["runtime"]["OutputManager"].present_text(
@@ -68,10 +68,10 @@ class command:
# Only beep/announce if indentation level has changed # Only beep/announce if indentation level has changed
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "auto_present_indent" "general", "autoPresentIndent"
) and self.lastIdent != curr_ident: ) and self.lastIdent != curr_ident:
if self.env["runtime"]["SettingsManager"].get_setting_as_int( if self.env["runtime"]["SettingsManager"].get_setting_as_int(
"general", "auto_present_indent_mode" "general", "autoPresentIndentMode"
) in [0, 1]: ) in [0, 1]:
self.env["runtime"]["OutputManager"].play_frequence( self.env["runtime"]["OutputManager"].play_frequence(
curr_ident * 50, 0.1, interrupt=False curr_ident * 50, 0.1, interrupt=False
@@ -23,7 +23,7 @@ class command:
def run(self): def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"review", "leave_review_on_cursor_change" "review", "leaveReviewOnCursorChange"
): ):
return return
if self.env["runtime"]["CursorManager"].is_review_mode(): if self.env["runtime"]["CursorManager"].is_review_mode():
@@ -22,7 +22,7 @@ class command:
def run(self): def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "interrupt_on_key_press" "keyboard", "interruptOnKeyPress"
): ):
return return
if self.env["runtime"]["InputManager"].no_key_pressed(): if self.env["runtime"]["InputManager"].no_key_pressed():
@@ -36,13 +36,13 @@ class command:
# if the filter is set # if the filter is set
if ( if (
self.env["runtime"]["SettingsManager"] self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interrupt_on_key_press_filter") .get_setting("keyboard", "interruptOnKeyPressFilter")
.strip() .strip()
!= "" != ""
): ):
filter_list = ( filter_list = (
self.env["runtime"]["SettingsManager"] self.env["runtime"]["SettingsManager"]
.get_setting("keyboard", "interrupt_on_key_press_filter") .get_setting("keyboard", "interruptOnKeyPressFilter")
.split(",") .split(",")
) )
for currInput in self.env["input"]["currInput"]: for currInput in self.env["input"]["currInput"]:
@@ -23,7 +23,7 @@ class command:
def run(self): def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"review", "leave_review_on_screen_change" "review", "leaveReviewOnScreenChange"
): ):
return return
self.env["runtime"]["CursorManager"].clear_review_cursor() self.env["runtime"]["CursorManager"].clear_review_cursor()
@@ -25,8 +25,8 @@ class command:
# Only run if progress monitoring is enabled # Only run if progress monitoring is enabled
try: try:
if ( if (
"progress_monitoring" in self.env["commandBuffer"] "progressMonitoring" in self.env["commandBuffer"]
and self.env["commandBuffer"]["progress_monitoring"] and self.env["commandBuffer"]["progressMonitoring"]
): ):
# Check if current line is a prompt - if so, reset progress # Check if current line is a prompt - if so, reset progress
# state # state
@@ -42,7 +42,7 @@ class command:
def run(self): def run(self):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "auto_read_incoming" "speech", "autoReadIncoming"
): ):
return return
# is there something to read? # is there something to read?
@@ -38,7 +38,7 @@ class command:
if int(time.time() - self.env["input"]["lastInputTime"]) < self.env[ if int(time.time() - self.env["input"]["lastInputTime"]) < self.env[
"runtime" "runtime"
]["SettingsManager"].get_setting_as_int( ]["SettingsManager"].get_setting_as_int(
"promote", "inactive_timeout_sec" "promote", "inactiveTimeoutSec"
): ):
return return
if ( if (
@@ -134,7 +134,7 @@ class config_command:
self.config.add_section("keyboard") self.config.add_section("keyboard")
self.config.set("keyboard", "driver", "evdevDriver") self.config.set("keyboard", "driver", "evdevDriver")
self.config.set("keyboard", "keyboard_layout", "desktop") self.config.set("keyboard", "keyboardLayout", "desktop")
self.config.add_section("screen") self.config.add_section("screen")
self.config.set("screen", "driver", "vcsaDriver") self.config.set("screen", "driver", "vcsaDriver")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to All (every punctuation mark)" return "Set punctuation to All (every punctuation mark)"
def run(self): def run(self):
current_level = self.get_setting("general", "punctuation_level", "some") current_level = self.get_setting("general", "punctuationLevel", "some")
if current_level.lower() == "all": if current_level.lower() == "all":
self.present_text("Punctuation level already set to All") self.present_text("Punctuation level already set to All")
return return
success = self.set_setting("general", "punctuation_level", "all") success = self.set_setting("general", "punctuationLevel", "all")
if success: if success:
self.present_text("Punctuation level set to All - every punctuation mark will be spoken") self.present_text("Punctuation level set to All - every punctuation mark will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to Most (detailed punctuation)" return "Set punctuation to Most (detailed punctuation)"
def run(self): def run(self):
current_level = self.get_setting("general", "punctuation_level", "some") current_level = self.get_setting("general", "punctuationLevel", "some")
if current_level.lower() == "most": if current_level.lower() == "most":
self.present_text("Punctuation level already set to Most") self.present_text("Punctuation level already set to Most")
return return
success = self.set_setting("general", "punctuation_level", "most") success = self.set_setting("general", "punctuationLevel", "most")
if success: if success:
self.present_text("Punctuation level set to Most - detailed punctuation will be spoken") self.present_text("Punctuation level set to Most - detailed punctuation will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to None (no punctuation spoken)" return "Set punctuation to None (no punctuation spoken)"
def run(self): def run(self):
current_level = self.get_setting("general", "punctuation_level", "some") current_level = self.get_setting("general", "punctuationLevel", "some")
if current_level.lower() == "none": if current_level.lower() == "none":
self.present_text("Punctuation level already set to None") self.present_text("Punctuation level already set to None")
return return
success = self.set_setting("general", "punctuation_level", "none") success = self.set_setting("general", "punctuationLevel", "none")
if success: if success:
self.present_text("Punctuation level set to None - no punctuation will be spoken") self.present_text("Punctuation level set to None - no punctuation will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set punctuation to Some (basic punctuation only)" return "Set punctuation to Some (basic punctuation only)"
def run(self): def run(self):
current_level = self.get_setting("general", "punctuation_level", "some") current_level = self.get_setting("general", "punctuationLevel", "some")
if current_level.lower() == "some": if current_level.lower() == "some":
self.present_text("Punctuation level already set to Some") self.present_text("Punctuation level already set to Some")
return return
success = self.set_setting("general", "punctuation_level", "some") success = self.set_setting("general", "punctuationLevel", "some")
if success: if success:
self.present_text("Punctuation level set to Some - basic punctuation will be spoken") self.present_text("Punctuation level set to Some - basic punctuation will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set character echo to Always (echo all typed characters)" return "Set character echo to Always (echo all typed characters)"
def run(self): def run(self):
current_mode = self.get_setting("keyboard", "char_echo_mode", "1") current_mode = self.get_setting("keyboard", "charEchoMode", "1")
if current_mode == "1": if current_mode == "1":
self.present_text("Character echo already set to Always") self.present_text("Character echo already set to Always")
return return
success = self.set_setting("keyboard", "char_echo_mode", "1") success = self.set_setting("keyboard", "charEchoMode", "1")
if success: if success:
self.present_text("Character echo set to Always - all typed characters will be spoken") self.present_text("Character echo set to Always - all typed characters will be spoken")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set character echo to Caps Lock (echo only when caps lock is on)" return "Set character echo to Caps Lock (echo only when caps lock is on)"
def run(self): def run(self):
current_mode = self.get_setting("keyboard", "char_echo_mode", "1") current_mode = self.get_setting("keyboard", "charEchoMode", "1")
if current_mode == "2": if current_mode == "2":
self.present_text("Character echo already set to Caps Lock mode") self.present_text("Character echo already set to Caps Lock mode")
return return
success = self.set_setting("keyboard", "char_echo_mode", "2") success = self.set_setting("keyboard", "charEchoMode", "2")
if success: if success:
self.present_text("Character echo set to Caps Lock mode - characters will be spoken only when caps lock is on") self.present_text("Character echo set to Caps Lock mode - characters will be spoken only when caps lock is on")
@@ -21,13 +21,13 @@ class command(config_command):
return "Set character echo to None (no character echo)" return "Set character echo to None (no character echo)"
def run(self): def run(self):
current_mode = self.get_setting("keyboard", "char_echo_mode", "1") current_mode = self.get_setting("keyboard", "charEchoMode", "1")
if current_mode == "0": if current_mode == "0":
self.present_text("Character echo already set to None") self.present_text("Character echo already set to None")
return return
success = self.set_setting("keyboard", "char_echo_mode", "0") success = self.set_setting("keyboard", "charEchoMode", "0")
if success: if success:
self.present_text("Character echo set to None - no typed characters will be spoken") self.present_text("Character echo set to None - no typed characters will be spoken")
@@ -21,8 +21,8 @@ class command(config_command):
return "Toggle exclusive keyboard access" return "Toggle exclusive keyboard access"
def run(self): def run(self):
current_state = self.getBooleanSetting("keyboard", "grab_devices", True) current_state = self.getBooleanSetting("keyboard", "grabDevices", True)
new_state = self.toggleBooleanSetting("keyboard", "grab_devices") new_state = self.toggleBooleanSetting("keyboard", "grabDevices")
if new_state != current_state: if new_state != current_state:
state_text = "enabled" if new_state else "disabled" state_text = "enabled" if new_state else "disabled"
@@ -21,8 +21,8 @@ class command(config_command):
return "Toggle word echo when pressing space" return "Toggle word echo when pressing space"
def run(self): def run(self):
current_state = self.getBooleanSetting("keyboard", "word_echo", False) current_state = self.getBooleanSetting("keyboard", "wordEcho", False)
new_state = self.toggleBooleanSetting("keyboard", "word_echo") new_state = self.toggleBooleanSetting("keyboard", "wordEcho")
if new_state != current_state: if new_state != current_state:
state_text = "enabled" if new_state else "disabled" state_text = "enabled" if new_state else "disabled"
@@ -108,7 +108,7 @@ class command(config_command):
"rate": "0.5", "rate": "0.5",
"pitch": "0.5", "pitch": "0.5",
"volume": "1.0", "volume": "1.0",
"auto_read_incoming": "True", "autoReadIncoming": "True",
} }
# Basic sound defaults # Basic sound defaults
@@ -123,10 +123,10 @@ class command(config_command):
self.config["keyboard"] = { self.config["keyboard"] = {
"driver": "evdevDriver", "driver": "evdevDriver",
"device": "ALL", "device": "ALL",
"keyboard_layout": "desktop", "keyboardLayout": "desktop",
"char_echo_mode": "1", "charEchoMode": "1",
"word_echo": "False", "wordEcho": "False",
"char_delete_echo": "True", "charDeleteEcho": "True",
} }
# Basic screen defaults # Basic screen defaults
@@ -137,9 +137,9 @@ class command(config_command):
# Basic general defaults # Basic general defaults
self.config["general"] = { self.config["general"] = {
"punctuation_level": "some", "punctuationLevel": "some",
"debug_level": "0", "debug_level": "0",
"number_of_clipboards": "50", "numberOfClipboards": "50",
} }
# Write the configuration # Write the configuration
+1 -1
View File
@@ -112,7 +112,7 @@ class ByteManager:
if self.lastByteKey == converted_escape_sequence: if self.lastByteKey == converted_escape_sequence:
if time.time() - self.lastInputTime <= self.env["runtime"][ if time.time() - self.lastInputTime <= self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_float("keyboard", "double_tap_timeout"): ].get_setting_as_float("keyboard", "doubleTapTimeout"):
self.repeat += 1 self.repeat += 1
shortcut_data = b"" shortcut_data = b""
for i in range(self.repeat): for i in range(self.repeat):
@@ -29,7 +29,7 @@ class DynamicKeyboardLayoutCommand:
try: try:
settingsManager = self.env["runtime"]["SettingsManager"] settingsManager = self.env["runtime"]["SettingsManager"]
currentLayout = settingsManager.get_setting( currentLayout = settingsManager.get_setting(
"keyboard", "keyboard_layout" "keyboard", "keyboardLayout"
) )
# Check if already set (compare both full path and base name) # Check if already set (compare both full path and base name)
@@ -44,7 +44,7 @@ class DynamicKeyboardLayoutCommand:
try: try:
# Update the setting in memory # Update the setting in memory
settingsManager.set_setting( settingsManager.set_setting(
"keyboard", "keyboard_layout", self.layoutPath "keyboard", "keyboardLayout", self.layoutPath
) )
# Save to the actual config file # Save to the actual config file
@@ -162,7 +162,7 @@ def get_keyboard_layouts(env):
# Get current layout setting path # Get current layout setting path
try: try:
currentLayoutSetting = env["runtime"]["SettingsManager"].get_setting( currentLayoutSetting = env["runtime"]["SettingsManager"].get_setting(
"keyboard", "keyboard_layout" "keyboard", "keyboardLayout"
) )
if currentLayoutSetting and os.path.exists(currentLayoutSetting): if currentLayoutSetting and os.path.exists(currentLayoutSetting):
currentLayoutDir = os.path.dirname(currentLayoutSetting) currentLayoutDir = os.path.dirname(currentLayoutSetting)
+6 -6
View File
@@ -89,7 +89,7 @@ class InputManager:
if not self.no_key_pressed(): if not self.no_key_pressed():
return return
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grab_devices" "keyboard", "grabDevices"
): ):
self.executeDeviceGrab = False self.executeDeviceGrab = False
return return
@@ -208,7 +208,7 @@ class InputManager:
elif self.lastDeepestInput == self.env["input"]["currInput"]: elif self.lastDeepestInput == self.env["input"]["currInput"]:
if time.time() - self.lastInputTime <= self.env["runtime"][ if time.time() - self.lastInputTime <= self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_float("keyboard", "double_tap_timeout"): ].get_setting_as_float("keyboard", "doubleTapTimeout"):
self.env["input"]["shortcut_repeat"] += 1 self.env["input"]["shortcut_repeat"] += 1
else: else:
self.env["input"]["shortcut_repeat"] = 1 self.env["input"]["shortcut_repeat"] = 1
@@ -255,7 +255,7 @@ class InputManager:
def grab_all_devices(self): def grab_all_devices(self):
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grab_devices" "keyboard", "grabDevices"
): ):
try: try:
return self.env["runtime"]["InputDriver"].grab_all_devices() return self.env["runtime"]["InputDriver"].grab_all_devices()
@@ -265,7 +265,7 @@ class InputManager:
def ungrab_all_devices(self): def ungrab_all_devices(self):
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grab_devices" "keyboard", "grabDevices"
): ):
try: try:
return self.env["runtime"]["InputDriver"].ungrab_all_devices() return self.env["runtime"]["InputDriver"].ungrab_all_devices()
@@ -355,7 +355,7 @@ class InputManager:
def write_event_buffer(self): def write_event_buffer(self):
try: try:
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grab_devices" "keyboard", "grabDevices"
): ):
self.env["runtime"]["InputDriver"].write_event_buffer() self.env["runtime"]["InputDriver"].write_event_buffer()
self.clear_event_buffer() self.clear_event_buffer()
@@ -572,7 +572,7 @@ class InputManager:
# Get current layout path # Get current layout path
layout_setting = self.env["runtime"]["SettingsManager"].get_setting( layout_setting = self.env["runtime"]["SettingsManager"].get_setting(
"keyboard", "keyboard_layout" "keyboard", "keyboardLayout"
) )
# Resolve full path if needed # Resolve full path if needed
+3 -3
View File
@@ -49,7 +49,7 @@ class OutputManager:
return return
if ( if (
self.env["runtime"]["SettingsManager"].get_setting_as_bool( self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"speech", "read_numbers_as_digits" "speech", "readNumbersAsDigits"
) )
and len(text.strip()) > 1 and len(text.strip()) > 1
): ):
@@ -157,7 +157,7 @@ class OutputManager:
self.env["runtime"]["SpeechDriver"].set_pitch( self.env["runtime"]["SpeechDriver"].set_pitch(
self.env["runtime"][ self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_float("speech", "capital_pitch") ].get_setting_as_float("speech", "capitalPitch")
) )
else: else:
self.env["runtime"]["SpeechDriver"].set_pitch( self.env["runtime"]["SpeechDriver"].set_pitch(
@@ -221,7 +221,7 @@ class OutputManager:
try: try:
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "new_line_pause" "general", "newLinePause"
): ):
clean_text = text.replace("\n", " , ") clean_text = text.replace("\n", " , ")
else: else:
@@ -52,7 +52,7 @@ class PunctuationManager:
# Check if we should replace undefined punctuation with spaces # Check if we should replace undefined punctuation with spaces
replace_with_space = self.env["runtime"]["SettingsManager"].get_setting_as_bool( replace_with_space = self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"general", "replace_undefined_punctuation_with_space" "general", "replaceUndefinedPunctuationWithSpace"
) )
# If the setting is disabled, use the old behavior (remove completely) # If the setting is disabled, use the old behavior (remove completely)
@@ -128,7 +128,7 @@ class PunctuationManager:
) and key not in " ": ) and key not in " ":
if ( if (
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "respect_punctuation_pause" "general", "respectPunctuationPause"
) )
and len(key) == 1 and len(key) == 1
and key in "',.;:?!" and key in "',.;:?!"
@@ -161,13 +161,13 @@ class PunctuationManager:
curr_punct_level = "" curr_punct_level = ""
if ( if (
self.env["runtime"]["SettingsManager"] self.env["runtime"]["SettingsManager"]
.get_setting("general", "punctuation_level") .get_setting("general", "punctuationLevel")
.lower() .lower()
in self.env["punctuation"]["LEVELDICT"] in self.env["punctuation"]["LEVELDICT"]
): ):
curr_punct_level = self.env["punctuation"]["LEVELDICT"][ curr_punct_level = self.env["punctuation"]["LEVELDICT"][
self.env["runtime"]["SettingsManager"] self.env["runtime"]["SettingsManager"]
.get_setting("general", "punctuation_level") .get_setting("general", "punctuationLevel")
.lower() .lower()
] ]
else: else:
@@ -183,7 +183,7 @@ class PunctuationManager:
try: try:
curr_index = punct_list.index( curr_index = punct_list.index(
self.env["runtime"]["SettingsManager"] self.env["runtime"]["SettingsManager"]
.get_setting("general", "punctuation_level") .get_setting("general", "punctuationLevel")
.lower() .lower()
) # curr punctuation ) # curr punctuation
except Exception as e: except Exception as e:
@@ -193,7 +193,7 @@ class PunctuationManager:
curr_index = 0 curr_index = 0
curr_level = punct_list[curr_index] curr_level = punct_list[curr_index]
self.env["runtime"]["SettingsManager"].set_setting( self.env["runtime"]["SettingsManager"].set_setting(
"general", "punctuation_level", curr_level.lower() "general", "punctuationLevel", curr_level.lower()
) )
return True return True
@@ -236,7 +236,7 @@ class QuickMenuManager(SpeechHelperMixin):
# Load base menu from config # Load base menu from config
menu_string = self.env["runtime"]["SettingsManager"].get_setting( menu_string = self.env["runtime"]["SettingsManager"].get_setting(
"menu", "quick_menu" "menu", "quickMenu"
) )
# Dynamically add speech-dispatcher specific items # Dynamically add speech-dispatcher specific items
+5 -5
View File
@@ -69,7 +69,7 @@ class RemoteManager:
def handle_settings_change_with_response(self, settings_text): def handle_settings_change_with_response(self, settings_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enable_settings_remote" "remote", "enableSettingsRemote"
): ):
return { return {
"success": False, "success": False,
@@ -115,7 +115,7 @@ class RemoteManager:
def handle_settings_change(self, settings_text): def handle_settings_change(self, settings_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enable_settings_remote" "remote", "enableSettingsRemote"
): ):
return return
@@ -137,7 +137,7 @@ class RemoteManager:
def handle_command_execution_with_response(self, command_text): def handle_command_execution_with_response(self, command_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enable_command_remote" "remote", "enableCommandRemote"
): ):
return { return {
"success": False, "success": False,
@@ -218,7 +218,7 @@ class RemoteManager:
def handle_command_execution(self, command_text): def handle_command_execution(self, command_text):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"remote", "enable_command_remote" "remote", "enableCommandRemote"
): ):
return return
@@ -309,7 +309,7 @@ class RemoteManager:
def export_clipboard(self): def export_clipboard(self):
clipboard_file_path = self.env["runtime"][ clipboard_file_path = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("general", "clipboard_export_path") ].get_setting("general", "clipboardExportPath")
clipboard_file_path = clipboard_file_path.replace( clipboard_file_path = clipboard_file_path.replace(
"$user", self.env["general"]["curr_user"] "$user", self.env["general"]["curr_user"]
) )
+2 -2
View File
@@ -429,11 +429,11 @@ class ScreenManager:
ignore_screens = [] ignore_screens = []
fix_ignore_screens = self.env["runtime"][ fix_ignore_screens = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("screen", "ignore_screen") ].get_setting("screen", "ignoreScreen")
if fix_ignore_screens != "": if fix_ignore_screens != "":
ignore_screens.extend(fix_ignore_screens.split(",")) ignore_screens.extend(fix_ignore_screens.split(","))
if self.env["runtime"]["SettingsManager"].get_setting_as_bool( if self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"screen", "autodetect_ignore_screen" "screen", "autodetectIgnoreScreen"
): ):
ignore_screens.extend(self.env["screen"]["autoIgnoreScreens"]) ignore_screens.extend(self.env["screen"]["autoIgnoreScreens"])
self.env["runtime"]["DebugManager"].write_debug_out( self.env["runtime"]["DebugManager"].write_debug_out(
+45 -47
View File
@@ -12,61 +12,59 @@ settings_data = {
"driver": "genericDriver", "driver": "genericDriver",
"theme": "default", "theme": "default",
"volume": 1.0, "volume": 1.0,
"generic_play_file_command": "play -q -v fenrirVolume fenrirSoundFile", "genericPlayFileCommand": "play -q -v fenrirVolume fenrirSoundFile",
"generic_frequency_command": "play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence", "genericFrequencyCommand": "play -q -v fenrirVolume -n -c1 synth fenrirDuration sine fenrirFrequence",
"progress_monitoring": True,
}, },
"speech": { "speech": {
"enabled": True, "enabled": True,
"driver": "genericDriver", "driver": "genericDriver",
"server_path": "", "serverPath": "",
"rate": 0.75, "rate": 0.75,
"pitch": 0.5, "pitch": 0.5,
"capital_pitch": 0.8, "capitalPitch": 0.8,
"volume": 1.0, "volume": 1.0,
"module": "", "module": "",
"voice": "en-us", "voice": "en-us",
"language": "", "language": "",
"auto_read_incoming": True, "autoReadIncoming": True,
"read_numbers_as_digits": False, "readNumbersAsDigits": False,
"generic_speech_command": 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"', "genericSpeechCommand": 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice "fenrirText"',
"fenrir_min_volume": 0, "fenrirMinVolume": 0,
"fenrir_max_volume": 200, "fenrirMaxVolume": 200,
"fenrir_min_pitch": 0, "fenrirMinPitch": 0,
"fenrir_max_pitch": 99, "fenrirMaxPitch": 99,
"fenrir_min_rate": 80, "fenrirMinRate": 80,
"fenrir_max_rate": 450, "fenrirMaxRate": 450,
}, },
"screen": { "screen": {
"driver": "vcsaDriver", "driver": "vcsaDriver",
"encoding": "auto", "encoding": "auto",
"screen_update_delay": 0.1, "screenUpdateDelay": 0.1,
"ignore_screen": "", "ignoreScreen": "",
"autodetect_ignore_screen": False, "autodetectIgnoreScreen": False,
}, },
"general": { "general": {
"debug_level": debug.DebugLevel.DEACTIVE, "debug_level": debug.DebugLevel.DEACTIVE,
"debug_mode": "FILE", "debug_mode": "FILE",
"debug_file": "", "debugFile": "",
"punctuation_profile": "default", "punctuationProfile": "default",
"punctuation_level": "some", "punctuationLevel": "some",
"respect_punctuation_pause": True, "respectPunctuationPause": True,
"replace_undefined_punctuation_with_space": True, "replaceUndefinedPunctuationWithSpace": True,
"new_line_pause": True, "newLinePause": True,
"number_of_clipboards": 10, "numberOfClipboards": 10,
"clipboard_export_path": "/tmp/fenrirClipboard",
"emoticons": True, "emoticons": True,
"fenrir_keys": "KEY_KP0,KEY_META", "fenrirKeys": "KEY_KP0,KEY_META",
"script_keys": "KEY_COMPOSE", "scriptKeys": "KEY_COMPOSE",
"time_format": "%I:%M%P", "time_format": "%I:%M%P",
"date_format": "%A, %B %d, %Y", "date_format": "%A, %B %d, %Y",
"auto_spell_check": False, "autoSpellCheck": False,
"spell_check_language": "en_US", "spellCheckLanguage": "en_US",
"script_path": "/usr/share/fenrirscreenreader/scripts", "script_path": "/usr/share/fenrirscreenreader/scripts",
"command_path": "/usr/share/fenrirscreenreader/commands", "command_path": "/usr/share/fenrirscreenreader/commands",
"attribute_format_string": "Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize", "attribute_format_string": "Background fenrirBGColor,Foreground fenrirFGColor,fenrirUnderline,fenrirBold,fenrirBlink, Font fenrirFont,Fontsize fenrirFontSize",
"auto_present_indent": False, "autoPresentIndent": False,
"auto_present_indent_mode": 1, "autoPresentIndentMode": 1,
"has_attributes": True, "has_attributes": True,
"shell": "", "shell": "",
}, },
@@ -79,8 +77,8 @@ settings_data = {
"driver": "unixDriver", "driver": "unixDriver",
"port": 22447, "port": 22447,
"socket_file": "", "socket_file": "",
"enable_settings_remote": True, "enableSettingsRemote": True,
"enable_command_remote": True, "enableCommandRemote": True,
}, },
"barrier": { "barrier": {
"enabled": True, "enabled": True,
@@ -90,16 +88,16 @@ settings_data = {
"review": { "review": {
"line_break": True, "line_break": True,
"end_of_screen": True, "end_of_screen": True,
"leave_review_on_cursor_change": True, "leaveReviewOnCursorChange": True,
"leave_review_on_screen_change": True, "leaveReviewOnScreenChange": True,
}, },
"menu": { "menu": {
"vmenu_path": "", "vmenuPath": "",
"quick_menu": "speech#rate;speech#pitch;speech#volume", "quickMenu": "speech#rate;speech#pitch;speech#volume",
}, },
"promote": { "promote": {
"enabled": True, "enabled": True,
"inactive_timeout_sec": 120, "inactiveTimeoutSec": 120,
"list": "", "list": "",
}, },
"time": { "time": {
@@ -114,14 +112,14 @@ settings_data = {
"keyboard": { "keyboard": {
"driver": "evdev", "driver": "evdev",
"device": "all", "device": "all",
"grab_devices": True, "grabDevices": True,
"ignore_shortcuts": False, "ignoreShortcuts": False,
"keyboard_layout": "desktop", "keyboardLayout": "desktop",
"char_echo_mode": 2, # while capslock "charEchoMode": 2, # while capslock
"char_delete_echo": True, "charDeleteEcho": True,
"word_echo": True, "wordEcho": True,
"interrupt_on_key_press": True, "interruptOnKeyPress": True,
"interrupt_on_key_press_filter": "", "interruptOnKeyPressFilter": "",
"double_tap_timeout": 0.2, "doubleTapTimeout": 0.2,
}, },
} }
+36 -36
View File
@@ -498,7 +498,7 @@ class SettingsManager:
# Set PTY driver settings # Set PTY driver settings
pty_settings = { pty_settings = {
"screen": {"driver": "ptyDriver"}, "screen": {"driver": "ptyDriver"},
"keyboard": {"driver": "ptyDriver", "keyboard_layout": "pty"} "keyboard": {"driver": "ptyDriver", "keyboardLayout": "pty"}
} }
for section, settings in pty_settings.items(): for section, settings in pty_settings.items():
for key, value in settings.items(): for key, value in settings.items():
@@ -507,12 +507,12 @@ class SettingsManager:
self.set_setting("screen", "driver", "ptyDriver") self.set_setting("screen", "driver", "ptyDriver")
self.set_setting("keyboard", "driver", "evdevDriver") self.set_setting("keyboard", "driver", "evdevDriver")
self.set_fenrir_keys(self.get_setting("general", "fenrir_keys")) self.set_fenrir_keys(self.get_setting("general", "fenrirKeys"))
self.set_script_keys(self.get_setting("general", "script_keys")) self.set_script_keys(self.get_setting("general", "scriptKeys"))
environment["runtime"]["DebugManager"] = debugManager.DebugManager( environment["runtime"]["DebugManager"] = debugManager.DebugManager(
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"general", "debug_file" "general", "debugFile"
) )
) )
environment["runtime"]["DebugManager"].initialize(environment) environment["runtime"]["DebugManager"].initialize(environment)
@@ -521,7 +521,7 @@ class SettingsManager:
environment["runtime"]["force_all_screens"] = True environment["runtime"]["force_all_screens"] = True
if cliArgs.ignore_screen: if cliArgs.ignore_screen:
current_ignore_screen = self.get_setting("screen", "ignore_screen") current_ignore_screen = self.get_setting("screen", "ignoreScreen")
if current_ignore_screen: if current_ignore_screen:
ignore_screens = ( ignore_screens = (
current_ignore_screen.split(",") + cliArgs.ignore_screen current_ignore_screen.split(",") + cliArgs.ignore_screen
@@ -529,7 +529,7 @@ class SettingsManager:
else: else:
ignore_screens = cliArgs.ignore_screen ignore_screens = cliArgs.ignore_screen
self.set_setting( self.set_setting(
"screen", "ignore_screen", ",".join(ignore_screens) "screen", "ignoreScreen", ",".join(ignore_screens)
) )
if not os.path.exists( if not os.path.exists(
@@ -561,43 +561,43 @@ class SettingsManager:
environment["runtime"]["TextManager"].initialize(environment) environment["runtime"]["TextManager"].initialize(environment)
if not os.path.exists( if not os.path.exists(
self.get_setting("general", "punctuation_profile") self.get_setting("general", "punctuationProfile")
): ):
if os.path.exists( if os.path.exists(
settings_root settings_root
+ "punctuation/" + "punctuation/"
+ self.get_setting("general", "punctuation_profile") + self.get_setting("general", "punctuationProfile")
): ):
self.set_setting( self.set_setting(
"general", "general",
"punctuation_profile", "punctuationProfile",
settings_root settings_root
+ "punctuation/" + "punctuation/"
+ self.get_setting("general", "punctuation_profile"), + self.get_setting("general", "punctuationProfile"),
) )
environment["runtime"]["PunctuationManager"].load_dicts( environment["runtime"]["PunctuationManager"].load_dicts(
self.get_setting("general", "punctuation_profile") self.get_setting("general", "punctuationProfile")
) )
if os.path.exists( if os.path.exists(
settings_root settings_root
+ "punctuation/" + "punctuation/"
+ self.get_setting("general", "punctuation_profile") + self.get_setting("general", "punctuationProfile")
+ ".conf" + ".conf"
): ):
self.set_setting( self.set_setting(
"general", "general",
"punctuation_profile", "punctuationProfile",
settings_root settings_root
+ "punctuation/" + "punctuation/"
+ self.get_setting("general", "punctuation_profile") + self.get_setting("general", "punctuationProfile")
+ ".conf", + ".conf",
) )
environment["runtime"]["PunctuationManager"].load_dicts( environment["runtime"]["PunctuationManager"].load_dicts(
self.get_setting("general", "punctuation_profile") self.get_setting("general", "punctuationProfile")
) )
else: else:
environment["runtime"]["PunctuationManager"].load_dicts( environment["runtime"]["PunctuationManager"].load_dicts(
self.get_setting("general", "punctuation_profile") self.get_setting("general", "punctuationProfile")
) )
if fenrir_manager: if fenrir_manager:
@@ -644,86 +644,86 @@ class SettingsManager:
if environment["runtime"]["InputManager"].get_shortcut_type() == "KEY": if environment["runtime"]["InputManager"].get_shortcut_type() == "KEY":
if not os.path.exists( if not os.path.exists(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
): ):
if os.path.exists( if os.path.exists(
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout") + self.get_setting("keyboard", "keyboardLayout")
): ):
self.set_setting( self.set_setting(
"keyboard", "keyboard",
"keyboard_layout", "keyboardLayout",
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout"), + self.get_setting("keyboard", "keyboardLayout"),
) )
environment["runtime"]["InputManager"].load_shortcuts( environment["runtime"]["InputManager"].load_shortcuts(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
) )
if os.path.exists( if os.path.exists(
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout") + self.get_setting("keyboard", "keyboardLayout")
+ ".conf" + ".conf"
): ):
self.set_setting( self.set_setting(
"keyboard", "keyboard",
"keyboard_layout", "keyboardLayout",
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout") + self.get_setting("keyboard", "keyboardLayout")
+ ".conf", + ".conf",
) )
environment["runtime"]["InputManager"].load_shortcuts( environment["runtime"]["InputManager"].load_shortcuts(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
) )
else: else:
environment["runtime"]["InputManager"].load_shortcuts( environment["runtime"]["InputManager"].load_shortcuts(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
) )
elif ( elif (
environment["runtime"]["InputManager"].get_shortcut_type() environment["runtime"]["InputManager"].get_shortcut_type()
== "BYTE" == "BYTE"
): ):
if not os.path.exists( if not os.path.exists(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
): ):
if os.path.exists( if os.path.exists(
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout") + self.get_setting("keyboard", "keyboardLayout")
): ):
self.set_setting( self.set_setting(
"keyboard", "keyboard",
"keyboard_layout", "keyboardLayout",
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout"), + self.get_setting("keyboard", "keyboardLayout"),
) )
environment["runtime"]["ByteManager"].load_byte_shortcuts( environment["runtime"]["ByteManager"].load_byte_shortcuts(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
) )
if os.path.exists( if os.path.exists(
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout") + self.get_setting("keyboard", "keyboardLayout")
+ ".conf" + ".conf"
): ):
self.set_setting( self.set_setting(
"keyboard", "keyboard",
"keyboard_layout", "keyboardLayout",
settings_root settings_root
+ "keyboard/" + "keyboard/"
+ self.get_setting("keyboard", "keyboard_layout") + self.get_setting("keyboard", "keyboardLayout")
+ ".conf", + ".conf",
) )
environment["runtime"]["ByteManager"].load_byte_shortcuts( environment["runtime"]["ByteManager"].load_byte_shortcuts(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
) )
else: else:
environment["runtime"]["ByteManager"].load_byte_shortcuts( environment["runtime"]["ByteManager"].load_byte_shortcuts(
self.get_setting("keyboard", "keyboard_layout") self.get_setting("keyboard", "keyboardLayout")
) )
environment["runtime"]["CursorManager"] = cursorManager.CursorManager() environment["runtime"]["CursorManager"] = cursorManager.CursorManager()
+2 -2
View File
@@ -40,13 +40,13 @@ class VmenuManager:
# if there is no user configuration # if there is no user configuration
if ( if (
self.env["runtime"]["SettingsManager"].get_setting( self.env["runtime"]["SettingsManager"].get_setting(
"menu", "vmenu_path" "menu", "vmenuPath"
) )
!= "" != ""
): ):
self.defaultVMenuPath = self.env["runtime"][ self.defaultVMenuPath = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("menu", "vmenu_path") ].get_setting("menu", "vmenuPath")
if not self.defaultVMenuPath.endswith("/"): if not self.defaultVMenuPath.endswith("/"):
self.defaultVMenuPath += "/" self.defaultVMenuPath += "/"
self.defaultVMenuPath += self.env["runtime"][ self.defaultVMenuPath += self.env["runtime"][
+2 -2
View File
@@ -4,5 +4,5 @@
# Fenrir TTY screen reader # Fenrir TTY screen reader
# By Chrys, Storm Dragon, and contributors. # By Chrys, Storm Dragon, and contributors.
version = "2025.12.10" version = "2025.12.03"
code_name = "testing" code_name = "master"
@@ -284,8 +284,7 @@ class driver(inputDriver):
) )
event_fired = True event_fired = True
else: else:
# Forward non-keyboard events: 2=EV_REL, 3=EV_ABS, 17=EV_LED if event.type in [2, 3]:
if event.type in [2, 3, 17]:
foreward = True foreward = True
event = device.read_one() event = device.read_one()
@@ -623,7 +622,7 @@ class driver(inputDriver):
def create_u_input_dev(self, fd): def create_u_input_dev(self, fd):
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grab_devices" "keyboard", "grabDevices"
): ):
self.uDevices[fd] = None self.uDevices[fd] = None
return return
@@ -730,7 +729,7 @@ class driver(inputDriver):
Only effective if grabDevices setting is enabled. Only effective if grabDevices setting is enabled.
""" """
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grab_devices" "keyboard", "grabDevices"
): ):
return True return True
@@ -792,7 +791,7 @@ class driver(inputDriver):
bool: True if ungrab successful, False otherwise bool: True if ungrab successful, False otherwise
""" """
if not self.env["runtime"]["SettingsManager"].get_setting_as_bool( if not self.env["runtime"]["SettingsManager"].get_setting_as_bool(
"keyboard", "grab_devices" "keyboard", "grabDevices"
): ):
return True return True
@@ -48,10 +48,10 @@ class driver(sound_driver):
self.env = environment self.env = environment
self.soundFileCommand = self.env["runtime"][ self.soundFileCommand = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("sound", "generic_play_file_command") ].get_setting("sound", "genericPlayFileCommand")
self.frequenceCommand = self.env["runtime"][ self.frequenceCommand = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("sound", "generic_frequency_command") ].get_setting("sound", "genericFrequencyCommand")
if self.soundFileCommand == "": if self.soundFileCommand == "":
self.soundFileCommand = "play -q -v fenrirVolume fenrirSoundFile" self.soundFileCommand = "play -q -v fenrirVolume fenrirSoundFile"
if self.frequenceCommand == "": if self.frequenceCommand == "":
@@ -38,26 +38,26 @@ class driver(speech_driver):
self.env = environment self.env = environment
self.minVolume = self.env["runtime"][ self.minVolume = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_int("speech", "fenrir_min_volume") ].get_setting_as_int("speech", "fenrirMinVolume")
self.maxVolume = self.env["runtime"][ self.maxVolume = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_int("speech", "fenrir_max_volume") ].get_setting_as_int("speech", "fenrirMaxVolume")
self.minPitch = self.env["runtime"][ self.minPitch = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_int("speech", "fenrir_min_pitch") ].get_setting_as_int("speech", "fenrirMinPitch")
self.maxPitch = self.env["runtime"][ self.maxPitch = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_int("speech", "fenrir_max_pitch") ].get_setting_as_int("speech", "fenrirMaxPitch")
self.minRate = self.env["runtime"][ self.minRate = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_int("speech", "fenrir_min_rate") ].get_setting_as_int("speech", "fenrirMinRate")
self.maxRate = self.env["runtime"][ self.maxRate = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting_as_int("speech", "fenrir_max_rate") ].get_setting_as_int("speech", "fenrirMaxRate")
self.speechCommand = self.env["runtime"][ self.speechCommand = self.env["runtime"][
"SettingsManager" "SettingsManager"
].get_setting("speech", "generic_speech_command") ].get_setting("speech", "genericSpeechCommand")
if self.speechCommand == "": if self.speechCommand == "":
self.speechCommand = 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText"' self.speechCommand = 'espeak -a fenrirVolume -s fenrirRate -p fenrirPitch -v fenrirVoice -- "fenrirText"'
if False: # for debugging overwrite here if False: # for debugging overwrite here