private static int getCode(int type)
    {
        if (type == Listener.TYPE_KEY_PRESSED || type == Listener.TYPE_KEY_RELEASED)
        {
            return Listener.CODE_KEY_ALL;
        }
        else if (type == Listener.TYPE_MOUSE_WHEEL)
        {
            return Listener.CODE_SCROLL_BOTH;
        }
        else if (type == Listener.TYPE_MOUSE_PRESSED || type == Listener.TYPE_MOUSE_RELEASED)
        {
            return Listener.CODE_BUTTON_ALL;
        }
        
        return -1;
    }