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

    :param name: Name.

    :return: Windows virtual key, or None if not found.
    """
    # Map custom name to Windows virtual key.
    # Custom name is mapped first for `^`, `#`, `!`, `+` to mean modifier keys.
    vk = _MAP_CUSTOM_NAME_TO_WIN_VK.get(name.upper(), None)

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

    # If virtual key is not found.

    # Map character to Windows virtual key
    vk = MAP_CHAR_TO_WIN_VK.get(name, None)

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

    # If virtual key is not found.

    # Map shifted character to Windows virtual key
    vk = MAP_SHIFTED_CHAR_TO_WIN_VK.get(name, None)

    # If virtual key is found
    if vk is not None:
        # Prefix the virtual key with EVK_SHIFT
        vk_s = [EVK_SHIFT, vk]

        # Return the virtual key tuple
        return vk_s

    # If virtual key is not found.

    # Map standard name or short name to Windows virtual key
    vk = _MAP_NAME_SHORT_NAME_TO_WIN_VK.get(name.upper(), None)

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

    # If virtual key is not found.

    # Return None
    return None

    Map given name to Windows virtual key.

    :param name: Name.

    :return: Windows virtual key, or None if not found.
    
Map given name to Windows virtual key.
Map given name to Windows virtual key .
def _map_name_to_win_vk(name):
    vk = _MAP_CUSTOM_NAME_TO_WIN_VK.get(name.upper(), None)
    if vk is not None:
        return vk
    vk = MAP_CHAR_TO_WIN_VK.get(name, None)
    if vk is not None:
        return vk
    vk = MAP_SHIFTED_CHAR_TO_WIN_VK.get(name, None)
    if vk is not None:
        vk_s = [EVK_SHIFT, vk]
         tuple
        return vk_s
    vk = _MAP_NAME_SHORT_NAME_TO_WIN_VK.get(name.upper(), None)
    if vk is not None:
        return vk
    return None
def _map_name_to_win_vk ( name ) : vk = _MAP_CUSTOM_NAME_TO_WIN_VK . get ( name . upper ( ) , None ) if vk is not None : return vk vk = MAP_CHAR_TO_WIN_VK . get ( name , None ) if vk is not None : return vk vk = MAP_SHIFTED_CHAR_TO_WIN_VK . get ( name , None ) if vk is not None : vk_s = [ EVK_SHIFT , vk ] return vk_s vk = _MAP_NAME_SHORT_NAME_TO_WIN_VK . get ( name . upper ( ) , None ) if vk is not None : return vk return None
Map given name to Windows virtual key.
Map given name to Windows virtual key .
"""
    Map given name to Windows virtual key.

    :param name: Name.

    :return: Windows virtual key, or None if not found.
    """ # Map custom name to Windows virtual key. # Custom name is mapped first for `^`, `#`, `!`, `+` to mean modifier keys. # If virtual key is found # Return the virtual key # If virtual key is not found. # Map character to Windows virtual key # If virtual key is found # Return the virtual key # If virtual key is not found. # Map shifted character to Windows virtual key # If virtual key is found # Prefix the virtual key with EVK_SHIFT # Return the virtual key tuple # If virtual key is not found. # Map standard name or short name to Windows virtual key # If virtual key is found # Return the virtual key # If virtual key is not found. # Return None
Windows virtual key, or None if not found.
Windows virtual key or None if not found .
name
None