Fix a bug where pressing enter/return would open console