added flushing option to Keyboard class' get_key