Navigation


RSS / Atom



KBC Poker keyboard

2012-06-18 , , ,

I bought an open box, all but unused KBC Poker keyboard with Cherry Blue MX keys as my “travel” keyboard back in September 2011. It’s the size of a standard keyboard with the number pad, function keys, and arrows lopped off. It has clicky, full-travel keys with a normal pitch. Great for fixed mobile typing.

The problem with this little keyboard is the <ESC> key. There isn’t one, or more precisely, there is but it’s accessed by holding down a function-key to the right of the spacebar and hitting the tilde at the top left corner of the keyboard. I’m an Emacs user. The time at work I don’t spend in meetings is spent in Emacs. I have years of configuration and muscle memory invested in using it. You might be asking yourself by now, “What does he think is wrong with the Apple keyboard?” Nothing really, but I strongly prefer the feel of a mechanical key switch. If you spend eight to ten hours a day typing, preferences matter.

The solution is KeyRemap4MacBook, a free System Preferences extension that lets you remap your keyboard and change key behavior. It can do all kinds of things with pointers and key mappings (most of which I’ve never explored) and found the following settings work just fine with the KBC Poker:

General-
  Don't remap an internal keyboard
  Don't remap any pointing devices
  Don't remap Apple's keyboards
  Don't remap Apple's pointing devices
Change Backquote(`) to Escape if no modifiers pressed

After seven months of use a couple of days each week, I’m fairly satisfied with the keyboard and the work-around (certainly for the price). I like the mapping of the Mac volume keys and the function keys but prefer not to have to switch key layouts when I’m at my main desk and I find distracting the small amount of flex in the plastic case and key mounting. I’ll continue saving up for a Happy Hacking 2 Pro keyboard (and probably will be saving for quite a long time).

Comment


Dropping wanderlust, back to mutt

2009-08-28 , , , Comment

I’ve given wanderlust, a mail user agent for Emacs, a solid six month try as my only mail reader after a prior year of dabbling with it. It’s good but not great. I found no improvement over mutt with Emacs as my editor. That combination just lets me read mail most of the time instead of swearing and grovelling through the code.

Comment


macports emacs quick fix

2008-01-23 , , ,

The macports version of emacs 22.1_1 (no x11, no carbon) is broken. I use it. Fortunately, Yamamoto Mitsuharu’s patch http://article.gmane.org/gmane.emacs.bugs/16867 allows it to build and install on Leopard x86. The bug tracker has Ticket #13942 for 1.6 and Ticket #13471 for 1.5.2 that have not been acknowledged by the maintainer.

Seems to work so I’ve slapped together a patch file and a portfile to use it until the fixes get incorporated:

Comment


Calculator expansion

2007-08-13 , , , Comments [1]

Great idea and public doman code from Michele Bini for tying the Emacs calculator into hippie expand.

Comment


Reflow using Text::Autoformat

2005-10-01 , , ,

Filladapt mode is good but the Perl module [Text::Autoformat](http://www.perl.com/CPAN/modules/by-module/Text/Text-Autoformat-1.13.tar.gz) is better at reflowing text for email. I cobbled together the following elisp to make that easy.

   (defun rel-autoformatter (begin end rightmargin)
      "Run Text::Autoformat on region"
      (shell-command-on-region begin end
       (format "perl -MText::Autoformat -e 'autoformat({all=>1,right=>%d})'" rightmargin) t t )
      (message "done."))
   (defun rel-autoformat (begin end)
      Text::Autoformat on region, RFC recommended right margin of 72"
      (interactive "r")
      (rel-autoformatter begin end 72))
   (defun rel-autoformat-quote (begin end)
      "Text::Autoformat on region, right margin of 60, suitable for quoting replies"
      (interactive "r")
      (rel-autoformatter begin end 60))
   (global-set-key (kbd "C-c f f") 'rel-autoformat)
   (global-set-key (kbd "C-c f q") 'rel-autoformat-quote)

It might be nice to handle parameters other than right margin- and do it in a cleaner way than explicitly specifying them. I doubt I’ll get around to it since Text::Autoformat usually does the right thing for me with just the margin hint.

Comment


A little useful elisp

2005-03-05 , , ,

I get a lot of email at work and at home and I’m always deleting sections and
inlining responses so I decided that I needed a key binding in XEmacs to do
that work for me. Thanks to my growing familiarity with Scheme, writing elisp doesn’t seem so bad (well, as long as I have the [XEmacs Lisp Reference Manual](http://xemacs.org/Documentation/21.5/html/lispref.html) handy).

It’s ugly but it works and it’s my first useful creation in Lisp/Scheme:

   (defun region-is-active ()           ;; stolen from eparker's dot file
      (if (string-match "XEmacs" emacs-version)
          (region-exists-p)  mark-active) ) 
   (defun whack () "text killer, region, to sig, or next paragraph"
           (interactive)
           (let ((start (point)))
             (cond 
              ((region-is-active) (delete-region (point) (mark)))
              ((re-search-forward "^--" nil t) 
                (forward-line -1) (delete-region start (point)))
              (t (forward-paragraph) (delete-region start (point)))))
           (insert "    [snip]\n\n\n")
           (forward-line -1))
   (global-set-key (kbd "C-x !") 'whack)

Comment