Charge USB device with power generating by mechanical computer keystrokes
First, to charge a USB device takes a certain amount of charge, not a certain amount of current. So it might be 500mAh which is 500mA for 1 hour, or 1mA for 500 hours, or 10 uA for 50000 hours (that's about 6 years). 

Whatever, 500mAh converted to units of charge (Amp-seconds, or Coulombs) is 1800 Coulombs. And at 5V that's 5 * 1800 = 7200 Joules.

Now let's assume you can design a perfectly efficient keyboard. My full size keyboard has a key travel of 4.5mm and AS NEAR AS i CAN MEASURE (sorry I measured the caps lock key) about 40g or 0.4N to operate the key.
So each key press requires 0.4*0.0045 joules, or 0.0018 Joules. 

So after 7200/0.0018 keystrokes, or 4 million keystrokes, your device will be charged. Assuming you manage to convert all that energy into electrical power with 100% efficiency.

And you'll have written the Lord of the Rings.

Twice.