Im using AZERTY but in program it only accepts QWERTY

So in this code if I press Q nohing happens but it do move whenever I press A.
I have changed the key to A then it only moves whenever I press Q.
This is due to my keyboard being azerty and it only recognizes qwerty.
Is there any fix for this?

SetTargetFPS(60);
    while (!WindowShouldClose())
    {
        BeginDrawing();
        ClearBackground(WHITE);

        DrawCircle(circleStartX, circleStartY, circleRad, RED);
        DrawRectangle(rectStartX, rectStartY, rectSize, rectSize, BLUE);

        if (IsKeyDown(KEY_D))
        {
            circleStartX += 10;
        }

         if (IsKeyDown(KEY_Q))
        {
            circleStartX = circleStartX - 10;
        }
        

        EndDrawing();
    }

I don’t really know raylib at all but maybe there’s a way to configure that and make it understand you’re using an AZERTY keyboard

If it’s not possible, it’s as simple as to find which ASCII value do your keys have and pass it as an argument to the IsKeyDown() function since it’s ultimately expecting an int value.

image

I don’t know a lot of french but most AZERTY users happen to be french. This seems like a good page to translate over QWERTY to AZERTY: AZERTY et QWERTY: Table de conversion et codes ASCII.

Raylib uses GLFW for key controls, so in theory it shouldn’t matter so long as their keyboard is set to US in their Operating System.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.

Privacy & Terms