Normal behavior : if a certain key binding (say, Ctrl+w) is not bound in awesome globalkeys, it gets passed down to the active window. If an awesome awful.key is bound to this key, then awesome grabs the key press and does something with it.

What I'd like is to define an awesome keybinding that lets it pass to the active window, under certain conditions. For instance, I press C-w, if the active window is Chrome, then awesome passes it down and chrome closes a tab, but if it's any other sort of window, then awesome closes the window.

I'm asking about the "redirect the key press" part, how to do that in Lua, if at all possible ?

  • You could try xdotool. Independent from awesome, you can define an action regarding pressed key and focused window. The action can be "send this keypress to focused window". – mviereck Feb 27 '17 at 17:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.