Skip to content
Advertisement

Alternative for ‘enter’ key in python interpreter?

Recently my Enter key stopped working. For sure it’s a hardware problem!. However I managed so many days without Enter key by using the alternatives ctrl + j or ctrl + m .Running python programs was fine as I would run the script by saving it in a file. Now that I need to give commandline values I have to press enter for it to be accepted in the IDLE Interpreter. While typing this too I can’t press enter or ctrl + j or ctrl + m.

But how did I do this? (This newline?) I copied a empty newline from another file. Even this doesn’t work in the interpreter. Someone help any way to enter values in python IDLE Interpreter without actually using enter key.

One good alternative would be to use the cmd or terminal and using the command line python script.py. And then using ctrl+m as this works there.

But I miss the python interpreter. Any alternatives any suggestion?

Ofcourse onscreen keyboard is an option but I’m looking for any key alternatives to enter in python Interpreter. Is that even possible?

Advertisement

Answer

Normally, IDLE has an Option / Configure IDLE menu which allows you to remap almost any action to a key combination. The newline and indent action is by default mapped to Key Return and Num Keypad Return, while Ctrl J is used for plain newline and indent. But it is easy to change this mapping configuration.

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