try {
Keyboard.create();
Keyboard.enableRepeatEvents(true);
Mouse.create();
InputSystem inputSystem = CoreRegistry.putPermanently(InputSystem.class, new InputSystem());
inputSystem.setMouseDevice(new LwjglMouseDevice());
inputSystem.setKeyboardDevice(new LwjglKeyboardDevice());
} catch (LWJGLException e) {
throw new RuntimeException("Could not initialize controls.", e);
}
}