Hacker News new | ask | show | jobs
by craighay1 996 days ago
I sometimes wonder if modal editing (like vim uses) might be a good approach for navigating/editing longform text on touch devices.

It does seem like a missed opportunity to have taken the keyboard/mouse approach and then transferred it to touch devices. Even the keyboard layout has no real advantage for two thumb typing on a screen.

Approaches that adapt the interface whilst leaning heavily on letter based inference could be interesting for one handed / single digit entry of letters. Something like dasher: https://www.inference.org.uk/dasher/dashersummary.html

https://en.m.wikipedia.org/wiki/Dasher_(software)

5 comments

On an iPhone if you hold the space bar down the whole keyboard becomes a kind of trackpad which you can use to move the cursor.

Since all the keys disappear, it doesn’t seem like a stretch to add something that works like mouse buttons so you could select text or paste in a specific spot in that “mode”.

Right now it’s so frustrating to do any kind of selecting.

You can use that for selection as well, tap somewhere else on the keyboard. Used to be even better with 3D Touch, you did not have to wait for the long press to register.
Holy crap. I've been using the space bar for years to move the cursor, I had no idea you could select with it too. Thank you!

It's even officially documented as well [1]. I wonder if selection was introduced when the spacebar cursor was, or if it was later.

[1] https://support.apple.com/guide/iphone/type-with-the-onscree...

I frequently use the selection, but I don't like the implementation of it. Rather than the selection being between the starting "anchor" point and your moving cursor's position, the cursor you're moving around just creates an ever-growing selection that can't be subtracted from. So if you're e.g. selecting across multiple lines and you bring the cursor up to the line above, it'll select everything from the starting point to where the cursor is now, but if you bring it back down it doesn't unselect that text. So if you accidentally select something you didn't want to, the selection is essentially ruined and you need to start over. I have no idea why they implemented it like this.
Super great. Doesn't work on gboard. Why isn't a period and comma a default on these keyboards??
Selection was introduced at the same time as “space bar cursor”, which is with the introduction of 3D Touch in the iPhone 6s.

Actually, it wasn’t even a “space bar cursor”, as the way of triggering it was with force pressing and not by holding the space bar. It works much better with 3D Touch, as you can move the cursor around and press harder without lifting to start selecting, then release a bit to stop. My iPhone 8 can still do it, and I’m really going to miss it when I upgrade.

I miss 3D Touch too, it was faster than waiting for a long tap.
Unfortunately this affordance isn’t available when trying to make a selection in noneditable text.

Since often on mobile devices I am responding to comment threads (in slack or gitlab or Jira, or indeed right now on HN, for example) the challenges I have in copy-pasting are often in grabbing text from a prior comment to quote, rather than in selecting my own text.

To be fair you can't drop a caret (the edit cursor) into non-editable text in most desktop applications as well. And that's a missed opportunity there too. I think Chrome got less agreesive in changing your selection to match word bounaries, but it was very annyone for a while. I think you could void it by holding Shift, but that had some other side-effects in some pages.
I think internet explorer did this selection thing at one point years ago. I don’t recall chrome doing it. Firefox used to have a ‘caret browsing’ feature but people didn’t use it so it was eventually removed. So I don’t really think it’s a missed opportunity so much as a feature people didn’t sufficiently love.
Press F6 in firefox for caret browsing.
One cool thing about the Samsung s-pen is it can select any text on the screen (drag while holding the pen button)
Thanks. I don’t know how much RSI I’d be saved from if I knew this years ago. Apple, if you’re listening, you should advertise this better. Ok, maybe not for the new iPhone user, but maybe for a user in his 2nd year or one which does a lot of text input.
> You can use that for selection as well, tap somewhere else on the keyboard.

Doesn't appear to work.

What does work is pushing a little harder (i.e. "force touch") with the same finger/thumb that initiated the move-cursor-via-spacebar gesture.

Only problem there is that sometimes the forcetouch doesn't register (no matter how hard you pinch the screen), or is too trigger happy and starts selecting text when you only wanted to move the cursor.

What do you mean "tap somewhere else on the Keyboard?" Once I hold down the space bar and then let go, the keyboard disappears. And I just tried some combination of this and got into a frozen state where the keyboard was missing and I had to kill Safari.

EDIT: Oh, I need to use a second finger. Cool.

As the finger starts close to the bottom edge of the screen, I always struggle with moving the cursor downwards. Is there a trick for that?
You can hold down on every key, not just the space bar.
Except for keys that have alternate accent keys, and I don't think it's possible at all on the other keys when you have swipe typing available.
I think you can only 3D touch on other keys. If you have one of the newer iPhones without 3D touch you have to long press the spacebar.
OH MY GOD THIS IS AMAZING HOW DID I NOW KNOW THIS
I've been using nvim in termux on foldable phone since I've bought phone in that form factor. It works great, I'm using "unexpected keyboard" as input method for faster special symbols access. It works pretty well. Good enough for me to program on the go.
Thanks for letting me know about the Unexpected Keyboard app. It'll take some getting used to, but having arrow keys and punctuation available without changing modes is pretty awesome.

I can even hit Ctrl-A to select all, Ctrl-C to copy, etc. This alone will help text editing on my phone.

The hacker keyboard does that also. Most standard keyboard functions work as you would expect them to.

That said, I am going to go try the unexpected keyboard.

I like it.

I really like the select cursor motion on the space bar. Makes quick work of a copy paste operation.

Seems to be quite an improvement. Thank you for the tip! But it would be even better if it had "stylus mode" because, with a precision stylus, it's easier to tap directly alternate characters than to drag from the center of the button toward the needed variant.
This is also the first I have heard of this keyboard, it is incredible.
In gboard we've already got modal stuff for numerical keypad, emojis, special characters (2 different modal pages), etc.

Adding one more modal keyboard page for cursor-editing (arrow keys, ctrl-arrow-keys, home/end, pgup/godown, select-toggle-button, delete, rclick menu) would just make sense. Would just be getting the rest of the desktop keyboard into the phone keyboard, nothing groundbreaking.

This exists on Android Gboard, though it's hidden in some menus by default. [0]

[0] https://www.xda-developers.com/gboard-v6-2-adds-cursor-contr... (2017)

Wow, indeed it's still there in GBoard!

Thank you for sharing, I could never have found it before knowing it exists.

Whoa, I had no idea (obviously). Note, that article is out of date, instead of the G icon, now it's a four-square icon. I don't know why they're not just using a standard hamburger icon, but whatever.
They already have an option to move your visit by dragging across spacebar. Why not just replace half of the oversized spacebar key with something useful?
TIL, thanks!
You can install blink shell, panic prompt, or whatever the popular iPhone ssh client of the day is and ssh over to your desktop to get a preview of how this would work.

Paired with a Bluetooth keyboard, it is fine IMO. The screen is a little bit small. Sometimes if I’m going to SSH from my phone, I’ll put the phone on a little stand in front of the keyboard, so it can sit more like a foot from my face, or whatever (normal cellphone usage distance). Or, I’ll put it in portrait mode farther away and think of it as “half a screen.”

Either way works fine for short stints. Nebulous concerns about eyeball heath for long sessions, although I have no real evidence to back that up, and we’re all screwed on that front anyway, right?

SSH isn't a solution. I'm trying to edit text here on my phone, not out on some server.

What GP is advocating is to replace the on-screen keyboard with a modal editing UX.

I do this all the time but I have not found a Bluetooth keyboard that is portable and not total junk. Do you have any suggestions?
I had a Logitech Keys-to-go I was quite happy with but recently got myself this 60% mechanical keyboard, mostly because you can get it with a case that doubles as a phone & tablet stand

https://nuphy.com/collections/keyboards/products/air60?varia...

Nope; I had a fold out one for a while but inevitably one side seems to go bad.

In the end I got Apple’s Bluetooth keyboard, I like the scissor actuation or whatever, but it is slightly too big to be as portable as a cellphone.

modal editing is just too much overhead for the average smart phone user.
I dunno, Samsung's default keyboard already has am implementation of modal editing, which was loved by most of it's users that I knew.

Not in the same way as vim, but you could hit a hot key to switch your keyboard to a navigation/select/copy+paste mode.

That's fine, the average computer user also doesn't use modal editing
There's tons of professional writers though, not to mention business users, lawyers, and other professionals that do lots of writing. It's pretty obvious that desktops are going the way of the dodo, and the aforementioned users need to write lots of text on mobile devices. I don't think modal text entry is any more onerous to learn than a graphic artist learning Blender or Photoshop, or an engineer learning Solidworks.
There may be fewer desktops, but laptops work the same way and they don't seem to be going away any time soon. I'm not aware of "tons of professional writers, lawyers, and other professionals that do lots of writing" who spend most of their writing time on the type of mobile devices described in this article.
I'm not saying they are now. I'm saying they will in the future.
I really doubt people are every going to give up big stand-alone monitors.

Putting cellphones on big standalone monitors might work. But in that case, we’ll probably also need to attach a pointing device and some way of entering text, so from a UI point of view, we’ve got a desktop.

Cellphones definitely have sufficient processing power for lots of typical office workloads nowadays… but using them in this way doesn’t seem to have caught on.

I dunno, eventually this sort of discussion ends up at “why didn’t DeX take over the world,” a question for which I have no good answers, since, like everyone else, I never tried it out.

I occasionally use DeX. It is fine, if you are needing to read email, browse the web, or do simple word processing, or need a touch interface for drawing. If I'm going to sit down and work for multiple hours, I'd rather be using my desktop applications.
No, the aforementioned users do not need to write lots of text on mobile devices - a professional writer will choose or adapt their devices and environment to best suit the needs of their writing work, not adapt their writing to better suit the limitations of the devices; instead it's all the "casual" users who need to make do with whatever device they have on hand even if that device was optimized for entirely different needs.
I don't think so, but the mode change can't be some obscure thing slightly changing in the status bar.
But nowadays you can install custom keyboards on every OS that could probably get you most of the way there.
Do you know of an example?
Sadly, no. There certainly are lots of novel keyboards out there that can be googled up, but perhaps the kinds of features that would make a vim/modal-type keyboard be interesting and useful on mobile require further API hooks into the standard text-input controls (to be able to do things like find word and line boundaries, perform complex selections and replacements, etc).

I wonder if ultimately, the advantages of a "stay on the home row" philosophy like vim has just don't really manifest when there's no longer a physical keyboard as the underlying HMI. But the core idea of doing something modal and separating movement/selection from input does still feel valuable.