termux / termux-app

Termux - a terminal emulator application for Android OS extendible by variety of packages.
https://f-droid.org/en/packages/com.termux
Other
34.69k stars 3.65k forks source link

[Bug]: #3579

Open voronind-com opened 1 year ago

voronind-com commented 1 year ago

Problem description

I use alt+esc combo in tmux to create new window. termux is the only one TE that doesn't send this key. I use on-screen keyboard, app's native extra keys. when I press esc it just drops alt press and nothing happens.

Steps to reproduce the behavior.

  1. press alt on extra keys. alt will be highlighted.
  2. press esc. alt key is no longer highlighted, no alt-esc is sent.

What is the expected behavior?

pressing alt+esc should be passed to terminal.

System information

voronind-com commented 1 year ago

sorry, I forgot to write a title. my bad! seems like I can't edit it.

voronind-com commented 1 year ago

I've tested it, and the end recieves keycode 27 - only esc key without alt.

sylirre commented 1 year ago

Termux currently doesn't support combining extra keys.

twaik commented 11 months ago

On my desktop PC there is no terminal that sends something with Alt+Esc combination. I tried to make it on vt3 and it sent ^[^[. I am not sure we should implement Alt+Esc bacause normally windows manager intercepts it and it is not meant to be handled by normal (terminal or graphical) applications.

voronind-com commented 11 months ago

On my desktop PC there is no terminal that sends something with Alt+Esc combination. I tried to make it on vt3 and it sent ^[^[. I am not sure we should implement Alt+Esc bacause normally windows manager intercepts it and it is not meant to be handled by normal (terminal or graphical) applications.

It works on Gnome's default terminal app as well as in system tty (ctrl+alt+f3). even you wrote that it sent ^[^[ - which means that combo works, your app just doesn't recognize it (I assume you just have bash running which prints it). if you make this i.e. a tmux shortcut then it'll work. if that combo wouldn't work, you'd see nothing printed.

twaik commented 11 months ago

even you wrote that it sent ^[^[ - which means that combo works

I did not say it does not work. Actually it mean that it works. I only was checking that terminal accepts something with cat command...

But on my system it is intercepted by KWin.

voronind-com commented 11 months ago

even you wrote that it sent ^[^[ - which means that combo works

I did not say it does not work. Actually it mean that it works. I only was checking that terminal accepts something with cat command...

But on my system it is intercepted by KWin.

sure, if you have a system shortcut for that, it'd be intercepted. same goes for any shortcut, really. if you have ctrl+c to close a window (alt+f4) then it won't be passed to a shell. but alt+esc is not a common shortcut that I'm aware of and your issue is really more related to your environment. if we take a system with no GUI or at least with Gnome, then it would work.

twaik commented 11 months ago

I do no have shortcuts assigned to Alt+Esc. It is simply intercepted by default.

twaik commented 11 months ago

Did you try to make Alt esc combo? Read 'Advanced extra keys configuration' in https://wiki.termux.com/wiki/Touch_Keyboard