void FGKeyboardInput::postinit()
{
SG_LOG(SG_INPUT, SG_DEBUG, "Initializing key bindings");
- string module = "__kbd";
+ std::string module = "__kbd";
SGPropertyNode * key_nodes = fgGetNode("/input/keyboard");
if (key_nodes == NULL) {
SG_LOG(SG_INPUT, SG_WARN, "No key bindings (/input/keyboard)!!");
FGButton &b = bindings[k];
// Try it straight, first.
- if (b.bindings[modifiers].size() > 0)
+ if (! b.bindings[modifiers].empty())
return b.bindings[modifiers];
// Alt-Gr is CTRL+ALT
SG_LOG( SG_INPUT, SG_DEBUG, "User pressed key " << k << " with modifiers " << modifiers );
if (!b.last_state || b.is_repeatable) {
const binding_list_t &bindings = _find_key_bindings(k, modifiers);
-
- for (unsigned int i = 0; i < bindings.size(); i++)
- bindings[i]->fire();
+ fireBindingList(bindings);
b.last_state = 1;
}
}
SG_LOG(SG_INPUT, SG_DEBUG, "User released key " << k << " with modifiers " << modifiers);
if (b.last_state) {
const binding_list_t &bindings = _find_key_bindings(k, modifiers);
- for (unsigned int i = 0; i < bindings.size(); i++)
- bindings[i]->fire();
+ fireBindingList(bindings);
b.last_state = 0;
}
}