Pythonista-Issues
Pythonista-Issues copied to clipboard
Incorrect cursor navigation on iPad with external keyboard.
In some places pressing up/down skips whole code block instead of moving curosr to the next line.

On the attached gif you can see that it skips line 3 when I press UP/DOWN arrows on keyboard.
Pythonista v3.3 iOS 14 iPad 8 with Apple's keyboard.
Same issue with the Magic Keyboard case. Makes me go crazy every time it happens.
Hi all, Same problem : Pythonista 3.3 on iPad Pro 10,5 - ios 14 - apple external keyboard. I stopped using the app waiting for this bug to be fixed.
Hi,
Pythonista 3.3 (330025), IPad Pro 11"/2nd, IOS 14.4 (was issue on 14.3), external bluetooth keyboard Trust22573 (same behavior with model 23746):
On pressing down key when on certain location cursor jumps to the end of file. Very frustrating, please fix this asap.
Thanks, Jan
I’m having same problem - iPad gen 6, Pythonista 3.3, iOS 14.4.
This bug is present everywhere. A fix is needed desperately. I can’t write more than a few lines before the cursor starts skipping all over the place. This is making using the program quite difficult, and is going to deter any new user from adopting.
Issue Housekeeping
This issue was recently opened as a new issue, let's clean that up?
- Issue: #671
- Affected users: 4 inc. me
- Recommendations
- Close issue 671 "as duplicate of 661"
- Rename this issue (661) to:" Cursor jumps to end of file w/Up+Down keypresses on physical keyboard." (70 chars)
Issue / Problem
Up-Down keypresses move cursor to end of file (with detailsbelow)
Possibly New Observations
Short Version
- Initial keypresses may need to be rapid, but following ones need not be
- Issue recurs when moving to the same line it originally happened on
Longer version
On first trying this, I can only get it to happen with a rapid press of up followed by down. Once that's happened, even a sizable delay between pressing "up" and "down" causes the issue to recur.
Once you've triggered the issue, at least sometimes, single-pressing the arrow keys can make it recur, and it SEEMS to be tied to the line where the problem occurred first. I will test this more an attempt to include a screen capture demonstrating this.
Steps to Reproduce
- (Use a device with an attached keyboard?)
- Open a file
- Tap in the middle of the file
- Quickly Tap (on the keyboard) Up then Down (or Down Up)
- Note: this does not need to be rapid.
- Observe the cursor jumps to the bottom of the screen
- Press Up
- Observe the cursor returns to the original line in the middle
I do not recall if this issue happened in previous OS releases; I think it did? Also, it happens on smaller files too - I'm not sure if the length matters.
Device & Software Info
- Device: iPad Pro 12.9, 4th generation (2020)
- OS: iPad OS 14.7.1
- Keyboard: Apple Smart Keyboard Folio (for 4th generation)
STaSHvirtual shell installed (0.7.5?)
I get this behavior every day on every few arrow taps (I write quite a lot), as Triptolemus and others describe. It's been like this for months I think, annoying as hell.
- Ipad Air 4 with the floaty fancy apple keyboard attached
- iPad OS 15.1 (19B74)
- Pythonista 3.3 (330025)
- Black Mamba 1.5.4
It generally seemed to me as Pythonista miscounting the number of characters in the file, but I did notice today that if my cursor jumps to the end of the file and I press CMD+/ to comment the line (it had text on it when I first tried) I get a IndexError Exception (string index out of range):
Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/B4AD11EF-B15B-44D0-9FEE-9E99250E44AE/Pythonista3/Documents/site-packages-3/blackmamba/script/toggle_comments.py", line 121, in <module> main() File "/private/var/mobile/Containers/Shared/AppGroup/B4AD11EF-B15B-44D0-9FEE-9E99250E44AE/Pythonista3/Documents/site-packages-3/blackmamba/system.py", line 101, in func return fn(*args, **kwargs) File "/private/var/mobile/Containers/Shared/AppGroup/B4AD11EF-B15B-44D0-9FEE-9E99250E44AE/Pythonista3/Documents/site-packages-3/blackmamba/script/toggle_comments.py", line 96, in main selected_lines_range = editor.get_line_selection() File "/var/containers/Bundle/Application/2E1D93F6-221D-4E86-8E3E-669EAF0CD753/Pythonista3.app/Frameworks/Py3Kit.framework/pylib/site-packages/editor.py", line 82, in get_line_selection if text[start-1] == '\n': IndexError: string index out of range
Just started using Pythonista and found this to be a blocker in terms of usability. Overall, Pythonista is great for a quick and simple python IDE. However, navigating a file - for anything longer than a single page - is incredibly frustrating. The only workaround I’ve found is to navigate to the end of the line (cmd-right-arrow), then right arrow to wrap around to the next line. This adds up quickly if trying to navigate up or down several lines.
Pythonista Version: 3.3 (330025)
Device & Software Info
Device: iPad Pro (12.9-inch) (5th generation) OS: iPadOS 16.1.1 Keyboard: Apple Magic Keyboard (Folio) , Hardware version 0009
Duplicate of #671
This is also a problem in Editorial. The bug can be generated the same way as it is in Pythonista.