View Single Post
Old 07-04-2022, 12:53 AM   #3
spinda
Member
spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.spinda knows the square root of minus one.
 
spinda's Avatar
 
Posts: 12
Karma: 7954
Join Date: Dec 2014
Device: Kindle PW1/2/3/4/5, KV, KT2, K2
Actually, that only works when running "./gargoyle.sh" directly when SSH'd into the Kindle. The following version will also work when launched from KUAL:

Code:
#!/bin/sh
EXTENSION=/mnt/us/extensions/gargoyle
cd ${EXTENSION}/dist/
lipc-set-prop -s com.lab126.keyboard open net.fabiszewski.gargoyle:abc:0
(while true; do sleep 3 && lipc-set-prop -s com.lab126.keyboard open net.fabiszewski.gargoyle:abc:0; done) &
bg_pid=${!}
trap "trap - SIGTERM && kill -- ${bg_pid}" SIGINT SIGTERM EXIT
SAVED_GAMES=/mnt/us/extensions/gargoyle/saved_games \
GAMES=/mnt/us/extensions/gargoyle/games \
LD_LIBRARY_PATH=${EXTENSION}/dist \
PATH=$PATH:${EXTENSION}/dist \
GTK2_RC_FILES=${EXTENSION}/dist/gtkrc \
./gargoyle
lipc-set-prop -s com.lab126.keyboard close net.fabiszewski.gargoyle
This starts a background task before launching the "gargoyle" binary. The background task pokes the keyboard every three seconds while Gargoyle is running, and is killed when the script exits.

A better fix would involve modifying Gargoyle itself. Wouldn't be too hard, I think - just run the lipc-set-prop command after launching the file-chooser dialog and again after starting a game. I'll look into it later if I get the time.

On another note, typing commands on the PW5 is dramatically more responsive that I'm used to from using the Kindle Gargoyle port on previous devices. The experience of playing interactive fiction on this device is truly delightful, particularly when combined with pete330's scrolling patches.

Last edited by spinda; 07-04-2022 at 12:56 AM.
spinda is offline   Reply With Quote