mirror of
https://codeberg.org/PLG-Development/PLG-MuDiCS
synced 2026-07-06 08:57:09 +00:00
chore(control): change to new keyboard_input api
This commit is contained in:
@@ -22,12 +22,12 @@ export async function open_file(ip: string, path_to_file: string): Promise<void>
|
||||
await request_display(ip, get_sanitized_file_url(path_to_file), options);
|
||||
}
|
||||
|
||||
export async function send_keyboard_input(ip: string, key: string): Promise<void> {
|
||||
export async function send_keyboard_input(ip: string, inputs: { key: string; action: 'press' | 'release'}[]): Promise<void> {
|
||||
const options = {
|
||||
method: 'PATCH',
|
||||
headers: { 'content-type': 'application/json' },
|
||||
body: JSON.stringify({
|
||||
key: key
|
||||
inputs
|
||||
})
|
||||
};
|
||||
await request_display(ip, '/keyboardInput', options);
|
||||
|
||||
Reference in New Issue
Block a user