Skip to content

support InputMask for event filtering #20

Description

@aktau

My little program reads events from a bluetooth controller (it's a little kiosk application activator).

It uses non-zero CPU, and causes ~8% CPU usage in bluetoothd just reading all the events. The PS5 DualSense controllers sends a lot of events from its various sensors.

I only want button presses though.

I encountered InputMask in the code:

go-evdev/types.go

Lines 73 to 78 in 66d1748

// InputMask ...
type InputMask struct {
Type uint32
CodesSize uint32
CodesPtr uint64
}

But it's not used. Then I found:

https://github.com/srsholmes/loadout/blob/6af41dc3b0d627d661f58b34557671a45c476569/apps/loadout-overlay/src/bun/native/input-intercept.ts#L182-L187

Which shows that it can be used for the purpose I want. It would be nice to support this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions