public boolean isTyped(int keycode) {
        try {
            Boolean pressedKey = keysPressed.get(keycode);
            Boolean myKey = keysTyped.get(keycode);
            if (pressedKey == null)
                return false;
            else if (pressedKey.booleanValue() && (myKey == null || !myKey.booleanValue())) {
                keysTyped.put(keycode, new Boolean(true));
                return true;
            } else
                return false;
        } catch (Exception e) {
            return false;
        }
    }