Skip to content

Can't enter characters with Alt-Gr modifier on Ubuntu #6034

@AlexanderKaschta

Description

@AlexanderKaschta

Version/Branch of Dear ImGui:

Version: 1.89.2 (18916)
Branch: docking

Back-end/Renderer/Compiler/OS

Back-ends: imgui_impl_glfw.cpp + imgui_impl_opengl3.cpp
Compiler: g++
Operating System: Ubuntu 22.04

My Issue/Question:

When entering characters on a keyboard with German-Layout (ISO-Layout, DE-de) that require the use of the Alt-Gr-Key, those get recognized by ImGui, but don't get entered/displayed in InputText fields. Example characters are @ or }. It can be checked, that the right characters are recognized under Inputs/Chars queue in the demo window. When entering those characters, it sometimes tries to do window navigation. Rendering of those characters works perfectly in regular text fields. This issue only exists on Ubuntu, on Windows 10 (same backend with MinGW64 g++ and same code) I'm able to enter those characters.

Further testing I've done:

  • I was able to reproduce this input-issue also with version 1.89 (18810) from the docking branch under Ubuntu 22.04. Windows 10 is not affected.
  • On an even older version, v1.79 (17900), from the master branch, I wasn't able to reproduce this issue. The input of all characters works perfectly on that version for both Oses (Ubuntu & Windows).

Expected result: Enter the characters into InputText.

Screenshots/Video

small

Preview from the Inputs/Chars queue section in the demo window on Ubuntu

Standalone, minimal, complete and verifiable example:

// Include imgui_stdlib

// Define an input variable outside the render loop
std::string my_input;

// Code for the render loop
ImGui::Begin("Example Bug");
// Create an example input field
ImGui::InputText("Test", &my_input);
ImGui::End();

Try entering characters ,which require the Alt-Gr modifier, to reproduce it.

Note:

Thanks for the great work on ImGui! This is my first issue to a larger project. I hope I've provided all important information. If further information is needed, I'm happy to help.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions