move some of the input setup into an input device component