code: def mousePressEvent(self, ev):
      self.setChecked(True)
      lpos = ev.position() if hasattr(ev, "position") else ev.localPos()
      self.pressPos = lpos
      ev.accept()
  
file_path: pyqtgraph/pyqtgraph/widgets/JoystickButton.py
imports: from math import hypot
  from ..Qt import QtCore, QtGui, QtWidgets
label_desc: Use image node_id 2 for calling the JoystickButton obj's underlying member method code with example usage: obj.mousePressEvent(ev) without return types