Added code to handle opposing keys pressed