diff --git a/packages/wolf_3d_flutter/lib/wolf_3d_input_flutter.dart b/packages/wolf_3d_flutter/lib/wolf_3d_input_flutter.dart index c19d2eb..88f2325 100644 --- a/packages/wolf_3d_flutter/lib/wolf_3d_input_flutter.dart +++ b/packages/wolf_3d_flutter/lib/wolf_3d_input_flutter.dart @@ -58,10 +58,14 @@ class Wolf3dFlutterInput extends Wolf3dInput { Set _previousKeys = {}; // --- Customization Helpers --- - void bindKey(WolfInputAction action, LogicalKeyboardKey key) => - bindings[action]?.add(key); - void unbindKey(WolfInputAction action, LogicalKeyboardKey key) => - bindings[action]?.remove(key); + void bindKey(WolfInputAction action, LogicalKeyboardKey key) { + bindings[action] = {}; + bindings[action]?.add(key); + } + + void unbindKey(WolfInputAction action, LogicalKeyboardKey key) { + bindings[action]?.remove(key); + } // --- Mouse Event Handlers --- void onPointerDown(PointerDownEvent event) {