code: def events(self):
  		
  
  		while True:
  			events = self._selector.select()
  			for nevent in range(len(events) + 1):
  				self._libinput.libinput_dispatch(self._li)
  				hevent = self._libinput.libinput_get_event(self._li)
  				if hevent:
  					type_ = self._libinput.libinput_event_get_type(hevent)
  					self._libinput.libinput_dispatch(self._li)
  					if type_.is_pointer():
  						yield PointerEvent(hevent, self._libinput)
  					elif type_.is_keyboard():
  						yield KeyboardEvent(hevent, self._libinput)
  					elif type_.is_touch():
  						yield TouchEvent(hevent, self._libinput)
  					elif type_.is_gesture():
  						yield GestureEvent(hevent, self._libinput)
  					elif type_.is_tablet_tool():
  						yield TabletToolEvent(hevent, self._libinput)
  					elif type_.is_tablet_pad():
  						yield TabletPadEvent(hevent, self._libinput)
  					elif type_.is_switch():
  						yield SwitchEvent(hevent, self._libinput)
  					elif type_.is_device():
  						yield DeviceNotifyEvent(hevent, self._libinput)
docs: Yield events from the internal libinput's queue.
  
  		Yields device events that are subclasses of
  		:class:`~libinput.event.Event`.
  
  		Yields:
  			:class:`~libinput.event.Event`: Device event.