beep-evdev

Crates.iobeep-evdev
lib.rsbeep-evdev
version0.6.0
created_at2023-07-04 16:55:19.407852+00
updated_at2025-07-11 11:56:42.900275+00
descriptionBeep the PC speaker using evdev
homepagehttps://github.com/conqp/beep-evdev/
repositoryhttps://github.com/conqp/beep-evdev/
max_upload_size
id908185
size17,242
Richard Neumann (conqp)

documentation

https://docs.rs/beep-evdev

README

beep-evdev

Beep the PC speaker using evdev.

Prerequisites

The current user must be allowed to r/w to the speaker device:

$ cat /etc/udev/rules.d/70-pcspkr-beep.rules
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="PC Speaker", ENV{DEVNAME}!="", GROUP="beep", MODE="0660"

Examples:

use beep_evdev::{Beep, Note, DEFAULT_FILE};
use evdev::Device;

fn main() {
    Device::open(DEFAULT_FILE)
        .unwrap()
        .play([Note::default()])
        .unwrap()
}
Commit count: 35

cargo fmt