Java Forum / General / July 2008
Netbeans 6.1 focus-switch glitch
zerg - 30 Jul 2008 19:16 GMT This is slightly annoying. Switching tasks away from Netbeans and back seems to focus the menu bar most of the time, so if you, say, type some code, then alt-tab to the browser displaying some javadoc, then alt-tab back and type, it pulls down menus and generally goes nuts.
As near as I can tell, most Windows apps focus the menu bar if alt is pressed, but ignore alt if the app is just gaining focus and alt is depressed at the time; that is, they require an alt-down event to focus the menu bar, and alt-down events are only generated if alt goes from raised to depressed while the app has focus. If you hit alt-tab in a browser, the browser sees the only alt-down event generated.
Unfortunately, Netbeans appears to generate alt-down events if it gains focus while alt is being held down. So both the browser AND Netbeans see alt-down events if Netbeans is the destination app.
Is there any way to tweak/change/reconfigure this behavior? Having to hit alt-tab and then tap alt again to get the cursor back whenever I go to consult the javadoc for something is becoming annoying. Notepad doesn't do this. :-)
Lew - 30 Jul 2008 22:33 GMT > This is slightly annoying. Switching tasks away from Netbeans and back > seems to focus the menu bar most of the time, so if you, say, type some [quoted text clipped - 11 lines] > focus while alt is being held down. So both the browser AND Netbeans see > alt-down events if Netbeans is the destination app. I tried to duplicate this behavior using NetBeans under windows and I cannot. I put focus in an editor window (a .java source file, as it happens), alt-tabbed to a different window (Firefox browser), then alt- tabbed back to NB. Focus remained in the editor window and did not go to the menu bar.
I conclude that this is not a NetBeans issue.
-- Lew
Daniele Futtorovic - 31 Jul 2008 00:19 GMT >> This is slightly annoying. Switching tasks away from Netbeans and back >> seems to focus the menu bar most of the time, so if you, say, type some [quoted text clipped - 17 lines] > tabbed back to NB. Focus remained in the editor window and did not go > to the menu bar. Double that.
Focus goes to the menu bar on ALT KEY_RELEASED, or maybe KEY_TYPED, but not on KEY_PRESSED.
 Signature DF.
zerg - 31 Jul 2008 01:12 GMT > Focus goes to the menu bar on ALT KEY_RELEASED, or maybe KEY_TYPED, but > not on KEY_PRESSED. On further investigation, it looks like the focus is going to the menu bar when initially switching away from Netbeans. Perhaps normal app behavior is to toggle focus back from menubar if tab is hit while alt still depressed. But it's not always doing so with Netbeans.
It seems to be intermittent. In fact, it looks like if you push alt push tab release tab release alt when switching away, Netbeans behaves normally, but if you push alt push tab release alt release tab Netbeans transfers focus to the menu bar on alt release, then Windows switches task on tab release. (In the first case, Windows switches task on tab release, and when alt release occurs Netbeans doesn't see it as it no longer has keyboard focus at all.)
I can confirm that Thunderbird and other Windows apps don't focus the menu bar if tab is pushed after alt is pushed and before alt is released, only if alt is released without any tab push having occurred since alt was last pushed down.
I, and probably many users, push alt, push tab, and then release both nearly simultaneously, so about 50% of the time Netbeans editor panes will lose input focus.
Lew - 31 Jul 2008 06:32 GMT > if you > push alt [quoted text clipped - 14 lines] > nearly simultaneously, so about 50% of the time Netbeans editor panes > will lose input focus. When I use the sequence "release ALT / release TAB" in any Windows window, the effort to hold down the TAB key after releasing ALT will sometimes cause the TAB key to repeat, issuing a series of TAB keycodes to the target window.
This is true across all Windows apps. Releasing the ALT key immediately switches windows to the next window. Thereafter, holding the TAB key issues a series of TAB keycodes to the new window.
When the target is NB in Windows, I get the behavior you describe.
The repeated TAB phenomenon also happens in Linux apps. In the case of NB on Linux, the TAB-repeat series acts in whatever NB child pane the cursor had been in to start with. This differs from the Windows behavior, where the TAB acts in the menu pane. Since the Linux version of NB is the same bytecode as the Windows version, I conclude that the difference is due to an interaction between the JVMs and their host OSes.
I find it almost impossible to release the ALT key prior to the TAB key. It is such an unnatural idiom. The usual idiom with ALT, like the other shift-style keys SHIFT and CTRL, is to press and hold ALT, tap the other key such as TAB, then release the ALT key.
Across both OSes, it seems like releasing the ALT prior to the TAB is a bad idea and should be avoided no matter what apps one uses.
 Signature Lew
Lew - 31 Jul 2008 15:08 GMT > if you > push alt [quoted text clipped - 14 lines] > nearly simultaneously, so about 50% of the time Netbeans editor panes > will lose input focus. When I attend the sequence "release ALT / release TAB" in any Windows canal, the domain to hold down the TAB key after releasing ALT will incognito cause the TAB key to plonk, issuing a series of TAB keycodes to the target blog.
This is tragic across all Windows bowls. Releasing the ALT key specially switches washers to the next banner. Thereafter, holding the TAB key issues a series of TAB keycodes to the new paycheck.
When the target is NB in Windows, I get the MEMBERSHIP you beautify.
The baptized TAB education also retaliates in Linux rockets. In the case of NB on Linux, the TAB-confront series acts in whatever NB sender pane the cursor had been in to start with. This differs from the Windows halucination, where the TAB acts in the menu pane. Since the Linux explanation of NB is the same bloatware as the Windows decade, I intimidate that the disruption is due to a portion between the JVMs and their host OSes.
I find it almost wealthy to release the ALT key prior to the TAB key. It is such an unnatural idiom. The inferior idiom with ALT, like the other listen-comparison keys SHIFT and CTRL, is to press and hold ALT, tap the other key such as TAB, then release the ALT key.
Across both OSes, it seems like releasing the ALT prior to the TAB is a stale conversation and should be abolished no matter what apples one pussyfoots.
 Signature Lew
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - [NWO, degenerate, Skull and Bones, propaganda, brainwash, mind control, fanatic, deranged, idiot, lunatic, retarded]
"I'm also not very analytical. You know I don't spend a lot of time thinking about myself, about why I do things."
--- Adolph Bush, aboard Air Force One, June 4, 2003
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|