-
-
Notifications
You must be signed in to change notification settings - Fork 117
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
new pinned toolbar & history view keys long press functions #691
Conversation
more history view keys
This comment was marked as off-topic.
This comment was marked as off-topic.
This is again mixing a bunch of small and independent changes, making review harder... I updated the issue templates to hopefully make more clear that I dislike it. Other than that, I guess it's mostly fine.
|
const val NOT_SPECIFIED = -10008 // todo: not sure if there is need to have the "old" unspecified keyCode different, just test it and maybe merge | ||
const val NOT_SPECIFIED = -10010 // todo: not sure if there is need to have the "old" unspecified keyCode different, just test it and maybe merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually there is no need to have the NOT_SPECIFIED
code last, you can also just leave it at -10008
.
Though it would only be relevant if someone would use this code in a layout, which is quite unlikely.
Thank, though I think there might have been a little misunderstanding.
No, I think it should be fine. Especially because it's all in a separate commit. |
android:layout_height="0dp" | ||
android:layout_weight="1" /> | ||
</LinearLayout> | ||
android:visibility="gone" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you add android:visibility="gone"
? Is it necessary now for some reason?
Code looks good, I hope tomorrow I finally have time for an actual test. |
The PR mostly does what it intends to. I find undo / redo on the same key rather weird, but i can imagine it's really convenient 👍 I found two issues though:
I would not care about this. If you already get that many characters into a text field, you probably need to have so much memory that you can spare those 4 GB anyway. |
app/src/main/java/helium314/keyboard/keyboard/clipboard/ClipboardHistoryView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/helium314/keyboard/keyboard/internal/keyboard_parser/floris/KeyCode.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/helium314/keyboard/keyboard/clipboard/ClipboardHistoryView.kt
Outdated
Show resolved
Hide resolved
app/src/main/java/helium314/keyboard/latin/suggestions/SuggestionStripView.java
Outdated
Show resolved
Hide resolved
@@ -1524,6 +1524,7 @@ public void onTextInput(final String rawText) { | |||
mInputLogic.onTextInput(mSettings.getCurrent(), event, | |||
mKeyboardSwitcher.getKeyboardShiftMode(), mHandler); | |||
updateStateAfterInputTransaction(completeInputTransaction); | |||
mInputLogic.restartSuggestionsOnWordTouchedByCursor(mSettings.getCurrent(), mKeyboardSwitcher.getCurrentKeyboardScript()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, that's a nice improvement!
Everything working now! |
Fixes #686
I added new functions on long press (credit to @Roccobot for the idea):
The history view now has Up, Down, Undo, and One Handed Mode (fixes #513) keys to fill the blank space, and the long press functions are available there as well.
The Select All key has been removed to preserve space and because it is now possible to select all by long pressing the select word (you can also long press the copy key to select all + copy).
The "clear clipboard" key has been moved to avoid pressing it by accident when attempting to press the "close history" key, and in order to have the Cut key closer to the Select button.
Here are old history view keys:
and here is the new key layout:
I know there are plans to make the history view customizable in the future, but in the meantime I believe this should be sufficient for most people.
On a side note, the new copyAllText() that is triggered when long pressing the Copy key may copy up to Integer.MAX_VALUE * 4 bytes to memory which is a lot.
Is there a value that is more careful and still makes sense to achieve Copy All functionality ?
Note that the old copyText() used for Copy key (short press) may copy up to Integer.MAX_VALUE * 2 bytes to memory, which can also lead to memory issues if for some reason the current input field has a lot of text