Re: emacs-like sequential keybinds



"Chengqi(Lars) Song" <songcq gmail com> writes:

> hi,
>
> is it possible to do emacs-like keybinds?
> such as
> "H-r f f" to run firefox
> "H-r s d" to run stardict
> ...

This is possible by defining nested keymaps.  For example:

(define example-keymap (make-keymap))
(bind-keys global-keymap "C-r" example-keymap)
(define example-f-keymap (make-keymap))
(bind-keys example-keymap "f" example-f-keymap)
(bind-keys example-f-keymap "f" (lambda () (system "firefox &")))

Regards,
Jason


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