diff --git a/ui (gen4)/lib/keyboard.js b/ui (gen4)/lib/keyboard.js index ee08f20d..2ef38551 100755 --- a/ui (gen4)/lib/keyboard.js +++ b/ui (gen4)/lib/keyboard.js @@ -300,6 +300,8 @@ function dropRepeatingkeys(handler, max_rate){ * XXX should action handler support event.stoppropagation()??? * ...at this point I'm not sure it is needed as it will not affect * the keyboard handlers, it will preven further JS event handlers... + * XXX this also supports the experimental 'ALL' key name that matches + * all the keys, needs more work, not for production use... */ var getKeyHandlers = module.getKeyHandlers = @@ -376,8 +378,11 @@ function getKeyHandlers(key, modifiers, keybindings, modes, shifted_keys, action modifiers = modifiers.replace(/\+?shift/i, '') } else if(chr in bindings){ var handler = bindings[chr] - } else { + } else if(key in bindings) { var handler = bindings[key] + // XXX experimental... + } else { + var handler = bindings['ALL'] } // alias... diff --git a/ui (gen4)/viewer.js b/ui (gen4)/viewer.js index 690f11d3..1edfc069 100755 --- a/ui (gen4)/viewer.js +++ b/ui (gen4)/viewer.js @@ -2309,6 +2309,11 @@ var drawer = require('lib/widget/drawer') // This will wrap the actions adding a contextual .preventClosing() method, // if called it will prevent the list from closing on open event and give // the user control over when to close the base list... +// +// XXX this may be a source for race conditions... +// scenario: +// - an action is run while a menu runs a state changing action +// - state restoration will overwrite the effects fo the BG action var makeActionLister = function(list, filter, pre_order){ pre_order = typeof(filter) == typeof(true) ? filter : pre_order filter = typeof(filter) == typeof(true) ? null : filter