Hacker News new | ask | show | jobs
by kqr 548 days ago
But I'm not selecting with gestures! I press ctrl-a most of the time. Then I might adjust with shift-space-swipe, much like I would with arrow keys on a physical keyboard.

I hate long pressing. It's so slow and imprecise.

Ctrl-z to undo is an action usually not available from the context menu or elsewhere.

Oh and pressing ctrl-d to send EOF in a subshell in Termux is much more convenient than typing "exit" or whatever.

2 comments

can you explain more about ctrl+d?
It sends the End Of File character. In most terminal applications, this ends an interactive session. E.g. if you're in a Python REPL and are done with it, you can press Ctrl-D and it will close and return to Bash. Press Ctrl-D once more and Bash will exit as well (and in most cases the terminal emulator will then close, too).

So, just a conventional shortcut to close things.

how is it different from ctrl+c ?
Ctrl-C sends the SIGINT signal instead. It can be handled, too, and by default it will terminate the program. Semantics are a little different: you use Ctrl-D when the app expects input, and Ctrl-C when it's actively doing something and you want to interrupt it.

For example, in Python REPL, you can press ^C to interrupt a running piece of code:

    >>> while True:
    ...     pass
    ... 
    ^CTraceback (most recent call last):
      File "<stdin>", line 1, in <module>
    KeyboardInterrupt
You can't however exit the REPL with ^C:

    >>> (^C)
    KeyboardInterrupt
But if you press ^D it exits just fine.

Ruby's irb works the same (and of course Bash/zsh do, too). In Node.js, ^D works right away, and ^C first triggers a warning but you can press it the second time to exit.

On iOS there was at least at some point a "shake to undo" or a 3 fingered swipe I could never get to trigger, infuriating, I just live without undo now.
On recent iOS versions, you can tap the screen with 3 fingers to get a popup that has 3 options (undo, copy, and paste IIRC).
The 3 finger tap is infuriatingly hard to trigger for me since if you don’t sync your fingers’ taps perfectly, you’re tapping random elements on the screen, potentially doing something bad, like saving/sending out the bad change, that you were trying to undo. A single triple-tap would have been better, but also there is a full SQUARE INCH of wasted space below the iOS keyboard on current phones. Idk why they can’t make use of some of it to open a cut/copy/paste/undo menu, or heck, add command and control keys too!
Nice to know! I’m used to having to vigorously shake my phone for undo. And for it randomly popping on when i pull it from a pocket…
What? When?