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;
IlvAny arg;
if (manager->getAccelerator(&action, &arg, IlvKeyUp, ‘f’))
{
manager->addAccelerator(action,
IlvKeyUp,
IlvCtrlChar(‘f’),
0,
arg);
manager->removeAccelerator(IlvKeyUp, ‘f’);
}
 

Version 5.5.1
Copyright © 2012, Rogue Wave Software, Inc. All Rights Reserved.