From 28a3da7e5225cefdbea0113a172963479eaca369 Mon Sep 17 00:00:00 2001 From: chrys Date: Sun, 10 Jul 2016 19:13:11 +0200 Subject: [PATCH] keyboard stuff --- src/fenrir-package/commands/commands/__init__.py | 0 .../__pycache__/curr_line.cpython-35.pyc | Bin 0 -> 1006 bytes .../commands/__pycache__/shut_up.cpython-35.pyc | Bin 0 -> 801 bytes .../commands/commands/curr_line.py | 15 +++++++++++++++ src/fenrir-package/commands/commands/shut_up.py | 11 +++++++++++ src/fenrir-package/commands/onInput/__init__.py | 0 .../commands/onScreenChanged/__init__.py | 0 7 files changed, 26 insertions(+) create mode 100755 src/fenrir-package/commands/commands/__init__.py create mode 100644 src/fenrir-package/commands/commands/__pycache__/curr_line.cpython-35.pyc create mode 100644 src/fenrir-package/commands/commands/__pycache__/shut_up.cpython-35.pyc create mode 100644 src/fenrir-package/commands/commands/curr_line.py create mode 100644 src/fenrir-package/commands/commands/shut_up.py create mode 100755 src/fenrir-package/commands/onInput/__init__.py create mode 100755 src/fenrir-package/commands/onScreenChanged/__init__.py diff --git a/src/fenrir-package/commands/commands/__init__.py b/src/fenrir-package/commands/commands/__init__.py new file mode 100755 index 00000000..e69de29b diff --git a/src/fenrir-package/commands/commands/__pycache__/curr_line.cpython-35.pyc b/src/fenrir-package/commands/commands/__pycache__/curr_line.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..0b33698e958984f0ec819e577b3dd48db9301f0e GIT binary patch literal 1006 zcmah|!D`z;5S^7|OO};T+LG3n;;Sy{EvHff4g`AeC53`7i@Mqp)zZq{m6F=@P;h>x zzqHr>MNXYrONnCw72es$%)WV=r}fFvQ7q1Wf4TGk{=(klBRawxOu2 zDpR>&odoT)X1Gj%0oz}tZ2kvQW&9p?<{KBCaOmMKtcYrOjDdS@%zzjk+9GZnAEq@5Yf#(p4(8jswpaI6SI<1TwmzoMrs=yp`}z8S(Djg zC2wc7YNTpD%b(3Xn_Ac;vRXCk>F$_iu^rK=R-0N|woU^(6qypTL;<-fGa>B&1+pb= zWznRb_R$49mg=U^wW_fBqx+hyvOd1r5P^v>0DH-%?5(#M_a0;QiM`K#TGz7IibPhH zUo){h6dD`Z%(_}ag5BqQ)l2Qw|9hKulFW^FC={9Nw#n;Tb-btYaB2GDJPql3sjQNm z+nDpJ&fAi3!ugLjD|Zz=z$W@Ng%b+&Pumlu8Jv%rj3Kj~j|oe>WSDp^J5QP0pQG96 M!%p|3<02pa0s806lK=n! literal 0 HcmV?d00001 diff --git a/src/fenrir-package/commands/commands/__pycache__/shut_up.cpython-35.pyc b/src/fenrir-package/commands/commands/__pycache__/shut_up.cpython-35.pyc new file mode 100644 index 0000000000000000000000000000000000000000..f0ce6e8ff7a6b0b236fd439afb58d6affb2bf03f GIT binary patch literal 801 zcmah`%}T>S5S~r?6WbI7p;GV#a;XQeB83Xxdg(#vWr@2hjV9Z=n^Y7Jg1&%{;Vb3p zTX@l#ZBt_r++=1yGWou5cDCQ^b>2>%FTVib17o{0rF-ZQSo54AgGTP(6H)>1Ik zqeVN#7{fL&q5L#rlXr+%*{~|THq?VlpGOCL4FLGWihs%dD;5^Yu&N<0gVgY;H z-~2hOiozAJMmvRb?jv}@BQY4@u?9B)FUWSi_>;123Y{mJDnq+eO3cqqvQh>cY>8M4 zl}4WNQK0N9y-LhNXG-TkZ5!&R^iiXQplYmJHHP1R_4L;?oLJ=&h&WBJVsX1`(X}cc zZ)!o!>Y%c!)&ISKwIy>0+cgSk>T+?fJ2jW>q^sg2YSW$QI8&UL9nQ0bEKpy7oPDT%^J`0a=)i literal 0 HcmV?d00001 diff --git a/src/fenrir-package/commands/commands/curr_line.py b/src/fenrir-package/commands/commands/curr_line.py new file mode 100644 index 00000000..17da62a3 --- /dev/null +++ b/src/fenrir-package/commands/commands/curr_line.py @@ -0,0 +1,15 @@ +#!/bin/python + +class command(): + def __init__(self): + pass + def run(self, environment): + environment['runtime']['speechDriver'].cancel() + if environment['screenData']['newContentText'].replace(" ","") == '': + environment['runtime']['speechDriver'].speak("empty screen") + else: + environment['runtime']['speechDriver'].speak(environment['screenData']['newContentText'].split('\n')[environment['screenData']['newCursor']['y']]) + def setCallback(self, callback): + pass + def shutdown(self): + pass diff --git a/src/fenrir-package/commands/commands/shut_up.py b/src/fenrir-package/commands/commands/shut_up.py new file mode 100644 index 00000000..4416e19b --- /dev/null +++ b/src/fenrir-package/commands/commands/shut_up.py @@ -0,0 +1,11 @@ +#!/bin/python + +class command(): + def __init__(self): + pass + def run(self, environment): + environment['runtime']['speechDriver'].cancel() + def setCallback(self, callback): + pass + def shutdown(self): + pass diff --git a/src/fenrir-package/commands/onInput/__init__.py b/src/fenrir-package/commands/onInput/__init__.py new file mode 100755 index 00000000..e69de29b diff --git a/src/fenrir-package/commands/onScreenChanged/__init__.py b/src/fenrir-package/commands/onScreenChanged/__init__.py new file mode 100755 index 00000000..e69de29b