摘要:
Linux内核提供函数 ioctl 用于控制底层设备与描述符。参数KDSETLED指示小键盘灯的状态,0x01为scroll lock灯亮,0x02为num lock灯亮, 0x04为caps lock灯亮。#include <stdio.h>#include <fcntl.h>#include <unistd.h>#include <sys/stat.h>#include <linux/kd.h>#include <sys/types.h>#include <sys/ioctl.h>int ERROR=-1; 阅读全文