📄 stdin.c
字号:
/* * Copyright (c) 2008 Martin Decky * All rights reserved. * * Distributed under the terms of GPL. * */#include "../stdin.h"#ifndef __WIN32__#include <unistd.h>#include <sys/select.h>bool stdin_poll(char *key){ /* Check new character */ fd_set rfds; struct timeval tv; /* Watch stdin */ FD_ZERO(&rfds); FD_SET(0, &rfds); tv.tv_sec = 0; tv.tv_usec = 0; int retval = select(1, &rfds, NULL, NULL, &tv); if (retval == 1) { /* There is a new character */ read(0, key, 1); return true; } return false;}#endif /* __WIN32__ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -