function keyPressed(key)
	if EnableKeyPress == false then
		return --return early
	end

	local bulletImg = "/assets/bullet.png"
	if key == "space" then
		local bullet = Bullet(UserPlayer1.x + UserPlayer1.width / 2, UserPlayer1.y, 1, bulletImg, 500)
		GameSounds.shoot1:play()
		table.insert(Bullets1, bullet)
	elseif key == "return" then
		local bullet = Bullet(UserPlayer2.x + UserPlayer2.width / 2, UserPlayer2.y, 2, bulletImg, 500)
		GameSounds.shoot2:play()
		table.insert(Bullets2, bullet)
	elseif key == "escape" then
		love.event.quit()
	elseif key == "r" then
		love.load()
	end

	-- KeyPressTime now equals a delay
	KeyPressTime = KeyDelay
	EnableKeyPress = false
end
