Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!transit3.readnews.com!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail From: Adam Beneschan Newsgroups: comp.lang.java.gui Subject: Re: Passing KeyEvent upward Date: Mon, 23 Jul 2012 21:15:32 -0700 (PDT) Organization: http://groups.google.com Lines: 32 Message-ID: References: <0f05834e-c654-4925-b78a-b8328b23ba0b@googlegroups.com> NNTP-Posting-Host: 68.4.246.214 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: posting.google.com 1343103333 3880 127.0.0.1 (24 Jul 2012 04:15:33 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Tue, 24 Jul 2012 04:15:33 +0000 (UTC) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=68.4.246.214; posting-account=duW0ogkAAABjRdnxgLGXDfna0Gc6XqmQ User-Agent: G2/1.0 Xref: csiph.com comp.lang.java.gui:5200 On Sunday, July 22, 2012 5:26:08 PM UTC-7, markspace wrote: > On 7/22/2012 4:09 PM, Adam Beneschan wrote: > > if the user presses a key, the > > key is handled just as if the menu hadn't come up--that is, the > > key-press event will be handled by the JTextPane (or is it the > > associated document?) as if the user had typed that key into the > > > Sounds like an accelerator to me. No, I don't think so. If I understand the term correctly, an accelerator just gives you a quick way to select a menu item (possibly from a submenu deeper in the menu tree) using the keyboard. That isn't what I want here. But thanks for the info. I'll look into it. It may be a few days before I can try it, though. -- Adam > > > > Also take a look at Actions. > > > > document. I've already set up a MenuKeyListener for the popup menu > > that recognizes the KeyEvent and calls menu.setVisible(false) to get > > rid of the menu. So far, so good. > > > Ick. Sounds terrible. You seem to be making things worse since you > don't know about the existing APIs that do menu acceleration. I'd stop, > make a super small example to get your thoughts straightened out, then > consider how best to rework your app with your new ideas.