diff --git a/ui (gen4)/features/keyboard.js b/ui (gen4)/features/keyboard.js index 11d4649a..f7db5b21 100755 --- a/ui (gen4)/features/keyboard.js +++ b/ui (gen4)/features/keyboard.js @@ -994,6 +994,7 @@ var KeyboardUIActions = actions.Actions({ .attr({ 'mode': mode, 'code': action, + 'action': o.action, 'doc': doc.trim() != '' ? doc : (kb.special_handlers[action] @@ -1072,6 +1073,16 @@ var KeyboardUIActions = actions.Actions({ ].join(' '), }) + // handle '?' button to browse path... + dialog.showDoc = function(){ + var action = dialog.select('!').attr('action') + action + && that.showDoc(action) + } + // clone the bindings so as not to mess up the global browser... + dialog.keybindings = JSON.parse(JSON.stringify(dialog.keybindings)) + dialog.keyboard.handler('General', '?', 'showDoc') + return dialog })], // XXX do we need a bindings to add new keys to current mode from the @@ -1203,6 +1214,20 @@ var KeyboardUIActions = actions.Actions({ && dialog.select(to_select) to_select = null }) + + dialog.newKey = function(){ + that.editKeyBinding(this.select('!').attr('mode') + || Object.keys(that.keybindings)[0]) } + dialog.newMode = function(){ + that.editKeyboardMode() } + + // clone the bindings so as not to mess up the global browser... + dialog.keybindings = JSON.parse(JSON.stringify(dialog.keybindings)) + dialog.keyboard + .handler('General', 'N', 'newKey') + .handler('General', 'K', 'newKey') + .handler('General', 'M', 'newMode') + return dialog })], // XXX add action completion... (???) @@ -1255,6 +1280,11 @@ var KeyboardUIActions = actions.Actions({ dialog.close() }, }) + + dialog.dom.attr({ + 'dialog-title': 'Action picker...', + 'keep-dialog-title': true, + }) }], ], }) @@ -1316,6 +1346,14 @@ var KeyboardUIActions = actions.Actions({ && callback.call(that, code) }) + dialog.abort = function(){ + abort = true + this.close() + } + dialog.keybindings = JSON.parse(JSON.stringify(dialog.keybindings)) + dialog.keyboard + .handler('General', 'Q', 'abort') + return dialog })], editKeyboardMode: ['- Interface/Mode...', @@ -1392,6 +1430,14 @@ var KeyboardUIActions = actions.Actions({ && callback.call(that, mode) }) + dialog.abort = function(){ + abort = true + this.close() + } + dialog.keybindings = JSON.parse(JSON.stringify(dialog.keybindings)) + dialog.keyboard + .handler('General', 'Q', 'abort') + return dialog })], editKeyboardModeDroppedKeys: ['- Interface/Dropped keys...', @@ -1400,7 +1446,7 @@ var KeyboardUIActions = actions.Actions({ var abort = false var drop = (that.keybindings[mode].drop || []).slice() - return browse.makeLister(null, + var dialog = browse.makeLister(null, function(path, make){ var drop_all @@ -1446,6 +1492,16 @@ var KeyboardUIActions = actions.Actions({ that.keybindings[mode].drop = drop } }) + + dialog.abort = function(){ + abort = true + this.close() + } + dialog.keybindings = JSON.parse(JSON.stringify(dialog.keybindings)) + dialog.keyboard + .handler('General', 'Q', 'abort') + + return dialog })], diff --git a/ui (gen4)/features/ui-widgets.js b/ui (gen4)/features/ui-widgets.js index aebf3d00..84059c1c 100755 --- a/ui (gen4)/features/ui-widgets.js +++ b/ui (gen4)/features/ui-widgets.js @@ -1179,7 +1179,6 @@ var BrowseActionsActions = actions.Actions({ dialog.keybindings = JSON.parse(JSON.stringify(dialog.keybindings)) dialog.keyboard.handler('General', '?', 'showDoc') - return dialog })],