pooriaazimi / BetterDictionary

Bookmark words in Apple's Dictionary.app
http://pooriaazimi.github.io/BetterDictionary
238 stars 28 forks source link

Thank you for developing this, really helps me, just one confusion. #7

Closed SherlockOy closed 9 years ago

SherlockOy commented 9 years ago

I press command+s and other operation you listed, none of them response, is there any bug about this?

pooriaazimi commented 9 years ago

Hi,

Are you sure the plugin is correctly installed? Do you see the "+" button at the top-left side of the menu bar, for example? betterdictionary-yosemite

If not, then you have to go through the steps described in https://github.com/pooriaazimi/BetterDictionary#os-x-1010-yosemite-and-109-mavericks to get it installed.

Also, what's your OS X version?

SherlockOy commented 9 years ago

Yeah, I'm sure I installed the plugin, and I can use the "+" button to add words to the list. The problem is just that I can't use the keyboard shortcut to add. My OS X version is 10.10.2.

pooriaazimi commented 9 years ago

That's strange...

I checked the code again and came up with a possible (though not plausible) cause. For Command+S, I'm not explicitly setting the modifier key (https://github.com/pooriaazimi/BetterDictionary/blob/master/BetterDictionary/BetterDictionary.m#L242-L244), relying on the fact that the default modifier is always Command – maybe that is the problem? But then why does it happen only on your machine (after ~4 years).

I am, however, setting the modifier keys explicitly for Command+Shift+D (https://github.com/pooriaazimi/BetterDictionary/blob/master/BetterDictionary/BetterDictionary.m#L255).

If you can use Command+Shift+D (to open/close the sidebar) but cannot use Command+S to save words, then that is the cause and I can fix it. Otherwise I have no other hypothesis :)

SherlockOy commented 9 years ago

Sorry for my replying late. Strange indeed... I tried Command+Shift+D , and that response to nothing. Just in case, when press the button "S", does it matter if the "S" is capital or not ? If not, well, never mind, and thanks for paying attention to this strange problem. :-P

pooriaazimi commented 9 years ago

Maybe you're using a non-standard non-English keyboard layout?

This is a Persian layout I sometimes use:

persian

And this is the same layout when I'm pressing down the Command key.

persian cmd

Notice that س is now replaced with S, so if I press س now, the final result would be Command + S and BetterDictionary (and all other apps) would happily interpret that as a save command. I'm guessing that your layout doesn't do that. You can check that using OS X's Keyboard Viewer:

screen shot 2015-01-18 at 6 20 05 pm

SherlockOy commented 9 years ago

I have checked, not this problem...I use the standard English keyboard layout and the result is the same...