What is the correct way to check if you have a mouse click rather than a keyboard click? I would be tempted to set a module level flag based on what most recently happened - if there was a "mousedown" event more recently we'll set isKeyboard to false and isMouse to true and vice-versa if "keydown" is pressed.
Then we wouldn't need the isInvokedByMouse and isInvokedByKeyboard functions.
Is there a better way? Relying on screen coordinates for this is highly dubious and I would argue a hack.
replies(1):