-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Extra keys conversion to agnosticism #2237
Extra keys conversion to agnosticism #2237
Conversation
The termux `extra-keys` have been moved to `termux-shared` library so that they can be imported and used by other apps for their own needs as long as they comply with GPLv3 license. Almost everything is customizable and has no dependency on termux specific logic. Check the javadocs of files of `com.termux.shared.terminal.io.extrakeys` package for more info, specially, `ExtraKeysView`, `ExtraKeysInfo`, `ExtraKeyButton`, `TerminalExtraKeys` and `TermuxTerminalExtraKeys`. Moreover, you can now long hold on `CTRL`, `ALT`, `SHIFT` and `FN` to lock those control keys. They will not be released when you press another key and will only be released by pressing the respective control key again. Closes termux#2049, Closes termux#1861
…operties values are empty
Can't find info on why it wasn't being read before
Thanks for that @agnostic-apollo I will be working on it soon and will let you know about that👍👍 |
Well.. for your information.. I will be working on it here |
This reverts commit 296ee60 We do not need to bump to compileSdkVersion 31 currently, since I have decided not to bump `androidx.window` to `1.0.0-alpha10` or higher currently, since it has changed APIs and ViewUtils will break. https://developer.android.com/jetpack/androidx/releases/window Moreover, bumping compileSdkVersion to 31 requires openjdk 11 in build environment, which will break Jitpack library build and possibly still F-Droid as well, unless changes are made. https://gitlab.com/fdroid/fdroiddata/-/issues/2441 jitpack/jitpack.io#4474 https://jitpack.io/docs/BUILDING/#java-version Also in android studio stub files are loaded when opening class sources since android 12 sources aren't available.
You are welcome. Jitpack build was failing, which failed yours. Is fixed now. |
Thanks 👍 lemme rerun the CI |
Well.. is there any way an app can read termux-app's Sharedpreferences set in |
What program do you use to test or work with keys |
Used I can be wrong, but it appears that
In Termux it produces nothing.
|
@xeffyr Whether Key My goal is to minimize the finger work and if In between I've also checked on my SM-P610 device (shot) and get |
Video appears to be about older Termux version. I'm asking specifically about this pull request and only about behavior of software keyboard and extra keys row. |
Right - the PR was closed yesterday and treated Since no one suffers from the confusing behavior or has not such a tablet device, it is still unchanged and probably remains so until other users suffer from it too. |
@suhan-paradkar That file stores https://github.com/termux/termux-app/wiki/RUN_COMMAND-Intent |
Ah.. thanks... |
@agnostic-apollo again - Do you also get Termux crash when tapping on |
…pening Also fixed NullPointerException due to changes in 2a74d43
The user can add `disable-hardware-keyboard-shortcuts=true` entry to `termux.properties` file to disable hardware keyboard shortcuts. The default value is `false`. Running `termux-reload-settings` command will also update the behaviour instantaneously if changed. Note that for `ctrl+alt+p` to work, you need to unset `shortcut.rename-session = ctrl + n`. https://wiki.termux.com/wiki/Terminal_Settings Closes termux#1825
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
…yboards and added docs for keyboard key characters mapping
…er in non-gboard keyboards
Yes, that has been fixed in 16c56a9
Should what be so? EK don't float...
I didn't get you. Once a macro has started, it can't be stopped by pressing another key. Auto-repeat will automatically cancel once you lift the finger. I have added docs with the details for behaviour in 994df1c.
I have added a proof of concept for custom key mapping for software and hardware keyboards in d9c7c8b that also supports escape sequences but currently requires root to modify
For more info on
They are likely using different |
Was related to the shot above - 1:41 in video. I have created it with two devices. Maybe you understand better, what I mean, the EK line disappears several times in the first 17 seconds and can not be used! 17Mb is a bit too big for Github - so video is here. |
There is no internal logic for keyboard button that would cause switching of extra key to text input mode. My guess is that when you press the button or swipe up, you also have some right to left movement in your fingers that triggers a fling, which then causes the switch. The |
I am merging this since no other issue has been raised. |
Exactly that I mean! The movement can also be done from left to right. The main thing is less than 50% of the length remains at the end. After the popup has been selected (up) this is no longer possible and the decision for one of the two alternatives can no longer be revised. |
The |
Thanks for the hint. @suhan-paradkar had already noticed that and I hope he find a solution - done in between! For some of my EK buttons, this is easily possible by switching in fling after press, even if it is not completed (<50%). Back then does not work and after popup no more. two Examples with
Most Extra-Keys could be common in Termux and X11 except X11/TUX-Toggle and this is not needet in Split/floating mode. |
…sion-to-agnosticism Extra keys conversion to agnosticism and disabling hardware keyboard shortcuts and terminal margin customization support
…sion-to-agnosticism Extra keys conversion to agnosticism and disabling hardware keyboard shortcuts and terminal margin customization support
extra-keys
have been moved totermux-shared
library so that they can be imported and used by other apps for their own needs as long as they comply withGPLv3
license.CTRL
,ALT
,SHIFT
andFN
to lock those control keys. They will not be released when you press another key and will only be released by pressing the respective control key again.SHIFT
orSHFT
.FN
extra key is read by the terminal.@suhan-paradkar let me know if some design change needs to be made for https://github.com/suhan-paradkar/termux-wayland. Check commits and javadocs for more details, there should be enough info to get it working.
implementation 'com.github.agnostic-apollo:termux-app:extra-keys-conversion-to-agnosticism-SNAPSHOT'
Someone on debug builds should "ideally" also test this before I merge, I have tested and seems to be working fine on my Android
7
device.