📄 test-buttons.c
字号:
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/time.h>
#include <errno.h>
main(void)
{
int buttons_fd;
int key_value;
int ret;
buttons_fd=open("/dev/buttons/1",0);
while(1)
{
ret=read(buttons_fd,&key_value,sizeof(key_value));
if(ret<0)
{
continue;
}
printf("buttons_value: %d\n",key_value);
}
close(buttons_fd);
return;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -