function

lowk.hotkey.bind

Signature

function lowk.hotkey.bind(keys, fn) -> hotkey

The keys param can either be a string like "control alt shift d" or a table like {MOD_CONTROL, VK_V}. When it's a string, each key is separated by spaces, the last key is interpreted as VK_{key}, and the other keys are interpreted as MOD_{key} and bitwise OR'd together, to create the table variant of the parameter.

The fn function takes no parameters and has no meaningful return value.

The return value is a table with keys id: int and unbind: function()->void