MCPcopy Create free account
hub / github.com/MyGUI/mygui / onKeyEvent

Method onKeyEvent

Tools/EditorFramework/HotKeyManager.cpp:231–250  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

229 }
230
231 bool HotKeyManager::onKeyEvent(bool _pressed, bool _shift, bool _control, MyGUI::KeyCode _key)
232 {
233 bool result = false;
234
235 MapCommand::const_iterator section = mCommands.find(_key);
236 if (section == mCommands.end())
237 return result;
238
239 const VectorCommand& commands = (*section).second;
240 for (const auto& command : commands)
241 {
242 if (command.getPressed() == _pressed && command.getShift() == _shift && command.getControl() == _control)
243 {
244 if (CommandManager::getInstance().executeCommand(command.getCommand()))
245 result = true;
246 }
247 }
248
249 return result;
250 }
251
252}

Callers 4

injectKeyPressMethod · 0.80
injectKeyPressMethod · 0.80
injectKeyPressMethod · 0.80
injectKeyPressMethod · 0.80

Calls 4

getControlMethod · 0.80
findMethod · 0.45
endMethod · 0.45
executeCommandMethod · 0.45

Tested by

no test coverage detected