How do I rebind keybinds from a string

I would first try to convert the String into a working and functional Dictionary although it will be difficult because the content of the String are not formatted in a uniform matter.
We essentially got a big array with only one string entry.
Also sometimes they use :, sometimes they also use =. Is there a way to uniform the entries?

For all intentions and purposes, you only need the keycode and the event_id.