使用 Mac 访问 python IDLE 中先前语句的键盘快捷键

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/4676130/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-18 16:53:11  来源:igfitidea点击:

keyboard short cut for accessing previous statements in python IDLE using a Mac

pythonkeyboard-shortcutspython-idle

提问by Lana

Is there a keyboard short cut for accessing previous statements in python IDLE? I am using a Mac

是否有用于访问 python IDLE 中先前语句的键盘快捷键?我正在使用 Mac

Thanks

谢谢

回答by William

On Windows this hotkey is alt-p.

在 Windows 上,这个热键是 alt-p。

However, assuming IDLE has options in Mac ;) you should be able to find out by going to Options->Configure IDLE. Then look in the Keys tab and under Custom Key Bindings, look for "history-previous".

但是,假设 IDLE 在 Mac 中有选项;) 您应该可以通过转到 Options->Configure IDLE 找到。然后查看 Keys 选项卡和 Custom Key Bindings 下的“history-previous”。

That should tell you what you need to know.

这应该告诉你你需要知道什么。

回答by villancikos

Using IDLE on the MAC you would need Ctrl+P(not command) for Previous statement (instruction) and Ctrl+Nfor Next statement.

在 MAC 上使用 IDLE 您需要Ctrl+ P(不是命令)用于上一条语句(指令)和Ctrl+N用于下一条语句。

I was struggling with this same question as I am always using the Up arrow on most of the "shell" style programs.

我一直在为同样的问题苦苦挣扎,因为我总是在大多数“shell”风格的程序上使用向上箭头。

回答by K.C. Barrett

Also, you can scroll back up to any previous line and hit 'return', which will place that statement in the current working line.

此外,您可以向上滚动到任何前一行并点击“返回”,这将将该语句放置在当前工作行中。