Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
Piotr Zieliński
[go: Go Back, main page]

Keyboard layout for the typing mode

The work I've done so far on improving the typing mode is described below. I haven't done much on other modes because for a long time I ignored their importance (they are still less important for me than the typing mode but clearly need some work).

I decided to use the Dvorak layout because it is more convenient for typing than the standard qwerty layout. However, this is not important; all modifications can be used with qwerty as well as with Dvorak.

It's important to emphasize that the layouts presented in below and the key bindings are by no means final and I change them occasionally.

Observations

The traditional keyboard layout has the following flaws:
  • Thumbs are underused, whereas little fingers are overused, esp. for side-wise moves (like reaching the Shift or the Ctrl key),
  • basic typing-mode functions (such as delete-char/word-backward, undo, end-of-line) and common symbols ($, parentheses, ...) require moving hands out of the home row.

Modifications

  • The right Alt key and the Ctrl key have been exchanged, so that Ctrl can be easily pressed with a thumb. The left Alt still stays in the same place.
  • An additional modifier Mod (which replaced the backlash key on UK keyboards) has been introduced to give faster access to common symbols. For example, Mod + T produces a ')'.
  • The Caps Lock key has been exchanged with the left Shift key so that its easily accessible with the left little finger and not confused with Mod (this is not that important)

Modifiers

  • Shift: for capital letters (as usual),
  • Alt: for most common one-key repeatable editing functions (such as delete-word),
  • Ctrl: for multiple-key bindings (such as open-file),
  • Mod: for frequently used symbols, (such as $, \, or /).

Layouts

The layouts shown below have been (slightly) optimized so that frequently used combinations (such as '()', '<=', or 'beginning-of-line + set-mark + line-down + yank') are easy to input. In particular, they only require pressing one modifier.

The modifier currently in effect is marked red. The keys which I use rarely and will probably change in the future are marked grey.

tab ' , . p y f g c r l
shift a o e u i d h t n s
Mod ; q j k x b m w v z
WinAlt Space Ctrl

Tab " < > P Y F G C R L
Shift A O E U I D H T N S
Mod : Q J K X B M W V Z
WinAlt Space Ctrl

tab " < > ? | { } _
shift : \ $ ; = ( ) / -
Mod ! & [ ] ^ +
WinAlt ~ (unbreakable space in tex) Ctrl

tab del word tab del char del word back up delete char back
shift home left enter right del line word left down word right end
Mod undo paste cut copy
WinAlt set-mark Ctrl

Key bindings

I had to change some (emacs) key bindings. I tried to apply the following rules:
  • Frequently used key bindings (such as word-left) should be easy to input rather than easy to remember. This applies to all Alt-letter combinations and a few Ctrl-letter1 letter2 combinations.
  • All other emacs key bindings should be left unchanged. Optimizing them does not make sense because they are not used sufficiently often.
Details can be found in the configuration files below.

Global key bindings

Having to set up key bindings for different applications separately is frustrating. There are two possible solutions to this problem: have all application use the same input libraries or have all applications use the same key bindings aka "generic keys". The idea is that instead of sending an event "Alt-A" directly to an application, it first passes though a small programs that looks it up in its configuration table and changes it to "beginning-of-line". Then this event ("beginning-of-line") is sent to the application, which doesn't care what keystroke was really pressed. This makes global key binding configuration much easier. Tell me if you know any program that does this.

Configuration files for the typing mode

I am using the following configuration files at the moment (bear in mind that I am using a UK keyboard with a short left shift key and an additional backslash key to the right to it (code 94)). I do not guarantee anything to work, these files should be considered a snapshot of my current configuration rather than anything portable.
  • xmodmap (apply all of those in the following order):
    • .Xmodmap (sets up the basic modifier keys and changes the UK keyboard into the US one).
    • dvorak.xmodmap (sets up the Dvorak layout)
    • symbols.xmodmap (binds various useful symbols to Mod)
  • ergo3.el Changes key bindings in emacs.
  • .inputrc (makes some of the key bindings from ergo3.el available in applications that use readline (xterm)).