1
0
Fork
You've already forked kbdled
0
Small utility for controlling your keyboard LEDs
  • C 96.7%
  • Makefile 3.3%
Find a file
2016年08月06日 01:05:36 +02:00
kbdled.c capsicumize, cleanup code, and switch to ISC license 2016年08月06日 01:05:36 +02:00
Makefile capsicumize, cleanup code, and switch to ISC license 2016年08月06日 01:05:36 +02:00
README.md Add animation support 2015年03月01日 13:35:02 +01:00

kbdled

A small utility for controlling your keyboard LEDs.

Tested under FreeBSD 10.1.

Installation

make install

Usage

usage: kbdled [+-][cnsr]
 kbdled -t tty [+-][cnsr]

Toggle your Caps Lock LED:

kbdled c

Toggle Num Lock LED:

kbdled n

Toggle Scroll Lock LED:

kbdled s

Reset all LEDs to off:

kbdled r

You can combine options to toggle multiple LEDs.

Toggle all LEDs:

kbdled cns

Prefix an LED with + to enable it and with - to disable it.

Enable the Caps Lock LED:

kbdled +c

Disable the Caps Lock LED:

kbdled -c

Enable all LEDs not matter their previous state:

kbdled +c+n+s

You can specify a tty like this:

kbdled -t /dev/ttyv8 +cns

There is some simple support for animating your LEDs. The following example enables your Caps Lock LED, waits 250 ms and then disables it again.

kblded +c w250 -c

You can loop with loop. This makes your Caps Lock LED blink forever:

kbdled +c w250 -c w250 loop

To make all LEDs "bounce" back and forth:

kbdled r+n w250 -n+c w250 -c+s w250 -s+c w250 -c+n w250 loop

License

Copyright (c) 2015 by Tobias Kortkamp

Distributed under the BSD 2-Clause License.