Modify keyPressEvent