Keybinds can be triggered in various ways, with the primary thing to keep in mind is that it operates based on presses and releases. There is no concept of a "full click" in jsmacros. Here are some examples:
// Log all keybinds to chat
KeyBind.getKeyBindings().forEach(JavaWrapper.methodToJava((bind, key) => {
Chat.log(`- ${bind}: ${key}`);
}));
// Hold mine/attack