Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Follow ASCII chart instead of browser's keycodes #19442

Merged
merged 1 commit into from
Oct 5, 2023

Commits on Oct 5, 2023

  1. test: Follow ASCII chart instead of browser's keycodes

    Until now, we were mapping values of characters to their browser's
    keycodes values [1]. This however is incorrect, since to get a value of
    character, we use Python's 'ord' function, which returns character's
    Unicode value.
    
    In some cases, these values are different. For example, a value for
    Enter has keycode '13' in browser [1], but Python's 'ord' will give us
    value of '10' for a line feed character. [2]
    
    [1] https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode
    [2] https://python-reference.readthedocs.io/en/latest/docs/str/ASCII.html
    skobyda committed Oct 5, 2023
    Configuration menu
    Copy the full SHA
    09f4f49 View commit details
    Browse the repository at this point in the history