Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Add keyevent for "home" key #87

Merged
merged 2 commits into from
Aug 25, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,6 @@ class Input extends AdbTask {
input('text', "$value")
}

void key(int code) {
input('keyevent', code)
}

void tap(int x, int y) {
input('touchscreen', 'tap', x, y)
}
Expand All @@ -22,15 +18,14 @@ class Input extends AdbTask {
input('touchscreen', 'swipe', startX, startY, endX, endY)
}

void enter() {
key 66
void key(int code) {
input('keyevent', code)
}

void tab() {
key 61
void home() {
key 3
}



void back() {
key 4
}
Expand All @@ -42,7 +37,7 @@ class Input extends AdbTask {
void down() {
key 20
}

void left() {
key 21
}
Expand All @@ -54,13 +49,21 @@ class Input extends AdbTask {
void power() {
key 26
}

void clear() {
key 28
}

void unlock() {
key 82
void tab() {
key 61
}

void enter() {
key 66
}

void clear() {
key 28
void unlock() {
key 82
}

private input(... values) {
Expand Down