Binding additional functions to keys

Home Forums AR Sandbox Forum Binding additional functions to keys

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #124048
    TRA_TSBP
    Participant

    Howdy y’all,

    Has anyone tried binding additional functions from the Tools menu? We use a wireless numeric keyboard to control drying, flooding, etc in our sandbox, and I currently have the 1 and 2 keys bound to the Global Water Tool, identical to how Dr. Kreylos has done in his walkthrough:

    section Vrui
    section Desktop

    section Tools
    section DefaultTools
    # Bind a global rain/dry tool to the “Num1” and “Num2” keys:
    section WaterTool
    toolClass GlobalWaterTool
    bindings ((Mouse, Num1, Num2))
    endsection
    endsection
    endsection
    endsection
    endsection

    However, we find that we use the “spot” fill/drain tools from the Local Water Tool class a lot, so I’d like to bind those as well to the “Num4” and “Num5” keys. I’ve tried several different versions of a text shell to bind them, but every time I do, it either un-binds the existing Global Water Tool bindings, or does nothing at all.

    Any help would be appreciated!

    #124054
    TRA_TSBP
    Participant

    For reference, this is the script I used to try and bind the 4 and 5 keys:

    section Vrui
    section Desktop

    section Tools
    section DefaultTools
    # Bind a global rain/dry tool to the “Num1” and “Num2” keys:
    section WaterTool
    toolClass GlobalWaterTool
    bindings ((Mouse, Num1, Num2))
    endsection

    # Bind a local rain/dry tool to the “Num4” and “Num5” keys:
    section WaterTool
    toolClass LocalWaterTool
    bindings ((Mouse, Num4, Num5))
    endsection
    endsection
    endsection
    endsection
    endsection

    Where did I go wrong?

    #124087
    Oliver Kreylos
    Keymaster

    You gave both tool sections the same name (“WaterTool”). You need to give them different names, such as “WaterTool1” and “WaterTool2”, or “GlobalWaterTool” and “LocalWaterTool”.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Comments are closed.