termux-app icon indicating copy to clipboard operation
termux-app copied to clipboard

[Feature]: Zoom on device without touchscreen (WSA)

Open ghost opened this issue 4 years ago • 6 comments

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).

ghost avatar Nov 07 '21 12:11 ghost

https://wiki.termux.com/wiki/Hardware_Keyboard:

Ctrl+Alt:

  • +/- → Adjust text size

ghost avatar Nov 07 '21 12:11 ghost

@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.

agnostic-apollo avatar Nov 07 '21 12:11 agnostic-apollo

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.

Splarkszter avatar Mar 27 '23 19:03 Splarkszter

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.

twaik avatar Dec 23 '23 09:12 twaik

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).

  1. Launch termux on TV.
  2. Install sshd with pkg i openssh
  3. Set password with passwd.
  4. Start sshd with sshd command.
  5. Connect ssh from PC or another termux (on phone or tablet). Default port is 8022.
  6. 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.
  7. Edit /data/data/com.termux/shared_prefs/com.termux_preferences.xml (i.e. with nano). Add <string name="fontsize">18</string> somewhere in the middle or change existing fontsize property. 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>
  1. Save changes (Ctrl+X, then 'y' in the case of nano).
  2. Launch Termux app.

twaik avatar Mar 14 '24 15:03 twaik