Skip to content

[Bug] addKeybind not properly registering key binds for MOUSE_WHEEL input mapper. #21

@Code-Kane

Description

@Code-Kane

Describe the bug
Currently, addKeybind doesn't support input mapper such as MOUSE_WHEEL, due to it not triggering +cmd or -cmd.

To Reproduce
Steps to reproduce the behavior:
Create a key bind using the MOUSE_WHEEL input mapper.

local keybind = lib.addKeybind({ name = 'RotateCCW', description = 'Rotate Object CCW', defaultKey = 'IOM_WHEEL_UP', defaultMapper = 'MOUSE_WHEEL', onPressed = function(self) print(('pressed %s (%s)'):format(self.currentKey, self.name)) end, onReleased = function(self) print(('released %s (%s)'):format(self.currentKey, self.name)) end })

Expected behavior
An event should be fired, the current issue is that Mouse_WHEEL doesn't emit up or down.
So, it should probably just not work with onReleased, but the onPressed cb should fire.

Screenshots

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions