void onKeyUp(int c, unsigned long flags) { printf("Key Up \"%s\" modifiers: [", getKeyDescription(c)); if (flags & PX_MOD_SHIFT) printf("Shift "); if (flags & PX_MOD_CONTROL) printf("Control "); if (flags & PX_MOD_ALT) printf("Alt "); printf("]"); printf(" Keycode: 0x%x", c); printf("\n"); }
void DictionaryStructure::validateKeyTypes(const DataTypes & key_types) const { if (key_types.size() != key.value().size()) throw Exception{ "Key structure does not match, expected " + getKeyDescription(), ErrorCodes::TYPE_MISMATCH}; for (const auto i : ext::range(0, key_types.size())) { const auto & expected_type = (*key)[i].type->getName(); const auto & actual_type = key_types[i]->getName(); if (expected_type != actual_type) throw Exception{ "Key type at position " + std::to_string(i) + " does not match, expected " + expected_type + ", found " + actual_type, ErrorCodes::TYPE_MISMATCH}; } }