Views User Guides > 2D Graphics > Managers > Manager Event Handling > Accelerators > Example: Changing the Key Assigned to an Accelerator
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');
}
 
Published date: 05/24/2022
Last modified date: 02/24/2022