wheelmouse bindings for CDE/motif

Discussion in 'Cadence' started by fogh, Jul 19, 2004.

  1. fogh

    fogh Guest

    Some X resources for the wheelmnouse.
    I put them in the file /etc/dt/config/C/sys.resources (copy it from /usr/dt/config/C/sys.resources if it doesn t exist)
    but it can probably go in another home-based file (like .Xdefaults ) or app-based (like Opus.ad )
    The latter might be the only possiblity for those of you who use cadence with kde or gnome. I am always lost when I need to give Xresources under gnome.

    I just gathered some google results, but I don t know how to improve this fursther. If you know how to extend this, please send the info to the NGs (including comp.cad.cadence).



    !! _____________________________________________________________________________________
    !! scrollmouse
    !! _____________________________________________________________________________________
    !## Athena text widgets
    *Paned.Text.translations: #override\n\
    Shift<Btn4Down>,<Btn4Up>: scroll-one-line-down()\n\
    Shift<Btn5Down>,<Btn5Up>: scroll-one-line-up()\n\
    Ctrl<Btn4Down>,<Btn4Up>: previous-page()\n\
    Ctrl<Btn5Down>,<Btn5Up>: next-page()\n\
    None<Btn4Down>,<Btn4Up>:scroll-one-line-down()scroll-one-line-down()scroll-one-line-down()scroll-one-line-down()scroll-one-line-down()\n\
    None<Btn5Down>,<Btn5Up>:scroll-one-line-up()scroll-one-line-up()scroll-one-line-up()scroll-one-line-up()scroll-one-line-up()\n\

    !## MOTIF based
    *XmScrollBar.Translations: #override\n\
    None<Btn4Down>:pageUpOrLeft(Up)\n\
    None<Btn5Down>:pageDownOrRight(Down)\n\

    *XmText.Translations: #override\n\
    None<Btn4Down>:scroll-one-line-down()\n\
    None<Btn5Down>:scroll-one-line-up()\n\

    *XmList.Translations: #override\n\
    None<Btn4Down>:ListPrevItem()\n\
    None<Btn5Down>:ListNextItem()\n\

    *XmComboBox.Translations: #override\n\
    None<Btn4Down>:CBListAction(Down)\n\
    None<Btn5Down>:CBListAction(Up)\n\

    *XmList.baseTranslations: #augment <Btn5Down>: ListNextPage()\n\
    <Btn4Down>: ListPrevPage()\n
    *XmScrollBar.baseTranslations: #augment <Btn4Down>: IncrementUpOrLeft(0) IncrementUpOrLeft(1)\n\
    <Btn5Down>: IncrementDownOrRight(0) IncrementDownOrRight(1)\n
    *XmText.baseTranslations: #augment Shift<Btn4Down>: page-left()\n\
    Shift<Btn5Down>: page-right()\n\
    <Btn4Down>: scroll-one-line-up()\n\
    <Btn5Down>: scroll-one-line-down()\n

    *XmSpinBox.accelerators: #override <Btn5Down>: SpinBPrior()\n<Btn5Up>:
    SpinBDisarm()\n<Btn4Down>: SpinBNext()\n<Btn4Up>: SpinBDisarm()\n<Key>osfUp:
    SpinBNext()\n<Key>osfDown: SpinBPrior()\n<KeyUp>osfUp:
    SpinBDisarm()\n<KeyUp>osfDown: SpinBDisarm()\n<Key>osfLeft:
    SpinBLeft()\n<Key>osfRight: SpinBRight()\n<KeyUp>osfLeft:
    SpinBDisarm()\n<KeyUp>osfRight: SpinBDisarm()\n<Key>osfBeginLine:
    SpinBFirst()\n<Key>osfEndLine: SpinBLast()

    !## xterm
    XTerm.vt100.translations: #override\n\
    Shift<Btn4Down>,<Btn4Up>:scroll-back(1,line)\n\
    Shift<Btn5Down>,<Btn5Up>:scroll-forw(1,line)\n\
    Ctrl<Btn4Down>,<Btn4Up>:scroll-back(1,page)\n\
    Ctrl<Btn5Down>,<Btn5Up>:scroll-forw(1,page)\n\
    <Btn4Down>,<Btn4Up>:scroll-back(1,halfpage)\n\
    <Btn5Down>,<Btn5Up>:scroll-forw(1,halfpage)\n
    !# In the scrollbar we map buttons 5 & 4 to 1 and 2 otherwise, core dump
    !# This will move proportionnaly to cursor position but we dont know how to
    !# program the same exact behavior as in the text widget.
    XTerm.vt100.Scrollbar.translations: #override\n\
    <Btn5Down>: StartScroll(Forward)\n\
    <Btn4Down>: StartScroll(Backward)\n
    !! _____________________________________________________________________________________
     
    fogh, Jul 19, 2004
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.