fix: hotkeys back working

Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
2026-04-26 06:45:37 +02:00
parent 29922b8058
commit 8258b044b1
8 changed files with 93 additions and 3 deletions

View File

@@ -24,6 +24,10 @@ defmodule BDS.Desktop.Automation do
GenServer.call(session, {:click, selector}, @request_timeout)
end
def press(session, shortcut) when is_binary(shortcut) do
GenServer.call(session, {:press, shortcut}, @request_timeout)
end
def capture_screenshot(session, destination) when is_binary(destination) do
GenServer.call(session, {:capture_screenshot, destination}, @request_timeout)
end
@@ -78,6 +82,11 @@ defmodule BDS.Desktop.Automation do
{:reply, normalize_simple_reply(reply), state}
end
def handle_call({:press, shortcut}, _from, state) do
{reply, state} = driver_request(state, %{"command" => "press", "shortcut" => shortcut})
{:reply, normalize_simple_reply(reply), state}
end
def handle_call({:capture_screenshot, destination}, _from, state) do
File.mkdir_p!(Path.dirname(destination))