onRButtonDown never triggered

Hi all,

I was working on a tool when I was unable to assign actions to the right mouse button clic using the onRButtonDown tool method. Using the Sketchup debugger I was unable to reach my brake point inside the tool onRButtonDown method…

  def onRButtonDown(arg_flags, arg_x, arg_y, arg_view)
    #Remove the last position recorded
    @picked_positions.pop

    #Force view to be refreshed and redrawn
    arg_view.refresh
  end

When I switch from the onRButtonDown to the onRButtonUp everything works fine. Does anyone notice this before? That sounds strange to me so I’m posting it here to double check my experience on this (I’m using SU2019 19.0.685 64-bit on Windows)

Thanks for your feedbacks.

You are best to use the ‘…Up’ version**, as it will be likely to work in all circumstances and OSs.

[Unless you want the user to hold down that button down form some weird reason - then your works really stats !]

**For example the key-press ‘…Down’ for TAB works on PC, but NOT MAC - whereas the key-press ‘…Up’ for TAB works on PC & MAC !

1 Like

only :onRButtonUp() works on my mac, as well…

there are some threads on SketchUcation discussing this and other ‘click’ oddities inside tools…

john

2 Likes

Thanks Tig and John for your replies, I’ll keep it with the onRButtonUp version :wink:

Do we need to open a bug for this anyway ?