Project

General

Profile

Actions

action #133613

open

Support for passing non-US-keyboard letters to the 'type_string' function size:M

Added by okurz over 1 year ago. Updated over 1 year ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Feature requests
Target version:
QA (public, currently private due to #173521) - future
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Motivation

The backend process dies after passing russian language characters to the 'type_string' function, see #133319

Acceptance criteria

  • AC1: os-autoinst provides explicit feedback about language support, either proper unicode support
  • AC2: #133319 is resolved

Suggestions

  • Read how https://github.com/os-autoinst/os-autoinst/tree/master/consoles/VNC.pm currently works
  • Read qemu docs about emulated keyboards because that is what is important for what we need to pass to the test systems
  • Of course don't add support for individual characters. Try to provide a generic support (or "more generic"). If not possible then at least provide a clear error message what encodings or what keyboard keys are supported
  • If no better solution is found fall back to plain old try/catch and "unknown letter" error message
  • Check pending PRs for extending support for other keyboard layouts

Related issues 1 (0 open1 closed)

Copied from openQA Project (public) - action #133451: Backend dies when passing non-US-keyboard letters to the 'type_string' function size:MResolvedlivdywan2023-07-252023-08-11

Actions
Actions #1

Updated by okurz over 1 year ago

  • Copied from action #133451: Backend dies when passing non-US-keyboard letters to the 'type_string' function size:M added
Actions #2

Updated by livdywan over 1 year ago

Just to retain the research that was already done:

A live X11 server can map keys to unicode. Of course openQA doesn't introspect the SUT. However 1) these could be generated via a reference server 2) mappings could be generated from config files. That could be done as part of the build or even as a "generate key mapping for layout" function in the testapi.

https://github.com/os-autoinst/os-autoinst/blob/master/consoles/VNC.pm
https://metacpan.org/pod/X11::Xlib#char_to_keysym
https://metacpan.org/pod/X11::Xlib::Keymap#find_keycode
https://metacpan.org/pod/X11::Xlib#codepoint_to_keysym
https://metacpan.org/dist/X11-Xlib/source/lib/X11/Xlib/Keymap.pm

Right now the code hard-codes a specific US keyboard layout. The generic solution needs to replace that with mappings based on a given layout specifier.

Actions

Also available in: Atom PDF