def button(self):
		"""The button that triggered this event.

		For pointer events that are not of type
		:attr:`~libinput.constant.EventType.POINTER_BUTTON`,
		this property raises :exc:`AttributeError`.

		Returns:
			int: The button triggering this event.
		Raises:
			AttributeError
		"""

		if self.type != EventType.POINTER_BUTTON:
			raise AttributeError(_wrong_prop.format(self.type))
		return self._libinput.libinput_event_pointer_get_button(self._handle)
The button that triggered this event.

		For pointer events that are not of type
		:attr:`~libinput.constant.EventType.POINTER_BUTTON`,
		this property raises :exc:`AttributeError`.

		Returns:
			int: The button triggering this event.
		Raises:
			AttributeError