diff --git a/src/window.coffee b/src/window.coffee index c1dcf8142..309eadbcc 100644 --- a/src/window.coffee +++ b/src/window.coffee @@ -41,6 +41,16 @@ window.setUpEnvironment = (windowMode) -> window.pasteboard = new Pasteboard window.keymap = new Keymap() + +# Set up the default event handlers and menus for a non-editor windows. +# +# This can be used by packages to have a minimum level of keybindings and +# menus available when not using the standard editor window. +window.setUpDefaultEvents = -> + windowEventHandler = new WindowEventHandler + keymap.loadBundledKeymaps() + ipc.sendChannel 'update-application-menu', keymap.keystrokesByCommandForSelector('body') + # This method is only called when opening a real application window window.startEditorWindow = -> installAtomCommand()