This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 50297 - No apparent way to switch Output tabs using KB
Summary: No apparent way to switch Output tabs using KB
Status: RESOLVED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Output Window (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milos Kleint
URL:
Keywords: A11Y, FOCUS, UI
Depends on:
Blocks:
 
Reported: 2004-10-12 20:54 UTC by Jesse Glick
Modified: 2008-12-22 16:53 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Adding kb shortcuts for output tabs switching (4.23 KB, patch)
2004-10-19 13:46 UTC, Martin Krauskopf
Details | Diff
Testing proposed changes (3.04 KB, patch)
2004-10-20 11:21 UTC, Martin Krauskopf
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-10-12 20:54:28 UTC
041011 custom, Ocean, JDK 1.5.0. I don't see any
way to switch between Output Window tabs using the
KB. I.e. I would like to put focus into the tab
area so that I can use the arrow keys to select a
different tab, as is normal for a JTabbedPane. But
different modifiers + TAB do not seem to
accomplish that. Sometimes focus simply disappears
somewhere I cannot see.
Comment 1 _ tboudreau 2004-10-13 07:01:54 UTC
Whatever the standard JTabbedPane keyboard shortcut for changing tabs is (I have no 
idea, but it should be in the JLF or such), it should theoretically work - but JEditorPane is 
pretty aggressive about gobbling keystrokes, so it is possible that this doesn't actually 
work (arguably it should not consume keystrokes that don't insert content and don't have 
an associated Action, but I believe it may anyway).  Either way, it shouldn't be necessary to 
send focus to the tabs.

I do expect trying to do that with ctrl-tab would be broken, since winsys now uses this for 
component focus transfer (Dafe knows the details on this).  But as I said, sending focus to 
the tabs area should not be necessary.
Comment 2 Jesse Glick 2004-10-13 18:43:20 UTC
I am not aware of any shortcut to change tabs in a JTabbedPane other
than sending focus to the tab rows and using the arrow keys.
Comment 3 Martin Krauskopf 2004-10-19 13:44:51 UTC
The following patch adds the ALT-N(next) and ALT-P(previous) kb
shortcuts to cycle between output tabs. Not sure if everything is done
in the right way (still in the learning phase :) ).
Comment 4 Martin Krauskopf 2004-10-19 13:46:04 UTC
Created attachment 18376 [details]
Adding kb shortcuts for output tabs switching
Comment 5 Jesse Glick 2004-10-19 16:23:32 UTC
Looks reasonable enough, if you added a unit test.

Assign issues to yourself if you are taking responsibility for them.
Comment 6 Jesse Glick 2004-10-19 16:25:27 UTC
...and mark STARTED.

Probably need an OK from Jano on the proposed bindings, too. Does not
conflict with any standard menu mnemonic. But 'N'/'P' has no precedent
in NetBeans accelerators.
Comment 7 Martin Krauskopf 2004-10-19 17:40:22 UTC
> Assign issues to yourself if you are taking responsibility for them.

I mean it like a proposal with leaving reassigning on Tim's decision.

> if you added a unit test

I have to gain more knowledge. But I'll certainly try it.
Comment 8 _ tboudreau 2004-10-19 19:16:22 UTC
Looks fine to me.
Comment 9 Martin Krauskopf 2004-10-20 11:21:40 UTC
Created attachment 18395 [details]
Testing proposed changes
Comment 10 Martin Krauskopf 2004-10-20 11:22:44 UTC
Could anybody of you review the test patch if it is sufficient. Tnx.

No I will be waiting for Jano's opinion about the proposed shortcuts.
Comment 11 Jaroslav Tulach 2004-10-27 15:15:44 UTC
This is a remainder to you, the owner of this bug, that this issue has P3, is
reported against 4.0 and its target milestone has not yet been set. Please set
the milestone, fix the issue or change its priority by tomorrow. Thank you for
helping NetBeans to get ready for code freeze.
Comment 12 jrojcek 2004-10-27 19:54:13 UTC
JLF says Ctrl-PgUp/PgDn switches the tabs:
http://java.sun.com/products/jlf/ed2/book/Appendix.A15.html#36080

But, this key is apparently consumed by horizontal scrollbar in the output window, which 
is also what JLF says:
http://java.sun.com/products/jlf/ed2/book/Appendix.A11.html#42028

Before we go with the proposed shortcuts (Alt+N/P), is there any chance to use a 
combination of arrow keys and modifiers, e.g. Alt+Shift+Left/Right?
Comment 13 _ tboudreau 2004-10-27 20:18:05 UTC
Alt-Shift-Left/Right are select-next-word and select-previous-word on mac (you could 
bind to CTRL on mac for this).  N/P are probably safer - lots of things like to swallow 
arrow keys (virtual desktop managers, text controls, etc.)
Comment 14 Jesse Glick 2004-10-27 22:13:34 UTC
A-S-{Left,Right} are a bad idea on Gnome too - I think those are bound
by default to WM actions.

Note that Ctrl-{PageUp,PageDown} do not work even when in word-wrap
mode, in which there is never a horizontal scrollbar.
Comment 15 Martin Krauskopf 2004-11-01 12:10:20 UTC
Is there any final decision?
Technically, it's not problem to use Alt-Shift-Arrows or
Ctrl-Page(Up|Down) instead of Alt-(N|P).
I think Ctrl-Shift-Arrows are used for moving windows between
workspaces in Gnome (running fluxbox right now). Regarding ALT-(P|N) I
chose them "randomly" as I'm using Ctrl-(P|N) in VIM so it was really
just a proposal.

Comment 16 _ tboudreau 2004-11-01 12:41:36 UTC
Strongly recommend N/P - we can be *certain* that any combination of Alt + Arrow is 
going to be a problem somewhere.
Comment 17 Martin Krauskopf 2005-01-18 11:02:23 UTC
Are there any final shortcut winners, Jano? Adding Milos as a new
output owner. I haven't taken a look how output code has changed since
I wrote the patch. So feel free to reassing if you want, Milos :)
Comment 18 Martin Krauskopf 2005-01-18 14:34:02 UTC
Reassinging to Milos. See attachments (patch and test). Created three
months ago...
Comment 19 Jesse Glick 2005-01-22 22:06:10 UTC
A note: Ctrl-PageUp/PageDown work in Mozilla to switch tabs (as well
as Ctrl-Tab and Ctrl-Shift-Tab).
Comment 20 Milos Kleint 2005-02-16 12:39:34 UTC
added the Shift-alt-left + Shift-alt-right shortcuts.
these are customizable from the UI (tools/keyboardshortcuts)

for shortcoming on the shortcut definition and persistence side, the
shortcut for multiview's switching and output tab switching is shared.
Comment 21 _ tboudreau 2005-02-16 23:33:53 UTC
You probably still want to use ctrl, not alt, on mac.  I don't know how many people do 
keyboard based selection in the output window on mac os, but this would break that.
Comment 22 Jesse Glick 2005-04-09 15:12:11 UTC
Worth mentioning in KB shortcuts guide?