📄 keypro.c
字号:
/*******************************************************************************
*
* file name : key.c
*
* Copyright (C) SEIKO EPSON CORP. 1997-2001
*
* This file for key process.
*
* Revision History
*
* 2001/07/18 Leon Zhong Start
*
********************************************************************************/
#include "ros33.h"
#include "key.h"
#include "systsk.h"
#define MAX_KEYBUF 40 //gfd add
unsigned char CurrentKey[80];
/******************************************************
* FUNCTION StoreKeyBuf
* Description: depend on keybuf to decide wheter
* to store a press key
* return : TRUE: added to buf sucessful
* FALSE: not added to buf
*******************************************************/
BOOL StoreKeyBuf(unsigned char key)
{
int i;
int isEmpty;
BYTE isOnly;
isEmpty = 0;
isOnly = 0;
for (i = 0; i <MAX_KEYBUF/2; i++)
{
if (CurrentKey[i*2] == key){
act_cyc(KEYSCANTIMER,TCY_ON);
return FALSE;
}
else
if (CurrentKey[i*2] == 0xff)
isEmpty = i*2+1;
else
isOnly++;
}
if (isEmpty){
CurrentKey[isEmpty - 1] = key;
CurrentKey[isEmpty] = 1;
if (isOnly == 0)
act_cyc(KEYSCANTIMER,(TCY_ON|TCY_INI));
else
act_cyc(KEYSCANTIMER,TCY_ON);
return TRUE;
}
act_cyc(KEYSCANTIMER,TCY_ON);
return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -