Trying to remap my hardware buttons
As you wrote you've modified a system file, it's safe to assume your device is rooted. There are several apps available promising to remap keys (see my list of key remapper apps), one of them might solve your issue. I have not tried any of them (had no need), but what sounds promising is Xposed Additions, see this screenshots:

 
Xposed Additions (source: Google Play; click images for larger variants)

On the first screenshot (the module's main screen), the last item reads "Buttons". Tapping that leads to the second screenshot – again look at the very button, and you see it even includes hardware keys (here: the power button). The item just above that would be your back button (soft or hard). So no need to directly tamper with system files – just let Xposed deal with it :)