Last active
February 9, 2020 18:23
-
-
Save benjohnson2001/005bb438bbb2f57be6d25bbb7bc241a4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local function controlModifierIsActive() | |
return controlKeyIsHeldDown() and optionKeyIsNotHeldDown() and commandKeyIsNotHeldDown() | |
end | |
local function optionModifierIsActive() | |
return optionKeyIsHeldDown() and controlKeyIsNotHeldDown() and commandKeyIsNotHeldDown() | |
end | |
local function commandModifierIsActive() | |
return commandKeyIsHeldDown() and optionKeyIsNotHeldDown() and controlKeyIsNotHeldDown() | |
end | |
local function controlKeyIsHeldDown() | |
return gfx.mouse_cap & 32 == 32 | |
end | |
local function optionKeyIsHeldDown() | |
return gfx.mouse_cap & 16 == 16 | |
end | |
local function commandKeyIsHeldDown() | |
return gfx.mouse_cap & 4 == 4 | |
end | |
local function controlKeyIsNotHeldDown() | |
return gfx.mouse_cap & 32 ~= 32 | |
end | |
local function optionKeyIsNotHeldDown() | |
return gfx.mouse_cap & 16 ~= 16 | |
end | |
local function commandKeyIsNotHeldDown() | |
return gfx.mouse_cap & 4 ~= 4 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment