title: Can I make this code work with Shortcut Recorder?
body: <p>I have this code(below) to create a customizable Hot Key.</p>
  
  <pre><code>OSStatus MyHotKeyHandler(EventHandlerCallRef nextHandler,EventRef theEvent,void *userData)
  {
      EventHotKeyID hkCom;
      GetEventParameter(theEvent,kEventParamDirectObject,typeEventHotKeyID,NULL,sizeof(hkCom),NULL,&amp;hkCom);
      HotKeyController *controller = (HotKeyController *)userData;
      int l = hkCom.id;
      switch (l) {
          case 1: [controller-&gt;window makeKeyAndOrderFront:NSApp];  
              break;
          case 2: [controller-&gt;searchWindow makeKeyAndOrderFront:nil];
              break;
          case 3: [controller-&gt;entryWindow makeKeyAndOrderFront:nil];
              break;  
      }
      return noErr;
  }
  
  - (void)awakeFromNib
  {
      //Register the Hotkeys
      EventHotKeyRef gMyHotKeyRef;
      EventHotKeyID gMyHotKeyID;
      EventTypeSpec eventType;
      eventType.eventClass=kEventClassKeyboard;
      eventType.eventKind=kEventHotKeyPressed;
  
  
      InstallApplicationEventHandler(&amp;MyHotKeyHandler,1,&amp;eventType,(void *)self,NULL);
  
      gMyHotKeyID.signature='htk1';
      gMyHotKeyID.id=1;
      if([[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyCodeMain"]!=-999) {
          RegisterEventHotKey([[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyCodeMain"], [[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyModifiersMain"], gMyHotKeyID, GetApplicationEventTarget(), 0, &amp;gMyHotKeyRef);
      }
  
      gMyHotKeyID.signature='htk2';
      gMyHotKeyID.id=2;
      if([[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyCodeSearch"]!=-999) {
          RegisterEventHotKey([[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyCodeSearch"], [[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyModifiersSearch"], gMyHotKeyID, GetApplicationEventTarget(), 0, &amp;gMyHotKeyRef);
      }
  
      gMyHotKeyID.signature='htk3';
      gMyHotKeyID.id=3;
      if([[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyCodeEntry"]!=-999) {
          RegisterEventHotKey([[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyCodeEntry"], [[NSUserDefaults standardUserDefaults] integerForKey:@"hotkeyModifiersEntry"], gMyHotKeyID, GetApplicationEventTarget(), 0, &amp;gMyHotKeyRef);
      }
  
  }
  </code></pre>
  
  <p>But the code was made to make the Hotkey Customizable via a Popup Box, how would I make it so it would work with <a href="http://wafflesoftware.net/shortcut/" rel="nofollow noreferrer">Shortcut Recorders</a> <a href="http://snapplr.com/ysvy" rel="nofollow noreferrer">Button Or Field.</a> In their example application (from the person who made the code) they used a Popup box connected via an action to the Controller to Choose the Hotkey and a Text Field connected to a NSUserDefaultsController to Display it. How would I make the Shortcut Recorders Field/Button choose the Hotkey because at the moment  i connect the action to and the User Deault Controller to it but it doesn't work (i.e Make the Hotkey Work) .  How would the code need to be changed to make it work or make it do what is should do?</p>