Skip to content

conqp/beep-evdev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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()
}

About

Beep the PC speaker using evdev

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages