Skip to content
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

USB-C Yubikey device disables on-screen keyboard #1995

Closed
cmosetick opened this issue Apr 6, 2021 · 25 comments
Closed

USB-C Yubikey device disables on-screen keyboard #1995

cmosetick opened this issue Apr 6, 2021 · 25 comments
Labels
bug report inactive Issue has had no response from users for a certain time period Keyboard

Comments

@cmosetick
Copy link

Hello and thank you for this excellent project.

I am a part-time security researcher and tester.
I have recently been doing some research on Android and found Termux to be helpful.
However, I have been road blocked by a USB issue with my testing device.
Please note that the Android device is NOT heavily customized.
So I am looking for other people that can reproduce and confirm the issue I describe below.
If several people are not able to reproduce this issue, then I am happy to consider it invalid.

Problem description
Inserting a Yubikey USB device into USB-C port on Android handset disables on-screen keyboard within Termux Application.
Device Tested: Yubikey 5Ci

NOTE - I do not see this issue with other applications while a Yubikey USB device is plugged into the same handset.
(i.e. the on-screen keyboard works normal and as expected in all other applications I have tested.)

NOTE: Inserting a regular USB-C mass storage device does not make the keyboard disappear!
Device Tested: A regular SanDisk USB-C flash disk formatted with a couple partitions.

Steps to reproduce

  • Plug in a Yubikey device into USB-C port of Android Handset.
  • You will immediately see the regular on-screen keyboard within Termux App disappear.
  • Tapping on the screen does not make on-screen keyboard re-appear.
  • I have not found a way to make on-screen keyboard re-appear.

Expected behavior

  • Android on-screen keyboard does not disappear.
    OR
  • There is a way to make on-screen keyboard come back and be usable even with Yubikey plugged into device.

Additional information

  • Termux application version: 0.108 installed via F-Droid. (same bug experienced with previous Play Store version)
  • Android OS version: 10
  • Linux Kernel version: 4.14.141-20190226
  • Device model: Samsung Galaxy

Please note that the Yubikey USB device works perfectly fine with @Yubico yubioath-android App on the same device.
(installed via Play Store)

CC:

@Grimler91
Copy link
Member

Thanks for the detailed report.

The yubikey identifies as a keyboard so that is why termux thinks you are using an external keyboard (and do not need the soft-keyboard).

It used to be possible to show the keyboard by pressing keyboard in the left drawer, but this apparently does not work anymore now that I tried it

@cmosetick
Copy link
Author

Hi @Grimler91, Thanks for the link regarding the Yubikey being identified as a keyboard. As I mentioned in my original report, Termux is the only application I have installed on the device that has this issue with disappearing + not able to return on-screen keyboard.

At least, I can not find any other applications.
Various note taking applications, web browsers, etc. etc., all have functioning keyboards with the device plugged in.

Additionally some applications IF open already when the Yubikey is plugged in, make the keyboard go away.
BUT, they let me tap on the screen of the Application, and then the on-screen keyboard comes back with no issues.

As you mentioned above, it seems like there should be a way to force the Termux on-screen keyboard to open by tapping something within Termux.

@agnostic-apollo
Copy link
Member

It's weird that it's working for other apps, but when you connect the yubikey and open termux, there might be a notification shown to select input method, it may have a toggle to enable soft keyboard. Or check Language and Input in android settings.

Otherwise try following with adb. Some phones like Xiaomi have additional options in Developer Options to disallow granting secure settings permission, so if the command doesn't work, check those toggle as well, although don't think following commands would be prohibited.

# get the value
adb shell settings get secure show_ime_with_hard_keyboard

#set the value
adb shell settings put secure show_ime_with_hard_keyboard 1

@codebam
Copy link

codebam commented Apr 15, 2021

This isn't a bug in Termux but rather an Android "feature". You need to pull down your navbar and switch back to your default on-screen keyboard from the notification. The Yubikey identifies itself as a keyboard to Android. This happens for me in all apps until I switch back from the notification

Edit: status bar, not navbar

@cmosetick
Copy link
Author

@codebam What is navbar?

@agnostic-apollo
Copy link
Member

agnostic-apollo commented Apr 22, 2021

He means the status bar at the top of android UI (navbar is the bottom one). While the keyboard is being used by an app, a notification is shown in the notifications list to Select Input Method, it might have a toggle to enable/disable soft keyboard or probably change keyboard in your case. If the toggle isn't there, then it should be in Language and Input section of Android Settings. If its not in either places, try to use the adb method mentioned. The toggle will probably only show when a hardware keyboard is attached. For android avd, there is a Keyboard Button instead of a notification.

@TPS
Copy link

TPS commented May 7, 2021

Related to #1634?

@agnostic-apollo
Copy link
Member

agnostic-apollo commented May 7, 2021

Can you guys check if 4d1851e solves the issue. The debug build apk is available here. Note that you won't be able to install the apk if you are using F-Droid or Play Store builds. Check https://github.com/termux/termux-app#installation. If you can't reinstall, then wait for new update to be pushed to F-Droid. Thanks.

How to reproduce changes

Prerequisites:

  1. Attach usb keyboard
  2. Disable Show on-screen keyboard while hardware keyboard is attached toggle in Android Language and Input settings.
  3. Install HackerKeyboard, and enable Show soft keyboard(always) toggle in HackerKeyboard settings.

Termux v0.112:

  1. Start Termux -> keybaord will not automatically show
  2. Press KEYBOARD toggle in drawer. -> keybaord will not show/toggle
  3. Press KEYBOARD toggle in extra keys. -> keybaord will show/toggle

Termux artifact:

  1. Start Termux -> keybaord will automatically show
  2. Press KEYBOARD toggle in drawer. -> keybaord will show/toggle
  3. Press KEYBOARD toggle in extra keys. -> keybaord will show/toggle

I have test with Android 7 device with usb otg keyboard and android 11 avd and everything is working as mentioned above.

Moreover, now soft keyboard might show when Show on-screen keyboard while hardware keyboard is attached toggle in Android Language and Input settings is enabled and a hardware keyboard is attached, which is an issue for some phones. (Untested)

@RalfWerner
Copy link

RalfWerner commented May 8, 2021

Thanks for the answer to:

I've checked*) your artifact with OS-KB-Toggle update, but no changes found. What should change in which configurations?
*) On Android 10 and 11 AVD emulators with PC-KB=External-KB and SM-P610 (Android 11) with BT-KB. This device can also be operated with PC-KB when the screen is mirrored (scrcpy) to PC. In both cases, PC-KB has no influence on OS-KB Toggling. All checks described in 1953 ff ... are unchanged.

Toggling only with KEYBOARD (extra key) still does not work!

  1. Start Termux -> keybaord will ... 2. Press KEYBOARD toggle in drawer.

I use hide-soft-keyboard-on-startup=true in *.properties - OS-KB should always not show! 2. is the same as 3. but in 2 steps
Hackers KB I've used for years on all my real devices, but not on AVD, since PC-KB can be used here. However, I prefer to use Floating KB, if possible (Swift, Gboard, Samsung). Differences I could not determine between the various OS-KB, except floating at some.
I also tested now on my Huawei (Android 8) with your Artifact and USB-KB. The result is like SM-P610 with BT-KB, except the disabling only with 2 or 7 steps is possible. In both cases, on both devices with the KEYBOARD Extra Key OS-KB can not be switched on again.

... and android 11 avd and everything is working as mentioned above.

What did you use as a second KB in the emulation? The PC-KB has no interaction with the Termux settings for me!

@agnostic-apollo
Copy link
Member

Well, I have pushed some more commits in order to attempt to fix soft keyboards not opening in some cases. Not sure if this will solve the issue for some specific devices where soft keyboard doesn't open if hardware keyboard is attached, since I can't reproduce that in LG G5 android 7 device and android 10 and 11 AVDs. You can grab the debug build APK from here. If soft keyboard doesn't open automatically, try using the KEYBOARD toggle button in drawer or extra keys now and see if that works. If it still doesn't, then someone who has this issue with their device, who has knowledge of android logcat, can use debug builds and can communicate properly, should contact me, and we can try to fix the issue if possible.

I have also added support for soft-keyboard-toggle-behaviour termux.properties property which can be used to change the default behaviour of KEYBOARD toggle buttons from show/hide to enable/disable. You can add the line soft-keyboard-toggle-behaviour=enable/disable to termux.properties and then run termux-reload-settings. This will make the keyboard toggle buttons to disable (and hide) the keyboard and tapping on the terminal view will not open the keybaord automatically, until the keyboard toggle button is pressed again manually. This has been tested on android 7 device, android 10 and 11 AVDs, including split screen and floating keyboard and is working for all cases. (e4e638b)

@agnostic-apollo
Copy link
Member

Toggling only with KEYBOARD (extra key) still does not work!

Are you trying to show/hide soft keyboard or enable/disable it? Working fine on my AVD, even on previous artifact, even though its behaviour was not changed from v0.112 39c69db

I use hide-soft-keyboard-on-startup=true in *.properties - OS-KB should always not show!

That got broken in previous artifact, should be fixed now.

However, I prefer to use Floating KB, if possible (Swift, Gboard, Samsung)

If hardware keyboard is connected, and Show on-screen keyboard while hardware keyboard is attached toggle in Android Language and Input settings is disabled, these keyboards would not show. At least Gboard does not and there is no setting for it in Gboard settings. Only HackerKeyboard has Show soft keyboard (always) setting. Termux can't fix this. Only keyboard app can change this behaviour.

disabling only with 2 or 7 steps is possible.

Disabling has been implemented now, check above.

What did you use as a second KB in the emulation?

Laptop keyboard as hardware, GBoard/HackerKeybaord as software.

The PC-KB has no interaction with the Termux settings for me!

I have no idea what you mean. Termux has no setting for hardware keyboards.

@Grimler91
Copy link
Member

@agnostic-apollo it works as intended with Show soft keyboard enabled, and soft-keyboard-toggle-behaviour = show/hide or soft-keyboard-toggle-behaviour = enable/disable does what it advertises, nice work.

There's one bug when rotating the screen on my galaxy s8, LOS 17.1, when Show soft keyboard is off.
If I start without keyboard in landscape, attach the keyboard and rotate the screen and then try to toggle the keyboard, then termux only fills half the screen, see this screen recording.

A logcat from termux does not show anything related.

@agnostic-apollo
Copy link
Member

Great. Welcome.

Hmmm, this could be tricky. I can't seem to reproduce it on my LG G5. Moreover, set log level to Verbose, then it will show termux internal keyboard related log entries. You can even run logcat command in termux logcat | grep -iE "TermuxTerminalViewClient|keyboard" for termux internal logging or sudo logcat | grep -iE "TermuxTerminalViewClient|keyboard" if you want to include android os logcat logs too if you have root. Although, internal ones are not likely to be helpful for this. Did this happen in v0.112 as well or just in the artifacts? But this does seem like a ROM bug, it's likely related to SOFT_INPUT_ADJUST_RESIZE which pushes up the view when keyboard is opened instead of the keyboard opening on top of the view (hiding stuff). If the Show soft keyboard toggle was off, then this resizing shouldn't happen. It seems resizing does, but keyboard is never opened since its not supposed to. What happens if you change behaviour of keyboard toggle to enable/disable? Hopefully, that doesn't cause the issue.

@RalfWerner
Copy link

Thanks for the 464 modifications of yesterday and one new source (now 197). The hide-soft-keyboard-on-startup works again - thanks also! First, two shots from my SM-P610! In the first, is Termux (extra keys below), the OS-KB-selection, parts of this issue and part of the floating transparent OS-KB above.
grafik

I have no idea what you mean. Termux has no setting for hardware keyboards.

The question was what you've used for AVD as external KB for testing. In the case of my BT-KB on SM-P610, this is the same hardware but is treated differently by Termux, as well as USB and scrcpy. The KEYBORD Extra Keys is still do nothing, when it is disabled (Shot 2). But that was previously the same, even when BT was decoupled. Again to:

Toggling only with KEYBOARD (extra key) still does not work!

My wish would be, the toggling with extra key but always and only works (independent of USB/BT). Currently, I mainy use it to turn off the OS-KB, which appears with most termux Screen Touches. With Hackers KB, this is even more difficult because it is not transparent and takes about 60% of the screens so the complete screen is toggeling.

@agnostic-apollo
Copy link
Member

agnostic-apollo commented May 10, 2021

By default, if Shot 2 toggle is disabled, soft keyboard will never show, not even with keyboard toggle buttons in drawer and in extra keys, even HackerKeyboard will not show. If you add soft-keyboard-toggle-behaviour=enable/disable property, then it will show in latest artifact. Your wish is also solved by this. Read my comments above, have mentioned this twice and in commit messages.

@RalfWerner
Copy link

RalfWerner commented May 10, 2021

I tried all the settings by *properties and menus. The case: "OS-KB only with Extra Key" I could not achieve a hiring. Maybe it is only my device, that PiP can. So, for example, when changing from Github Picture to the Termux Picture always the OS-KB is displayed or with disable never, no matter what I'm trying. On this device it is hard to prevent that constantly that OS-KB appears. More cases of "unwanted OS-KB display" (done on Huawei - you can check this too) are:

  • long tap (Copy Paste More) in termux but a bit too short
  • try to sweep-scroll-up/down (e.g. one line) but too less

Special disable effect, when Split (horizontal) screen is used (e.g Github/browser+Termux): A half KB is displayed in Github-Screen, when Toggeling (Extra key) in Termux-Screen but unusable in termux even not in vertical position.
grafik

[~]$ cat .termux/termux.properties
extra-keys-style=arrows-all
shortcut.next-session=ctrl+n
hide-soft-keyboard-on-startup=true
soft-keyboard-toggle-behaviour=disable
enforce-char-based-input=true
extra-keys=[[{macro:CTRL,display:'^',popup:{macro:'CTRL d',display:d}},TAB,{key:LEFT,popup:BKSP},{key:RIGHT,popup:{macro:'o ENTER',display:off}},  {key: UP,popup:PGUP},{key:DOWN,popup:PGDN},{key:ENTER,popup:{macro:'CTRL n',display:'next'}},  {key:KEYBOARD,popup:DRAWER},{macro:'mc SPACE i ENTER',display:mc,popup:F10},{display:X11,macro:'t SPACE 0 ENTER',  popup:{macro:'ob ENTER',display:OB}}]]

current state of my *.properties - but toggeling is not disabled - what is wrong?

@agnostic-apollo
Copy link
Member

agnostic-apollo commented May 11, 2021

By default when you open termux it automatically takes focus of terminal view and opens soft keyboard. When soft keybaord is closed, like with back button, you can tap on terminal view to open keyboard too.

If hide-soft-keyboard-on-startup=true is set, then when termux is opened or switched back from another app from recents menu, focus is not automatically taken and soft keyboard is not opened. This does not work with PIP, when you tap on termux app box, you are not selecting the termux app but focusing/tapping on the terminal view inside termux app which opens keyboard. The only way to prevent this is to disable the keyboard, either from Termux Settings or keyboard button toggles with soft-keyboard-toggle-behaviour=enable/disable property set. With split screen if you tap termux in recents menu to switch to termux app (termux on bottom), keyboard will not open, but if you tap on termux app box (termux on top) keyboard will open.

soft-keyboard-toggle-behaviour=disable

That is invalid value. There are only two valid values: soft-keyboard-toggle-behaviour=show/hide and soft-keyboard-toggle-behaviour=enable/disable

@Grimler91
Copy link
Member

Here's a (root) logcat. Only message from termux (except for keyevent messages, since I enabled that as well) are V Termux:TermuxTerminalViewClient: Showing/Hiding soft keyboard on toggle when I try to toggle the keyboard.

Did this happen in v0.112 as well or just in the artifacts? But this does seem like a ROM bug, it's likely related to SOFT_INPUT_ADJUST_RESIZE which pushes up the view when keyboard is opened instead of the keyboard opening on top of the view (hiding stuff).

I get the same on termux v0.108, LOS 18.1, on another device, so feels like a LOS bug and not really a termux issue. Here's a screenshot from the other device (the "dead" area is smaller):

Screenshot_20210511-195128_Termux

If the Show soft keyboard toggle was off, then this resizing shouldn't happen. It seems resizing does, but keyboard is never opened since its not supposed to. What happens if you change behaviour of keyboard toggle to enable/disable? Hopefully, that doesn't cause the issue.

With enable/disable I can toggle the "dead" area (as in the video). With show/hide the "dead" area is always there (after rotating from landscape to portrait), toggling then does not seem to do anything.

@RalfWerner
Copy link

RalfWerner commented May 12, 2021

... There Are Only Two Valid Values: soft-keyboard-toggle-behavior=show/hide and *=enable/disable

OK thanks! Only with enable/disable, I can reach my desired behavior but only without BT-KB. The Values ​​are not interchangeable, as far as I've checked. Any incorrect spelling or swap as hide/show makes something else (no error message). The Settings Shot2 (step 5 of 7) are thus changed but also with every KEYBOARD application. This also relyed when the file *.properties is changed and with termux-reload-settings or New Session (DRAWER popup over KEYBORAD above) and applies to all sessions. The session toggle (NEXT popup over ENTER above) often leads to the state that no KB works anymore!
Long Tap on KEYBOARD in the Drawer dazzles Extra Keys and thus the KB Toggle.

What do you think of the Solution: All devices with PiP (should belonging to Android 11 but is not in AVD) use as default *=enable/disable and hide*=true, if Extra Keys are displayed with KEYBOARD - do not need the two properties (lines 3+4 above)?

@agnoistc-apollo some weeks ago, we discussed about X11. Mainly related to the Keyboard Toggle and possible common OS-KB features. I use almost exclusively the X11 plugin with Xwayland and Xvnc (2nd choice) for comparison only, as it has significant advantages. As well as sshd, the X11/WM start/toggle belongs to me to the termux start - see ps/Extra keys in Shot.
In your TermuxConstants I have not discovered anything from the X11 plugin. Could you take a look at it?

agnostic-apollo added a commit that referenced this issue May 14, 2021
…rd is connected

Users can enable this behaviour by enabling the `Termux Settings` -> `Keyboard I/O` -> `Soft Keyboard Only If No Hardware` toggle.

Currently, for this case, soft keyboard will be disabled on Termux app startup and when switching back from another app. Soft keyboard can be temporarily enabled in show/hide soft keyboard toggle behaviour with keyboard toggle buttons and will continue to work when tapping on terminal view for opening and back button for closing, until Termux app is switched to another app. After returning back, keyboard will be disabled until toggle is pressed again.

This also may help for the Lineage OS bug where blank space is shown where soft keyboard should be if "Show soft keyboard" toggle in "Language and Input" is disabled. Check KeyboardUtils.shouldSoftKeyboardBeDisabled() and #1995 (comment) for details.

The `TermuxPreferenceConstants` class has been updated to `v0.10.0`. Check its Changelog sections for info on changes.
@agnostic-apollo
Copy link
Member

agnostic-apollo commented May 14, 2021

@Grimler91 Well the os logs don't show anything related, but thanks!

Yeah, likely is a LOS issue, maybe report that. As far as solving it from Termux side is concerned, I am not sure if its possible directly. You see, in Android, there is/was no official isKeyboardOpen() API, the best you could do is check if the height of the specific view in your app does not match the screen height or its hardcoded height, since keyboard will take some of it, but that of course doesn't work in PIP/split screen/floating keyboard. API 30 has finally introduced an API, which I implemented but didn't use, since doesn't work in android 7 at least. An I'm not sure, but the API likely uses similar view related calculations to decide if keyboard is open.

Anyways, in your case, if we use the above ways, I don't think there is a reliable way to differentiate between keyboard open and taking space vs keyboard not open but blank space being taken. The best I could do considering you have confirmed that enable/disable is working, is to add another option in Termux Settings for Disable soft keyboard only if hardware keyboard attached. That should be helpful for other use cases as well. I have added that in 90c9a7b, which details its behaviour. Let me know how it goes and if it has any issues.

@RalfWerner
Copy link

Thanks for the adjustments @agnostic-apollo. I considered this initially "formally". It increases the number of sources from 197 to 205. The adjustment from @fornwall to 200 and both together should contain 208. merge conflicts I've not discovered and the v112 works identical (checked yesterday) so I recommend merge now to avoid the problems of Android 10 branch and it could solve the $nl problem. Your gradlew.bat update change nothing but git works differently on windows/linux (see here)!

I did not get feedback yet to what you've used for AVD as external KB for testing and common OS-KB features ... from the X11 plugin. Could you take a look at it

If I have complete the check your changes on my devices, I'll contact you again - thanks so far :)

@agnostic-apollo
Copy link
Member

@RalfWerner

The Values ​​are not interchangeable, as far as I've checked. Any incorrect spelling or swap as hide/show makes something else

Would you also like some German language combinations to be supported as well?

(no error message)

Errors are currently not thrown. At verbose log level, the values that are loaded are logged. Some updates and design changes need to be made in future to support setting termux.properties from Termux Settings, so will fix in that.

All devices with PiP (should belonging to Android 11 but is not in AVD) use as default =enable/disable and hide=true

Very complicated logic and no special need for it anyway since user can easily configure in couple of minutes. They will also complain about different behaviour from normal.

In your TermuxConstants I have not discovered anything from the X11 plugin. Could you take a look at it?

No specific usage of X11 plugin in termux and it was never released officially.

Your gradlew.bat update change nothing but git works differently on windows/linux

It wouldn't change behaviour on windows since that's controlled by gitattributes. It just fixes an issue of gradlew.bat marked as modified automatically after git clone on some old version of git, like people on Ubuntu 16.04 who are using the archived apt repo http://us.archive.ubuntu.com for installing git which is currently still at v2.7.4-0ubuntu1.10 from/based on 2016, issue may occur on other distros as well which are at old git versions. Although for ubuntu, git PPA can be manually added to get currently latest git v2.31.1.

@RalfWerner
Copy link

RalfWerner commented May 15, 2021

Would you also like some German language combinations to be supported as well? ... made in future

No thank you I understand English pretty well! With spelling I meant typo or writing mistakes. ... so it comes - nice.

It just fixes an issue of gradlew.bat marked as modified

I use WSL forgit clone and CMD forcall gradlew * (every line would be supplemented by<cr>) - no matter,it's just touch

Very complicated logic and no special need for it anyway since user can easily configure in couple of minutes.

The behavior (constant unmotivated OS-KB) I has only noticed with my new SM-P610 device (tablet) as a problem and it does not occur with other apps. With the current *.properties possibilities, also working on the mobile phones is improved.
grafik
Shot to: "but only without BT-KB" above. By this setting, I expected to be able to display OS-KB with the KEYBOARD Extra Key even when BT-KB is coupled. The setting now requires 9 (previously 7) Steps. I checked all 4 possibilities. Unfortunately, it did not work.

They (termux user) will also complain about different behaviour from normal.

Defaults should only be changed if KEYBOARD is described and displayed. This is currently always a user action. They may also realized that float (PIP) is not needed in Termux because it is already part of Android for almost all apps and request a solution as described here. With AVD, that (and BT/USB-KB) can not be checked but that's why you have asked for cooperation.

No specific usage of X11 plugin in termux and it was never released officially.

Does that mean you will not take a look at it, although it is the best XServer? You said nothing about external KB at AVD, so I suspect that does not test that either and also nothing to my recommend merge now so I assume you will not

@RalfWerner
Copy link

RalfWerner commented May 18, 2021

Addendum to the shot above

and OS-KB Toggle with BT-KB. I have another video (1:14 without sound <10MB) created on this topic. It shows the screen of the pad and the phones with which the pad was recorded. The Phone (TeamViewer) has a delay, so that the movements/actions appear slightly offset.

toggle.mp4

Exactly here are three KB with scrcpy and the BT-Toggle (you call the PC-KB Hardware-KB). Termux here is starting in Picture and X11 behind it as full screen. This video is a supplement to the 1st (at begin with 13 unwanted OS-KB display) and created with v113. There is a solution but only with the Android Settings (german dialog 0:33 on my SM-P610), even if it is quite complicated. The Termux settings have no influence on it but will changed (1:10) without my actions (0:58). I do not seem to understand the meaning of the 2nd choice.
All KB can also be used in X11. The Toggle functions differs but is not treated in this video. If you are interested in, I could it addendum - do you are?

@agnostic-apollo
Copy link
Member

@cmosetick Does the issue still happen with changes in recent termux versions? Current F-Droid version is v0.116.

Issue should be closed if its fixed.

@agnostic-apollo agnostic-apollo added the inactive Issue has had no response from users for a certain time period label Aug 22, 2021
AdamMickiewich pushed a commit to VolyaTeam/dzida-app that referenced this issue Aug 8, 2022
…rd is connected

Users can enable this behaviour by enabling the `Termux Settings` -> `Keyboard I/O` -> `Soft Keyboard Only If No Hardware` toggle.

Currently, for this case, soft keyboard will be disabled on Termux app startup and when switching back from another app. Soft keyboard can be temporarily enabled in show/hide soft keyboard toggle behaviour with keyboard toggle buttons and will continue to work when tapping on terminal view for opening and back button for closing, until Termux app is switched to another app. After returning back, keyboard will be disabled until toggle is pressed again.

This also may help for the Lineage OS bug where blank space is shown where soft keyboard should be if "Show soft keyboard" toggle in "Language and Input" is disabled. Check KeyboardUtils.shouldSoftKeyboardBeDisabled() and termux#1995 (comment) for details.

The `TermuxPreferenceConstants` class has been updated to `v0.10.0`. Check its Changelog sections for info on changes.
shrihankp pushed a commit to reisxd/termux-app that referenced this issue Oct 20, 2022
…rd is connected

Users can enable this behaviour by enabling the `Termux Settings` -> `Keyboard I/O` -> `Soft Keyboard Only If No Hardware` toggle.

Currently, for this case, soft keyboard will be disabled on Termux app startup and when switching back from another app. Soft keyboard can be temporarily enabled in show/hide soft keyboard toggle behaviour with keyboard toggle buttons and will continue to work when tapping on terminal view for opening and back button for closing, until Termux app is switched to another app. After returning back, keyboard will be disabled until toggle is pressed again.

This also may help for the Lineage OS bug where blank space is shown where soft keyboard should be if "Show soft keyboard" toggle in "Language and Input" is disabled. Check KeyboardUtils.shouldSoftKeyboardBeDisabled() and termux#1995 (comment) for details.

The `TermuxPreferenceConstants` class has been updated to `v0.10.0`. Check its Changelog sections for info on changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug report inactive Issue has had no response from users for a certain time period Keyboard
Projects
None yet
Development

No branches or pull requests

6 participants