alanc @ sun.com

Alan Coopersmith’s blog

Random thoughts of a disorganized mind...
(and though it should be obvious, while Sun pays me to think about things, they disclaim any responsibility for these thoughts, nor do I claim what I say matches in any way what Sun thinks)

Loading...
http://blogs.sun.com/alanc/date/20040715 Thursday July 15, 2004

Wheel Mouse support for Solaris: Part 2: Using it with applications

The default configuration of the wheel mouse support in Solaris (both the new support for workstations in my previous post and the existing support in the Sun Ray 2.0 software) is to map the wheel rolls to presses of buttons 4 & 5, as done in XFree86 and other X servers. Because of this, software written to support scroll wheels in those other servers often just starts working on Solaris as soon as you install the wheel mouse support, and much other software can be easily configured to do so as well. Software that should just work includes GNOME 2.0 and other software using the GTK+ toolkit, Mozilla, Netscape 7.0, and StarOffice 7. The Xsun patch for Solaris 9 that introduces workstation wheel mouse support also includes an update to the Solaris xterm to support scroll wheels as well.

There's an existing site with tips for many applications, including older versions of Netscape, at http://koala.ilog.fr/colas/mouse-wheel-scroll/.

Additionally, you can add scroll wheel support to some of the existing CDE & X applications on Solaris by adding entries to your $HOME/.Xdefaults file such as these:

*DtTerm*Translations: #override \
        Shift<Btn4Down>:        scroll(-1,page) \n\
        Shift<Btn5Down>:        scroll(1,page) \n\
        None<Btn4Down>:         scroll(-5,line) \n\
        None<Btn5Down>:         scroll(5,line)

*DtEditor.textTranslations: #override \
        Shift<Btn4Down>:        previous-page() \n\
        Shift<Btn5Down>:        next-page() \n\
        None<Btn4Down>:        process-up()process-up()process-up()process-up()process-up() \n\
        None<Btn5Down>:        process-down()process-down()process-down()process-down()process-down()

*DtHelpDialog*textTranslations: \
           <Btn4Down>:	       PageUpOrDown(1)\n\
           <Btn5Down>:	       PageUpOrDown(0)

Xman*help*Paned.manualPage.translations:#override \
				<Key>Prior: Page(Back) \n\
				<Key>Next : Page(Forward)  \n\
      				Shift<Btn4Down>,<Btn4Up>: Page(Line,-1) \n\
			        Shift<Btn5Down>,<Btn5Up>: Page(Line,1) \n\
			        Ctrl<Btn4Down>,<Btn4Up>: Page(Back) \n\
				Ctrl<Btn5Down>,<Btn5Up>: Page(Forward) \n\
				None<Btn4Down>,<Btn4Up>: Page(Line,-5) \n\
				None<Btn5Down>,<Btn5Up>: Page(Line,5)

Xman*manualBrowser*manualPage.translations:  #override \
				<Key>Prior: Page(Back) \n\
				<Key>Next : Page(Forward) \n\
				Ctrl<Key>s: PopupSearch() \n\
      				Shift<Btn4Down>,<Btn4Up>: Page(Line,-1) \n\
			        Shift<Btn5Down>,<Btn5Up>: Page(Line,1) \n\
			        Ctrl<Btn4Down>,<Btn4Up>: Page(Back) \n\
				Ctrl<Btn5Down>,<Btn5Up>: Page(Forward) \n\
				None<Btn4Down>,<Btn4Up>: Page(Line,-5) \n\
				None<Btn5Down>,<Btn5Up>: Page(Line,5)

(You won't need any of these entries on Solaris Express 5/04 and later, or Solaris 10, since they're already included in the default X resource sets for those applications in those releases. You can add them though if you want to customize the rates at which the wheel scrolls the text in those applications, or mappings of the modifier keys to effects.)