Installs a callback procedure that is invoked after the keymap matches input to a function name or fails to match an input. Only one keyboard grab function can be installed at a time. When keymaps are chained to a keymap with a grab callback, the callback is invoked for matches in the chained keymap (when the chained keymap does not have its own grab callback).
If a grab callback returns a true value for a matching or non-matching callback, the event is considered handled. If the callback returns a true value for a matching callback, then the matching keymap function is not called by the keymap.
wx:keymap% object, a wx:object% object, and a wx:key-event% object -- that returns a boolean
The callback procedure f will be invoked as:
The str argument is the name of a function for a matching callback, or null for a non-matching callback. The km argument is the keymap that matched (possibly a keymap chained to the one in which the callback was installed) or the keymap in which the callback was installed. The buffer and event arguments are the same as passed on to the matching keymap function.
Key grab callback functions are de-installed with remove-grab-key-function.