Missing keyUp events on meaningful key combinations (e.g. “Select till beginning of line”)

后端 未结 3 491
面向向阳花
面向向阳花 2020-12-11 20:28

I have an NSTextField which uses as an extended NSTextFieldCell, which creates a custom field editor, that intercepts and records key events. (Knowing the key events is impo

3条回答
  •  感情败类
    2020-12-11 21:13

    This is just the way the event architecture is set up. Sending key equivalent messages is preferred to sending messages for the various keys that are part of them. See "Handling Key Events," in particular, "Handling Key Equivalents." It looks like you could subclass NSApplication and override -sendEvent: to dispatch these events however you'd like, but you'd likely break more functionality than you'd add.

提交回复
热议问题