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');
}
 

Version 6.0
Copyright © 2015, Rogue Wave Software, Inc. All Rights Reserved.