def set_numlock_state(
        self,
        state: Optional[Literal[True, False, 0, 1, 'On', 'Off', 'AlwaysOn', 'AlwaysOff']] = None,
        *,
        blocking: bool = True,
    ) -> Union[None, FutureResult[None]]:
        """
        Analog for `SetCapsLockState <https://www.autohotkey.com/docs/commands/SetNumScrollCapsLockState.htm>`_
        """
        args: List[str] = []
        if state is not None:
            if str(state).lower() not in ('1', '0', 'on', 'off', 'alwayson', 'alwaysoff'):
                raise ValueError(
                    f'Invalid value for state. Must be one of On, Off, AlwaysOn, AlwaysOff or None. Got {state!r}'
                )
            if state is True:
                state = 'On'
            elif state is False:
                state = 'Off'

            args.append(str(state))
        else:
            args.append('')

        resp = self._transport.function_call('AHKSetNumLockState', args, blocking=blocking)
        return resp

        Analog for `SetCapsLockState <https://www.autohotkey.com/docs/commands/SetNumScrollCapsLockState.htm>`_
        
ahk/_sync/engine.py