mav_callbackKeyboardSet - Keyboard callback management.

[ Maverik Level 1 functions ]

#

mav_callbackKeyboardSet

mav_callbackKeyboardSet, mav_callbackKeyboardExec

## Summary

Keyboard callback management.

## Syntax

void mav_callbackKeyboardSet(MAV_window *w, MAV_class *c, MAV_callbackKeyboardFn fn);

int mav_callbackKeyboardExec(MAV_window *w, MAV_object *o,MAV_keyboardEvent *ke);

## Description

mav_callbackKeyboardSet sets the callback function for keyboard events for object class `c` in window `w`, to be `fn`.

When a keyboard event is detected by mav_eventsCheck, the system checks if the mouse is currently pointing at an object. If it is, and a keyboard callback has been registered for that class of object, the system calls mav_callbackKeyboardExec to execute `fn`, passing it the keyboard event data `me`.

Note: to cause `fn` to be executed regardless of the mouse position (to obtain a non-object specific action) specify object class `o` to be `MAV_CLASS_WORLD`.

## See also

mav_eventsCheck.

Back to the index page.