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

Lower-case parens



   >Historical question: Ergonomically, Parentheses are annoying because they
   >require constant use of the SHIFT key.

Life with lower-case parens is verra nice, as former LispM hackers will tell
you. One day I was missing that feature, so I sat down and fixed it. The
following xmodmap file
    ! Swap () and []
    keycode 0x12 =  9               bracketleft
    keycode 0x13 =  0               bracketright
    keycode 0x22 =  parenleft       braceleft
    keycode 0x23 =  parenright      braceright

swaps () & [] on the keyboard on my linux laptop under X, so that parens are
conveniently accessible -- lowercase & not on the hard-to-touch-type topmost
row. I highly recommend this hack to Lisp & Scheme hackers.

There is a newer standard utility for hacking the X keyboard, but I don't
know anything about it. It would probably make it easier; xmodmap is a
fairly nasty notation to use.

I also have linux console-driver keymap files that achieve the same thing,
for non-X-windows use. I can post such a file if anyone cares.

These keyboard hacks also have the nice side effect that when other people use
my laptop for a little while, they separate out into two sets:
  - the set of people who go, "Hey? What's going on? Your bracket keys
    generate parens?!?!"
  - and the, usually older and more select, group that go, "Hey! You've
    got lower-case parens! That's great!" and then start laughing.

You load the xmodmap file by inserting the following little bit of text
into your .xinitrc:
    ;;; Hack the keyboard
    (if (file-readable? ".dots/xmodmap")
	(run (xmodmap .dots/xmodmap)))

Uh... your .xinitrc *is* written in Scheme, isn't it?
    -Olin