https://github.com/irontec/ledturner
turn on / off keyboard leds based on /dev/input/event*
https://github.com/irontec/ledturner
Last synced: 4 months ago
JSON representation
turn on / off keyboard leds based on /dev/input/event*
- Host: GitHub
- URL: https://github.com/irontec/ledturner
- Owner: irontec
- Created: 2013-11-15T07:11:46.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2013-11-15T10:48:00.000Z (over 12 years ago)
- Last Synced: 2025-04-12T19:12:02.523Z (about 1 year ago)
- Language: C
- Homepage:
- Size: 113 KB
- Stars: 12
- Watchers: 24
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
LedTurner
=========
Turns on/off keyboard leds writing directly to input device.
(It works with multiple keyboards separately)
## Compiling ##
```
gcc -o ledturner ledturner.c
```
## Using ##
```
./ledturner --input /dev/input/event* [OPTIONS]
```
```
--num, -n [0|1] Turn OFF (0) , ON (1) Num Lock LED
--caps, -c [0|1] Turn OFF (0) , ON (1) Caps Lock LED
--scroll, -s [0|1] Turn OFF (0) , ON (1) Scroll Lock LED
```
## Examples ##
Assuming our keyboard is on /dev/input/event8
Turn OFF "Num Lock" LED
```
./ledtuner --input /dev/input/event8 --num 0
```
Turn On "Caps Lock" LED
Turn Off "Scroll Lock" LED
```
./ledtuner --input /dev/input/event8 --caps 1 --scroll 0
```
Turn them all OFF
```
./ledtuner --input /dev/input/event8 -c 0 -s 0 -n 0
```
## Tips ##
* You probably must be root to be able to write on input devices.
* Use xinput to find out your devices:
```
xinput --list
```
```
xinput --list-props "HID 046a:0001"
```