1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-23 06:31:51 +00:00

added shortcut for toggle mode

This commit is contained in:
Nguyễn Việt Hưng
2018-05-18 10:52:42 +07:00
parent c9cb31bd02
commit fb24efd3de
2 changed files with 11 additions and 0 deletions

View File

@@ -9,6 +9,7 @@ import { syncHistoryWithStore } from 'react-router-redux'
require('./lib/ipcClient')
require('../lib/customMeta')
import i18n from 'browser/lib/i18n'
import ee from 'browser/main/lib/eventEmitter'
const electron = require('electron')
@@ -63,6 +64,12 @@ document.addEventListener('keyup', function (e) {
}
})
document.addEventListener('keydown', function(e) {
if (e.key === 'm' && e.ctrlKey) {
ee.emit('topbar:togglemodebutton')
}
});
document.addEventListener('click', function (e) {
const className = e.target.className
if (!className && typeof (className) !== 'string') return