src/aoikhotkey/hotkey_manager.py
def _hotseq_is_triggered(self, hotseq):
        """
        Test whether given key-sequence is triggered.

        :param hotseq: Key-sequence's virtual key list.

        :return: Whether given key-sequence is triggered.
        """
        # Get given key-sequence's length
        hotseq_len = len(hotseq)

        # Compare with the newest virtual keys in the queue
        try:
            # For given key-sequence's each virtual key
            for idx, vk in enumerate(hotseq):
                # Get the corresponding virtual key's index in the queue.
                # E.g. `hotseq_len` is 2, then 0 -> -2, 1 -> -1.
                queue_idx = -hotseq_len + idx

                # May raise IndexError if the queue is not long enough
                queue_vk = self._vk_s_dn_queue[queue_idx]

                # If the virtual key is not EQ the corresponding virtual key
                if vk != queue_vk:
                    # Return False
                    return False

        # If the queue is not long enough
        except IndexError:
            # Return False
            return False

        # Return True
        return True

        Test whether given key-sequence is triggered.

        :param hotseq: Key-sequence's virtual key list.

        :return: Whether given key-sequence is triggered.
        
Test whether given key-sequence is triggered.
Test whether given key - sequence is triggered .
def _hotseq_is_triggered(self, hotseq):
        hotseq_len = len(hotseq)
        try:
            for idx, vk in enumerate(hotseq):
                queue_idx = -hotseq_len + idx
                queue_vk = self._vk_s_dn_queue[queue_idx]
                if vk != queue_vk:
                    return False
        except IndexError:
            return False
        return True
def _hotseq_is_triggered ( self , hotseq ) : hotseq_len = len ( hotseq ) try : for idx , vk in enumerate ( hotseq ) : queue_idx = - hotseq_len + idx queue_vk = self . _vk_s_dn_queue [ queue_idx ] if vk != queue_vk : return False except IndexError : return False return True
Test whether given key-sequence is triggered.
Test whether given key - sequence is triggered .
"""
        Test whether given key-sequence is triggered.

        :param hotseq: Key-sequence's virtual key list.

        :return: Whether given key-sequence is triggered.
        """ # Get given key-sequence's length # Compare with the newest virtual keys in the queue # For given key-sequence's each virtual key # Get the corresponding virtual key's index in the queue. # E.g. `hotseq_len` is 2, then 0 -> -2, 1 -> -1. # May raise IndexError if the queue is not long enough # If the virtual key is not EQ the corresponding virtual key # Return False # If the queue is not long enough # Return False # Return True
Whether given key-sequence is triggered.
Whether given key - sequence is triggered .
self
hotseq
Key-sequence's virtual key list.
Key - sequence ' s virtual key list .