2017-07-24 04:15:07 -04:00
|
|
|
# Version 1.5
|
2017-07-24 04:15:59 -04:00
|
|
|
- Doku: Write a user wiki
|
|
|
|
https://wiki.linux-a11y.org/doku.php?id=fenrir_user_manual&s[]=fenrir
|
|
|
|
|
|
|
|
- initial working setup.py
|
|
|
|
|
|
|
|
- leave review on typing
|
|
|
|
|
|
|
|
- add dependency check (check-dependencys.py)
|
|
|
|
|
|
|
|
- Add nice dummy drivers as template or for debugging
|
|
|
|
|
|
|
|
- reimplement detection code for X11
|
|
|
|
|
|
|
|
- initial translate structure (manuelcortez Thanks!)
|
|
|
|
http://www.supernifty.org/blog/2011/09/16/python-localization-made-easy/
|
|
|
|
|
|
|
|
- add a configurable place where you can place own commands or overwrite existing commands without need to change default code
|
|
|
|
|
|
|
|
- implement autodetection of plugged and unplugged input devices (python-pyudev) for evdev driver
|
|
|
|
http://stackoverflow.com/questions/22678686/python-script-to-detect-hot-plug-event
|
|
|
|
http://askubuntu.com/questions/508236/how-can-i-run-code-whenever-a-usb-device-is-unplugged-without-requiring-root
|
|
|
|
https://www.mattfischer.com/blog/?p=182
|
|
|
|
|
|
|
|
- implement speechdriver generic (Easy for contribution)
|
|
|
|
|
|
|
|
- try to autodetect encoding (Easy for contribution) (Prototype "charmapTTY" in play zone)
|
|
|
|
https://stackoverflow.com/questions/6396659/how-do-you-get-the-encoding-of-the-terminal-from-within-a-python-script
|
|
|
|
|
|
|
|
Braille Support (WIP):
|
|
|
|
initial BrlTTY driver
|
|
|
|
detect device size via driver
|
|
|
|
output to braille device
|
|
|
|
make flushMode configurable
|
|
|
|
make flushTimeout configurable
|
|
|
|
flush message after X seconds and show current line (review over text)
|
|
|
|
tweak current commands and output
|
|
|
|
command flush_braille
|
|
|
|
command for scroll left
|
|
|
|
command for scroll right
|
|
|
|
create offset for scrolling
|
|
|
|
respect scrolling
|
|
|
|
make cursor following configurable (brailleCursorTrackingMode)
|
|
|
|
- cell
|
|
|
|
- page
|
|
|
|
follow cursor while typing
|
|
|
|
brailleFocusMode:
|
|
|
|
- review = priority to review
|
|
|
|
|
|
|
|
- initial try to make it more asynchronus with multpible threads
|
|
|
|
|
|
|
|
- be more event based (vcsa sets POLLPRI)
|
|
|
|
http://scotdoyle.com/python-epoll-howto.html
|
|
|
|
Needed events:
|
|
|
|
screen update (vcsa sets POLLPRI)
|
|
|
|
plug input device (udev event)
|
|
|
|
screen changed (logind event, collides with screen update)
|
|
|
|
keyboard input (select, wait forever)
|
|
|
|
braille input (brlapi_readKey)
|
|
|
|
braille flush (timer, sleep)
|
|
|
|
Each event is watched in an own thread. This improves performance and reduce the load.
|
|
|
|
The event loop is to be done as "queue" since those are thread safe.
|
|
|
|
The threads are reading incomming data and add the events and data to the queue
|
|
|
|
the mainloop just reads the queue in an blocking way and executes the needed codepath with the data.
|
|
|
|
clean up the code for the events so that just the correct codepath is used:
|
|
|
|
- screen
|
|
|
|
- input
|
|
|
|
- new device
|
|
|
|
|
|
|
|
Settings:
|
|
|
|
- configuration should be overwritable with parameter and alternative paths (Easy for contribution)
|
|
|
|
Tutorial Mode:
|
|
|
|
- navigate through a list of bound commands. speak binding and description.
|
2017-07-24 04:15:07 -04:00
|
|
|
|
|
|
|
# Version: 1.00
|
|
|
|
|
2016-12-23 10:36:16 -05:00
|
|
|
- move from VCS to VCSA and parese the Attributes
|
|
|
|
http://linux.die.net/man/4/vcsa
|
|
|
|
http://man.cx/vcsa(4)/de
|
|
|
|
http://manpages.org/display-vcsa/7
|
|
|
|
https://en.wikipedia.org/wiki/Virtual_console
|
|
|
|
every second byte is a attribute others are text. fast way: c[::2],c[1::2]
|
|
|
|
http://manpages.ubuntu.com/manpages/precise/de/man4/vcs.4.html
|
|
|
|
https://docs.python.org/3/library/fcntl.html
|
|
|
|
http://rodrigorivas.serveblog.net/en/imagenes-desde-vt-con-vcsa/
|
|
|
|
good doku:
|
|
|
|
http://angband.oook.cz/d/eyangband-052/src/main-vcs.c
|
|
|
|
http://manpages.ubuntu.com/manpages/trusty/man1/screader.1.html
|
|
|
|
|
|
|
|
- implement speechdriver espeak
|
|
|
|
https://github.com/relsi/python-espeak
|
|
|
|
|
|
|
|
- detect collumns in TTYs automaticaly.
|
|
|
|
it seems we have this info in vcsa
|
|
|
|
|
|
|
|
- get current cursor
|
|
|
|
- shortcut handling
|
|
|
|
https://docs.python.org/2/library/termios.html
|
|
|
|
http://stackoverflow.com/questions/287757/pythons-configparser-unique-keys-per-section
|
|
|
|
0=down, 1=press, 2=hold
|
|
|
|
2KEY_SHIFT, 1KEY_A = say_current_line_cursor
|
|
|
|
- implement command structure
|
|
|
|
- implement speechdriver speechd
|
|
|
|
https://git.gnome.org/browse/orca/tree/src/orca/speech.py
|
|
|
|
https://git.gnome.org/browse/orca/tree/src/orca/speechdispatcherfactory.py
|
|
|
|
http://devel.freebsoft.org/doc/speechd/speech-dispatcher.html#Client-Programming
|
|
|
|
|
|
|
|
- autodetect current TTY maybe with (PAM or a sys folder)
|
|
|
|
cat /sys/devices/virtual/tty/tty0/active
|
|
|
|
http://serverfault.com/questions/306854/how-to-find-out-the-currently-active-linux-virtual-terminal-while-connected-via
|
|
|
|
|
|
|
|
- Input
|
|
|
|
http://python-evdev.readthedocs.io/en/latest/tutorial.html
|
|
|
|
http://stackoverflow.com/questions/12384772/how-can-i-capture-mouseevents-and-keyevents-using-python-in-background-on-linux
|
|
|
|
maybe TTY in RAW MODE
|
|
|
|
|
|
|
|
- Settings (make it configureable)
|
|
|
|
- improve differ speed
|
|
|
|
- lock mechanism for threads
|
|
|
|
- restructure loops to listen for events
|
|
|
|
inputloop -> does block with an select
|
|
|
|
commands -> a new thread should spawned from inputloop
|
|
|
|
updatescreen -> maybe we could watch it with inotify vsca should support polling COMMENT: sadly not possible, poll events not fired as expected
|
|
|
|
https://github.com/seb-m/pyinotify/wiki/Tutorial
|
|
|
|
<Example Code>
|
|
|
|
import pyinotify
|
|
|
|
import glob
|
|
|
|
class Identity(pyinotify.ProcessEvent):
|
|
|
|
def process_default(self, event):
|
|
|
|
p = event.pathname
|
|
|
|
print(p)
|
|
|
|
|
|
|
|
wm = pyinotify.WatchManager()
|
|
|
|
|
|
|
|
notifier = pyinotify.Notifier(wm, default_proc_fun=Identity(), timeout=5)
|
|
|
|
wm.add_watch('/sys/devices/virtual/tty/tty0/active', pyinotify.IN_CLOSE_WRITE)
|
|
|
|
for file in list(glob.glob('/dev/vcsa[0-64]')):
|
|
|
|
wm.add_watch(file, pyinotify.IN_CLOSE_WRITE)
|
|
|
|
print(file)
|
|
|
|
|
|
|
|
try:
|
|
|
|
while 1:
|
|
|
|
notifier.process_events()
|
|
|
|
if notifier.check_events( timeout=1000):
|
|
|
|
notifier.read_events()
|
|
|
|
print('events')
|
|
|
|
else:
|
|
|
|
print('timeout')
|
|
|
|
except KeyboardInterrupt:
|
|
|
|
notifier.stop()
|
|
|
|
print('fin')
|
|
|
|
</Example Code>
|
|
|
|
|
|
|
|
https://www.infoq.com/articles/inotify-linux-file-system-event-monitoring
|
|
|
|
https://github.com/seb-m/pyinotify/wiki/Tutorial
|
|
|
|
http://www.saltycrane.com/blog/2010/04/monitoring-filesystem-python-and-pyinotify/
|
|
|
|
|
|
|
|
- add setting for ignore screens ( dont grab shortcuts from X or orca)
|
|
|
|
- soundIcons
|
|
|
|
- performance tuning
|
|
|
|
- add sound volume
|
|
|
|
- convert volume to percent in config
|
|
|
|
- convert pitch to percent in config
|
|
|
|
- convert rate to percent in config
|
|
|
|
- make screenUpdate rate configurable
|
|
|
|
- default soundIcon theme (soundfiles)
|
|
|
|
- debugging
|
|
|
|
- threading ReadContent, ReadShortcuts, executeCommands, listenNewTTYsForListen, controllThread (main)
|
|
|
|
- autoload plugins while starting
|
|
|
|
- implement sounddriver generic (use current sox and make it configurable)
|
|
|
|
- add setting for autodetect X
|
|
|
|
ps a -o tty,comm | grep -e Xorg | grep -v "grep -e Xorg"
|
|
|
|
- respect window mode in differ (getwindow code is already in place)
|
|
|
|
- parse punctuation setting file in conf/substitution
|
|
|
|
|
|
|
|
- implement commands
|
|
|
|
curr_word
|
|
|
|
curr_char
|
|
|
|
next_word
|
|
|
|
next_char
|
|
|
|
prev_word
|
|
|
|
prev_char
|
|
|
|
enable_disable_speech #enable, disable speech
|
|
|
|
enable_disable_braile #enable, disable braile
|
|
|
|
enable_disable_sound #enable, disable sound
|
|
|
|
enable_disable_output #enable, disable speech, braile and sound
|
|
|
|
next_clipboard
|
|
|
|
prev_clipboard
|
|
|
|
first_clipboard
|
|
|
|
last_clipboard
|
|
|
|
curr_clipboard
|
|
|
|
paste_clipboard
|
|
|
|
define_window
|
|
|
|
remove_window
|
|
|
|
reset_review_on_screen_change
|
|
|
|
remove_clipboard_marks
|
|
|
|
copy_marked
|
|
|
|
set_mark (this could also used for area?)
|
|
|
|
read_clipboard_mark_text
|
|
|
|
curr_screen
|
|
|
|
curr_screen_before_cursor
|
|
|
|
curr_screen_after_cursor
|
|
|
|
cursor_position
|
|
|
|
indention
|
|
|
|
add_bookmark (per application)
|
|
|
|
remove_bookmark
|
|
|
|
present_bookmark
|
|
|
|
say_char_phonetic
|
|
|
|
spell_word_phonetic
|
|
|
|
"alpha", "bravo", "charlie", "delta", "echo",
|
|
|
|
"foxtrot", "golf", "hotel", "india", "juliet",
|
|
|
|
"kilo", "lima", "mike", "november", "oscar",
|
|
|
|
"papa", "quebec", "romeo", "sierra", "tango",
|
|
|
|
"uniform", "victor", "whisky", "x ray",
|
|
|
|
"yankee", "zulu"
|
|
|
|
next_char_phonetic
|
|
|
|
prev_char_phonetic
|
|
|
|
next_word_phonetic
|
|
|
|
prev_word_phonetic
|
|
|
|
toggle_highlighted_mode
|
|
|
|
|
|
|
|
- implement onInput commands
|
|
|
|
read_line_if_cursor_change_vertical (needed if you arrow up and down, we want to announce the line)
|
|
|
|
read_char_if_cursur_change_horizontal (needed if you arrow left and right, we want to announce the char under the cursor)
|
|
|
|
echo_char (echos the last char on pressing space or return)
|
|
|
|
echo_word (echos the last word)
|
|
|
|
echo_deleted_char (echos deleted char on screen
|
|
|
|
read highlighted
|
|
|
|
|
|
|
|
- implement onScreenChange commands
|
|
|
|
promoted text
|
|
|
|
clear_marks_on_screen_change
|
|
|
|
leve_review_mode_on_screen_change
|
|
|
|
window mode (define a area and just read that changes)
|
|
|
|
|
|
|
|
- add screenManager
|
|
|
|
abstract screen driver
|
|
|
|
- pass environment instance in init and remove it from function calls
|
|
|
|
|
|
|
|
- New Triggers
|
|
|
|
onAppChange
|
|
|
|
onAppProfileChange
|
|
|
|
onScreenChange
|
|
|
|
rename current onScreenChange to onScreenUpdate
|
|
|
|
|
|
|
|
- rework inputManager
|
|
|
|
try to consume shortcuts
|
|
|
|
grab keyboard exclusive
|
|
|
|
release keyboard on error or quit
|
|
|
|
grab shortcuts with fenrir key
|
|
|
|
grab "singel key shortcuts" like numpad navigation for review
|
|
|
|
forwart nonshortcuts to system
|
|
|
|
make grabbing configuarble
|
|
|
|
possiblity to forewart shortcut [proxyshortcut]
|
|
|
|
possiblity to forewart shortcut (or use them as shortcut) [pressing twice while timeout]
|
|
|
|
cleanup inputManager
|
|
|
|
split input driver out of the handler
|
|
|
|
|
|
|
|
- dictonary for special chars and string replacements
|
|
|
|
- punctuation
|
|
|
|
- beep on cursor to capital letters in cursor and review
|
|
|
|
- add pause handling
|
|
|
|
create pause
|
|
|
|
make it configurable when the pause the pause happens
|
|
|
|
- external scripting
|
|
|
|
load scripts from a folder as subprocess
|
|
|
|
create thread
|
|
|
|
load key definition of keybindings like SOPS did
|
|
|
|
|
|
|
|
- add an daemonize mode
|
|
|
|
https://github.com/thesharp/daemonize
|
|
|
|
https://web.archive.org/web/20131017130434/http://www.jejik.com/articles/2007/02/a_simple_unix_linux_daemon_in_python/
|
|
|
|
|
|
|
|
- announce capslock
|
|
|
|
- anounce numlock
|
|
|
|
- anounce scroll
|
|
|
|
- add the debugging to core
|
|
|
|
|
|
|
|
- autostart systemd
|
|
|
|
https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-Managing_Services_with_systemd-Unit_Files.html
|