wiki:BindingHook
close Warning: Can't synchronize with repository "(default)" ("(default)" is not readable or not a Git repository.). Look in the Trac log for more information.

Binding hook

At CLFSWM startup, a binding hook (*binding-hook*) is executed to reset hashtable keys and bind keys and mouse actions.

The default value of *binding-hook* is:

*BINDING-HOOK*=(INIT-*INFO-KEYS* 
                INIT-*INFO-MOUSE*
                SET-DEFAULT-INFO-KEYS
                SET-DEFAULT-INFO-MOUSE
                INIT-*MAIN-KEYS*
                INIT-*MAIN-MOUSE*
                SET-DEFAULT-MAIN-KEYS
                SET-DEFAULT-MAIN-MOUSE
                INIT-*SECOND-KEYS*
                INIT-*SECOND-MOUSE*
                SET-DEFAULT-SECOND-KEYS
                SET-DEFAULT-SECOND-MOUSE)

To change the default key binding in your configuration file (for example), you have to attach a new hook to *binding-hook*.

Something like this:

(defun my-binding ()
  (define-main-key ("a" :alt) 'open-menu))

(add-hook *binding-hook* 'my-binding)
Last modified 16 years ago Last modified on 10/26/08 21:59:17