touchscreen tablet utilities

versatile 64-bit multi-user Linux distribution

Moderators: kirk, jamesbond, p310don, JakeSFR, step, Forum moderators

Post Reply
User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

touchscreen tablet utilities

Post by stemsee »

The title might not convey clearly what i have in mind. What I have in mind is to create some touch friendly panels for fatdog linux which makes it easy to use with a typical tablet. I mean on-screen keyboard toggle button, not a titchy icon in the corner of the tray where the bezel hampers activation. An alternative to the systray. Switching windows and desktops easily with one finger. Floating App menu with generously sized icons. Navigation pad for sending key-combos to activate app menus, and a common text input gui which serves most apps, probably using copy and paste in the backend with xdotool.

So that using fatdog in tablet mode should not simply be the normal desktop in minutae, it isn't suitable for such operation without hardware keyboard and mouse. This project's goal is to cover a limited use case. Browsing, camera, note taking, recording audio / video with big buttons, connecting to wifi APs, playing music/radio/movies and some networking. etc similar to what i do using my phone over scrcpy. Basically it means opening apps live guvcview with fixed objectives, snapshot, record video with/without audio ....

xscreenshot-20241019T153543.png
xscreenshot-20241019T153543.png (53.53 KiB) Viewed 1101 times

Browser should be chrome based which is pinch to zoom enabled already.

I made an effort towards this with several scripts, wifi-2-desktop, script-2-desktop, emoji-2-desktop, radio/media as desktop files. Did that and a fair bit more while experimenting with my yad file browser, in which dirs and files are represented as a desktop file. Desktop files seem to me to be ideal, also scripts with a suitable icon are similar in appearance and functionality.

Any thoughts?

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: touchscreen tablet utilities

Post by step »

Sounds good. To create your GUI you could also use Fatdog QuickApps (Menu > Personal > ).

Or you could add your own applets to the the Fatdog64 Control Panel. Create file ~/.fatdog/control-panel-applets and/or add files under ~/.fatdog/control-panel-applets.dir. Look at /etc/control-panel-applets and /etc/control-panel-applets.dir/applet-definition for short instructions and examples.

Either way, the applets are .desktop files, the same stuff that goes into your yad icon box.

chiron
Posts: 21
Joined: Tue Jul 28, 2020 8:15 am
Location: Frankonia/EU
Has thanked: 4 times
Been thanked: 6 times

Re: touchscreen tablet utilities

Post by chiron »

I use fatdog on my Thinkpad Yogas, also in tabletmode, and I created a quicklaunch on an extra lxqt panel with larger icons that is hidden and activated once you move your finger to the respective edge of the screen. Actually I liked it so much I configured all my lxqt panels to be that way. Swipe to the edge of the screen, panel appears, make your selection, panel vanishes. The quicklaunch also takes .desktop files, so you can add your own scripts and have control over the icons.

As keyboard I use the on-board qtvkbd that gets invoked as soon as the yoga goes into tabletmode (did some shell scripts to handle screen rotation, switching speakers etc...). you can place the keyboard dock anywhere you like on the desktop and it always stays on top even when the browser is in fullscreen, so you have easy access to the keyboard. Plus the keyboard actually looks nice and is resizeable.

User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

@step
Yes, and /usr/share/applications ... the selections of which to make available in panels for tablet mode, and which cli arguments to use best suited for tablet mode. As i see it you set up tablet mode customisations in desktop mode, and just use the thing to consume in tablet mode: read epubs, browse web, watch videos, listen to music. But if you have speakers, bt earphones, bt speaker ... you don't want to invoke sound wizard, just replace /root/.asoundrc with a saved profile for that device etc which a desktopfile will do.

@chiron
Yes, exactly. Are you willing to share your work, configs scripts settings etc? I am sharing some scripts for making various files or settings as desktop files here
https://fatdog64-d88.taild4ecf9.ts.net/

Clarity
Posts: 3888
Joined: Fri Jul 24, 2020 10:59 pm
Has thanked: 1643 times
Been thanked: 528 times

Re: touchscreen tablet utilities

Post by Clarity »

One of the missing elements of Linux distros with touchscreen that is missed, often in the community is "finger-tap on any open area of the desktop 'should' open the Menu for application selects...not the way it is currently implemented". Thus, it should acts as the current mouse right-click on open area of the desktop.

Probably a OOTB setup switching right click behavior when touchscreen is detected. Or some pop-up at boot-time to guide user behavior, OOTB>

This allows the Touch systems to behave more like what we would expect on a cell phone.

User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

Previously Jamesbond setup a wacom driver to provide two-finger right click. Somewhere along the upgrade path that stopped working. However in chrome based broswers two finger touch as right click is still available. Chrome takes over control of the actual touch hardware. So it seems JWP\Openbox only accidentally supported two finger right click. In fact two fingers and more do register, but some advanced configuration is needed I guess .... maybe touchegg, which I am just starting to get familiar with. And apart from that I created a tray icon which uses xdotool to generate a right click under the finger, with a small delay for positioning. It works, but not ideal. EDIT* improved floating button for delayed (4s) right-click.

xscreenshot-20241023T073859.png
xscreenshot-20241023T073859.png (8.82 KiB) Viewed 781 times

depends on yad and xdotool

Code: Select all

#!/bin/sh
yad --on-top --button="🖱️!!Click then move cursor over the item you wish to right-click on":"bash -c 'sleep 2; xdotool click 3'" --geometry=48x48+100+100 --undecorated --skip-taskbar --fontname="Sans Bold 20" --title="Right-Click" &

Geany used to support pinch to zoom with the touchscreen well. Evince supports pinch to zoom and so does yad --print --add-preview, which can display text based documents and graphics images. Unfortunately that is the only yad gui option that does afaik! Evince and cr3 also offer page rotation for reading in landscape or portrait, without rotating the screen/WM. Libreoffice is also touch friendly but not a smooth experience. Maybe wps office would be better.

I need to find an image viewer/editor which has pinch to zoom. Chrome based browsers can be used for viewing I guess. I have made some good progress already. Bt and wifi desktop file connections work well. So too mediafiles, and playlists and epubs.

Edit: I have also scripted a simple alert/alarm/reminder. easily set year month day and hour, display text and an exec string which is to play an alarm, in fact a media file named alarm.mp3 e.g. 'vlc /root/media/alarm.mp3'

xscreenshot-20241023T075333.png
xscreenshot-20241023T075333.png (29.01 KiB) Viewed 778 times

a few floating panels open

xscreenshot-20241023T084315.png
xscreenshot-20241023T084315.png (447.84 KiB) Viewed 776 times
Last edited by stemsee on Mon Oct 28, 2024 2:24 am, edited 1 time in total.
User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

I am creating a navigation pad, but I am not sure what to use it for. Well, I can assign a config file for the nine commands for the nine 'user programmable' buttons. Initially I though it would be for sending key combos using xdotool.

xscreenshot-20241023T100655.png
xscreenshot-20241023T100655.png (27.09 KiB) Viewed 774 times
User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

two finger right-click solved using touchegg, also desktop change with 3 finger swipe. Just put the following in /root/.config/touchegg/touchegg.conf

Code: Select all

<gesture type="PINCH" fingers="4" direction="IN">
  <action type="CLOSE_WINDOW">
    <animate>true</animate>
    <color>F84A53</color>
    <borderColor>F84A53</borderColor>
  </action>
</gesture>
<gesture type="SWIPE" fingers="4" direction="LEFT">
  <action type="CHANGE_DESKTOP">
    <direction>next</direction>
    <animate>true</animate>
    <animationPosition>right</animationPosition>
    <color>3E9FED</color>
    <borderColor>3E9FED</borderColor>
  </action>
</gesture>
<gesture type="SWIPE" fingers="4" direction="RIGHT">
  <action type="CHANGE_DESKTOP">
    <direction>previous</direction>
    <animate>true</animate>
    <animationPosition>left</animationPosition>
    <color>3E9FED</color>
    <borderColor>3E9FED</borderColor>
  </action>
</gesture>
<gesture type="SWIPE" fingers="4" direction="DOWN">
  <action type="SHOW_DESKTOP">
    <animate>true</animate>
    <color>909090</color>
    <borderColor>FFFFFF</borderColor>
  </action>
</gesture>
<gesture type="DRAG" fingers="3" direction="RIGHT">
   <action type="SEND_KEYS">Control+Alt+Left</action>
</gesture>
<gesture type="DRAG" fingers="3" direction="LEFT">
   <action type="SEND_KEYS">Control+Alt+Right</action>
</gesture>
<gesture type="TAP" fingers="2">
  <action type="MOUSE_CLICK">
    <button>3</button>
    <on>begin</on>
  </action>
</gesture>
<gesture type="SWIPE" fingers="2" direction="LEFT">
  <action type="SEND_KEYS">
    <repeat>true</repeat>
    <modifiers>Alt_L</modifiers>
    <keys>Shift_L+Tab</keys>
    <decreaseKeys>Tab</decreaseKeys>
  </action>
</gesture>
<gesture type="SWIPE" fingers="2" direction="RIGHT">
  <action type="SEND_KEYS">
    <repeat>true</repeat>
    <modifiers>Alt_L</modifiers>
    <keys>Tab</keys>
    <decreaseKeys>Shift_L+Tab</decreaseKeys>
  </action>
</gesture>
<gesture type="TAP" fingers="3">
  <action type="MOUSE_CLICK">
    <button>8</button>
    <on>begin</on>
  </action>
</gesture>
<gesture type="TAP" fingers="4">
  <action type="MOUSE_CLICK">
    <button>9</button>
    <on>begin</on>
  </action>
</gesture>
<gesture type="SWIPE" fingers="3" direction="LEFT">
  <action type="TILE_WINDOW">
    <direction>left</direction>
    <animate>true</animate>
    <color>3E9FED</color>
    <borderColor>3E9FED</borderColor>
  </action>
</gesture>
<gesture type="SWIPE" fingers="3" direction="RIGHT">
  <action type="TILE_WINDOW">
    <direction>right</direction>
    <animate>true</animate>
    <color>3E9FED</color>
    <borderColor>3E9FED</borderColor>
  </action>
</gesture>

start touchegg as follows

Code: Select all

touchegg --daemon &
touchegg &

three finger swipe down minimises. three finger tap desktop tasks. This is amazing!!!

xscreenshot-20241023T173659.png
xscreenshot-20241023T173659.png (147.89 KiB) Viewed 743 times

That just took five minutes to find!

Last edited by stemsee on Mon Oct 28, 2024 2:07 am, edited 1 time in total.
User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

lxqt panel focus model gets confused easily between touchscreen and track-pad, and becomes unusable, even before adding touchegg gestures. Maybe necessary to disable track-pad in tablet mode

lxqtpanel.png
lxqtpanel.png (18.52 KiB) Viewed 654 times

edit: disabling track-pad 'xinput disable 10' makes no difference. We have entered some unknown mode of operation. No, the trackpad/mouse is never confused, this is touchscreen only. Maybe xorg config for touchscreen needs tweaking.

yadu (yad gtk3) multi-touch, showing magnifier per text box per finger (3), in fact my thumb could simultaneously and independently select items in list on the left. So gtk3 is multitouch and multi focus.

touch.png
touch.png (49.61 KiB) Viewed 640 times

update:
Opening up my yad audio equaliser function, I am able to control sliders for each eq band simultaneously and independently, using yadu (gtk3) instead of yad (gtk2 on fd64). But this doesn't work with buttons.

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: touchscreen tablet utilities

Post by step »

@stemsee, Fatdog64 has three yad packages: yad_gtk2, yad_gtk3 and yadu. yad_gtk2 and yad_gtk3 use the same code base. The only difference is one uses the GTK2 library while the other one uses the GTK3 library. yadu, on the other hand, uses a different code base with the GTK3 library. Could you please try yad_gtk3 instead of yadu, to see whether the code base vs GTK3 is making the difference for pinching? No rush, I'm just curious.

User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

I see no difference between using yad_gtk2, yad_gtk3 and yadu, using --print --add-preview ... all support pinch...btw what is the underlying gtk widget for print preview? But between gtk2 and the others none of the extra touch functionality exists with gtk2.... AND if I use --gtkrc theme for yadu and gtk3 they also lose extra touch functionality.

Do you have any yadu binary compiled with html?

User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

Honestly chrome based web browser does a great job as an epub/pdf /txt reader, and media player. Offering split screen graphic history, and rotations, tabbed pages are as many desktops, and perfectly touchable.

xscreenshot-20241026T233743.png
xscreenshot-20241026T233743.png (428.11 KiB) Viewed 492 times

resources
https://sketch.io/sketchpad/ - online drawing and painting and text
https://products.aspose.app/ocr/en/handwriting-to-text - OCR get text from handwriting, or images etc.
https://www.canva.cn/?display-com-option=true - online content designer
https://www.musicca.com/drum-machine?da ... kmo6em7ai- - online drum machine
https://www.musicca.com/drums - online drums
https://www.musicca.com/piano - online piano
https://www.online-convert.com/ - many conversions avaialable

Last edited by stemsee on Sun Oct 27, 2024 11:25 pm, edited 3 times in total.
step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: touchscreen tablet utilities

Post by step »

stemsee wrote: Fri Oct 25, 2024 6:27 am

what is the underlying gtk widget for print preview?

GtkUnixDialog.

Do you have any yadu binary compiled with html?

No, because the Fatdog64 package repository lacks WebkitGTK, which is a dependency for yadu --html.

User avatar
stemsee
Posts: 782
Joined: Sun Jul 26, 2020 8:11 am
Location: lattitude 8
Has thanked: 186 times
Been thanked: 132 times

Re: touchscreen tablet utilities

Post by stemsee »

Can GtkUnixDialog widget in yad --print preview be enabled to show columns and rows, 2 pages wide 6 pages length etc?

step
Posts: 546
Joined: Thu Aug 13, 2020 9:55 am
Has thanked: 57 times
Been thanked: 198 times
Contact:

Re: touchscreen tablet utilities

Post by step »

You mean a grid of page thumbnails? I don't think so.

Post Reply

Return to “FatDog64”