use get_random_int() to fix entropy depleting

https://patchwork.kernel.org/patch/1745611/
input: Move randomness after handling input event