2

I have an option to right-click. But users that need to use Ctrl + Click cannot use right-click because Java only allows for the right-click button to be hit.

Does anyone know how I can allow for Ctrl + Click, as well as the right-click button?

Thanks!

mre
  • 43,520
  • 33
  • 120
  • 170
Dylan Wheeler
  • 6,928
  • 14
  • 56
  • 80

1 Answers1

3

I'm assuming that you want to support users on Macs with one button mice. Here's another question that addressed this issue: How to detect right-click event for Mac OS

Check out the answer that wasn't accepted as that appears to be the best solution. Long story short, you want to use SwingUtilities.isRightMouseButton(event).

Community
  • 1
  • 1
Jon7
  • 7,165
  • 2
  • 33
  • 39