1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

esc to show preview when rightclick to toggle set

This commit is contained in:
Rokt33r
2016-01-19 18:58:27 +09:00
parent fb8a2eb2e0
commit da0222f213
3 changed files with 12 additions and 1 deletions

View File

@@ -87,7 +87,11 @@ export default class CodeEditor extends React.Component {
name: 'Focus title',
bindKey: {win: 'Esc', mac: 'Esc'},
exec: function (editor, e) {
remote.getCurrentWebContents().send('list-focus')
let currentWindow = remote.getCurrentWebContents()
if (config['switch-preview'] === 'rightclick') {
currentWindow.send('detail-preview')
}
currentWindow.send('list-focus')
},
readOnly: true
})