Example: Changing the Key Assigned to an Accelerator

The code below assigns the Ctrl-F key instead of ‘f’ to the action IlvManager::fitTransformerToContents.

IlvManagerAcceleratorAction action;

IlAny arg;

if (manager->getAccelerator(&action, &arg, IlvKeyUp, 'f'))

{

manager->addAccelerator(action,

IlvKeyUp,

IlvCtrlChar('f'),

0,

arg);

manager->removeAccelerator(IlvKeyUp, 'f');

}