MCPcopy Create free account
hub / github.com/buggins/coolreader / hasKeyMapping

Method hasKeyMapping

cr3gui/src/cr3pocketbook.cpp:344–358  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

342 }
343
344 int hasKeyMapping(int key, int flags) {
345 // NOTE: orientation related key substitution is performed by inkview
346 for ( int i=_windows.length()-1; i>=0; i-- ) {
347 if ( _windows[i]->isVisible() ) {
348 int cmd, param;
349 CRGUIAcceleratorTableRef accTable = _windows[i]->getAccelerators();
350
351 if (!accTable.isNull() && accTable->translate( key, flags, cmd, param ) ) {
352 if (cmd != GCMD_PASS_TO_PARENT )
353 return cmd;
354 }
355 }
356 }
357 return -1;
358 }
359 bool onKeyPressed( int key, int flags )
360 {
361 CRLog::trace("CRPocketBookWindowManager::onKeyPressed(%d, %d)", key, flags);

Callers 1

main_handlerFunction · 0.80

Calls 5

lengthMethod · 0.45
isVisibleMethod · 0.45
getAcceleratorsMethod · 0.45
isNullMethod · 0.45
translateMethod · 0.45

Tested by

no test coverage detected