Merge pull request #542 from npes87184/dev
Return success count in injectText
This commit is contained in:
commit
56f8e78f58
1 changed files with 5 additions and 3 deletions
|
@ -104,13 +104,15 @@ public class EventController {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean injectText(String text) {
|
private int injectText(String text) {
|
||||||
|
int successCount = 0;
|
||||||
for (char c : text.toCharArray()) {
|
for (char c : text.toCharArray()) {
|
||||||
if (!injectChar(c)) {
|
if (!injectChar(c)) {
|
||||||
return false;
|
continue;
|
||||||
}
|
}
|
||||||
|
successCount++;
|
||||||
}
|
}
|
||||||
return true;
|
return successCount;
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean injectMouse(int action, int buttons, Position position) {
|
private boolean injectMouse(int action, int buttons, Position position) {
|
||||||
|
|
Loading…
Reference in a new issue