最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

windows - (SOLVED) Ctrl + LeftRight Arrow Key not working properly inside Python Interpreter - Stack Overflow

programmeradmin4浏览0评论

When hitting Ctrl + Left/Right Arrow Key inside a Python Interpreter, the expected behavior is you'll move your cursor to the previous/next word. This isn't really happening at the moment. Instead, it just moves the cursor per letter.

I've been using Python for years, and I swear it wasn't like this.

I'm using Windows 11 and it's installed System Wide.

For context, I already tried reinstalling and it's still behaving this way. And yes, the behavior is as expected when outside of the interpreter and just inside the CLI.

https://youtu.be/WecyDCrqQPs

When hitting Ctrl + Left/Right Arrow Key inside a Python Interpreter, the expected behavior is you'll move your cursor to the previous/next word. This isn't really happening at the moment. Instead, it just moves the cursor per letter.

I've been using Python for years, and I swear it wasn't like this.

I'm using Windows 11 and it's installed System Wide.

For context, I already tried reinstalling and it's still behaving this way. And yes, the behavior is as expected when outside of the interpreter and just inside the CLI.

Share Improve this question edited Mar 24 at 23:45 enaielei asked Mar 24 at 16:37 enaieleienaielei 895 bronze badges 5
  • When you say "inside Python interpreter" what exactly do you mean? At the Python prompt or within a running program? An IDE like IDLE or a command window? – Mark Ransom Commented Mar 24 at 17:18
  • 1 Until you find a better workaround, Esc-b / Esc-f appear to work - but both keystrokes must be repeated for each successive jump – chickity china chinese chicken Commented Mar 24 at 20:00
  • @MarkRansom Watch the video – enaielei Commented Mar 24 at 22:55
  • @chickitychinachinesechicken It works although I don't think I will be ever using this. I'm not accustomed to this hotkey. – enaielei Commented Mar 24 at 23:03
  • 1 I have better things to do than go off-site for a video. That's critical information that should be in the question. – Mark Ransom Commented Mar 25 at 14:02
Add a comment  | 

1 Answer 1

Reset to default 1

I've downgraded to 3.12.9 and it seems to be working as expected again.

Also, posted this as an issue on GitHub. The reason given to me was this: https://github/python/cpython/issues/131700#issuecomment-2749697973

发布评论

评论列表(0)

  1. 暂无评论