From 7f60d5d3dbf745bbf122cf79ade62b4e31840bc2 Mon Sep 17 00:00:00 2001 From: elenapan Date: Mon, 23 Mar 2020 13:02:07 +0200 Subject: [PATCH] Implement helpers for sending keys to clients --- config/awesome/helpers.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/config/awesome/helpers.lua b/config/awesome/helpers.lua index 7928cb3..1cec539 100644 --- a/config/awesome/helpers.lua +++ b/config/awesome/helpers.lua @@ -337,6 +337,14 @@ function helpers.screenshot(action, delay) end +function helpers.send_key(c, key) + awful.spawn.with_shell("xdotool key --window "..tostring(c.window).." "..key) +end + +function helpers.send_key_sequence(c, seq) + awful.spawn.with_shell("xdotool type --delay 5 --window "..tostring(c.window).." "..seq) +end + function helpers.fake_escape() root.fake_input('key_press', "Escape") root.fake_input('key_release', "Escape")