From 11156b67778ce87a24611b918b60fe970b979755 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 12 Dec 2021 00:56:26 +0100 Subject: bin: implement led revert Command: $ vtcol leds set --revert Implementing this detail of KDSETLED: [I]f a higher order bit is set, the LEDs revert to normal: displaying the state of the keyboard functions of caps lock, num lock, and scroll lock. --- src/lib.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lib.rs') diff --git a/src/lib.rs b/src/lib.rs index 6193277..0669b87 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -185,6 +185,9 @@ impl KbLedState ioctl::kdsetled(con, Some(*self)) } + #[inline] + pub fn revert(con: &Console) -> io::Result<()> { ioctl::kdsetled(con, None) } + #[inline] pub fn cap(&self) -> bool { (self.0 & 0x4) != 0 } -- cgit v1.2.3