Replies: 1 comment
-
Something's broken. I can't get it to work either on Hammerspoon 0.9.91 (6078) on Mojave. I also tried: hs.hotkey.bind({}, "1", function()
print("1 Pressed")
local eventtap = require("hs.eventtap")
local mouse = require("hs.mouse")
local event = eventtap.event
local RIGHT_MOUSE_DOWN = event.types["rightMouseDown"]
local RIGHT_MOUSE_UP = event.types["rightMouseUp"]
local CLICK_STATE = event.properties.mouseEventClickState
local point = mouse.absolutePosition()
local clickNumber = 1
event.newMouseEvent(RIGHT_MOUSE_DOWN, point):setProperty(CLICK_STATE, clickNumber):post()
event.newMouseEvent(RIGHT_MOUSE_UP, point):setProperty(CLICK_STATE, clickNumber):post()
end) Any ideas @cmsj? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I would like to open right click menu whenever i click on button "1"
Sounds simple enough, and i've gone through the documentation. Should look something like this but it doesnt work
Any ideas?
I tried middleClick, otherClick...
I know the keystroke bind is good cause i tested the hello world popup with it
Thank you in advance
Beta Was this translation helpful? Give feedback.
All reactions