Input action the stroke should trigger
Sequence of event codes that triggers the event.
Add a number of bindings to an empty map.
import fluid.io.keyboard; auto map = InputMapping(); map.bindNew!(FluidInputAction.press) (KeyboardIO.codes.enter); map.bindNew!(FluidInputAction.focusNext)(KeyboardIO.codes.tab); map.bindNew!(FluidInputAction.submit) (KeyboardIO.codes.leftControl, KeyboardIO.codes.enter); map.bindNew!(FluidInputAction.copy) (KeyboardIO.codes.leftControl, KeyboardIO.codes.c); // The above creates equivalent layers assert(map.layers == [ Layer([KeyboardIO.codes.leftControl], [ Trigger(inputActionID!(FluidInputAction.submit), KeyboardIO.codes.enter), Trigger(inputActionID!(FluidInputAction.copy), KeyboardIO.codes.c), ]), Layer([], [ Trigger(inputActionID!(FluidInputAction.press), KeyboardIO.codes.enter), Trigger(inputActionID!(FluidInputAction.focusNext), KeyboardIO.codes.tab), ]), ]);
Bind an input stroke to an input action.
Does not replace any existing mappings, even in case of collision. Previously created mappings will have higher higher priority than this mapping.