Open this page in the API Guide

CommandMenu.focus Method

Bring the menu into focus so that it will react to keyboard events.