cocoabits / MASShortcut

Modern framework for managing global keyboard shortcuts compatible with Mac App Store. More details:
http://blog.shpakovski.com/2012/07/global-keyboard-shortcuts-in-cocoa.html
BSD 2-Clause "Simplified" License
1.52k stars 220 forks source link

hotkey bind fail but return success #97

Open wangchenyun opened 7 years ago

wangchenyun commented 7 years ago

If shortcut is alread exist by other apps,it will work fail with any information.The api "RegisterEventHotKey" always return ture. Does anything I can do with it?

And it cause a problem that hotkey bind ,in fact it is a failure and can not bind same hotkey again. so I want to change this block(@property (nonatomic, copy) void (^shortcutValueChange)(MASShortcutView *sender);),but I can found where is his implementation?

Thank you for giving me the answer.

shpakovski commented 7 years ago

Hello Wang, thanks a lot for the problem report!

Could you be more specific? Please describe all steps to reproduce this Issue, maybe starting from git clone.

Thanks in advance 👍

wangchenyun commented 7 years ago

Sorry for my late reply! While a key (like Cmd+W) is registered as an exclusive key,you can not register a same key exclusive later. It is ok,but when the first register app has quit,I also can not register the same key.I should unregister the key that I have register fail before and then I can register. This is the way now I handle. do you have any good ideas to deal with this problem?

shpakovski commented 7 years ago

I’m very sorry, but please, describe the case step by step. It is still not clear to me what is a problem.

zoul commented 7 years ago

Same here, unfortunately: I can’t understand the problem clearly enough.