summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2021-12-12 00:56:26 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2021-12-12 01:14:54 +0100
commit11156b67778ce87a24611b918b60fe970b979755 (patch)
tree5943313f938e7bbfc44e909627efdf4913b73c78 /src/lib.rs
parent951df26618973a74d8c68a80634f965c23ba0734 (diff)
downloadvtcol-11156b67778ce87a24611b918b60fe970b979755.tar.gz
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.
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/lib.rs b/src/lib.rs
index 6193277..0669b87 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -186,6 +186,9 @@ impl KbLedState
}
#[inline]
+ pub fn revert(con: &Console) -> io::Result<()> { ioctl::kdsetled(con, None) }
+
+ #[inline]
pub fn cap(&self) -> bool { (self.0 & 0x4) != 0 }
#[inline]