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

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

		Returns:
			~libinput.constant.ButtonState: The button state 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_state(
			self._handle)
The button state that triggered this event.

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

		Returns:
			~libinput.constant.ButtonState: The button state triggering this
			event.
		Raises:
			AttributeError