getOpFromAction method
- Return the operation associated to a mouse/keyboard combination
mouse A mouse button (0, 1, 2, 3) 3 for wheel notches
key The keyboard modifier ('CTRL', 'SHIFT') or null if key is not needed
- returns The operation if it has been found, null otherwise
Implementation
String? getOpFromAction(int mouse, String? key) {
Map<String,dynamic> action;
for (int i = 0; i < mouseActions.length; i++) {
action = mouseActions[i];
if (action['mouse'] == mouse && action['key'] == key) {
return action['operation'];
}
}
if (key != null) {
for (int i = 0; i < mouseActions.length; i++) {
action = mouseActions[i];
if (action['mouse'] == mouse && action['key'] == null) {
return action['operation'];
}
}
}
return null;
}