Have you also added the mapping of the Harmony Clear button-send to the Kodi Delete function in .Kodi\userdata\keymaps\keymap.xml ?
In the Harmony software I have the Clear button set to send the Clear keypress and change it's function, once received, in the keymap instead.
Keymap, of course! Completely forgot about that, thanks for the code.