mirror of
https://github.com/elenapan/dotfiles.git
synced 2026-03-01 00:17:34 +08:00
Implement helpers for sending keys to clients
This commit is contained in:
parent
89ab17ff06
commit
7f60d5d3db
1 changed files with 8 additions and 0 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue