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

[Feature request] An Enter key that works like other Android keyboards #879

Open
tenextractor opened this issue Jan 18, 2025 · 7 comments
Open

Comments

@tenextractor
Copy link
Contributor

The current keycode enter sends the message in applications like Discord. This causes messages to be accidentally sent.
The current keycode \n does not send messages, but enters a literal \n character in browser URL/search boxes instead of going to the entered URL/searching.

I want an Enter key that works like other Android keyboards, which adds a newline in messaging applications and triggers search in browsers. This behavior was implemented in my keyboard as follows:
ctx.sendKeyChar('\n'), where ctx is an InputMethodService.

I request a new keycode (maybe called smart_enter) that implements this behavior. I would have contributed and made a PR for this, but for some reason, I couldn't get this keyboard to build in Android Studio.

@ChiefMikeK
Copy link

@ChiefMikeK
Copy link

Image

@Spike-from-NH
Copy link
Contributor

Last mentioned in #822. Is there, or could there be, a keyword that makes a gesture send \n?

@tenextractor
Copy link
Contributor Author

@ChiefMikeK As I've said, \n does not satisfy my requirement.

@Spike-from-NH
Copy link
Contributor

Then let me say: Is there, or could there be, a keyword that makes a gesture send newline? What happens when you press Ctrl j?

@Julow
Copy link
Owner

Julow commented Jan 25, 2025

Is your original issue specific to Discord ? I've found that this is due to a bug in the app that I've fixed in e1191f3.
Could you try it ? The debug build is at the end of this page: https://github.com/Julow/Unexpected-Keyboard/actions/runs/12968910453

@tenextractor
Copy link
Contributor Author

@Julow Thanks, I have tested the debug apk and it solves the issue.

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

No branches or pull requests

4 participants