Before blaming the power supply, when your keyboard or mouse doesn't work properly, make sure you are using a "lightweight" keyboard/mouse, there are some (especially keyboards) that use so much current that the R-PIs USB ports polyfuse nearly trips, and this means that the keyboard doesn't get enough voltage (below 4.75 Volt). A weak power-supply then doesn't help (as it might not keep up enough voltage to begin with), but even with the best power supply, if your keyboard draws 130mA then it will fail!
Solution, use it behind a sufficiently powered USB hub, or use a simple keyboard that draws a normal amount of current (say 30mA).
So avoid (directly connecting) keyboards with built in stuff (USB output connector for a mouse, lighted keys etc).
A keyboard with an USB output connector might seem a solution to use one less USB port, but it probably won't work, as it means that the keyboard includes the logic of a USB hub, so it needs the power for the keyboard, the hub, and the device connected to the hub, and that quickly adds up to more than the allowed 100mA