title: How to get a JavaFX MenuItem to respond to a TAB KeyPress?
body: <p>A JavaFX MenuItem can respond to most KeyPress events by setting an ActionEvent EventHandler. However, while the event handler does catch a KeyPress of KeyCode.ENTER, it does <em>not</em> catch a KeyCode.TAB KeyPress event.  Apparently, some key events like TAB are handled at a deeper level.  For example, the arrow keys enable traversal of the menu.</p>
  
  <p>My ContextMenu is a list of completions of an email address string the user has started typing in a TextField.   The users want to press the arrow keys to select the desired item, and the TAB key to execute the completion.</p>
  
  <p>I can attach an event handler to the ContextMenu itself and catch the TAB keypress. But the event's Source is then the ContextMenu, and I can find no variables in the ContextMenu indicating which MenuItem was highlighted when the TAB key was pressed. MenuItem allows css style to control appearance of the menu item in focus, but it does not have any properties telling whether it is in focus or not.   </p>
  
  <p>I have tried futzing with the EventDispatchChain via MenuItem buildEventDispatchChain() to no avail. There seems to be no way to intercept the TAB KeyPress or otherwise determine which menu item was in focus when the TAB key was pressed.</p>
  
  <p>Any suggestions?</p>