📄 keyboard.h
字号:
///////////////////////////////////////////////////////////////////////////////
// /src/keyboard.h
//I put keyboard related method declarations here and implement
//them in /src/keyboar.c
//
//Created by Chen Hongquan.
////////////////////////////////////////////////////////////////////////////////
#ifndef __KEYBOARD_H
#define __KEYBOARD_H
typedef struct key
{
unsigned char keyPressMask;
unsigned char keyReleaseMask;
unsigned char preStatus; //Previous status. 1: pressed. 0: released.
unsigned char curStatus; //Current status. 1: pressed. 0: released.
void (*p_callFunction)(void); //primary key function.
void (*p_callDefault)(void); //Default function, in order to extends
//our function. For example, we can add
//implement into the function to deal
//with hold key action and put the
//function address here.
}key;
void initKeyboard(void);
void onKey1Pressed(void);
void onKey2Pressed(void);
void onKey3Pressed(void);
void onKey4Pressed(void);
void onKey1Default(void);
void onKey2Default(void);
void onKey3Default(void);
void onKey4Default(void);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -