added ugly but working decision method for input device choice.