lacasanova / shortcutrecorder

Automatically exported from code.google.com/p/shortcutrecorder
0 stars 0 forks source link

Needs active delegate function #26

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

I've noticed programs using this component suffer from this defect: Let's say 
you use it to assign a 
global hot key that does XYZ. So you enter the keystroke, and the hotkey is 
defined. Now if you 
want to re-enter the key, you can't, because that key is now overridden to do 
XYZ, and the 
component can't see it.

It seems to me that when this component becomes active listening to keystokes, 
it should call a 
delegate function. The user function would then disable all the program's 
hotkeys temporarily. 
Then when the component is done getting its keystroke, another delegate 
function would re-
enable whatever the key is supposed to do.

Original issue reported on code.google.com by idou...@gmail.com on 2 Sep 2008 at 12:40

GoogleCodeExporter commented 8 years ago
I think this was a misunderstanding on my part. When the user clicks the X, the 
delegate is called with an invalid 
key (-1 or nil or something), at which point your program ought to deactivate 
the old hotkey, and then this 
problem doesn't arise. At least I think that is what is supposed to happen, but 
it would be good if this was stated 
explicitely somewhere in the doco.

Original comment by idou...@gmail.com on 21 Oct 2009 at 4:31