src/aoikhotkey/util/sendkey_winos.py
def vk_to_sc(vk, flags=0):
    """
    Map virtual key to scan code and flags.

    :param vk: Virtual key.

    :param flags: Flags.

    :return: A tuple of (scan_code, flags).
    """
    # Map virtual key to scan code
    sc = _MapVirtualKeyW(vk, 0)

    # If the virtual key is extended key
    if (vk >= 33 and vk <= 46) or (vk >= 91 and vk <= 93):
        # Add extended key flag
        flags |= _KEYEVENTF_EXTENDEDKEY

    # Return the scan code and flags
    return sc, flags

    Map virtual key to scan code and flags.

    :param vk: Virtual key.

    :param flags: Flags.

    :return: A tuple of (scan_code, flags).
    
Map virtual key to scan code and flags.
Map virtual key to scan code and flags .
def vk_to_sc(vk, flags=0):
    sc = _MapVirtualKeyW(vk, 0)
    if (vk >= 33 and vk <= 46) or (vk >= 91 and vk <= 93):
        flags |= _KEYEVENTF_EXTENDEDKEY
    return sc, flags
def vk_to_sc ( vk , flags = 0 ) : sc = _MapVirtualKeyW ( vk , 0 ) if ( vk >= 33 and vk <= 46 ) or ( vk >= 91 and vk <= 93 ) : flags |= _KEYEVENTF_EXTENDEDKEY return sc , flags
Map virtual key to scan code and flags.
Map virtual key to scan code and flags .
"""
    Map virtual key to scan code and flags.

    :param vk: Virtual key.

    :param flags: Flags.

    :return: A tuple of (scan_code, flags).
    """ # Map virtual key to scan code # If the virtual key is extended key # Add extended key flag # Return the scan code and flags
A tuple of (scan_code, flags).
A tuple of ( scan_code flags ) .
vk
None
flags
None