Back to Wails

global-shortcuts

v3/examples/global-shortcuts/README.md

2.13.0805 B
Original Source

global-shortcuts

This example demonstrates how to use the global shortcuts API to register system-wide keyboard shortcuts that fire even when the application is not focused.

Press Ctrl+Shift+G (Cmd+Shift+G on macOS) from any application to bring the window to the front, and Ctrl+Shift+H (Cmd+Shift+H) to hide it. The example also shows that registering the same shortcut twice is rejected.

Status

PlatformStatus
MacWorking (Carbon hot keys)
WindowsWorking (RegisterHotKey)
Linux X11Working (XGrabKey)
Linux WaylandImplemented via the XDG global shortcuts portal. Requires a desktop that provides the portal (recent GNOME or KDE Plasma). On Wayland the compositor, and ultimately the user, chooses the final key binding.