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

Fix #304: Improve Utils.autoCapitalizeCheck #890

Merged
merged 1 commit into from
May 14, 2024

Conversation

mpsijm
Copy link
Contributor

@mpsijm mpsijm commented May 11, 2024

Instead of manually reading the getTextBeforeCursor, use IMEService.currentInputConnection.getCursorCapsMode to detect whether auto-capitalization should happen.
This fixes #304, where terminal emulator apps like Termux, JuiceSSH, KDE Connect, etc., which provide an empty input connection to Thumb-Key, would always be auto-capitalized.

@mpsijm mpsijm requested a review from dessalines as a code owner May 11, 2024 11:03
@mpsijm mpsijm mentioned this pull request May 11, 2024
Instead of manually reading the `getTextBeforeCursor`,
use `IMEService.currentInputConnection.getCursorCapsMode`
to detect whether auto-capitalization should happen.
This fixes dessalines#304, where terminal emulator apps like Termux, JuiceSSH,
KDE Connect, etc., which provide an empty input connection to Thumb-Key,
would always be auto-capitalized.
@mpsijm mpsijm force-pushed the 304-improve-auto-capitalize branch from ddbe326 to 7d5d556 Compare May 11, 2024 11:11
Copy link
Owner

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you test this? Termux still has the same issues.

@mpsijm
Copy link
Contributor Author

mpsijm commented May 14, 2024

I tested this in JuiceSSH, and it works there 🙂 Too bad that it doesn't work in Termux, but this fix would help me 😇 This is a screenrec using a dev version of Thumb-Key compiled from this branch:

Screen_Recording_20240514_090030_JuiceSSH.mp4

Before this fix, every letter would be capitalized.

EDIT: Can also confirm that Termux still capitalizes every letter, even with this fix. I'd almost say that Termux incorrectly sets the "caps mode". But then other keyboards should have the same problem, which is not the case (tested FlickBoard, Kii Keyboard, and Samsung Keyboard) 😛

Copy link
Owner

@dessalines dessalines left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge because it at least fixes it for juicessh then. Thx for this.

@dessalines dessalines merged commit 7fe8190 into dessalines:main May 14, 2024
1 check passed
@mpsijm mpsijm deleted the 304-improve-auto-capitalize branch May 14, 2024 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bugs in Termux
2 participants