projects
/
kiosk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
70d01ad
)
Make it so that I can verbally scroll chrome.
author
Scott Gasch
<
[email protected]
>
Mon, 27 Feb 2023 20:10:08 +0000
(12:10 -0800)
committer
Scott Gasch
<
[email protected]
>
Mon, 27 Feb 2023 20:10:08 +0000
(12:10 -0800)
kiosk.py
patch
|
blob
|
history
diff --git
a/kiosk.py
b/kiosk.py
index c9f84e9b1755fead9c07b71baa2f8d45bc1f05af..a7350ec41b2ee3d1d2c779f764436ef146e270ec 100755
(executable)
--- a/
kiosk.py
+++ b/
kiosk.py
@@
-133,6
+133,16
@@
def process_command(command: str, page_history: List[str], page_chooser) -> str:
page = None
if 'hold' in command:
page = page_history[0]
page = None
if 'hold' in command:
page = page_history[0]
+ elif 'down' in command:
+ os.system(
+ "xdotool search --onlyvisible \"chrom\" windowactivate click --repeat 8 5"
+ )
+ return None
+ elif 'up' in command:
+ os.system(
+ "xdotool search --onlyvisible \"chrom\" windowactivate click --repeat 8 4"
+ )
+ return None
elif 'back' in command:
page = page_history[1]
elif 'skip' in command:
elif 'back' in command:
page = page_history[1]
elif 'skip' in command:
@@
-240,8
+250,10
@@
def thread_change_current(command_queue: Queue) -> None:
if command is not None:
logger.info(f'chooser: We got a verbal command ("{command}"), parsing it...')
if command is not None:
logger.info(f'chooser: We got a verbal command ("{command}"), parsing it...')
- triggered = True
page = process_command(command, page_history, page_chooser)
page = process_command(command, page_history, page_chooser)
+
+ if page:
+ triggered = True
else:
while True:
(page, triggered) = page_chooser.choose_next_page()
else:
while True:
(page, triggered) = page_chooser.choose_next_page()