How to get paste selection at mouse click instead of mouse location

Currently We are getting the paste selection at mouse location, that is fine when we are pasting from context menu and keyboard it works fine.

But our requirement is when we are pasting from pallet it should paste at last mouse click event. It is not pasting their because last mouse location will be at pallet side only so it is pasting their. We are trying like getting mouse click event in canvas and assigning that to paste selection but its again pasting at mouse location only. So any suggestions???

Could you be a bit more clear on the sequence of operations you’re doing when pasting from the palette?

Typically palettes are used for drag and drop, but is your scenario something like this?

  1. Select node in palette
  2. Click somewhere on the main diagram
  3. Ctrl-V to paste the palette node