mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-05-16 15:02:48 +00:00
Add long press functions to more toolbar keys, and more clipboard history toolbar keys (#691)
Co-authored-by: codokie <@>
This commit is contained in:
parent
6bb49ee1a0
commit
83fc10ff02
9 changed files with 99 additions and 47 deletions
|
@ -653,9 +653,12 @@ public final class RichInputConnection implements PrivateCommandPerformer {
|
|||
mIC.setSelection(mExpectedSelStart - range.getNumberOfCharsInWordBeforeCursor(), mExpectedSelStart + range.getNumberOfCharsInWordAfterCursor());
|
||||
}
|
||||
|
||||
public void copyText() {
|
||||
// copy selected text, and if nothing is selected copy the whole text
|
||||
CharSequence text = getSelectedText(InputConnection.GET_TEXT_WITH_STYLES);
|
||||
public void copyText(final boolean getSelection) {
|
||||
CharSequence text = "";
|
||||
if (getSelection) {
|
||||
// copy selected text, and if nothing is selected copy the whole text
|
||||
text = getSelectedText(InputConnection.GET_TEXT_WITH_STYLES);
|
||||
}
|
||||
if (text == null || text.length() == 0) {
|
||||
// we have no selection, get the whole text
|
||||
final ExtractedTextRequest etr = new ExtractedTextRequest();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue