Input: keyboard - remove static variable and clean up initialization