Mailspring/internal_packages/composer/keymaps/composer.cson
Evan Morikawa 4f8366a772 refactor(keymaps): override-key-bindings instead of native-key-bindings
Summary: This diff essentially inverts the behavior of native-key-bindings. Instead of opting-in to native-key-bindings, they're applied UNLESS there's an override-key-bindings class. I think this may be a better solution for us since we don't often want to override behavior like Copy and Select All.

Test Plan: No new tests on this one...

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1124
2015-02-04 21:31:41 -05:00

33 lines
1.1 KiB
Plaintext

# We need the "input" specifier on the css class to have the specificity
# required to prevent the default `native!` behavior from happening.
# The default state. There's no input in the text field and there are no
# autocomplete suggestions
'.autocomplete input':
'backspace': 'native!'
'tab': 'native!'
',': 'native!'
# When the text in the input field looks like an emalil
'.autocomplete.autocomplete-looks-like-raw-email input':
'space': 'participants:add-raw-email'
# When there is some text in the input field, but we have no suggestion
'.autocomplete.autocomplete-no-suggestions input':
',': 'participants:add-raw-email'
'tab': 'participants:add-raw-email'
'enter': 'participants:add-raw-email'
'escape': 'participants:cancel'
# When we found a name to suggest
'.autocomplete.autocomplete-with-suggestion input':
',': 'participants:add-suggestion'
'tab': 'participants:add-suggestion'
'enter': 'participants:add-suggestion'
'up': 'participants:move-up'
'down': 'participants:move-down'
'escape': 'participants:cancel'
'.autocomplete.autocomplete-empty input':
'backspace': 'participants:remove'