termux / termux-x11

Termux X11 add-on application.
https://termux.dev
GNU General Public License v3.0
2.12k stars 314 forks source link

System shortcuts interception #253

Closed 5A52 closed 1 year ago

5A52 commented 1 year ago

Intercept system shortcuts is butiful and very awaited feature. However Is it possible to have a separate chekbox for WIN key? For example for me it is ok to always intercept all keys even without any checkbox as I can't imogine situation when some one will need to close whole desktop (termux-x11 app) by alt+f4. But there must be some "magic" key to be able to put termux-x11 app in the background without touching a mouse. The best candidate in my opinion is a WIN key, as it is not hardly used in a linux, but wery well used in DEX. WIN+cursor keys are doind tilting (works fine with termux-x11 if keys are not intercepted) WIN+1.....0 start app shortcut from DEX taskbar...e.t.c.

twaik commented 1 year ago

I am sorry, but I do not think filtering keys is possible. DexUtils API only lets me specify if application intercepts all keys or not.

5A52 commented 1 year ago

Sorry to hear that, but I guessed it is like this. Then may be it is a good idea to stop intercepting if app is not fullscreen??

twaik commented 1 year ago

I'll check what I can do.

twaik commented 1 year ago

I can make it stop intercepting system shortcuts if app loses focus. Does it fit?

5A52 commented 1 year ago

I think no, as keys already are not intercepted if app is not in focus. But tilting for example does not work, as window must be in focus to be moved\resized.

twaik commented 1 year ago

It seems to me the problem can not be solved.

5A52 commented 1 year ago

Why? Is it impossible to stop intercepting (like switching toggle in app preferences manually) if app leaves fullscreen, and switch it back on if enters?

twaik commented 1 year ago

A question is about filtering single key, not about conditions of entering or leaving that state.