Skip to content

Commit

Permalink
Add hotkey support (#638)
Browse files Browse the repository at this point in the history
Treat devices providing brightness controls as keyboards.
  • Loading branch information
briceburg authored and rvaiya committed Feb 11, 2024
1 parent ccd17ad commit fd0b99d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ static uint8_t resolve_device_capabilities(int fd)
if ((mask[0] & keyboard_mask) == keyboard_mask)
capabilities |= CAP_KEYBOARD;

if (mask[KEY_BRIGHTNESSUP/32] & (1 << (KEY_BRIGHTNESSUP % 32)))
capabilities |= CAP_KEYBOARD;

return capabilities;
}

Expand Down

0 comments on commit fd0b99d

Please sign in to comment.