Enable On Screen Button and Disable Capacitive Button Xiaomi Redmi 3/s/x /Note 3/ Note 4

Requirements is ROOT ACCESS 
how to: 

go to system/build.prop and add new line "qemu.hw.mainkeys=0" without quotes.

now go to system/usr/keylayout/generic.kl and edit 4 lines at the videos.

Tested on MIUI 8, CM14, CM13, CM14.1, 

For Resurrection Remix Rom edit ft5x06_ts.kl instead of Generic.kl

Check on YouTube for the guides