[Feature]: Zoom on device without touchscreen (WSA)
Feature description
Currently Termux only supports changing font size by two-finger pinch-zooming, which is not doable on devices without touchscreen like Android-x86 VM and WSA.
Additional information
Although I could also use ADB it was always to cumbersome to choose device by IP (I sometimes have up to 4 devices hooked on my PC).
https://wiki.termux.com/wiki/Hardware_Keyboard:
Ctrl+Alt:
- +/- → Adjust text size
@xeffyr that doesn't work with laptop/pc keyboard. Do plan on adding the option but some users want to change font from scripts as well. Only current font size is stored in shared preferences, so changing font size from scripts needs some thinking.
My touch-screen is broken and eventually had to re-install termux... now it's hard to read when i share the screen to the PC... ctrl+alt doesn't work for some reason.
What about adding Ctrl+mouse scrolling behaviour for zoom? It works in most Windows and Linux programs that support content zooming so it is legit to implement it here.
That can be used as a workaround (in the case if Ctrl+Alt+'+' or Ctrl+Alt+'-' do not work or you do not have Ctrl or Alt).
- Launch termux on TV.
- Install
sshdwithpkg i openssh - Set password with
passwd. - Start sshd with
sshdcommand. - Connect ssh from PC or another termux (on phone or tablet). Default port is 8022.
- Finish session with "Ctrl+D" or "exit" command. Do not press exit on notification, it will kill
sshd. In the case if activity is launched during next step changes will not be kept. - Edit
/data/data/com.termux/shared_prefs/com.termux_preferences.xml(i.e. withnano). Add<string name="fontsize">18</string>somewhere in the middle or change existingfontsizeproperty. Like this:
<?xml version='1.0' encoding='utf-8' standalone='yes' ?>
<map>
<int name="app_shell_number_since_boot" value="0" />
<string name="current_session">133166f0-7b1a-47c4-a3e4-4d222cc6640a</string>
<int name="log_level" value="1" />
<string name="fontsize">18</string>
<int name="terminal_session_number_since_boot" value="6" />
</map>
- Save changes (Ctrl+X, then 'y' in the case of
nano). - Launch Termux app.