mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-30 12:39:20 +03:00
Improved keyboard shortcuts handling
This commit is contained in:
parent
5f21fcc100
commit
2a6a1ff799
7 changed files with 58 additions and 77 deletions
|
|
@ -1213,8 +1213,8 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
shortcuts.add('q', 'meta', Scope.Compose, ()=>false);
|
||||
shortcuts.add('w', 'meta', Scope.Compose, ()=>false);
|
||||
|
||||
shortcuts.add('m,contextmenu', '', Scope.Compose, e => this.popupMenu(e));
|
||||
shortcuts.add('m', 'ctrl', Scope.Compose, e => this.popupMenu(e));
|
||||
shortcuts.add('contextmenu', '', Scope.Compose, e => this.popupMenu(e));
|
||||
shortcuts.add('m', 'meta', Scope.Compose, e => this.popupMenu(e));
|
||||
|
||||
shortcuts.add('escape,close', '', Scope.Compose, () => {
|
||||
this.skipCommand();
|
||||
|
|
@ -1229,7 +1229,7 @@ class ComposePopupView extends AbstractViewPopup {
|
|||
this.saveCommand();
|
||||
return false;
|
||||
});
|
||||
shortcuts.add('save', Scope.Compose, () => {
|
||||
shortcuts.add('save', '', Scope.Compose, () => {
|
||||
this.saveCommand();
|
||||
return false;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -2,9 +2,10 @@ import { Scope } from 'Common/Enums';
|
|||
|
||||
import { AbstractViewPopup } from 'Knoin/AbstractViews';
|
||||
|
||||
class KeyboardShortcutsHelpPopupView extends AbstractViewPopup {
|
||||
export class KeyboardShortcutsHelpPopupView extends AbstractViewPopup {
|
||||
constructor() {
|
||||
super('KeyboardShortcutsHelp');
|
||||
this.metaKey = shortcuts.getMetaKey();
|
||||
}
|
||||
|
||||
onBuild(dom) {
|
||||
|
|
@ -49,5 +50,3 @@ class KeyboardShortcutsHelpPopupView extends AbstractViewPopup {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
export { KeyboardShortcutsHelpPopupView, KeyboardShortcutsHelpPopupView as default };
|
||||
|
|
|
|||
|
|
@ -99,9 +99,8 @@ class PluginPopupView extends AbstractViewPopup {
|
|||
shortcuts.add('escape', '', Scope.All, () => {
|
||||
if (this.modalVisibility()) {
|
||||
this.tryToClosePopup();
|
||||
return false;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue