Fixed input segfaults by switching to new KeyboardState and scancodes