I want to add a hotkey by script. The regular Addon tutorial mentions how to add a normal hotkey. But i need a Map Type Mouse, left mouse button, with holding down a modifier key. And i run into trouble here.
My current code is
kmi = km.keymap_items.new("view3d.paint_select", map_type = 'MOUSE', type = 'LEFTMOUSE', value = 'PRESS', key_modifier = 'I')
And i get this error:
TypeError: KeyMapItems.new(): was called with invalid keyword argument(s) (map_type), expected (idname, type, value, any, shift, ctrl, alt, oskey, key_modifier, head)
map_type is missing in the expected list of keywords. But where else should i put it then? Is map_type not part of KeyMapItem?