bind-key -- Bind the given KEY within the CONTEXTS to invoke PROC.


(bind-key contexts key proc #&optional release-proc)


Bind the given key within the contexts to invoke proc. Return value is #t if the binding was made successfully, #f otherwise (e.g., if unbound modifiers or an unknown keysym is used, the binding will fail). contexts is a list of event-contexts (e.g., '(left-button-1 frame-sides)) key is a string giving the key-specifier (e.g., M-Delete for Meta+Delete) proc is a procedure that will be invoked (with no arguments) when the specified key is pressed in the specified context. The optional argument release-proc, if specified, is a procedure that will be invoked when the key is released. The contexts include: 'window 'title 'icon 'root 'frame-corners 'frame-sides 'client-window 'root-window 'left-button-N (N=1-5) 'right-button-N (N=1-5)

Implementation Notes

Module: Built-in Primitive

Defined in src/binding.c at line 1061 (CVS log)