public static int osd_is_key_pressed(int keycode) {
        if (keycode >= 256) {
            return 0;
        }

        //TODO          /*if (keycode == KEY_PAUSE)
        /*         {
                    static int pressed,counter;
                    int res;

                    res = key[KEY_PAUSE] ^ pressed;
                    if (res)
                    {
                            if (counter > 0)
                            {
                                    if (--counter == 0)
                                            pressed = key[KEY_PAUSE];
                            }
                            else counter = 10;
                    }

                    return res;
            }*/
        if (MainApplet.inst != null) {
            return MainApplet.inst.key[keycode] ? 1 : 0;
        } else if (MainStream.inst != null) {
            //return screen.key[keycode] ? 1 : 0;
            if(MainStream.debug){
                return screen.key[keycode] ? 1 : 0;
            }
            return MainStream.inst.key[keycode] ? 1 : 0;
        } else {
            return screen.key[keycode] ? 1 : 0;
        }

    }