support long press and touch

This commit is contained in:
Brahim Hadriche committed 2023-11-15 16:22:22 -05:00
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: '',
})