nano-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Request]: Change keyboard shortcuts to more standard


From: Zach DeCook
Subject: [Request]: Change keyboard shortcuts to more standard
Date: Sat, 29 Feb 2020 09:50:14 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:68.0) Gecko/20100101 Thunderbird/68.4.2

> > I don't advocate changing the *main* keystrokes.
> > I just doubt hundreds have internalized ^Q as reverse search.

> Would you have chosen to assign some other function to it?
> If yes, which one?

Wikipedia has a nice table comparing common Desktop Environment keyboard shortcuts against readline/emacs shortcuts.
https://en.wikipedia.org/wiki/Control_key#Table_of_examples

I would say in several cases, the readline/emacs shortcuts have become more ingrained in me as I used the terminal more and more. (Also, as background, I have a background using macOS, which keeps many of the emacs-style shortcuts with control (and uses command for what other desktop environments use control for)).

Here are my suggestions for the time-being:

* ^Q Quit (exit)
* ^O Open file (read file into new buffer)
* ^Z Undo
* ^Y Redo
* ^F Find (whereis)
* ^X not bound
* ^V not bound
* ^W not bound

And the following, non-standard-but-similar-enough shortcuts should be:

* M-Z Suspend (like ^Z)

Probably the most controversial change here is ^F and ^W

^F is "Forward one character" in readline, and many nano users (myself included) have muscle memory for ^W (whereis), However, most interfaces use ^F for Find (though many also use the vi-like /).

I think this change is necessary as users coming from a desktop environment associate ^W with "Close window". With the current (nano 4.8) behavior, pressing ^W not only does *not* close the window, it also deactivates the shortcut needed to close the window (instead, you need to trigger cancel first).

Unbinding ^X and ^V have similar motivations: desktop environment users expect them to cut and paste, but their current behavior is jarring. Changing ^X to cut would hurt users familiar to nano, so unbinding is best. Current behavior of ^C is not jarring, so it doesn't need to change.

Setting M-Z to Suspend (removing toggle suspension) is very logical. Users who like to suspend are already using it (M-Z ^Z) to suspend, and the toggle seems to only exist so that desktop environment users aren't frightened when what they thought was "undo" made everything disappear.

This leaves us with the following 'issues'

* ^B "Backward one character" is not parallel with ^F
* ^Y and ^V no longer do pageup and pagedown
* writeout is no longer bound

The first two aren't too much a concern for me. I usually use a keyboard with easy access to home, end, pageup, pagedown and the arrow keys (it's more comfortable to use them than ^B ^F ^N ^P ^Y ^V).

I can see how writeout could be useful, so something would need to be chosen for that (but for most users, ^S Save is sufficient).

-Zach



reply via email to

[Prev in Thread] Current Thread [Next in Thread]