The average American emits about 17 tons of CO2 per year, so you're saving less than one month's worth of emissions for the programmer, and that's assuming their program is used by millions of users on incredibly inefficient computers. With more realistic assumptions, the CO2 emitted by the programmer running his computer working on these optimizations, and getting to/from the office, probably greatly outweighs the benefit gained from reducing others' emissions.
This conversation happens a lot. I point out that some optimization isn't worthwhile, and I get a response along the lines of "every little bit counts." But you're kind of missing the point. Every little bit counts, but there are opportunity costs. It's not a choice between optimizing your keydown routines or doing nothing. It's a choice between optimizing your keydown routines, or spending that same time optimizing something that actually matters.
I'm not arguing for slower, less efficient programs. I'm arguing that you'll make faster, more efficient programs if you avoid optimizing things that don't make a big difference.