Remove some shortcuts due to conflicts, read #252

This commit is contained in:
the-djmaze 2022-03-02 09:26:30 +01:00
parent 4250dcf3f0
commit 096faae844
8 changed files with 18 additions and 40 deletions

View file

@ -11,7 +11,7 @@ import {
SetSystemFoldersNotification
} from 'Common/EnumsUser';
import { inFocus, pInt, isArray, arrayLength, forEachObjectEntry } from 'Common/Utils';
import { pInt, isArray, arrayLength, forEachObjectEntry } from 'Common/Utils';
import { initFullscreen } from 'Common/UtilsUser';
import { encodeHtml, HtmlEditor, htmlToPlain } from 'Common/Html';
import { koArrayWithDestroy } from 'External/ko';
@ -1197,14 +1197,6 @@ export class ComposePopupView extends AbstractViewPopup {
}
}
popupMenu(event) {
if (event.ctrlKey || event.metaKey || 'ContextMenu' == event.key
|| (this.oEditor && !this.oEditor.hasFocus() && !inFocus())) {
this.identitiesDropdownTrigger(true);
return false;
}
}
onBuild(dom) {
// initUploader
const oJua = new Jua({
@ -1326,8 +1318,10 @@ export class ComposePopupView extends AbstractViewPopup {
shortcuts.add('q', 'meta', ScopeCompose, ()=>false);
shortcuts.add('w', 'meta', ScopeCompose, ()=>false);
shortcuts.add('contextmenu', '', ScopeCompose, e => this.popupMenu(e));
shortcuts.add('m', 'meta', ScopeCompose, e => this.popupMenu(e));
shortcuts.add('m', 'meta', ScopeCompose, () => {
this.identitiesDropdownTrigger(true);
return false;
});
shortcuts.add('arrowdown', 'meta', ScopeCompose, () => {
this.skipCommand();

View file

@ -24,7 +24,7 @@ import {
fireEvent
} from 'Common/Globals';
import { arrayLength, inFocus } from 'Common/Utils';
import { arrayLength } from 'Common/Utils';
import { download, mailToHelper, showMessageComposer, initFullscreen } from 'Common/UtilsUser';
import { SMAudio } from 'Common/Audio';
@ -333,12 +333,12 @@ export class MailMessageView extends AbstractViewRight {
}
});
keyScopeReal.subscribe(value => this.messageDomFocused(Scope.MessageView === value && !inFocus()));
keyScopeReal.subscribe(value => this.messageDomFocused(Scope.MessageView === value));
// initShortcuts
// exit fullscreen, back
shortcuts.add('escape,backspace', '', Scope.MessageView, () => {
shortcuts.add('escape', '', Scope.MessageView, () => {
if (!this.viewModelDom.hidden && currentMessage()) {
const preview = SettingsUserStore.usePreviewPane();
if (this.fullScreenMode()) {

View file

@ -125,7 +125,7 @@ export class SystemDropDownUserView extends AbstractViewRight {
}
onBuild() {
shortcuts.add('m,contextmenu', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
shortcuts.add('m', '', [Scope.MessageList, Scope.MessageView, Scope.Settings], () => {
if (!this.viewModelDom.hidden) {
MessageUserStore.fullScreen(false);
this.accountMenuDropdownTrigger(true);