NativeMenu and CMD-Backspace #AS3

3 June 2010, Comments: 0

If you are using var the NativeMenu on Mac and don’t know how to assign the backspace key, then you are here completely right.

This is how it works:

You just to set keyEquivalent = ‘\b’  (On German Keyboard: Alt Gr – Shift – 7)

Example:

menuItem:NativeMenuItem = nativeMenu.addItem(new NativeMenuItem(“MyMenuItem”));

menuItem.keyEquivalentModifiers = [Keyboard.COMMAND];

menuItem.keyEquivalent = ‘\b’;

menuItem.enabled = false;

menuItem.addEventListener(Event.SELECT, eventHandler);

Leave a Reply