public static void onKeyDown(Component comp, final String keyStrokeStr,
			final P0 action) {
		final KeyStroke keyStroke = getKeyStroke(keyStrokeStr);
		if (keyStroke==null) {
			throw new IllegalArgumentException("Unknown key stroke: " + keyStrokeStr);
		}
		comp.addKeyListener(new KeyAdapter() {
			public void keyPressed(KeyEvent e) {
                if (keyStroke.getKeyCode() == e.getKeyCode()
                		&& (e.isControlDown() == ((keyStroke.getModifiers() & InputEvent.CTRL_MASK) > 0))
                		&& (e.isAltDown() == ((keyStroke.getModifiers() & InputEvent.ALT_MASK) > 0))
                		&& (e.isShiftDown() == ((keyStroke.getModifiers() & InputEvent.SHIFT_MASK) > 0))
                		&& (e.isMetaDown() == ((keyStroke.getModifiers() & InputEvent.META_MASK) > 0))
                		) {
                	e.consume();
                	action.e();
                }
			}
		});
	}