src/aoikhotkey/hotkey_parser.py
def vk_tran(vk, side=VK_TRAN_SIDE_V_LEFT):
    """
    Transform given virtual key to sided virtual key.
    """
    # If given side is not valid
    if side not in {
        VK_TRAN_SIDE_V_NONE,
        VK_TRAN_SIDE_V_LEFT,
        VK_TRAN_SIDE_V_RIGHT,
    }:
        # Raise error
        raise ValueError(side)

    # If given side is valid.

    # If given side is none
    if side == VK_TRAN_SIDE_V_NONE:
        # Return given virtual key
        return vk

    # If given side is not none.

    # Expand given virtual key to two sided virtual keys
    vk_s = vk_expand(vk)

    # If given virtual key has no corresponding sided virtual keys
    if vk_s is None:
        # Return given virtual key
        return vk

    # If given virtual key has corresponding sided virtual keys.

    # 3MMWQ
    # Get sided virtual key
    #
    # Code `vk_s[side]` assumes the two-item tuple structure at 2AO2I and the
    # side values defined at 2MVP3 being 0 and 1.
    sided_vk = vk_s[side]

    # Return the sided virtual key
    return sided_vk

    Transform given virtual key to sided virtual key.
    
Transform given virtual key to sided virtual key.
Transform given virtual key to sided virtual key .
def vk_tran(vk, side=VK_TRAN_SIDE_V_LEFT):
    if side not in {
        VK_TRAN_SIDE_V_NONE,
        VK_TRAN_SIDE_V_LEFT,
        VK_TRAN_SIDE_V_RIGHT,
    }:
        raise ValueError(side)
    if side == VK_TRAN_SIDE_V_NONE:
        return vk
    vk_s = vk_expand(vk)
    if vk_s is None:
        return vk
     Code `vk_s[side]` assumes the two-item tuple structure at 2AO2I and the
     side values defined at 2MVP3 being 0 and 1.
    sided_vk = vk_s[side]
     Return the sided virtual key
    return sided_vk
def vk_tran ( vk , side = VK_TRAN_SIDE_V_LEFT ) : if side not in { VK_TRAN_SIDE_V_NONE , VK_TRAN_SIDE_V_LEFT , VK_TRAN_SIDE_V_RIGHT , } : raise ValueError ( side ) if side == VK_TRAN_SIDE_V_NONE : return vk vk_s = vk_expand ( vk ) if vk_s is None : return vk sided_vk = vk_s [ side ] return sided_vk
Transform given virtual key to sided virtual key.
Transform given virtual key to sided virtual key .
"""
    Transform given virtual key to sided virtual key.
    """ # If given side is not valid # Raise error # If given side is valid. # If given side is none # Return given virtual key # If given side is not none. # Expand given virtual key to two sided virtual keys # If given virtual key has no corresponding sided virtual keys # Return given virtual key # If given virtual key has corresponding sided virtual keys. # 3MMWQ # Get sided virtual key # # Code `vk_s[side]` assumes the two-item tuple structure at 2AO2I and the # side values defined at 2MVP3 being 0 and 1. # Return the sided virtual key
vk
side