I am currently using several dozen keyboard shortcuts in xfce4 using xbindkeys. I want to switch to Wayland though for window management.

Question: Does xbindkeys work in Wayland? If not, how does one configure keyboard shortcuts in Wayland? Is there an easy way to transplant a keyboard setup from X to Wayland?

3 Answers 3


I've been trying to find out more about the possibilities for global keybindings in Wayland, but have seen mostly found inconsistent or incomplete information. xbindkeys will not work in Wayland, except (maybe) for X applications, which use an instance of X Server running as a Wayland client. Because the creators of Wayland are emphasizing greater security and compartmentalization of applications, there's been some resistance to enabling inter-client communication (such as that between xbindkeys and the focused window or the window manager, etc). Not sure exactly how it is/will be implemented, but I think it would involve privileging certain applications to send messages indirectly through the compositor (Weston or other). Could be wrong about that. Regardless, the Wayland API will be different, and thus require new keybinding programs. As of a couple months ago, it didn't appear any had been developed, and I'm not sure it had been settled how that sort of IPC would be handled. Let me know if you find anything.


This is not a port of xbindkeys, but I think it provides similar functionality. Sadly the sway wiki does not really mention it but it is in the man 5 sway

mode <mode>
    Switches to the specified mode. The default mode is default.

mode [--pango_markup] <mode> <mode-subcommands...>
    The only valid mode-subcommands... are bindsym, bindcode, bindswitch, and set. If --pango_markup is
    given, then mode will be interpreted as pango markup.

it is also mentioned in the Arch Linux wiki Control swaynag with the keyboard and in at least one issue 'mode --pango_markup' compatibility).

I believe it works the same way that the i3 config does. I will be testing it soon. The i3 manual Binding modes section looks like the best source for learning to use this feature


Not directly migrating the config, but for wayland I dropped my xbindkeys and switched to evdev described here https://unix.stackexchange.com/a/587975/18775

  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference. Aug 25 at 13:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .