View Single Post
Old 02-05-2023, 10:53 PM   #52
elinkser
Addict
elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.elinkser has survived committing the World's Second Greatest Blunder.
 
Posts: 242
Karma: 146236
Join Date: Oct 2022
Device: Kobo Clara HD
***
FRESH OFF THE SUCCESS OF THE RIGHT-CLICK SOLUTION OF THE PRECEDING COMMENT #51,
HERE FOR YOUR ENJOYMENT, THE "BLOOPER REEL" OF STUFF THAT DIDN'T FARE AS WELL
***



USE XBINDKEYS TO GENERATE RIGHT CLICK WITH SHIFT-LEFT CLICK


apk add xvkbd
apk add xbindkeys

Create /.xbindkeysrc and enter the lines:

# Map Shift-LeftClick to RightClick
"xvkbd -text '\m2'"
m:0x1 + b:1


(Doesn't work.)


ONE-FINGER CLICK INTERCEPTION BY LIBINPUT-TOUCHSCREEN


cd /home/root/

Edit /.config/libinput-touchscreen/config to:

TAP X 1
xdotool click 1
TAP X 2
xdotool click 3

MOVEMENT W 2
xdotool click 3
MOVEMENT E 2
xdotool click 3
MOVEMENT N 2
xdotool key Page_Down
MOVEMENT S 2
xdotool key Page_Up


Disable tapping FROM TELNET ON DESKTOP (YOU WILL LOSE INPUT ON KOBO):

Run "DISPLAY=:0 xinput list"
⎡ Virtual core pointer id=2 [master pointer (3)]
⎜ ↳ Virtual core XTEST pointer id=4 [slave pointer (2)]
⎜ ↳ cyttsp5_mt id=7 [slave pointer (2)]
⎣ Virtual core keyboard id=3 [master keyboard (2)]
↳ Virtual core XTEST keyboard id=5 [slave keyboard (3)]
↳ gpio-keys id=6 [slave keyboard (3)]

Run "DISPLAY=:0 xinput list-props 7"
Device 'cyttsp5_mt':
Device Enabled (115): 1
...

Run "DISPLAY=:0 xinput set-prop 7 115 0"
The Kobo touchscreen no longer responds.

Run "DISPLAY=:0 xinput list-props 7"
Device 'cyttsp5_mt':
Device Enabled (115): 0
...

Run " DISPLAY=:0 libinput debug-events" and tap the screen
-event0 DEVICE_ADDED gpio-keys seat0 default group1 cap:k
-event1 DEVICE_ADDED cyttsp5_mt seat0 default group2 cap:t ntouches 0 calib
event1 TOUCH_DOWN +0.000s 0 (0) 75.28/36.57 (1090.00/392.00mm)
event1 TOUCH_FRAME +0.000s
event1 TOUCH_UP +0.060s 0 (0)
event1 TOUCH_FRAME +0.060s


But remember the line in /.config/libinput-touchscreen/config we added:
TAP X 1
xdotool click 1


Run "DISPLAY=:0 ./libinput-touchscreen-master/libinput-touchscreen" and tap the screen:
Device found: /dev/input/event1
Loading screen calibration from //.config/libinput-touchscreen/dims.txt
G(1) T1 D0
Trigger xdotool click 1

So the tap is registered, but is very unreliable, so run "DISPLAY=:0 xinput set-prop 7 115 1"
And our Kobo screen is responsive again.

Comment out the left-click entries in "/.config/libinput-touchscreen/config":
#TAP X 1
# xdotool click 1
#TAP X 2
# xdotool click 3



ALTERNATIVE RIGHT-CLICK DRIVER "TOUCHEGG" FOR LIBINPUT

touchegg

cd /home/root/
apk add touchegg
mkdir .config/touchegg

nano .config/touchegg/touchegg.conf
*Enter the following:

<gesture type="SWIPE" fingers="2" direction="DOWN">
<action type="RUN_COMMAND">
<repeat>false</repeat>
<command>xdotool key Page_Up</command>
<on>end</on>
</action>
</gesture>

<gesture type="SWIPE" fingers="2" direction="UP">
<action type="RUN_COMMAND">
<repeat>false</repeat>
<command>xdotool key Page_Down</command>
<on>end</on>
</action>
</gesture>

<gesture type="SWIPE" fingers="2" direction="LEFT">
<action type="RUN_COMMAND">
<repeat>true</repeat>
<command>xdotool click 6</command>
<decreaseCommand>xdotool click 5</decreaseCommand>
</action>
</gesture>

<gesture type="SWIPE" fingers="2" direction="RIGHT">
<action type="RUN_COMMAND">
<repeat>true</repeat>
<command>xdotool click 7</command>
<decreaseCommand>xdotool click 5</decreaseCommand>
</action>
</gesture>

<gesture type="PINCH" fingers="4" direction="IN">
<action type="RUN_COMMAND">
<repeat>false</repeat>
<command>xdotool click 3</command>
<on>end</on>
</action>
</gesture>

<gesture type="TAP" fingers="2">
<action type="RUN_COMMAND">
<repeat>false</repeat>
<command>xdotool click 3</command>
<on>end</on>
</action>
</gesture>



*Now run the daemon and client:

DISPLAY=:0 touchegg --daemon 3 15 &
<Return>
DISPLAY=:0 touchegg


(The only gesture that seems to work is the "TAP".)

*Kill the client and daemon:

<Ctrl-c>
killall touchegg



*****



THE NETSURF BROWSER IS WORKING GREAT BUT CANNOT HANDLE SOME WEBSITES, AND THERE WAS THIS ARMHF BINARY OF A LIGHTWEIGHT, JAVASCRIPT-CAPABLE WEB BROWSER "FLOATING" AROUND, SO...



wget https://mirror.math.princeton.edu/pu...t-2.3.3-r0.apk

tar zxvf luakit-2.3.3-r0.apk

DISPLAY=:0 ./usr/bin/luakit
Error loading shared library libwebkit2gtk-4.0.so.37: No such file or directory (needed by ./usr/ bin/luakit)
Error loading shared library libsoup-2.4.so.1: No such file or directory (needed by ./usr/bin/luakit)
Error loading shared library libluajit-5.1.so.2: No such file or directory (needed by ./usr/bin/luakit)
Error loading shared library libjavascriptcoregtk-4.0.so.18: No such file or directory (needed by ./usr/bin/luakit)


df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 2064208 879060 1080292 45% /


apk add luajit
(1/1) Installing luajit (2.1_p20210510-r3)

apk add libsoup
(1/1) Installing libsoup (2.74.3-r0)

apk add webkit2gtk
(1/31) Installing libcap2 (2.66-r0)
(2/31) Installing bubblewrap (0.7.0-r0)
(3/31) Installing xdg-dbus-proxy (0.1.4-r0)
(4/31) Installing libgpg-error (1.46-r1)
(5/31) Installing libgcrypt (1.10.1-r0)
(6/31) Installing gcr-base (3.41.1-r1)
(7/31) Installing gnome-keyring (42.1-r0)
(8/31) Installing libwpe (1.14.0-r0)
(9/31) Installing libwpebackend-fdo (1.14.0-r0)
(10/31) Installing aspell-libs (0.60.8-r2)
(11/31) Installing nuspell-libs (5.1.2-r1)
(12/31) Installing enchant2 (2.3.3-r1)
(13/31) Installing libxv (1.0.11-r3)
(14/31) Installing alsa-lib (1.2.8-r0)
(15/31) Installing cdparanoia-libs (10.2-r11)
(16/31) Installing graphene (1.10.8-r1)
(17/31) Installing gstreamer (1.20.5-r0)
(18/31) Installing opus (1.3.1-r1)
(19/31) Installing orc (0.4.33-r0)
(20/31) Installing libtheora (1.1.1-r16)
(21/31) Installing gst-plugins-base (1.20.5-r0)
(22/31) Installing harfbuzz-icu (5.3.1-r1)
(23/31) Installing hyphen (2.8.8-r2)
(24/31) Installing libgudev (237-r1)
(25/31) Installing libmanette (0.2.6-r2)
(26/31) Installing libseccomp (2.5.4-r0)
(27/31) Installing libsecret (0.20.5-r0)
(28/31) Installing libwoff2common (1.0.2-r2)
(29/31) Installing libwoff2enc (1.0.2-r2)
(30/31) Installing libxslt (1.1.37-r0)
(31/31) Installing webkit2gtk (2.38.4-r0)


df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 2064208 962052 997300 49% /



DISPLAY=:0 ./usr/bin/luakit
[ 0.900950] W [core/luah]: couldn't load any rc file
[ 0.901943] F [core/luakit]: couldn't find rc file


cp usr/bin/luakit /usr/bin/
cp -r usr/lib/luakit/ /usr/lib/
cp -r usr/share/luakit/ /usr/share/
cp usr/share/applications/luakit.desktop /usr/share/applications/
cp usr/share/pixmaps/luakit.* /usr/share/pixmaps/
cp -r etc/xdg/luakit/ /etc/xdg/


DISPLAY=:0 ./usr/bin/luakit
[ 0.328927] I [core/luah]: Loading rc: /etc/xdg/luakit/rc.lua
[ 0.345207] E [core/common/lualib]: Lua error: module 'lfs' not found:
no field package.preload['lfs']
no file './lfs.lua'
no file '/usr/share/luajit-2.1.0-beta3/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs/init.lua'
no file '/usr/share/lua/5.1/lfs.lua'
no file '/usr/share/lua/5.1/lfs/init.lua'
no file '/usr/share/lua/common/lfs.lua'
no file '/usr/share/lua/common/lfs/init.lua'
no file '/usr/share/luakit/lib/lfs.lua'
no file '/usr/share/luakit/lib/lfs/init.lua'
no file '/.config/luakit/lfs.lua'
no file '/.config/luakit/lfs/init.lua'
no file '/etc/xdg/luakit/lfs.lua'
no file '/etc/xdg/luakit/lfs/init.lua'
no file './lfs.so'
no file '/usr/local/lib/lua/5.1/lfs.so'
no file '/usr/lib/lua/5.1/lfs.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
Traceback:
(1) [C] in function require
(2) /etc/xdg/luakit/rc.lua:5 in main chunk
[ 0.346607] W [core/luah]: loading rc '/etc/xdg/luakit/rc.lua' failed, falling back...
[ 0.233526] F [core/luakit]: couldn't find rc file


apk add lua5.1
(1/2) Installing lua5.1-libs (5.1.5-r11)
(2/2) Installing lua5.1 (5.1.5-r11)


df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 2064208 964072 995280 49% /


DISPLAY=:0 ./usr/bin/luakit
[ 0.638502] I [core/luah]: Loading rc: /etc/xdg/luakit/rc.lua
[ 0.653692] E [core/common/lualib]: Lua error: module 'lfs' not found:
no field package.preload['lfs']
no file './lfs.lua'
no file '/usr/share/luajit-2.1.0-beta3/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs.lua'
no file '/usr/local/share/lua/5.1/lfs/init.lua'
no file '/usr/share/lua/5.1/lfs.lua'
no file '/usr/share/lua/5.1/lfs/init.lua'
no file '/usr/share/lua/common/lfs.lua'
no file '/usr/share/lua/common/lfs/init.lua'
no file '/usr/share/luakit/lib/lfs.lua'
no file '/usr/share/luakit/lib/lfs/init.lua'
no file '/.config/luakit/lfs.lua'
no file '/.config/luakit/lfs/init.lua'
no file '/etc/xdg/luakit/lfs.lua'
no file '/etc/xdg/luakit/lfs/init.lua'
no file './lfs.so'
no file '/usr/local/lib/lua/5.1/lfs.so'
no file '/usr/lib/lua/5.1/lfs.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
Traceback:
(1) [C] in function require
(2) /etc/xdg/luakit/rc.lua:5 in main chunk
[ 0.655031] W [core/luah]: loading rc '/etc/xdg/luakit/rc.lua' failed, falling back...
[ 0.239572] F [core/luakit]: couldn't find rc file


apk add ldoc
(1/7) Installing lua5.4-libs (5.4.4-r6)
(2/7) Installing lua5.4 (5.4.4-r6)
(3/7) Installing lua-filesystem (1.8.0-r2)
(4/7) Installing lua5.4-filesystem (1.8.0-r2)
(5/7) Installing lua-penlight (1.13.1-r0)
(6/7) Installing ldoc (1.4.6-r4)
(7/7) Installing lua5.1-filesystem (1.8.0-r2)


df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/loop0 2064208 965568 993784 49% /


nano /etc/xdg/luakit/theme.lua
-- Default settings
theme.font = "32px monospace"
theme.fg = "#fff"
theme.bg = "#000"
---
-- Follow mode hints
theme.hint_font = "32px monospace, courier, sans-serif"


DISPLAY=:0 ./usr/bin/luakit https://www.startpage.com


RESIZE THE LUA WINDOW USING RIGHTCLICK ON TITLE BAR, SELECT RESIZE, THEN DRAG


Type : open http://wpt.live/acid/acid3/test.html
Score:16/100


Type : open https://www.javatpoint.com/html-server-sent-event
...Still waiting for the page to open...



---

BASIC INSTRUCTIONS FOR ANYONE WHO WANTS TO TRY THEIR LUCK:


*** SINCE YOU ARE MESSING AROUND WITH PACKAGES FROM ANOTHER VERSION -AND EVEN ARCHITECTURE, THOUGH ARMHF CAN RUN ON ARMV7 - PLEASE BACKUP, TAKE NOTES, ETC... ***

Spoiler:

Opening the help page

To open the internal help page, press <F1>. From there, you can open the introspector to view current keybindings or open the included API documentation.
Switching to command mode

Many common operations in luakit, such as typing and opening a URL, involve the use of commands. This is done by switching to command mode, typing the command, and pressing <Enter>.

To switch to command mode, press : (i.e. <Shift-;>), and the command bar will appear at the bottom of the window. In the remainder of this document, commands will be written prefixed by a :; so : open means to first press :, and then type open *WITHOUT THE SPACE BETWEEN : and open (I put the space to avoid emoji conversion)

Go to a URL in the current tab

Type : open followed by a space and the URL to navigate to, and press <Enter>. For example, to open the luakit website, type : open luakit.github.io and then press press <Enter>.

Shortcut: press o to switch to command mode with open already typed.

Search

Press /, and type your search query, e.g: /luakit. Press <Enter> to finish typing your search query and switch back to normal mode. While in normal mode with highlighted search results, press n to jump to the next search result, and N to jump to the previous one.
Opening, closing, and undo-closing tabs

Try the following steps in order:

Run :tabopen luakit.org, and wait until the page finishes loading.
Press d, and the new tab will close.
Press u, and the just-closed tab will reappear.

Scrolling in a web page

There are several different keys to scroll a webview:

The arrow, page up/down, and home/end keys all work as one would expect.
The h, j, k, l, gg, and G key bindings all scroll in a vim-like manner.
The <Control-e>, <Control-y>, <Control-d>, <Control-u>, <Control-f>, and <Control-b> keys all scroll vertically by various amounts.

Bookmarks

Press B to bookmark the current page.
Press gb or gB to open the bookmarks page in the current tab or a new tab, respectively.


Last edited by elinkser; 02-14-2023 at 10:02 AM. Reason: :\o
elinkser is offline   Reply With Quote