开发者

Secondary click toggle in OS X

开发者 https://www.devze.com 2023-01-17 07:51 出处:网络
I\'m trying to write a program that serves to toggle a secondary click for a one button HID (in this case a touch screen). What I want to do is have the user touch a button on the screen that makes th

I'm trying to write a program that serves to toggle a secondary click for a one button HID (in this case a touch screen). What I want to do is have the user touch a button on the screen that makes the next touch a right click. I simply don't know whe开发者_StackOverflowre to begin on this. I began by looking to Applescript, but found that this is impossible. Any help would be greatly appreciated.


You are looking for OS X's event tap mechanism. Event taps are used to find and modify low level events.

In your app you would set an event tap to find mouse down events and insert key down/up events into the event stream for the modifier keys where neccessary.

0

精彩评论

暂无评论...
验证码 换一张
取 消