-
Notifications
You must be signed in to change notification settings - Fork 155
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added new functionality to send any possible keyEvent returned functionality to toggle orientation using "third mouse button" temporally disabled some un-useful or buggy features. code refactored.
- Loading branch information
Showing
26 changed files
with
556 additions
and
422 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 9 additions & 3 deletions
12
src/com/github/xsavikx/android/screencast/api/command/KeyCommand.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,22 @@ | ||
package com.github.xsavikx.android.screencast.api.command; | ||
|
||
import com.github.xsavikx.android.screencast.api.injector.InputKeyEvent; | ||
|
||
public class KeyCommand extends InputCommand { | ||
private static final String COMMAND_FORMAT = INPUT + WHITESPACE + "keyevent %d"; | ||
private int keyCode; | ||
private int code; | ||
|
||
public KeyCommand(int keyCode) { | ||
this.keyCode = keyCode; | ||
this.code = keyCode; | ||
} | ||
|
||
public KeyCommand(InputKeyEvent inputKeyEvent) { | ||
code = inputKeyEvent.getCode(); | ||
} | ||
|
||
@Override | ||
public String getFormatedCommand() { | ||
return String.format(COMMAND_FORMAT, keyCode); | ||
return String.format(COMMAND_FORMAT, code); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -351,4 +351,5 @@ private static Set<InputKeyEvent> fillEventsWithKeyCodes(){ | |
return eventsWithKeyCodes; | ||
} | ||
|
||
|
||
} |
4 changes: 2 additions & 2 deletions
4
src/com/github/xsavikx/android/screencast/api/injector/KeyCodeConverter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.