public void keyTyped(KeyEvent evt)
        {
                int modifiers = evt.getModifiers();
                char c = evt.getKeyChar();

                // this is the apple/cmd key on macosx.. so menu commands
                // were being passed through as legit keys.. added this line
                // in an attempt to prevent.
                if ((modifiers & KeyEvent.META_MASK) != 0) return;

                if (c != KeyEvent.CHAR_UNDEFINED) // &&
                  //                (modifiers & KeyEvent.ALT_MASK) == 0)
                {
                  if(c >= 0x20 && c != 0x7f)
                        {
                                KeyStroke keyStroke = KeyStroke.getKeyStroke(
                                        Character.toUpperCase(c));
                                Object o = currentBindings.get(keyStroke);

                                if(o instanceof Hashtable)
                                {
                                        currentBindings = (Hashtable)o;
                                        return;
                                }
                                else if(o instanceof ActionListener)
                                {
                                        currentBindings = bindings;
                                        executeAction((ActionListener)o,
                                                evt.getSource(),
                                                String.valueOf(c));
                                        return;
                                }

                                currentBindings = bindings;

                                if(grabAction != null)
                                {
                                        handleGrabAction(evt);
                                        return;
                                }

                                // 0-9 adds another 'digit' to the repeat number
                                if(repeat && Character.isDigit(c))
                                {
                                        repeatCount *= 10;
                                        repeatCount += (c - '0');
                                        return;
                                }

                                executeAction(INSERT_CHAR,evt.getSource(),
                                        String.valueOf(evt.getKeyChar()));

                                repeatCount = 0;
                                repeat = false;
                        }
                }
        }