support long press and touch
This commit is contained in:
1 parent
dca3e42c79
commit
d89b1c519d
3 files changed
+79
-14
No files matched your search
@@ -2,14 +2,24 @@ import { getIp } from "./Host";
|
||||
|
||||
export class ExternalControlProtocol {
|
||||
static async launchApp(appId) {
|
||||
console.log("Launching app", appId)
|
||||
return fetch(`http://${getIp()}:8060/launch/${appId}`, {
|
||||
method: 'POST',
|
||||
body: '',
|
||||
})
|
||||
}
|
||||
|
||||
static async pressKey(key) {
|
||||
return fetch(`http://${getIp()}:8060/keypress/${key}`, {
|
||||
static async pressKeyUp(key) {
|
||||
console.log("Pressing key up", key)
|
||||
return fetch(`http://${getIp()}:8060/keyup/${key}`, {
|
||||
method: 'POST',
|
||||
body: '',
|
||||
})
|
||||
}
|
||||
|
||||
static async pressKeyDown(key) {
|
||||
console.log("Pressing key down", key)
|
||||
return fetch(`http://${getIp()}:8060/keydown/${key}`, {
|
||||
method: 'POST',
|
||||
body: '',
|
||||
})
|
||||
|
||||
Reference in new issue
Block a user