Sign in with your CogSci, Facebook, Google, or Twitter account.

Or register to create a new account.

We'll use your information only for signing in to this forum.

Supported by

[open] to_chr problem with new version

borisboris Posts: 60
edited October 2015 in OpenSesame

Hi all,

The following code

   if my_keyboard.to_chr(key) == "backspace":
        resp = resp[:-1]

was working well but with OS new version, I get this message:
AttributeError: 'psycho' object has no attribute 'to_char'

Would you have any idea of the solution?

Best regards,


  • sebastiaansebastiaan Posts: 2,982
    edited 12:36PM

    Hi Boris,

    Way, way, back, keyboard.to_chr() was necessary to convert keyboard codes to characters. For a long time, the function was still there but didn't do anything. And now it's removed.

    This will do the trick though:

    if key == "backspace":
            resp = resp[:-1]


    There's much bigger issues in the world, I know. But I first have to take care of the world I know.

Sign In or Register to comment.