Training Wheels For Better Ergonomics
1. Background
In my previous article Ergonomics Using xcape
I described my setup to minimize chording in Emacs. The setup is
working whell, and in the few weeks of usage, I've reduce the xcape
timeout
setting from 250ms to 170ms, this is the timeout that
controls the behavior of modifier keys in xcape.
2. Training Wheels In Emacs
Next, I decided that getting some feedback from Emacs and Emacspeak when xcape behavior is triggered would act as training wheels while getting used to the setup.
I considered the following:
- Adding a feature to
xcape
that produces a sound cue on triggering modified behavior — would work everywhere in X. - Having Emacs produce some feedback when xcape behavior is triggered.
- Asked on emacs-devel as to how one would do this in Emacsand
was pointed at
echo-keystrokes
by one of the core Emacs maintainers.
3. Solution
I phrased my question on emacs-devel as is there an elisp hook for
implementing this. Turns out no new code is needed; Emacs has a
echo-keystrokes
custom option that controls how long Emacs waits
before displaying an incomplete key-sequence.
So now, I have echo-keystrokes
set to 0.05 — and Emacspeak
speaks the resulting incomplete keystroke that is displayed by
Emacs.
Still playing with various values of echo-keystrokes
but that is
easy — it's just one custom setting.
4. Conclusion
To quote Larry Wall of Perl fame,
Lazy programmer equals good programmer!