To sidestep a problem I ran into creating that mapping for the OSMC remote the home button mapping is added to many individual windows instead of just a single command in global. As the window specific mappings take precedence over global mappings you can’t just map a new function for that button and have it work in most windows in this particular situation. There is a couple ways of getting to where you want to go. The easiest if your only wanting the function changed in the video library windows is to map it to “videos” in keymap editor instead of global. Another option would be to disable the custom OSMC keymap at Settings>System>Input>Peripherals>OSMC RF Remote>Don’t use the custom keymap for this device>[enable]
and then reboot Kodi which should allow your global mapping to work as expected. Or for the adventurous, you can do a manual keymap. If you check out the very end of the following post…
there is an example keymap titled “Make home button dedicated to CEC power control” which you could copy and just change the global actions to the function you want. That keymap removes all the custom mappings for the home button so whatever is put in the global section will work in all windows.