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.
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.
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.
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.
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 :) ).
Created attachment 18376 [details] Adding kb shortcuts for output tabs switching
Looks reasonable enough, if you added a unit test. Assign issues to yourself if you are taking responsibility for them.
...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.
> 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.
Looks fine to me.
Created attachment 18395 [details] Testing proposed changes
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.
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.
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?
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.)
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.
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.
Strongly recommend N/P - we can be *certain* that any combination of Alt + Arrow is going to be a problem somewhere.
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 :)
Reassinging to Milos. See attachments (patch and test). Created three months ago...
A note: Ctrl-PageUp/PageDown work in Mozilla to switch tabs (as well as Ctrl-Tab and Ctrl-Shift-Tab).
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.
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.
Worth mentioning in KB shortcuts guide?