added optional mouse/keyboard detection