Skip to content

TEXTINPUT does not recognize some keys in the layout. #13225

Closed as not planned
Closed as not planned
@CicTec

Description

@CicTec

Hi,

It seems that TEXTINPUT does not correctly recognize some keys with particular symbols or accented letters.

Here is the image of the keyboard and layout used (Italian):

Image

The characters marked in red are returned with code -61/-62 or 194/195 bitted as unsigned char.

Some examples:

  • To obtain the character "£" you must press SHIFT + the key
  • To obtain the character "è" just press the relative key
  • To obtain the character "é" you must press SHIFT + the key
  • To obtain the character "[" you must press ALT GR + the key

Below is the output of the test:

Image

Below is the source of the test:

SDL_Event e;

SDL_StartTextInput();

while(SDL_PollEvent(&e)) {
  switch(e.type) {
    case SDL_TEXTINPUT: {
      printf("[INPUT]: e.text.text[0]:             %ld\n", e.text.text[0]);
      printf("[INPUT]: e.text.text[0]:             %c\n",  e.text.text[0]);
      printf("[INPUT]: e.text.text[0] & 0xFF: %ld\n", e.text.text[0] & 0xFF);
      printf("[INPUT]: e.text.text[0] & 0xFF: %c\n",  e.text.text[0] & 0xFF);
      break;
    }

    case SDL_QUIT: {
      goto MainLoop_Finalize;
    }
  }
}
MainLoop_Finalize:
  SDL_StopTextInput();

All the other keys respond correctly.

The version used for the test is SDL 2.30.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions