objective c - Add hotkey when editing a NSTextField -
is possible add hotkeys when you're editing nstextfield? example, when you're in text field if pressed command + 1 inserted 1 string, , command + 2 insert text string, etc, when you're editing nstext field.
i tried adding keydown method subclassed nstextfield, didn't seem ever fired. if changed keyup gets fired, not if command key held down.
it seems when i'm searching hotkeys information find on global hotkeys (ones activate when app isn't visible) isn't i'm looking for.
if had menu item keyboard shortcut, implement validateuserinterfaceitem:
enable when field in responder chain. i'm not sure whether work hidden menu item.
Comments
Post a Comment