**Bash + Xdotool, 51 bytes**

    while true; do xdotool key Num_Lock; sleep .5; done

Just execute it in a bash shell.  It needs to be in a graphical environment.  It uses Num Lock because it is shorter(Thanks to @Engineer Toast)