禁用(或过滤)热角 [英] Disable (or filter) Hot Corners

查看:103
本文介绍了禁用(或过滤)热角的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个后台应用程序,当某个特定的应用程序打开时,我想禁用任何Hot Corners.无论如何,有没有拦截"或过滤"这些事件?也许是我没有想到的另一种方式来实现这一目标?

I have a background app that, when a specific app is open, I want to disable any Hot Corners. Is there anyway to 'intercept' or 'filter' these events? Or perhaps another way to accomplish this that I am not thinking of?

注意:该应用程序是用Objective-C编写的.

Note: The app is written in Objective-C.

推荐答案

我认为答案是不是真的".

I think the answer is "not really".

一个应用程序本身具有一些选项,但是这与您希望在后台应用程序中执行以影响其他应用程序的愿望不符.这些选项包括捕获显示内容,以及设置演示文稿选项(-[NSApplication setPresentationOptions:]).

An app has some options for itself, but that doesn't fit with your desire to do it in a background app to affect a different app. Those options include capturing the display(s) and, maybe, setting the presentation options (-[NSApplication setPresentationOptions:]).

您可以尝试设置 Quartz事件点击,然后简单地吞噬屏幕角​​中(或将移出屏幕角)的任何鼠标移动事件.我不知道您是否要禁用所有热角或仅禁用分配给特定功能的那些角.您可以使用AppleScripts如下查询热点.读者可以将其翻译成脚本桥作为练习:

You might try setting up a Quartz event tap and simply swallowing any mouse-move event that is in (or would move beyond) the screen corner(s). I don't know if you want to disable all hot corners or only those corners assigned to a specific function. You can query the hot corners using AppleScripts like the following. Translating that into the Scripting Bridge is left as an exercise for the reader:

tell application "System Events"
    get activity of top left screen corner of expose preferences
end tell

这篇关于禁用(或过滤)热角的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆