MCPcopy Create free account
hub / github.com/MrNeRF/LichtFeld-Studio / getKeyForAction

Method getKeyForAction

src/visualizer/input/input_bindings.cpp:825–834  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

823 }
824
825 int InputBindings::getKeyForAction(Action action, ToolMode mode) const {
826 const auto trigger = getEffectiveTriggerForAction(action, mode);
827 if (!trigger)
828 return -1;
829
830 if (const auto* key_trigger = std::get_if<KeyTrigger>(&*trigger)) {
831 return key_trigger->key;
832 }
833 return -1;
834 }
835
836 void InputBindings::setBinding(ToolMode mode, Action action, const InputTrigger& trigger) {
837 std::erase_if(bindings_, [mode, action](const Binding& b) {

Callers 3

register_keymapFunction · 0.80
handleKeyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected