Hi, I'm using Mi 5s, and I failed to change the back and menu key by modifying the file mentioned in previous posts. However, the mod in xda for los did work for me: https://forum.xda-developers.com/mi-5s/development/mod-swap-buttons-xiaomi-mi-5s-t3561095
I also made a magisk version (maybe...