I like to send a shortcut for refreshing a tab to Firefox.
What I have:
What I have found / tryed:
pressing F5 on keyboard refrshing the active tab on active Firefox on active workspace
pressing Ctrl + R on keyboard refrshing the active tab on active Firefox on active workspace too Source: https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly?redirectslug=Keyboard+shortcuts&redirectlocale=en-US
it should be able to send F5 or Ctrl + R by xdotool to active tab on active Firefox on active workspace
What I tryed on terminal (dont get error message, a its looks for me, like i dont realy get a reload of webpage). It can be it send the output of terminal to the terminal and not to the firefox.:
xdotool key F5
xdotool key Ctrl + R
Question:
Remark and new knowledge:
now I have found the follow, which are able to reload the active a tab from Firefox Browser on Debian (dont know it works on other Browser too)
dont know on this time it works on more than one browser on one or more workspaces and how to use this for one specific workspace, like run this on terminal or bash on workspace 2 and use it for one or more than one Firefox on workspace one.
xdotool search --onlyvisible --classname Navigator windowactivate --sync key F5
Now I changed the code from MarcoLucidi a little bit. Now it reload a a active tab (can be on active browser on workspace 1 ). I will test tomorrow a little bit. See the follow:
xdotool key --window "$(xdotool search --classname Navigator | head -1)" F5
"The fact that xdotool doesn't seem to work is probably related to applications detecting and discarding synthesized events:
Sending keystrokes to a specific window uses a different API than simply typing to the active window.
[...]
Many programs observe this flag and reject these events."
Source: Automatic web-page refresh using xdotool - not sending key after window focus
"With that in mind I was able to make it work with the series of commands below. This reloads both Chromium and Firefox.
cwid=$(xdotool getwindowfocus) # Save the current window
twid=$(xdotool search --name somename)
xdotool windowactivate $twid
sleep 0.1 # The key event might be sent before the window has been fully activated
xdotool key --window $twid F5
xdotool windowactivate $cwid # Done, now go back to where we were
" Source: Automatic web-page refresh using xdotool - not sending key after window focus