Skip to content
Advertisement

Trying to type ‘→’ with keyboard module

I am making a program that writes a program in TI-Basic. In TI-Basic, to set a variable, the syntax is value → varname. The TI-Connect software doesn’t like it when I copy-paste, so I’m using the keyboard module to simulate keypresses. I can’t manually type the program as it is about 850 lines long. When I try to run the program, I get the following error:

JavaScript

My code:

JavaScript

I can’t figure out how to type this key.

Advertisement

Answer

The best solution I found is to use a different python keyboard library, pynput. It has native support for typing unicode characters. Here is some sample code:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement