@Override
            public void invoke(long window, int key, int scancode, int action, int mods) {
                scancode = GlfwKeyMap.toJmeKeyCode(key);
                if( key == GLFW_KEY_LEFT_SHIFT || key == GLFW_KEY_RIGHT_SHIFT ) {
                    shift_pressed = (action == GLFW_PRESS);
                } else if( key >= 'A' && key <= 'Z' && !shift_pressed ) {
                    key += 32; // make lowercase
                } else if( key >= 'a' && key <= 'z' && shift_pressed ) {
                    key -= 32; // make uppercase
                }
                final KeyInputEvent evt = new KeyInputEvent(scancode, (char) key, GLFW_PRESS == action, GLFW_REPEAT == action);
                evt.setTime(getInputTimeNanos());
                keyInputEvents.add(evt);
            }
Create a new input attached to the given {@link LwjglWindowVR context}.
@param context the context to attach to this input.
jme3-vr/src/main/java/com/jme3/input/lwjgl/GlfwKeyInputVR.java