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

Commit

Permalink
Reorder key events by code
Browse files Browse the repository at this point in the history
Making it easier to spot missing keycodes
  • Loading branch information
stefanhoth committed Aug 25, 2015
1 parent 20fc645 commit e47c383
Showing 1 changed file with 18 additions and 18 deletions.
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,14 +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 @@ -41,7 +37,7 @@ class Input extends AdbTask {
void down() {
key 20
}

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

void unlock() {
key 82
}


void clear() {
key 28
}

void tab() {
key 61
}

void home() {
key 3
void enter() {
key 66
}

void unlock() {
key 82
}

private input(... values) {
Expand Down

0 comments on commit e47c383

Please sign in to comment.