diff options
author | Philipp Gesang <phg@phi-gamma.net> | 2021-12-12 00:56:26 +0100 |
---|---|---|
committer | Philipp Gesang <phg@phi-gamma.net> | 2021-12-12 01:14:54 +0100 |
commit | 11156b67778ce87a24611b918b60fe970b979755 (patch) | |
tree | 5943313f938e7bbfc44e909627efdf4913b73c78 /src/lib.rs | |
parent | 951df26618973a74d8c68a80634f965c23ba0734 (diff) | |
download | vtcol-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.rs | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -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] |