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 213458 - Enable horizontal scrolling with shift
Summary: Enable horizontal scrolling with shift
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Key bindings (show other bugs)
Version: 8.0.2
Hardware: PC Linux
: P3 normal with 4 votes (vote)
Assignee: Svata Dedic
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-03 20:42 UTC by jordan314
Modified: 2015-11-01 16:57 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Patch to add "Scroll Left" and "Scroll Right" to the Keymap Options (8.92 KB, patch)
2013-01-04 18:28 UTC, joey4712
Details | Diff
Patch to add "Scroll Left" and "Scroll Right" to the Keymap Options - Version 2 - with Shift + Mouse Wheel as default (8.19 KB, patch)
2013-01-04 20:10 UTC, joey4712
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description jordan314 2012-06-03 20:42:16 UTC
In OS X, if you have a mouse without horizontal scroll capability, you can hold down shift to scroll left and right. Applications like Google Chrome support this in linux as well. It would be nice if Netbeans supported this in the editor.
Comment 1 joey4712 2013-01-03 22:24:29 UTC
Would be really great if you could scroll left / right with the mouse wheel when holding the shift key. As already mentioned by the Jordan: the same behaviour is implemented in other famous programs like Google Chrome.

Maybe this would already be possible to configure if we have "Scroll left" and "Scroll right" in addition to to "Scroll up" and "Scroll down" available under Options -> Keymap?

This way it would be possible to assign the Shortcut "Shift + Mouse Wheel Down" to "Scroll Right" and the other way round, right?
Comment 2 joey4712 2013-01-04 10:04:16 UTC
BTW: this is also implemented in jEdit, but for some OS X related reason they changed the shortcut to CTRL+SHIFT+scroll.

Also see: http://community.jedit.org/?q=node/view/4453
Comment 3 joey4712 2013-01-04 18:28:48 UTC
Created attachment 129910 [details]
Patch to add "Scroll Left" and "Scroll Right" to the Keymap Options

Hi all ...

I had a look at the NetBeans sources myself and found out that it was quite easy to add two additional shortcuts to the Keymap Options:

"Scroll Left" and "Scroll Right"


Please see the attached patch:

- It will add a keyboard shortcut to scroll left or right with Ctrl + Arrow Key.
- If you change the configuration of the two shortcuts to Shift + Mousewheel you have the requested "Horizontal scrolling with shift key" feature


I hope I did everything right and the patch is in the correct format, etc.

At least it works very nice on my machine (Ubuntu with Smooth Scrolling Touch Mouse Logitech M600).


Let me know if it works for you.

Bye... Joey4712
Comment 4 Svata Dedic 2013-01-04 18:42:36 UTC
(In reply to comment #3)
> - It will add a keyboard shortcut to scroll left or right with Ctrl + Arrow
> Key.

Sadly Ctrl + LEFT/RIGHT is already assigned to 'move to prev/next word'. The 'move' actions are probably a lot more used than scrolling, as they e.g. jump through the camel case identifiers

A different key combination must be chosen.
Comment 5 joey4712 2013-01-04 19:22:16 UTC
(In reply to comment #4)
> Sadly Ctrl + LEFT/RIGHT is already assigned to 'move to prev/next word'. The
> 'move' actions are probably a lot more used than scrolling, as they e.g. jump
> through the camel case identifiers
> 
> A different key combination must be chosen.

Yes, of course you are absolutely right. I didn't think about it because I'm only using the changed shortcuts (Shift + Mouse Wheel) myself.

I think it will be quite difficult to find a shortcut using the left/right keys which does not cause any side effects or conflicts with other shortcuts.

So my suggestion is:
a) Just add the two new shortcuts with an empty/unset default setting.
b) Add the two new shortcuts with Shift + Mouse Wheel as default.

What do you think?
Comment 6 joey4712 2013-01-04 20:10:03 UTC
Created attachment 129914 [details]
Patch to add "Scroll Left" and "Scroll Right" to the Keymap Options - Version 2 - with Shift + Mouse Wheel as default

I just attached an updated version of the patch wich implements the option b) as described above:

b) Add the two new shortcuts with Shift + Mouse Wheel as default.
Comment 7 Svata Dedic 2013-01-07 08:11:40 UTC
Oops ... sorry I cannot integrate the actions into 7.3; we are already past almost all the freeze deadlines. Apologies - moving to next release.
Comment 8 zoon 2013-12-05 11:36:40 UTC
Please please please apply this simple patch to the program.
I'm on NetBeans 7.4, Ubuntu 13.10 and still don't have this feature.
Comment 9 ionuion 2013-12-10 09:59:31 UTC
Shift scroll working in some editor windows on
Environment:
Product Version: NetBeans IDE 7.4 (Build 201310111528)
Updates: NetBeans IDE is updated to version NetBeans 7.4 Patch 1
Java: 1.8.0-ea; Java HotSpot(TM) 64-Bit Server VM 25.0-b59
Runtime: Java(TM) SE Runtime Environment 1.8.0-ea-b117
System: Mac OS X version 10.8.5 running on x86_64; UTF-8; en_US (nb)

I use a magic trackpad by Apple. Pressing Shift and swiping vertically on the trackpad translates to horizontal scroll in the following windows:
- editor
- projects
- files
- services

I didn't have to tamper with anything in the Keymap section in the Options.
Comment 10 joey4712 2013-12-10 10:05:42 UTC
As far as I know in OS X this works without the patch.

On Linux this is not the default behavior. At least I created the patch for myself to be able to use horizontal scrolling on my Linux desktop.
Comment 11 Wires77 2015-07-22 16:28:57 UTC
Hey did this patch ever make it in to the code?  The shift+scroll works in the output tab but in neither the editor nor the the projects windows.

Product Version: NetBeans IDE 8.0.2 (Build 201411181905)
Updates: NetBeans IDE is updated to version NetBeans 8.0.2 Patch 2
Java: 1.8.0_45; Java HotSpot(TM) 64-Bit Server VM 25.45-b02
Runtime: Java(TM) SE Runtime Environment 1.8.0_45-b15
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)