Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何在某些特定窗口中禁用键盘?
我想如果一个窗口是打开的,那么键盘不应该做任何事情。
提前致谢。
您可以从 NSWindow 的 canBecomeKeyWindow 方法返回 NO。这会禁用窗口的键盘