+3
Completed

Code completion from a keyboard user's angle

Bilaal Emrith 12 years ago updated by Alexander Blach (Developer) 12 years ago 14
Hey there, good job. One minor improvement based on the Textastic 4.0 could be implementing the code completion for keyboard users as well. Right now, there's no way of using the keyboard to navigate through the suggestions and accepting them with the return key. else nice work.
Version 4.0.2

Answer

Answer
Completed
Implemented in Textastic 4.0.2:

You can press return to accept the top-most entry.
Use the arrow keys on the external keyboard to select a different entry from the list. Hit return to accept the selected entry.
Use the left or right arrow keys to close the list.

For the on-screen keyboard nothing has changed.
Yeah, you currently have to scroll the completion list with your finger and tap to select an entry.


I thought a lot about it. The biggest problem is that iPad keyboards generally lack an Esc key. So how would you get out of the list on a keyboard without an Esc key? (like the Apple keyboard dock and the Logitech fold-up keyboard that I own) 


Because of that problem I've decided to make it touch-only until I find a solution.

I have to agree that a keyboard solution would be preferable. I'd like to avoid touching the screen as much as possible. Perhaps tab selects the currently highlighted suggestions, up and down scrolls suggestions, and (maybe) right or left arrow escapes the suggestions.
The right and left arrow idea sounds good. I'll try it out.
You're completely right about it. 
I own the Zagg Folio and this one lacks the escape key as well  .

I guess it'll all come down to combining the keys we have to implement an escape function and also change the way the navigation keys work when code completion is On.

Else, real nice work mate.
I was just about to make a related/similar request:

Auto select/highlight the first completion suggestion on the list (the most relevant);
Use arrow key (when available or textastic's software version) to navigate up&down;
Use selected suggestion by pressing TAB ( pressing the space bar or other key whould continue imput as normal) .

No need to have ESC key for this to work, or am I missing something ?
Start typing, auto completion list pops up and continually updates to show (& highlight) the most relevant suggestion on top as you type new chars;
If the most relevant suggestion is the one you want press TAB. If not, use keys to navigate or continue typing as usual..

Is this possible? I think it could be usable this way, what do you think?
But what if you want to move the cursor up or down instead and just want to ignore code completion? In other editors, you do this by pressing the Esc key to dismiss the code completion list. I thought it would annoy people if this wasn't possible. 
You would only accept the suggestion by pressing Tab so there is nothing to ignore since no suggestion is accepted by default.
You woul need to escape a certain suggestion if it was assumed/accepted by default. As I'm putting it you would have to press Tab to assume it.

Everything would stay exactly as now except the fact that , in addintion to "touch suggestion to accept", you would be able to press Tab to have the highlighted suggestion accepted. No need to escape suggestion as there is no need as it is working now on v4.0.

Sorry for being a little confusing.. :p
That still doesn't solve the problem that you can't move the cursor up or down when the code completion list is shown, does it? 

Or do you mean that it would not be possible to choose a different entry than the first one in the list using the keyboard arrow keys? That could indeed be an option - not ideal but better than now for keyboard users. Just hit "tab" to accept the top-most entry and tap with your finger on the screen if you need select a different one.
Exactly that. Tab to accept top-most, tap to select other suggestion.

When I first tried Textastic 4 code completion yesterday, I pressed Tab and was somehow waiting that it woulfdwork that way.. Tab is used for completion on Terminal, so it could work from the usability point of view, that is..

Tha nk you for your attention.
Amazing work on this release, btw!
Simplifying:
Pressing Tab would be the same as touching the top-most suggestion on the list.

If the keyboard have arrow keys then one could navigate up and down to select other suggestions. But most of the time the top-most suggestion is the one we want..
Also, if I implemented it this way, I would probably not use the software navigation wheel for navigating the code completion. I think it makes little sense to use these arrow keys if you can just directly tap on the entry.

By the way: I'm really happy that you're taking the time to post your ideas here!
i think making the functionality such that pressing tab chooses the first option would be really good. I don't have a keyboard for my ipad yet (waiting to new Adonit Writer) but i bet if the only way to choose one of the choices is to touch the screen i'm definitely just going to finish typing the whole thing anyway. in fact that is what happens most of the time for me with Eclipse. So in summary, completion list is way better than no completion list, and allowing the pressing of a key to select from the list is even better.
Answer
Completed
Implemented in Textastic 4.0.2:

You can press return to accept the top-most entry.
Use the arrow keys on the external keyboard to select a different entry from the list. Hit return to accept the selected entry.
Use the left or right arrow keys to close the list.

For the on-screen keyboard nothing has changed.
Mr. Grillo's "Pressing Tab would be the same as touching the top-most suggestion on the list." and Mr. Blach's "I think it makes little sense to use these arrow keys if you can just directly tap on the entry." seems awfully confusing if this program indeed caters to those who expect more accessibility than GUI-centric users and eagerly await improvements like support for external keyboards.

Those who can't navigate a page of text without the use of trackpad, mouse or touching the screen wouldn't understand and should disregard the above comment. Please excuse me.

Code completion is awesome the way it is with the arrow keys and return. I agree that the tab key should be put to better use, perhaps with a modifier combo (sans keyboard support through iPad's multi-touch?), or in a Textmate-like way that would allow 'smart' cursor navigation.

I liked that keyboard so much I wanted to use it with my pc, but i ran into problems with missing functionality, escape key doesnt work, no delete key etc. here's a guide how to solve those problems

http://alsoko.net/logitech-tablet-keyboard-for-ipad-key-remapping/

enoy!