I've read and followed YUI's tutorial for subscribing to Menu events. I also looked through the API and bits of the code for Menu, MenuBar, and Custom Events, but the following refuses to work
// oMenuBar is a MenuBar instance with submenus
var buyMenu = oMenuBar.getSubmenus()[1];
// this works
buyMenu.subscribe('show', onShow, {foo: 'bar'}, false);
// using the subscribe method doesn't work
buyMenu.subscribe('mouseOver', onMouseOver, {foo: 'bar'}, false);
// manually attaching a listener doesn't work
YAHOO.util.Event.addListener(buyMenu, 'mouseOver', onMouseOver);
// http://developer.yahoo.com/yui/docs/YAHOO.widget.Menu.html#event_keyPressEvent
// there is a keyPress Event, but no spelling of it will trigger the handler
buyMenu.subscribe('keypress', onShow, {foo: 'bar'}, false);
buyMenu.subscribe('keypressed', onShow, {foo: 'bar'}, false);
buyMenu.subscribe('keyPressed', onShow, {foo: 'bar'}, false);
buyMenu.subscribe('keyPress', onShow, {foo: 'bar'}, false);
Functionally, I'm trying to attach a keyPress listener for each submenu of the MenuBar. I do not want to add Bubbling library as a dependency.