	protected int[] sortModifierKeys(final int modifierKeys) {
		final IKeyLookup lookup = KeyLookupFactory.getDefault();
		final String platform = SWT.getPlatform();
		final int[] sortedKeys = new int[4];
		int index = 0;
		if ("win32".equals(platform) || "wpf".equals(platform)) { 
			if ((modifierKeys & lookup.getCtrl()) != 0) {
				sortedKeys[index++] = lookup.getCtrl();
			}
			if ((modifierKeys & lookup.getAlt()) != 0) {
				sortedKeys[index++] = lookup.getAlt();
			}
			if ((modifierKeys & lookup.getShift()) != 0) {
				sortedKeys[index++] = lookup.getShift();
			}
		} else if ("gtk".equals(platform) || "motif".equals(platform)) { 
			if ((modifierKeys & lookup.getShift()) != 0) {
				sortedKeys[index++] = lookup.getShift();
			}
			if ((modifierKeys & lookup.getCtrl()) != 0) {
				sortedKeys[index++] = lookup.getCtrl();
			}
			if ((modifierKeys & lookup.getAlt()) != 0) {
				sortedKeys[index++] = lookup.getAlt();
			}
		} else if ("carbon".equals(platform)) { 
			if ((modifierKeys & lookup.getShift()) != 0) {
				sortedKeys[index++] = lookup.getShift();
			}
			if ((modifierKeys & lookup.getCtrl()) != 0) {
				sortedKeys[index++] = lookup.getCtrl();
			}
			if ((modifierKeys & lookup.getAlt()) != 0) {
				sortedKeys[index++] = lookup.getAlt();
			}
			if ((modifierKeys & lookup.getCommand()) != 0) {
				sortedKeys[index++] = lookup.getCommand();
			}
		}
		return sortedKeys;
	}

	protected int[] sortModifierKeys(final int modifierKeys) {
		final IKeyLookup lookup = KeyLookupFactory.getDefault();
		final String platform = SWT.getPlatform();
		final int[] sortedKeys = new int[4];
		int index = 0;
		if ("win32".equals(platform) || "wpf".equals(platform)) { 
			if ((modifierKeys & lookup.getCtrl()) != 0) {
				sortedKeys[index++] = lookup.getCtrl();
			}
			if ((modifierKeys & lookup.getAlt()) != 0) {
				sortedKeys[index++] = lookup.getAlt();
			}
			if ((modifierKeys & lookup.getShift()) != 0) {
				sortedKeys[index++] = lookup.getShift();
			}
		} else if ("gtk".equals(platform) || "motif".equals(platform)) { 
			if ((modifierKeys & lookup.getShift()) != 0) {
				sortedKeys[index++] = lookup.getShift();
			}
			if ((modifierKeys & lookup.getCtrl()) != 0) {
				sortedKeys[index++] = lookup.getCtrl();
			}
			if ((modifierKeys & lookup.getAlt()) != 0) {
				sortedKeys[index++] = lookup.getAlt();
			}
		} else if ("carbon".equals(SWT.getPlatform()) || "cocoa".equals(SWT.getPlatform())) { 
			if ((modifierKeys & lookup.getShift()) != 0) {
				sortedKeys[index++] = lookup.getShift();
			}
			if ((modifierKeys & lookup.getCtrl()) != 0) {
				sortedKeys[index++] = lookup.getCtrl();
			}
			if ((modifierKeys & lookup.getAlt()) != 0) {
				sortedKeys[index++] = lookup.getAlt();
			}
			if ((modifierKeys & lookup.getCommand()) != 0) {
				sortedKeys[index++] = lookup.getCommand();
			}
		}
		return sortedKeys;
	}
