0

I want to assign a key equivalent to an NSButton if the control is the first responder.

4

1 回答 1

1

你可以在你的实现中覆盖becomeFirstResponder:和调用setKeyEquivalent:。如果要在按钮失去第一响应者状态时删除等效键,请覆盖resignFirstResponder:.

于 2011-05-30T17:25:48.377 回答