Upload
knight17
View
212
Download
0
Embed Size (px)
Citation preview
8/17/2019 Keyboard and Choice of Text Editor
http://slidepdf.com/reader/full/keyboard-and-choice-of-text-editor 1/3
Source: Virtuous code
Lately I do the bulk of my coding on a Kinesis Advantage keyboard. Increasingly
I’m also making use of the optional 3-switch foot pedal. It’s been interesting
watching the effect this has on my priorities for editor keybindings.
Every keypress or key-chord has an opportunity cost associated with it. Some
are higher than others. Most traditional hacker-oriented tools make certain as-
sumptions about these opportunity costs.
For instance, most tools assume that the opportunity cost for using arrow keys
for navigation is extremely high. This is based on the fact that historically, Unix
terminals often didn’t even possess arrow keys, making their opportunity cost
effectively infinite. And even on modern keyboards, they are off in a little remote
island, forcing the user to relocate a hand away from the home row and then
back, even for the smallest cursor motion.
As a consequence, the traditional “hackers editors” have eschewed arrow key
navigation. It’s available, but it’s not considered the primary navigation center.
So for instance, if there are special bindings for navigating by expression or byfunction, they are not built around the arrow keys.
Editor developers have also traditionally recognized that modifier keys have a
high opportunity cost, since on the vast majority of keyboards they involve
stretching a pinkie to full extension while keeping the rest of the hand in posi-
tion to hit a key. Vim is particularly good about avoiding these digit acrobatics.
Emacs is less sympathetic, but even Emacs usually emphasizes contiguous se-
quences of simpler key combos over multiple-modifier contortions.
The Kinesis keyboard addresses both of these keyboard shortcomings. On theKinesis, you can comfortably use the arrow keys without leaving home position.
It’s still a slightly higher opportunity cost than using Vim-style home-row navi-
gation, but it’s a marginal difference instead of a massive one.
The Kinesis also recognizes what game pad designers have long realized: that
the human thumb is an extraordinarily dexterous organ. It is equally at home
hitting single keys or mashing down multiple buttons at a time. The Kinesis
takes advantage of this fact by organizing modifier keys along with other com-
mon non-character keys into “thumb islands”.
8/17/2019 Keyboard and Choice of Text Editor
http://slidepdf.com/reader/full/keyboard-and-choice-of-text-editor 2/3
And then there’s the optional foot pedal. Using a foot pedal with your keyboard
feels impossibly geeky at first. Until you use it for a while, and then you start
wondering why you didn’t recruit your feet for help years ago. It’s not like they
had anything better to do all this time. Sewing machines have foot pedals. Cars
have foot pedals. Airplanes have rudder pedals. Why not computers?
The upshot of all this is that a lot of the work that has gone into hacker editors’
keybindings doesn’t seem to matter to me as much anymore. For instance, I’ve
been using RubyMine lot lately (for reasons unrelated to keybindings). People
ask me if I use Emacs or Vim keybindings for it, and I don’t. I use the defaults, for
the most part. This includes bindings like Ctrl-Left/Right for wordwise naviga-
tion, or Alt-Up/Down for navigating by method. And on the Kinesis, it’s fine. It
doesn’t bother me.
Similarly, it’s become less urgent to me to explore Vim-style keybindings in
Emacs. Key-chords are now relatively “cheap” in terms of effort and comfort.
(Although Spacemacs remains intriguing…)
Obviously, keybindings are the tiniest tip of the iceberg we it comes to the capa-
bilities and advantages of an editor like Vim or Emacs. Please don’t think I’m
saying navigation keys are the only things that keep me using mature text edit-
ing tools. And of course, there’s nothing stopping you from using arrow keys to
navigate around in Emacs or Vim.
But it does have me thinking about how much of those editors’ UX is designed
around a lowest-common-denominator teletype keyboard, circa 1960.
There’s an argument to be made that this is a good thing. After all, when I take
my laptop out on the deck, or to a cafe, I instantly lose all of those Kinesis ad-
vantages (heh). Even if I started carrying an Atreus with me, it doesn’t have all
the keys of a Kinesis. Let alone pedals. Perhaps I should emphasize muscle
memory for the subset of comfortable keybindings that are available to me all of
the time, instead of the superset that’s available in my home office.
But I’m not sure that’s such a great idea. A fighter pilot doesn’t use a yoke in-
stead of a fly-by-wire joystick just because sometimes she also flies Cessnas.
Maybe it’s time we started demanding modern programmer-input devices
across the board. Instead of designing input schemes around the limitations of a
device that hasn’t changed substantially since it was invented for bashing inked
hammers into a roll of paper.
UPDATE: It occurred to me that I hadn’t even mentioned the
“Home/End/PageUp/PageDown” cluster. This is an example of a set of functions
that most hacker’s editors use some kind of key sequence or combo for, since
their location is usually as problematic as that of the arrow keys, if not evenmore so. But the Kinesis puts these keys in the thumb islands, available without
8/17/2019 Keyboard and Choice of Text Editor
http://slidepdf.com/reader/full/keyboard-and-choice-of-text-editor 3/3
moving your hands or glancing down. A lot of editor tutorials will try to wean
you off of these keys along with the arrows. But I’m finding I’m using the dedi-
cated keys more and more (and the alternative keybindings less and less), be-
cause I’m no longer paying a price for it. Which is nice, because it means I can
use the same muscle memory across all applications.
UPDATE 2: Hi Hacker News! Since I don’t feel like wading into the comments
over there, I wanted to quickly address a common theme in some of the com-
ments. Namely: the notion that “efficiency” is the only axis that a given key-
board/layout/editor combo might be judged on. If you’re a young hacker you
may not presently be much concerned about keyboard comfort; but speaking
from the ancient and decrepit age of 34: you will be.
Comments available at: http://devblog.avdi.org/2015/06/04/how-a-keyboard-
changed-what-i-look-for-in-an-editor/