-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gesture navigation makes opening session drawer nearly impossible #1325
Comments
have you tried pressing the edge for at least 1-2 seconds? the session drawer side menu should peek and will allow you to pull it. |
It doesn't work for me. (Galaxy Note 9, Android 10) |
try sliding it diagonally from edge. it works on my pixel 4 xl. |
Diagonally is slightly more reliable than the 1-2 second holding or with system gesture navigation disabled. I think that informing the OS ( https://developer.android.com/guide/navigation/gesturenav#conflicting-gestures )that you expect gestures on the left hand side would be a better solution than knowing to slide it diagonally if you have gestures enabled. Then it should work as it does in previous versions of android or with gesture navigation off. |
Oh, I didn't know about that, diagonal sliding works, thank you. |
This comment was marked as resolved.
This comment was marked as resolved.
Could this be fixed? Even with the tips in this thread, the menu is damn near impossible to open. Having gesture navigation enabled basically limits using Termux with only one tab. |
Swiping with two fingers similar to the three finger screenshot gesture worked for me. |
Termux is currently the only reason I need to use button nav over gesture nav on my Oneplus 8, diagonal sliding still triggers the back gesture on OxygenOS 10, and long-pressing the edge is near-impossible with the OP8's dumb curved screen. |
Fixes (I think) termux#1325
I have now added support for a key in the extra keys row to open the drawer in PR #1479. When using the PR, you can include it in |
Nice! But I really hope swiping is made to work when gesture navigation is enabled. |
I don't think there is anything Termux can do about that. An app can't influence how the gesture navigation works as far as I know. You can see the same issue in other apps too, e.g. Google Keep. |
Slide for Reddit opens a similar sidebar to Termux when gesture navigation is enabled and you swipe from left side, so it's definitely doable. Shouldn't be too much trouble checking out how Slide is doing it, and implementing a similar change to Termux. |
I tried that app now, and it behaves fairly similar to Termux on my phone (Pixel 3). There's definitely still some conflict between the drawer and gesture. But I think one difference might be that it allows you to drag a bit further from the edge to open the drawer, so changing that may help. |
Most apps (and launchers) allow the menu slide to be started from anywhere on the screen, not just the side. Simply start sliding sideways anywhere and the menu pops open. It might conflict with "mouse" input though, I don't know how far Termux' "mouse" support goes (it supports simple clicks at least) and if sliding touch is supported at all, but if it exists I'm sure someone has worked it into their workflow. |
That's not my experience. The mentioned Google Keep and Slide apps does not allow you to do that. The reason is that there's often other elements that you want to slide on.
Termux supports mouse drag when using a mouse, but not when using a touch screen as far as I know. There has been interest in enabling drag on touch screens though (#1384). So I guess it would conflict with mouse usage, and either way I don't think it would be a good idea to hinder this from being implemented for touch screens. It also seems to conflict with scroll. I tested increasing the edge size now, and at least with the way I did it, you have to scroll perfectly vertically, otherwise the drawer opens instead of the screen being scrolled. I think increasing the edge side a little bit, so that it is easier to use without hindering scroll or drag too much might be a good solution though. |
I don't have any issues on Slide for Reddit with gesture navigation enabled. It just always opens the drawer when swiping from left side. It's precisely what I would expect from Termux as well. |
Well, this seems to be highly dependent on the phone. I can open the drawer just fine without triggering back as long as I swipe diagonally (except that it makes Termux scroll a bit too, which doesn't happen in Slide), but others are saying it's not working for them. If I swipe horizontally, I trigger back, both in Termux and Slide. |
What's the actual problem you are seeing with Slide for Reddit when swiping from left? |
If I swipe horizontally, the back gesture triggers and the drawer doesn't open. If I try to swipe further from the edge, it changes tabs instead of opening the drawer. If I swipe diagonally, it works fine, but this works for me in Termux too (except that it scrolls a bit, as mentioned). If I hold the finger a short while on the edge, and then swipe horizontally, it also works fine and opens the drawer. This also works fine for me in Termux, though I do have to hold a bit closer to the edge in Termux than in Slide. |
So does this close Slide for Reddit? Weird, because the drawer always opens for me, no matter how I swipe from left: horizontally or diagonally. |
It opens a popup asking to confirm exit. If I change the back button behavior in settings to close application, it does close it. I see that that option also can be set to open drawer. If I set it to that, the drawer always opens, but it seems like with that it's impossible to close the app. It's not entirely consistent btw (with the back button set back to close application again). A few times it does open the drawer with a horizontal swipe, but more often it closes it. |
Ah, I didn't remember Slide for Reddit has a setting for this: "Back button behavior", mine is indeed set to "Open drawer". I wouldn't personally mind if Termux worked similarly with gesture navigation: swiping from left would open the drawer, and it wouldn't be possible to close the app like that. |
Another option would be to simply allow another way of opening the drawer, i.e. double-tapping the edge, or adding it to the long-press menu or even to the Termux notification thingy. |
I think it would have to be optional. Personally I'm not too fond of it in other apps, but when I think about it I rarely use back in Termux. Either way, yeah, adding an option like Slide has would be a potential solution. It could also work so that the app is closed when back is triggered when the drawer is open. To close the drawer, you would swipe or press on the terminal area or entry in the list. E.g. Discord works like this. I think this is more practical than the way Slide works.
Another way to open it is what I did in #1479. With that you can open the drawer by pressing a key in the extra keys row. |
I tested Discord, and it indeed works very nicely! Maybe Termux could even default to this behavior. |
Apparently Discord allows you to swipe from anywhere like @SharkWipf mentioned. That might be problematic because of mouse drag, as I mentioned in a previous comment (I said there that it's not my experience that apps allows this, but maybe I just haven't noticed it in the ones that do). I also said it interacted badly with scroll, but I see that that works nicely in Discord. |
Telegram and Twitter also work this way, for the record, seems like many popular apps do it like this. |
Termux has settings, see the wiki. I agree that having an option for swipe anywhere would be a good solution, provided someone makes it interact well with scrolling. |
* Make popup keys for extra keys row configurable This makes the keys you get when swiping up on a key configurable. You can configure such a key by using an array of strings instead of a single string in the row. The first entry will be the normal key and the second will be the extra key. This is a slightly breaking change, as people that have configured custom extra keys with "-" or "/" will have to change the config to keep the popup keys. The default config will remain the same in terms of functionality, i.e. it includes the same popup key for "-". * Make popup keys interact well with long press keys This stops the repeat action when the popup is shown, and makes sure the popup is closed when you release even if there has been some repeat actions. * Support configuring the style of the extra keys This adds a setting for choosing between the different ways to render key names that were already present in ExtraKeysView. The available setting values are "arrows-only", "arrows-all", "all", "none" and "default". Other values will fallback to "default". Can be used as a workaround for #1410 * Support using modifier keys with letter keys in extra keys This allows you to use the modifier keys on the extra keys rows, e.g. ctrl, together with another button on the extra keys rows, as long as that button is a normal letter and not a special key. Support for special keys will come in the next commit. * Support using modifier keys with special keys in extra keys This allows you to use the modifier keys on the extra keys rows together with a special key on the extra keys rows, e.g. CTRL+LEFT. Fixes #745, fixes most of #895 and possibly #154 * Support mapping extra keys to other actions This adds a setting called extra-keys-map which allows you to map a key on the extra keys rows to another action. The value is a json object where the key is the button text as configured in extra-keys and the value is the action. Multiple actions can be used, but if they are special characters (like ESC or LEFT) they have to be separated from the other characters with a space on each side. If you want an actual space character, use SPACE. For example if you want to add a key to go to the next active channel in weechat, you can use this: extra-keys-map = {"weechat next": "ESC a"} And then add "weechat next" to extra-keys. The name can of course be whatever you want. Or if you want the button for the UP arrow to show ⇧ instead of ↑, you can use this: extra-keys-map = {"⇧": "UP"} And put "⇧" in extra-keys instead of "UP". Modifier keys (ctrl, alt and shift) can't be used in this map yet. Support for ctrl and alt will come in the next commit. I think this fixes #1186 * Support CTRL and ALT in extra keys map This allows you to use CTRL and ALT in extra-keys-map. For example if you want a button to exit the terminal, you can use this: extra-keys-map = {"exit": "CTRL d"} And add "exit" to extra-keys. * Support a KEYBOARD button in extra keys This toggles showing the keyboard input method. * Support specifying macro keys in the extra-keys option Instead of specifying macros in the separate extra-keys-map option by matching the key name in the two options, you can now use "macro" instead of "key" in extra-keys, and it will be a macro, i.e. a sequence of multiple keys separated by space. * Remove option extra-keys-map Now that you can specify macro in extra-keys, there is no point in having this separate option. Instead of specifying the value to display as key, and the macro to perform in extra-keys-map, you would now specify the value to display in the display property and the macro to perform in the macro property. * Lookup display text when creating ExtraKeyButton This will make it easier to support key aliases for macros in the next commit. * Add support for a key to open the drawer Fixes (I think) #1325
This comment was marked as spam.
This comment was marked as spam.
https://wiki.termux.com/wiki/Touch_Keyboard#Extra_Keys_Row Extra keys row can be configured to add a button for opening drawer. See supported keys in https://wiki.termux.com/wiki/Touch_Keyboard#Supported_keys. |
The `terminal-margin-horizontal` key can be used to adjust the terminal left/right margin and the `terminal-margin-vertical` can be used to adjust the terminal top/bottom margin. This will also affect drawer. The user can set an integer value between `0` and `100` as `dp` units. The default value is still `3` for horizontal and `0` for vertical margin. So adding an entry like `terminal-margin-horizontal=10` to `termux.properties` file will allow users to set a horizontal margin of `10dp`. After updating the value, either restart termux or run `termux-reload-settings` for changes to take effect. This was added since for some users text on edges would not be shown on the screen or they had screen protectors/cases that covered screen edges (Of course, that would require fixing every single app and android system UI itself, so kinda stupid to use). Moreover, horizontal margin of like `10dp` may be helpful with peek-and-slide for people having gesture navigation enabled on android `10+` since they won't be to touch at exactly the edge of the screen to trigger peek (termux#1325). Closes termux#2210
This one work Thank you sooooo much Wow the way I've struggled with this thing for a very long and lastly decided to search on how to solve it !! |
* Make popup keys for extra keys row configurable This makes the keys you get when swiping up on a key configurable. You can configure such a key by using an array of strings instead of a single string in the row. The first entry will be the normal key and the second will be the extra key. This is a slightly breaking change, as people that have configured custom extra keys with "-" or "/" will have to change the config to keep the popup keys. The default config will remain the same in terms of functionality, i.e. it includes the same popup key for "-". * Make popup keys interact well with long press keys This stops the repeat action when the popup is shown, and makes sure the popup is closed when you release even if there has been some repeat actions. * Support configuring the style of the extra keys This adds a setting for choosing between the different ways to render key names that were already present in ExtraKeysView. The available setting values are "arrows-only", "arrows-all", "all", "none" and "default". Other values will fallback to "default". Can be used as a workaround for termux#1410 * Support using modifier keys with letter keys in extra keys This allows you to use the modifier keys on the extra keys rows, e.g. ctrl, together with another button on the extra keys rows, as long as that button is a normal letter and not a special key. Support for special keys will come in the next commit. * Support using modifier keys with special keys in extra keys This allows you to use the modifier keys on the extra keys rows together with a special key on the extra keys rows, e.g. CTRL+LEFT. Fixes termux#745, fixes most of termux#895 and possibly termux#154 * Support mapping extra keys to other actions This adds a setting called extra-keys-map which allows you to map a key on the extra keys rows to another action. The value is a json object where the key is the button text as configured in extra-keys and the value is the action. Multiple actions can be used, but if they are special characters (like ESC or LEFT) they have to be separated from the other characters with a space on each side. If you want an actual space character, use SPACE. For example if you want to add a key to go to the next active channel in weechat, you can use this: extra-keys-map = {"weechat next": "ESC a"} And then add "weechat next" to extra-keys. The name can of course be whatever you want. Or if you want the button for the UP arrow to show ⇧ instead of ↑, you can use this: extra-keys-map = {"⇧": "UP"} And put "⇧" in extra-keys instead of "UP". Modifier keys (ctrl, alt and shift) can't be used in this map yet. Support for ctrl and alt will come in the next commit. I think this fixes termux#1186 * Support CTRL and ALT in extra keys map This allows you to use CTRL and ALT in extra-keys-map. For example if you want a button to exit the terminal, you can use this: extra-keys-map = {"exit": "CTRL d"} And add "exit" to extra-keys. * Support a KEYBOARD button in extra keys This toggles showing the keyboard input method. * Support specifying macro keys in the extra-keys option Instead of specifying macros in the separate extra-keys-map option by matching the key name in the two options, you can now use "macro" instead of "key" in extra-keys, and it will be a macro, i.e. a sequence of multiple keys separated by space. * Remove option extra-keys-map Now that you can specify macro in extra-keys, there is no point in having this separate option. Instead of specifying the value to display as key, and the macro to perform in extra-keys-map, you would now specify the value to display in the display property and the macro to perform in the macro property. * Lookup display text when creating ExtraKeyButton This will make it easier to support key aliases for macros in the next commit. * Add support for a key to open the drawer Fixes (I think) termux#1325
The `terminal-margin-horizontal` key can be used to adjust the terminal left/right margin and the `terminal-margin-vertical` can be used to adjust the terminal top/bottom margin. This will also affect drawer. The user can set an integer value between `0` and `100` as `dp` units. The default value is still `3` for horizontal and `0` for vertical margin. So adding an entry like `terminal-margin-horizontal=10` to `termux.properties` file will allow users to set a horizontal margin of `10dp`. After updating the value, either restart termux or run `termux-reload-settings` for changes to take effect. This was added since for some users text on edges would not be shown on the screen or they had screen protectors/cases that covered screen edges (Of course, that would require fixing every single app and android system UI itself, so kinda stupid to use). Moreover, horizontal margin of like `10dp` may be helpful with peek-and-slide for people having gesture navigation enabled on android `10+` since they won't be to touch at exactly the edge of the screen to trigger peek (termux#1325). Closes termux#2210
* Make popup keys for extra keys row configurable This makes the keys you get when swiping up on a key configurable. You can configure such a key by using an array of strings instead of a single string in the row. The first entry will be the normal key and the second will be the extra key. This is a slightly breaking change, as people that have configured custom extra keys with "-" or "/" will have to change the config to keep the popup keys. The default config will remain the same in terms of functionality, i.e. it includes the same popup key for "-". * Make popup keys interact well with long press keys This stops the repeat action when the popup is shown, and makes sure the popup is closed when you release even if there has been some repeat actions. * Support configuring the style of the extra keys This adds a setting for choosing between the different ways to render key names that were already present in ExtraKeysView. The available setting values are "arrows-only", "arrows-all", "all", "none" and "default". Other values will fallback to "default". Can be used as a workaround for termux#1410 * Support using modifier keys with letter keys in extra keys This allows you to use the modifier keys on the extra keys rows, e.g. ctrl, together with another button on the extra keys rows, as long as that button is a normal letter and not a special key. Support for special keys will come in the next commit. * Support using modifier keys with special keys in extra keys This allows you to use the modifier keys on the extra keys rows together with a special key on the extra keys rows, e.g. CTRL+LEFT. Fixes termux#745, fixes most of termux#895 and possibly termux#154 * Support mapping extra keys to other actions This adds a setting called extra-keys-map which allows you to map a key on the extra keys rows to another action. The value is a json object where the key is the button text as configured in extra-keys and the value is the action. Multiple actions can be used, but if they are special characters (like ESC or LEFT) they have to be separated from the other characters with a space on each side. If you want an actual space character, use SPACE. For example if you want to add a key to go to the next active channel in weechat, you can use this: extra-keys-map = {"weechat next": "ESC a"} And then add "weechat next" to extra-keys. The name can of course be whatever you want. Or if you want the button for the UP arrow to show ⇧ instead of ↑, you can use this: extra-keys-map = {"⇧": "UP"} And put "⇧" in extra-keys instead of "UP". Modifier keys (ctrl, alt and shift) can't be used in this map yet. Support for ctrl and alt will come in the next commit. I think this fixes termux#1186 * Support CTRL and ALT in extra keys map This allows you to use CTRL and ALT in extra-keys-map. For example if you want a button to exit the terminal, you can use this: extra-keys-map = {"exit": "CTRL d"} And add "exit" to extra-keys. * Support a KEYBOARD button in extra keys This toggles showing the keyboard input method. * Support specifying macro keys in the extra-keys option Instead of specifying macros in the separate extra-keys-map option by matching the key name in the two options, you can now use "macro" instead of "key" in extra-keys, and it will be a macro, i.e. a sequence of multiple keys separated by space. * Remove option extra-keys-map Now that you can specify macro in extra-keys, there is no point in having this separate option. Instead of specifying the value to display as key, and the macro to perform in extra-keys-map, you would now specify the value to display in the display property and the macro to perform in the macro property. * Lookup display text when creating ExtraKeyButton This will make it easier to support key aliases for macros in the next commit. * Add support for a key to open the drawer Fixes (I think) termux#1325
The `terminal-margin-horizontal` key can be used to adjust the terminal left/right margin and the `terminal-margin-vertical` can be used to adjust the terminal top/bottom margin. This will also affect drawer. The user can set an integer value between `0` and `100` as `dp` units. The default value is still `3` for horizontal and `0` for vertical margin. So adding an entry like `terminal-margin-horizontal=10` to `termux.properties` file will allow users to set a horizontal margin of `10dp`. After updating the value, either restart termux or run `termux-reload-settings` for changes to take effect. This was added since for some users text on edges would not be shown on the screen or they had screen protectors/cases that covered screen edges (Of course, that would require fixing every single app and android system UI itself, so kinda stupid to use). Moreover, horizontal margin of like `10dp` may be helpful with peek-and-slide for people having gesture navigation enabled on android `10+` since they won't be to touch at exactly the edge of the screen to trigger peek (termux#1325). Closes termux#2210
Problem description
Using a Pixel device, if you enable gesture navigation (which is the default on the new pixel 4) you can no longer swipe in from the left to get the session drawer. I haven't been able to isolate it but typically you only get the back gesture with some weird gestures sometimes getting the session drawer. When disabling gesture navigation it is very easy to open it.
Steps to reproduce
On Android 10, enable system gesture navigation then open Termux and try to swipe from the left to open the session drawer, you get the back gesture instead.
Expected behavior
Session drawer should be opened or there should be an option to open it via the long click menu
Additional information
The text was updated successfully, but these errors were encountered: