Workaround plugins that steal the keyboard focus

There is a very long-standing bug in firefox that allows plugins (Flash, Acrobat, etc) to steal all of the keyboard shortcuts for the window. This is a simple workaround to return the keyboard focus to the top level window:

xdotool must be installed.

Alternative method (without xdotool)
For example, use Move Mouse to move mouse pointer to a safe location (any area with no links or embedded Flash elements), then call the function below to simulate a mouse click (that brings the focus back).

-- Simulate mouse click local function simulateClick root.fake_input("button_press", 1) root.fake_input("button_release", 1) end

-- Bind it to a key awful.key({ modkey, }, "n", function simulateClick end),