groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] gxditview feature request


From: Robert Goulding
Subject: Re: [Groff] gxditview feature request
Date: Wed, 23 May 2007 12:38:19 +0200

On 5/22/07, Ralph Corderoy <address@hidden> wrote:

Hi Robert,

> On my Mac, I usually keep an X server going with gxditview previewing
> the file I'm working on in my text editor.  I can switch back and
> forth with Cmd-Tab, and update the preview with 'r'.  All this I can
> do without touching a mouse.  But if I need to scroll within the
> gxditview preview page, I not only need to use the mouse, but also try
> to remember those awful, counterintuitive Mosaic mouseclick scrolls.

It's the Athena widget set IIRC.

> Inevitably, I bash the arrow keys a few times hoping that they will
> scroll the screen, but vainly...
>
> so, could arrow-key scrolling be implemented easily in gxditview?

I was hoping it would just be an X resource issue, and indeed, putting

    GXditview.*.viewport.*.background: red
    GXditview.*.viewport.horizontal.translations: #augment \
        <Key>l: StartScroll(Forward) NotifyScroll(Proportional) EndScroll()\n\
        <Key>h: StartScroll(Backward) NotifyScroll(Proportional) EndScroll()
    GXditview.*.viewport.vertical.translations: #augment \
        <Key>j: StartScroll(Forward) NotifyScroll(Proportional) EndScroll()\n\
        <Key>k: StartScroll(Backward) NotifyScroll(Proportional) EndScroll()

in my ~/.Xdefaults-`hostname` had an effect, but only when a scrollbar
had the input focus, i.e. click on the scrollbar widget first and then
`j' and `k' would scroll it up and down.

To make the scrollbars "grab" these key presses no matter where the
input focus is I believe Intrinsic accelerators should be used, e.g.

    GXditview.*.viewport.vertical.accelerators: #override \
        <Key>1: StartScroll(Forward) NotifyScroll(Proportional) EndScroll()\n\
        <Key>2: StartScroll(Backward) NotifyScroll(Proportional) EndScroll()

but the application must "install" accelerators, e.g.
XtInstallAccelerators(), to link a possible source hierarchy of the
event with the destination widget that should handle them.  I don't
think the Athena Paned widget does this automatically, but could be
wrong.

Thanks, Ralph - that certainly makes it a little easier to scroll
around. It would be nice, as you say, if hjkl (or the arrow keys)
could be recognized as scroll keys wherever the focus happens to be.

Robert.

--
Robert Goulding
Program in History and Philosophy of Science
University of Notre Dame




reply via email to

[Prev in Thread] Current Thread [Next in Thread]