public void keyPressed(int keyCode, int rawKeyCode) {
        prevCursorState = cursorState;
        switch (keyCode) {
            case GameCanvas.FIRE:
                if (windowState == BROWSE_STATE) {
                    if (cursorState == MENU_UTAMA) {
                        MainMenu mainMenu = new MainMenu(engine);
                        changeScene(mainMenu);
                    } else {
                        //Jika udah beli, langsung ke equip state
                        if (itemButtons[cursorState].getItem().isBought()) {
                            windowState = CONFIRM_EQUIP_STATE;
                            isOK = itemButtons[cursorState].getItem().isEquipped();

                        } //jika uang cukup buat beli
                        else if (profile.getMoney() >= itemButtons[cursorState].getItem().getPrice()) {
                            windowState = CONFIRM_BUY_STATE;
                            isOK = false;
                        } //Jika uang tidak cukup
                        else {
                            //bunyi eng ing eng. fulus ente nggak cukup
                        }
                    }
                } else if (windowState == CONFIRM_BUY_STATE) {
                    if (isOK) {
                        profile.setMoney(profile.getMoney() - itemButtons[cursorState].getItem().getPrice());
                        itemButtons[cursorState].getItem().setBought(true);

                        windowState = CONFIRM_EQUIP_STATE;
                        isOK = false;
                    } else {
                        windowState = BROWSE_STATE;
                        isOK = false;
                    }
                } else if (windowState == CONFIRM_EQUIP_STATE) {
                    windowState = BROWSE_STATE;
                    if (isOK) {
                        if (itemButtons[cursorState].getItem() instanceof Weapon) {
                            ItemDatabase.unequipAllWeapons();
                        }
                        itemButtons[cursorState].getItem().setEquipped(true);
                    }
                    windowState = BROWSE_STATE;
                }
                updateButtonsState();
                break;
            case GameCanvas.DOWN:
                if (windowState == BROWSE_STATE) {
                    cursorState += 3;
                    if (cursorState > 8) {
                        cursorState = KITCHEN_SET;
                    } else if (cursorState > EMBLEM) {
                        cursorState = MENU_UTAMA;
                    }
                }
                updateButtonsState();
                break;
            case GameCanvas.UP:
                if (windowState == BROWSE_STATE) {
                    cursorState -= 3;
                    if (cursorState < KITCHEN_SET) {
                        cursorState = MENU_UTAMA;
                    }
                }
                updateButtonsState();
                break;
            case GameCanvas.RIGHT:
                if (windowState == BROWSE_STATE) {
                    cursorState++;
                    if (cursorState == HASDUK) {
                        cursorState = KITCHEN_SET;
                    } else if (cursorState == MENU_UTAMA) {
                        cursorState = HASDUK;
                    } else if (cursorState > MENU_UTAMA) {
                        cursorState = MENU_UTAMA;
                    }
                } else if (windowState == CONFIRM_BUY_STATE || windowState == CONFIRM_EQUIP_STATE) {
                    isOK = !isOK;
                }
                updateButtonsState();
                break;
            case GameCanvas.LEFT:
                if (windowState == BROWSE_STATE) {
                    cursorState--;
                    if (cursorState < KITCHEN_SET) {
                        cursorState = TALI;
                    } else if (cursorState == TALI) {
                        cursorState = EMBLEM;
                    } else if (cursorState == EMBLEM) {
                        cursorState = MENU_UTAMA;
                    }
                } else if (windowState == CONFIRM_BUY_STATE || windowState == CONFIRM_EQUIP_STATE) {
                    isOK = !isOK;
                }
                updateButtonsState();
                break;

        }


        if (rawKeyCode == GameCanvas.KEY_NUM0) {
            profile.setMoney(5000);
        }
        moneyFrame.setLabel("" + profile.getMoney());
    }