lightroom-develop-module-no-mouse-wheel

Hacking Adobe Lightroom to Add Mouse Wheel Support

I fell in love with Photography a few years ago. Shortly after that I found that Canon’s suite of tools (primarily Digital Photo Professional) was absolutely terrible for editing and managing photos.

I briefly used (and loved) Picasa for it’s organization capabilities (geo-, keyword- and face-tagging en masse). But Picasa–at the time, anyways–was very weak on editing capabilities. A friend recommended Lightroom 3 and I haven’t looked back since (I’m now on v4.4).

Lightroom isn’t perfect, however. It has a few usability issues. One of my pet peeves is that Lightroom for Windows doesn’t support the mouse wheel. I’ll reflexively scroll down… but nothing happens. This drive me crazy.

But it gets worse. Once I’ve attempted to scroll (and paid the cognitive penalty… “oh yeah, scrolling doesn’t work”) I then have to mouse over to the scroll bar and drag it. Except the scroll bar is a measly 13 pixels wide and, if I miss it (50/50 chance, it seems), I end up clicking on the button that collapses the entire panel.

F’ing awesome. Just what I need when I’m trying to edit a series of photos.

Software should not make you feel stupid. Kind of like an extension of Asimov’s First Law

Adobe would literally have to write only a few lines of code to enable mousewheel scrolling. So I requested Adobe support mouse wheel scrolling as part of their JDI program (Just Do It). Crickets. Go figure… I’m probably the only person in the world who uses the Windows version of Lightroom.

Anyways, all that to say… three years ago, I wrote my own Lightroom plugin to add mousewheel support.

Technical Stuff

As far as Lightroom knows, my plugin is a Lua script. But it’s a little more involved than that…

Sequence diagram for enabling mouse wheel in Lightroom for Windows

Sequence diagram for enabling mouse wheel in Lightroom for Windows

  1. Lightroom loads and runs the plugin Lua script
  2. The Lua script uses the Lightroom plugin API to spawn a process
  3. The external process uses the Win32 API to inject a DLL into Lightoom’s process
  4. The external process issues a command to the injected DLL
  5. The injected DLL hooks child windows in Lightroom to process their mousewheel events

If you want to use it or care to read in more detail how I did it, you’re welcome to download the source code (LRMouseWheel on GitHub).

Caveat Emptor

I was using the 32-bit version of Lightroom when I wrote this. It will have to be retrofitted to work with 64-bit Lightroom. I had never upgraded it because I eventually switched to Photoshop for editing.

Also, the plugin is not 100% complete. The dialog boxes (Import, for example) are structured differently from the main window. So I had some issues there. In the end, I gave up on dialog boxes since my biggest frustration was the tool-window on the Develop and Library modules.

Finally… I haven’t tried Lightroom 5 yet. Maybe they’ve already added support and this plugin will be unnecessary.

2 thoughts on “Hacking Adobe Lightroom to Add Mouse Wheel Support”

  1. In LR5 you click on the slider once and then the mousewheel controls that slider. Pretty sure it worked that way in LR4 as well, but I don’t have that version handy where I can verify it.

    1. Hey, thanks Jon. Yes, I think I recall the mousewheel working on the sliders (Windows handles this functionality). My concern was with scrolling down to lower panels… although some have commented on Reddit that this works for them. So I’m not sure if they are using the Mac version or perhaps something about my setup was strange.

Comments are closed.