SDL2 does not generate KEYDOWN and KEYUP events for dead keys

I want to use the keys as a game control not to write text.

I have tried SDL_StopTextInput(); but this only disables the SDL_TEXTINPUT event and does not create SDL_KEYDOWN and SDL_KEYUP events

#include <GL/glew.h>
#include <SDL2/SDL.h>
#include <iostream>

#define ANCHO 800
#define ALTO 600

int main (int n, char **argumentos)
{
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
    SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);
    SDL_SetHint(SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR, "0");//No suspende el compositor de ventana (No funciona en devuan mate)
    //error: ‘SDL_HINT_VIDEO_X11_NET_WM_BYPASS_COMPOSITOR’ was not declared in this scope (devuan mate)
    SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
    SDL_SetHint(SDL_HINT_IME_INTERNAL_EDITING, "1");
    SDL_Window *ventana = SDL_CreateWindow("Ejemplo", 0, 0, ANCHO, ALTO, SDL_WINDOW_OPENGL | SDL_WINDOW_RESIZABLE);
    SDL_GLContext contexto = SDL_GL_CreateContext(ventana);
    SDL_GL_SetSwapInterval(1);//Limita a 60 fps

    glewExperimental = GL_TRUE;

    glEnable (GL_CULL_FACE);
    glViewport(0, 0, ANCHO, ALTO);
    glClearColor(0.95, 0.95, 0.95, 1.0);
    //glActiveTexture(GL_TEXTURE0);
    glEnable(GL_BLEND);
    glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

    SDL_StopTextInput();
    bool terminar = false;
    while (!terminar)
    {
        SDL_Event evento;
        while (SDL_PollEvent(&evento))
        {
            if(evento.type == SDL_TEXTEDITING)
                std::cout << "SDL_TEXTEDITING" << "\n";
            else if(evento.type == SDL_TEXTINPUT)
                std::cout << "SDL_TEXTINPUT" << "\n";
            else if(evento.type == SDL_KEYMAPCHANGED)
                std::cout << "SDL_KEYMAPCHANGED" << "\n";
            else if(evento.type == SDL_SYSWMEVENT)
                std::cout << "SDL_SYSWMEVENT" << "\n";
            else if(evento.type == SDL_KEYDOWN)
                std::cout << "SDL_KEYDOWN" << "\n";
            else if(evento.type == SDL_KEYUP)
                std::cout << "SDL_KEYUP" << "\n";
            else if (evento.type == SDL_WINDOWEVENT)
            {
                if (evento.window.event == SDL_WINDOWEVENT_CLOSE)
                    terminar = true;
            }
        }

        glClear(GL_COLOR_BUFFER_BIT);

        SDL_GL_SwapWindow(ventana);
    }

    return 0;
}

Operating system: Gentoo 64bits
Keyboard: C.UTF-8, es_CL.UTF-8, Spanish/Spanish

I want sdl2 to generate events for all keys, I’ve looked this up on many pages and can’t find a solution.