code: public static void registerHook (int modifierMask, int keyCode, Hook hook)
      {
          // store the hooks mapped by key code
          ArrayList<Tuple<Integer,Hook>> list = _bindings.get(keyCode);
          if (list == null) {
              list = new ArrayList<Tuple<Integer,Hook>>();
              _bindings.put(keyCode, list);
          }
  
          // append the hook and modifier mask to the list
          list.add(new Tuple<Integer,Hook>(modifierMask, hook));
      }
docs: Registers the supplied debug hook to be invoked when the specified
  key combination is depressed.
  
  @param modifierMask a mask with bits on for all modifiers that must
  be present when the specified key code is received (e.g. {@link
  KeyEvent#CTRL_DOWN_MASK}|{@link KeyEvent#ALT_DOWN_MASK}).
  @param keyCode the code that identifies the normal key that must be
  pressed to activate the hook (e.g. {@link KeyEvent#VK_E}).
  @param hook the hook to be invoked when the specified key
  combination is received.