You should not copy paste these keys when entering. Doing so can insert line endings etc, when transferring between systems, particularly between windows and linux systems. iOS devices also used to have issues when entering keys by use of some of the on screen keyboards used in some of the XBMC remote apps.
I have the same problem. I added the line given to me in the license, After booting OSMC, I went to MY OSMC>Pi config>GPU Mem & Codec and the MPEG2 code is there but on the next line above, it shows disabled and I don’t know how to enable it`.