import { KeyboardKeys } from "components/kbd.slint"; // The keyboard shortcuts Settings lists. Handlers bind these same values, so // the page can only show keys that work. `Control` is Command on Apple // platforms and `Meta` is Control there. export global Shortcuts { out property compose: @keys(Control + N); out property search: @keys(Control + K); out property search-alternate: @keys(Slash); out property archive: @keys(A); out property spam: @keys(J); // Mac keyboards label Backspace "delete", and Apple Mail trashes with it. out property trash: KeyboardKeys.apple ? @keys(Backspace) : @keys(Delete); // Outlook's and Evolution's keys for moving and copying mail to a // folder. out property move-to: @keys(Control + Shift + V); out property copy-to: @keys(Control + Shift + Y); // Thunderbird's key for Edit As New Message. out property edit-as-new: @keys(Control + E); // Thunderbird's keys: F5 checks the accounts in view, Shift+F5 every // account. Apple Mail checks every account with Shift-Command-N. out property check-mail: @keys(F5); out property check-all-mail: @keys(Shift + F5); out property check-all-mail-alternate: @keys(Control + Shift + N); out property previous-message: @keys(UpArrow); out property next-message: @keys(DownArrow); out property open-message: @keys(Return); out property select-message: @keys(Space); out property switch-pane: @keys(F6); out property find: @keys(Control + F); out property zoom-in: @keys(Control + Plus); // Plus is Shift+= on many layouts; browsers zoom on Control+= as well. out property zoom-in-alternate: @keys(Control + Equals); out property zoom-out: @keys(Control + HyphenMinus); out property zoom-reset: @keys(Control + Digit0); out property caret-browsing: @keys(F7); // Tab keys work while typing, so src/tabs.rs handles them before Slint // sees the event. A test there checks these values against it. out property new-tab: @keys(Control + T); out property close-tab: @keys(Control + W); out property reopen-tab: @keys(Control + Shift + T); // Tabs cycle with the Control key on every platform, as in Safari. out property next-tab: KeyboardKeys.apple ? @keys(Meta + Tab) : @keys(Control + Tab); out property previous-tab: KeyboardKeys.apple ? @keys(Meta + Shift + Tab) : @keys(Control + Shift + Tab); out property first-tab: @keys(Control + Digit1); out property eighth-tab: @keys(Control + Digit8); out property last-tab: @keys(Control + Digit9); // GNOME's and KDE's key for quitting. src/window_chrome.rs handles it on // Linux desktops, and Settings lists it only there. out property quit: @keys(Control + Q); }