src/aoikhotkey/hotkey_manager.py
def emask_ctx(self, emask):
        """
        Create event mask context manager.

        :param mask: Event mask.

        :return: Event mask context manager.
        """
        # Create context manager factory
        @contextmanager
        def ctx_factory():
            # Store old mask
            old_mask = self._emask

            # Set new mask
            self._emask = emask

            # This is before entering the context
            yield
            # This is after exiting the context

            # Restore old mask
            self._emask = old_mask

        # Return event mask context manager
        return ctx_factory()

        Create event mask context manager.

        :param mask: Event mask.

        :return: Event mask context manager.
        
Create event mask context manager.
Create event mask context manager .
def emask_ctx(self, emask):
        @contextmanager
        def ctx_factory():
            old_mask = self._emask
            self._emask = emask
            yield
            self._emask = old_mask
        return ctx_factory()
def emask_ctx ( self , emask ) : @ contextmanager def ctx_factory ( ) : old_mask = self . _emask self . _emask = emask yield self . _emask = old_mask return ctx_factory ( )
Create event mask context manager.
Create event mask context manager .
"""
        Create event mask context manager.

        :param mask: Event mask.

        :return: Event mask context manager.
        """ # Create context manager factory # Store old mask # Set new mask # This is before entering the context # This is after exiting the context # Restore old mask # Return event mask context manager
Event mask context manager.
Event mask context manager .
self
emask
mask
None