Introduction
hackertyper.net is a website that simulates "hacking" (as the media portrays it) by outputting complicated code from the crypto section of the Linux kernel onto the screen as you type at a rate of 3 characters per one inputted.
Challenge
Your program/function should either accept a file as a command-line argument, have the file path hard-coded, or accept the text [that would be in the file] as a command-line or function argument, and mimic hackertyper.net by outputting 3 characters onto the screen (STDOUT or equivalent) from the file for each one received through STDIN or equivalent.
Once EOF is reached, the program should start outputting characters from the beginning of the file again (wrap).
Specs
For the purposes of simplicity, you can assume that STDIN has already been set to no buffer and no echo mode, that is not waiting until the user presses enter before passing input to your program and not displaying the characters you type.
The file can contain newlines, while the input will not contain newlines.
For a small example written in C (not golfed) that demonstrates how this works, see this.
Green text and a black background are not required.
Example input and output
The file:
#include <stdio.h>
int main() { }
Input:
hello world
Output:
#include <stdio.h>
int main() { }
The file:
hello
Input:
hello world
Output:
hellohellohellohellohellohellohel