Mailspring/keymaps/base.cson

110 lines
4.1 KiB
Text
Raw Normal View History

# This is the core set of universal, cross-platform keymaps. This is
# extended in the following places:
#
# 1. keymaps/base.cson - (This file) Core, universal keymaps across all platforms
# 2. keymaps/base-darwin.cson - Any universal mac-only keymaps
# 3. keymaps/base-win32.cson - Any universal windows-only keymaps
# 4. keymaps/base-darwin.cson - Any universal linux-only keymaps
# 5. keymaps/templates/Gmail.cson - Gmail key bindings for all platforms
# 6. keymaps/templates/Outlook.cson - Outlook key bindings for all platforms
# 7. keymaps/templates/Apple Mail.cson - Mac Mail key bindings for all platforms
# 8. some/package/keymaps/package.cson - Keymaps for a specific package
# 9. ~/.nylas/keymap.cson - Custom user-specific overrides
#
# NOTE: We have a special N1 extension called `cmdctrl` that automatically
# uses `cmd` on mac and `ctrl` on windows and linux. This covers most
# cross-platform cases. For truely platform-specific features, use the
# platform keymap extensions.
'body':
### Core system commands. ###
# These have their default effects, but map to
# commands to allow for custom interactions.
'cmdctrl-z': 'core:undo'
'cmdctrl-Z': 'core:redo'
'cmdctrl-y': 'core:redo'
'shift-delete': 'core:cut'
'cmdctrl-x': 'core:cut'
'cmdctrl-c': 'core:copy'
'cmdctrl-v': 'core:paste'
'cmdctrl-shift-v': 'core:paste-and-match-style'
'cmdctrl-a': 'core:select-all'
'up' : 'core:previous-item'
'down' : 'core:next-item'
'left' : 'core:move-left'
'right' : 'core:move-right'
'shift-up' : 'core:select-up'
'shift-down' : 'core:select-down'
'shift-left' : 'core:select-left'
'shift-right': 'core:select-right'
### Core application commands. ###
'cmdctrl-q' : 'application:quit'
'cmdctrl-w' : 'window:close'
'cmdctrl-p' : 'application:print-thread'
### Universal N1 commands. ###
feat(thread-list): Multiple selection, bulk actions, refactoring Summary: This diff provides multi-selection in the thread list powered by a new ModelList component that implements selection on top of ListTabular (or soon another List component). It includes business logic for single selection, shift selection, command-click selection, etc. This diff also improves the performance of DatabaseView by assessing whether updates are required based on specific database changes and skipping queries in many scenarios. WIP WIP Move selection into modelView instead of store WIP Preparing to convert to ModelList mixin Make ThreadStore => ThreadListStore Break the DraftStore in two (new DraftListStore) to avoid keeping all drafts in all windows Get rid of unread instance variable in favor of getter that falls through to isUnread() Much smarter logic in DatabaseView to prevent needless queries (especially counts and full invalidation of retained range) Squashed commit of the following: commit 486516b540e659735675765ca8b20d8a107ee2a9 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 17:30:23 2015 -0700 Invalidate the retained range debounced commit 7ac80403f52d108696c555f79c4c687d969f0228 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 17:30:16 2015 -0700 Wait until after the view updates to move focus commit 88d66eb19a9710847ff98bea22045bb686f30cc6 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 17:28:01 2015 -0700 Bail out early when loading data if a reload has been requested commit a49bedc44687040f7c675ff298376917a0b5fdcb Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:38:58 2015 -0700 Log query data when in a query is being logged commit c64a9e02f9072fd30edb98c45be581d6ac00c48a Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:38:45 2015 -0700 Mark thread and messages as read in parallel instead of in sequence commit 4b227100a795e20257cda0d60b00cc75b0000b0f Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:38:32 2015 -0700 Don't load tags with hardcoded IDs from the database, and load them in parallel instead of in sequence commit aeb7f1d646786cfa1c247fe78ce5467da07c4446 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:37:54 2015 -0700 Pass objects instead of ids to thread methods—since we always have the most current thread anyway, this makes things a bit faster commit e70889d1d05ece81a081b8b3f27b62491429b6f9 Author: Ben Gotow <bengotow@gmail.com> Date: Mon Apr 6 16:41:49 2015 -0700 [icon] Paper airplanes Restyle account sidebar, optimize tag count queries a bit more Fix initialization issue with webkit image mask Can't compare dates with is/isnt Assets for check boxes Bug fixes Wrap ModelList instead of providing props Verbose mode for database view Fix existing specs Six new specs covering invalidateIfItemsInconsistent Test Plan: Run 40+ new tests Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1410
2015-04-09 10:25:00 +08:00
'enter' : 'core:focus-item'
'delete' : 'core:remove-from-view'
'escape' : 'application:pop-sheet'
'backspace': 'core:remove-from-view'
'cmdctrl-,': 'application:open-preferences'
'pageup' : 'core:messages-page-up'
'pagedown' : 'core:messages-page-down'
'shift-pageup' : 'core:list-page-up'
'shift-pagedown': 'core:list-page-down'
'cmdctrl-1': 'application:select-account-0'
'cmdctrl-2': 'application:select-account-1'
'cmdctrl-3': 'application:select-account-2'
'cmdctrl-4': 'application:select-account-3'
'cmdctrl-5': 'application:select-account-4'
'cmdctrl-6': 'application:select-account-5'
'cmdctrl-7': 'application:select-account-6'
'cmdctrl-8': 'application:select-account-7'
'cmdctrl-9': 'application:select-account-8'
### N1 developer commands. ###
'cmdctrl-alt-l': 'window:reload'
'cmdctrl-alt-i': 'window:toggle-dev-tools'
'cmdctrl-alt-w': 'application:show-work-window'
'cmdctrl-alt-s': 'application:run-all-specs'
'cmdctrl-alt-p': 'application:run-package-specs'
'body *[contenteditable].contenteditable':
### Basic formatting commands ###
'cmdctrl-u': 'contenteditable:underline'
'cmdctrl-b': 'contenteditable:bold'
'cmdctrl-i': 'contenteditable:italic'
'cmdctrl-k': 'contenteditable:insert-link'
### Advanced formatting commands ###
'cmdctrl-&': 'contenteditable:numbered-list'
'cmdctrl-#': 'contenteditable:numbered-list'
'cmdctrl-*': 'contenteditable:bulleted-list'
'cmdctrl-(': 'contenteditable:quote'
'cmdctrl-[': 'contenteditable:outdent'
'cmdctrl-]': 'contenteditable:indent'
'cmdctrl-L': 'contenteditable:align-left'
'cmdctrl-E': 'contenteditable:align-center'
'cmdctrl-R': 'contenteditable:align-right'
'cmdctrl-,': 'contenteditable:set-right-to-left'
'cmdctrl-.': 'contenteditable:set-left-to-right'
'cmdctrl-\\': 'contenteditable:remove-formatting'
'cmdctrl-%': 'contenteditable:previous-font'
'cmdctrl-^': 'contenteditable:next-font'
'cmdctrl-+': 'contenteditable:increase-text-size'
'cmdctrl--': 'contenteditable:decrease-text-size'
### Custom Property Navigating ###
'cmdctrl-;': 'contenteditable:previous-selection'
"cmdctrl-'": 'contenteditable:next-selection'
'cmdctrl-m': 'contenteditable:open-spelling-suggestions'