on osx lion, you can control-command-d or triple-tap on a word that your mouse is pointed to in any app to launch a popover dictionary. i want to make an app to track the words a user is looking up in the dictionary.
how do i observe the event where the user does control-command-d or triple-tap to launch the popover dictionary?
I understand that the specific API for this is HIDictionaryWindowShow.
In the Dictionary app on your Mac, type a word or phrase in the search field in the upper-right corner of the Dictionary window. Note: If you add another Dictionary source, wait for it to download completely before searching for a word or phrase.
Make Dictionary talkGo to System Preferences, click Dictation & Speech, click the Text to Speech tab, and choose a voice. To make Dictionary talk, select a word and Control-click (or right-click) it. From the contextual menu, choose Speech > Start Speaking.
You can open Dictionary from Launchpad (click the Launchpad icon in the Dock).
Auto-correction is available for languages that your Mac is set up to spell check. To see these languages, go to System Preferences > Keyboard > Text and click the Spelling pop-up menu. Click "Set Up" to learn how to add spelling dictionaries for additional languages.
You can use popoverDidShow:
- (void)awakeFromNib {
NSNotificationCenter* notificationCenter = [NSNotificationCenter defaultCenter];
[notificationCenter addObserver:self selector:@selector(popoverDidShow:)
name:NSPopoverDidShowNotification object:nil];
}
// dictionary is shown or another NSPopover
- (void)popoverDidShow:(NSNotification*)notify {
//your code
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With