Automatic web-page refresh using xdotool - not sending key after window focus

前端 未结 7 1005
清歌不尽
清歌不尽 2020-12-31 23:52

Given:

I have Firefox with the [Firefox Page Title] page open on my Ubuntu computer.

Here is my command:

7条回答
  •  抹茶落季
    2021-01-01 00:23

    For me, the following works:

    xdotool search --onlyvisible --class Firefox key F5
    

    as well as

    { 
       xdotool search --onlyvisible --class Firefox windowfocus
       sleep 0.1
       xdotool key ctrl+r
    }
    

    but

    xdotool search --onlyvisible --class Firefox key ctrl+r
    

    and

    xdotool search --onlyvisible --class Firefox windowfocus key ctrl+r
    

    do not work.

    So it seems that using a key combo with modifiers requires a little delay, at least with Firefox (I can send ctrl-keys to Emacs with no such issues, however).

提交回复
热议问题