green-green-avk / AnotherTerm

Local PTY, USB and Bluetooth serial ports, SSH and Telnet terminal client for Android. Xwayland support (in dev only).
https://green-green-avk.github.io/AnotherTerm-docs/
Other
189 stars 19 forks source link

[FR] Add ability to have hook script when toggling android on screen keyboard #51

Open racheandre opened 9 months ago

racheandre commented 9 months ago

First of all, I really like your app. Termux is good but it does not support using in different profile. This app fits my requirement and it even has minimal wayland compositor for running x11 app.

My problem is when I toggle the android keyboard on the app with a x11 desktop, the desktop screen will be covered by the keyboard, so it is natural to just limit the resolution to a smaller size so that the keyboard can only cover the empty space on the x11 desktop. If it is possible to run a script when toggling the on screen keyboard, it can change resolution according to the status of the on screen keyboard.

green-green-avk commented 9 months ago

The composer does already send proper resize events to applications...

The possible problem is with the Android IME size guessing (that is pain)...

My test on Samsung Note 8 shows that some tenths of pixels could be eaten in the landscape screen orientation.

What is your device, by the way? As I see, the IME size guessing does not work at all for you?

racheandre commented 9 months ago

I am using a Pixel 7a, and only tried portrait orientation. Not sure if it is related, but I am using i3. It does not have the correct resolution when running, so I run a xrandr on boot. Maybe I should try IceWM?

green-green-avk commented 9 months ago

Let's give IceWM a try. Maybe i3 has hard times with screen resize events support...