Your current code doesn't appear to take into account the frame time. I would both accelerate and translate using a timer, or ensure you run at a fixed frametime.
A quick look shows that your code also uses a second thread and runs all the code in that thread. Many GLFW functions need to be called from the main thread. Since it doesn't look like you need the thread, I would just run without it.
By the way, I would put braces around the body of your if statement as it is very confusing as to what you intend.