Well, I have a good message for you and ... well, another one.
The good mesage is that you are about to learn something new, JavaScript. The other message is that you will have to do that learning.
First thing you should become clear about is how you want to store the times. The easiest solution was a comma-separated list of timestamps, e.g.
1234, 1345, 1456, ...
Make sure you can work with that later in your analysis. If not, you can also store the timestamps into different variables, but that will limit data collection to a specific number of key presses.
SO, how to record the timestamps? YOu need an internal variable on the page (assume its ID is IV01_01), and your video HTML tag needs an HTML ID, let's assume the ID is myVIdeo.
So, you can simply write the timestamp to the internal variable whenever the space bar is pressed.
var input = document.getElementById("IV01_01");
var video = document.getElementById("myVideo");
document.addEventListener("keydown", function(objEvent) {
if (objEvent.keyCode == 32) {
input.value = input.value + ", " + video.currentTime;
}
});
upper limit of key press rate
That will depend on the system and browser the respondent is using. Let's assume that humans will not be able to outpress a halfway modern computer.
Is there a fixed latency between keypress and the time record
Unless the device is under heavy load, this latency will be much smaller than human response time. Usually you can assume an accuracy of about 1-2 frames. When you have 60 Hz, that is about 20-30 millisconds. Note: There is no use in trying to reduce the latency unless your respondents have a faster screen.