long (@NotNull String modifierId) { if (!modifierId.contains(".")) { if (modifierId.equalsIgnoreCase("alt")) { return InputEvent.ALT_DOWN_MASK; } if (modifierId.equalsIgnoreCase("cmd")) { return InputEvent.META_DOWN_MASK; } if (modifierId.equalsIgnoreCase("ctrl")) { return InputEvent.CTRL_DOWN_MASK; } if (modifierId.equalsIgnoreCase("shift")) { return InputEvent.SHIFT_DOWN_MASK; } return 0; } final String[] spl = modifierId.split("\\."); long mask = 0; for (String sub : spl) { mask |= _str2mask(sub); } return mask; }