I have an LSUIElement
application that displays a menubar status item. The application can display a dialog window that contains a text field.
If the user right-clicks/control-clicks the text field, a menu appears that allows cut, copy, paste, etc. However, the standard Command-X, Command-C, and Command-V keyboard shortcuts do not work in the field. I assume this is because my application does not provide an Edit menu with those shortcuts defined.
I've tried adding an Edit menu item to my application's menu, as suggested in the Ship Some Code blog, but that did not work. The menu items in the Edit menu can be used, but keyboard shortcuts still don't work.
I can imagine a few ways to hack the keyboard handling, but is there a "recommended" way to make this work?
(For details about the app, see Menubar Countdown.)
Related question: Copy/Paste Not Working in Modal Window
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…