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:
|
// 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.
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
InputMaskin the code:go-evdev/types.go
Lines 73 to 78 in 66d1748
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.