/*********************************************************************/ var KEYBOARD_CONFIG = { 'Global bindings': { doc: 'NOTE: binding priority is the same as the order of sections '+ 'on this page.', pattern: '*', F4: { alt: doc('Close viewer', function(){ if(window.require != null){ require('nw.gui') .Window.get().close() return false } }), }, F5: doc('Full reload viewer', function(){ if(window.require != null){ require('nw.gui') .Window.get().reload() return false } }), F12: doc('Show devTools', function(){ if(window.require != null){ require('nw.gui') .Window.get().showDevTools() return false } }), }, 'Overlay mode.': { pattern: '.overlay', doc: '', ignore: '*', Esc: function(){ removeOverlay() return false }, }, 'Editor mode.': { pattern: '.editor:not(.inline-editor-mode)', doc: '', '0': function(){ var n = getPageNumber() if(togglePageView('?') == 'on'){ setMagazineScale(getPageTargetScale(1)) } else { setMagazineScale(getPageTargetScale(PAGES_IN_RIBBON)) } focusPage(n) }, Esc: '0', '=': function(){ var n = getPageNumber() setMagazineScale(Math.min( getMagazineScale() * 1.2, getPageTargetScale(1))) focusPage(n) }, '-': function(){ var n = getPageNumber() setMagazineScale(Math.max( getMagazineScale() * 0.8, getPageTargetScale(PAGES_IN_RIBBON*2))) focusPage(n) }, 'O': { // load... // XXX needs testing... 'ctrl': function(){ showInOverlay('
NOTE: this download will not include the actual '+ 'images. at this point, images should be added manually.
'+ '') // setup the data... $(generateMagazineDownload) }, }, // ? '/': function(){ showInOverlay('NOTE: this section is a stub.
'+ '
| C-O | Load issue from file. |
| C-S | Save issue to file. |
| - / + | Zoom out/in. |
| 0 | Set default zoom level. |