code: static void updateShortcuts(BaseUIComponent component, Set<String> shortcuts, boolean remove) {
          Set<String> currentShortcuts = CommandUtil.parseShortcuts(component.getKeycapture(), null);
          
          if (remove) {
              currentShortcuts.removeAll(shortcuts);
          } else {
              currentShortcuts.addAll(shortcuts);
          }
          
          component.setKeycapture(CommandUtil.concatShortcuts(currentShortcuts));
      }
docs: /*package