System.out.println("adding char");
 	public void keyPressed(KeyEvent e) {		System.out.println("Key pressed "+e);		int keyCode = e.getKeyCode();		IJ.setKeyDown(keyCode);		hotkey = false;		if (keyCode==e.VK_CONTROL || keyCode==e.VK_SHIFT)			return;		char keyChar = e.getKeyChar();		int flags = e.getModifiers();		if (IJ.debugMode) IJ.log("keyCode=" + keyCode + " (" + KeyEvent.getKeyText(keyCode)			+ ") keyChar=\"" + keyChar + "\" (" + (int)keyChar + ") "			+ KeyEvent.getKeyModifiersText(flags));		boolean shift = (flags & e.SHIFT_MASK) != 0;		boolean control = (flags & e.CTRL_MASK) != 0;		boolean alt = (flags & e.ALT_MASK) != 0;		String c = "";		ImagePlus imp = IJ.getInstance().getImagePlus();		boolean isStack = (imp!=null) && (imp.getStackSize()>1);				if (control && (keyCode == e.VK_D)) {			// hard coding the control-d shortcut until we fix the menu shortcuts			IJ.run("Draw");			imp.killRoi();		}		if (imp!=null && !control && ((keyChar>=32 && keyChar<=255) || keyChar=='\b' || keyChar=='\n')) {			Roi roi = imp.getRoi();			if (roi instanceof TextRoi) {				System.out.println("have a text roi");				if ((flags & e.META_MASK)!=0 && IJ.isMacOSX()) return;				if (alt)					switch (keyChar) {						case 'u': case 'm': keyChar = IJ.micronSymbol; break;						case 'A': keyChar = IJ.angstromSymbol; break;						default:					}				System.out.println("adding char");				((TextRoi)roi).addChar(keyChar);				return;			}		}        				Hashtable shortcuts = Menus.getShortcuts();		if (shift)			c = (String)shortcuts.get(new Integer(keyCode+200));		else			c = (String)shortcuts.get(new Integer(keyCode));				if (c==null)			switch(keyCode) {				case KeyEvent.VK_BACK_SPACE: c="Clear"; hotkey=true; break; // delete				case KeyEvent.VK_EQUALS: case 0xbb: c="Start Animation [=]"; break;				case KeyEvent.VK_SLASH: case 0xbf: c="Reslice [/]..."; break;				case KeyEvent.VK_COMMA: case 0xbc: c="Previous Slice [<]"; break;				case KeyEvent.VK_PERIOD: case 0xbe: c="Next Slice [>]"; break;				case KeyEvent.VK_LEFT: case KeyEvent.VK_RIGHT: case KeyEvent.VK_UP: case KeyEvent.VK_DOWN: // arrow keys					Roi roi = null;					if (imp!=null) roi = imp.getRoi();					if (roi==null) return;					if ((flags & KeyEvent.ALT_MASK) != 0)						roi.nudgeCorner(keyCode);					else						roi.nudge(keyCode);					return;				default: break;			}		if (c!=null && !c.equals("")) {			if (c.equals("Fill"))				hotkey = true;			else {				doCommand(c);				keyPressedTime = System.currentTimeMillis();			}		}	}