key handling updated for GLFW3; fixes #2