Device: introduce system_path() method

This commit is contained in:
Wayne Warren 2022-01-15 19:46:27 -07:00
parent 3a425349ec
commit e3e7d339bd

View file

@ -253,6 +253,11 @@ impl Device {
self.raw.supported_sounds() self.raw.supported_sounds()
} }
/// Returns the system path used to open the device.
pub fn system_path(&self) -> &Path {
self.raw.system_path()
}
/// Retrieve the current keypress state directly via kernel syscall. /// Retrieve the current keypress state directly via kernel syscall.
pub fn get_key_state(&self) -> io::Result<AttributeSet<Key>> { pub fn get_key_state(&self) -> io::Result<AttributeSet<Key>> {
self.raw.get_key_state() self.raw.get_key_state()