The delay is there because I figured when you press a button it takes some milliseconds to let it go again and I only want to use it once, not consecutive times.
Does your IR send the same code over and over? Most do not. They send the value of the button when first pressed, and then send a repeat code (that is not the same as the button code) when the button is held down.