sallos is down so i can't test but
XButton1 = 5
XButton2 = 6
XButton1 i think is Mouse4 but it could be Mouse5 and XButton2 i think is Mouse5 but it could be Mouse4, i really don't remember.
Code:
string keyID = "6";
Keys key = (Keys)Enum.Parse(typeof(Keys), keyID);
key will end up being Keys.XButton2 so this should work unless PlayUO pareses it different.