src/aoikhotkey/hotkey_parser.py
def vk_ntc(name):
    """
    Map given name to virtual key.

    :param name: Name.

    :return: Virtual key, or None if not found.
    """
    # If the platform is MacOS
    if IS_MACOS:
        # Map standard name or short name to MacOS virtual key
        mac_vk = _MAP_NAME_SHORT_NAME_TO_MAC_VK.get(name.upper(), None)

        # If virtual key is found
        if mac_vk is not None:
            # Return the virtual key
            return mac_vk

    # Map standard name or short name to Windows virtual key.
    win_vk = _map_name_to_win_vk(name)

    # If virtual key is found
    if win_vk is not None:
        # If the platform is MacOS
        if IS_MACOS:
            # If the virtual key is pre-defined
            if win_vk < 1000:
                # Map the Windows virtual key to MacOS virtual key.
                # May be None.
                vk = MAP_WIN_VK_TO_MAC_VK.get(win_vk, None)

            # If the virtual key is not pre-defined,
            # it means the virtual key is extended virtual key, e.g. EVK_CTRL.
            # Extended virtual keys will be processed by hotkey parse function.
            else:
                # Use the virtual key as-is
                vk = win_vk

            # Return the virtual key, or None
            return vk

    # Return the virtual key, or None
    return win_vk

    Map given name to virtual key.

    :param name: Name.

    :return: Virtual key, or None if not found.
    
Map given name to virtual key.
Map given name to virtual key .
def vk_ntc(name):
    if IS_MACOS:
        mac_vk = _MAP_NAME_SHORT_NAME_TO_MAC_VK.get(name.upper(), None)
        if mac_vk is not None:
            return mac_vk
    win_vk = _map_name_to_win_vk(name)
    if win_vk is not None:
        if IS_MACOS:
            if win_vk < 1000:
                vk = MAP_WIN_VK_TO_MAC_VK.get(win_vk, None)
            else:
                vk = win_vk
            , or None
            return vk
    , or None
    return win_vk
def vk_ntc ( name ) : if IS_MACOS : mac_vk = _MAP_NAME_SHORT_NAME_TO_MAC_VK . get ( name . upper ( ) , None ) if mac_vk is not None : return mac_vk win_vk = _map_name_to_win_vk ( name ) if win_vk is not None : if IS_MACOS : if win_vk < 1000 : vk = MAP_WIN_VK_TO_MAC_VK . get ( win_vk , None ) else : vk = win_vk return vk return win_vk
Map given name to virtual key.
Map given name to virtual key .
"""
    Map given name to virtual key.

    :param name: Name.

    :return: Virtual key, or None if not found.
    """ # If the platform is MacOS # Map standard name or short name to MacOS virtual key # If virtual key is found # Return the virtual key # Map standard name or short name to Windows virtual key. # If virtual key is found # If the platform is MacOS # If the virtual key is pre-defined # Map the Windows virtual key to MacOS virtual key. # May be None. # If the virtual key is not pre-defined, # it means the virtual key is extended virtual key, e.g. EVK_CTRL. # Extended virtual keys will be processed by hotkey parse function. # Use the virtual key as-is # Return the virtual key, or None # Return the virtual key, or None
Virtual key, or None if not found.
Virtual key or None if not found .
name
None