mirror of
https://github.com/clockworkpi/DevTerm.git
synced 2025-12-12 18:28:50 +01:00
fn+arrow keys to be page up/dn, home end bottom mouse middle key fixed shift caps lock bug fix now there are only two layers in keyboard remove bug code,layers, use USBComposite_stm32f1's modifiers and setAdjustForHostCapsLock to do shift / caps lock job
39 lines
831 B
C++
39 lines
831 B
C++
#ifndef DEVTERM_H
|
|
#define DEVTERM_H
|
|
|
|
#define KEY_LATENCY 1400
|
|
|
|
#include <USBComposite.h>
|
|
typedef struct key_debouncing{
|
|
|
|
bool deing;//debouncing
|
|
uint16_t de_time;
|
|
|
|
}KEY_DEB;
|
|
|
|
typedef struct keyboard_state{
|
|
|
|
uint8_t layer;
|
|
uint8_t prev_layer;
|
|
uint8_t fn_on;
|
|
uint8_t shift;
|
|
|
|
}KEYBOARD_STATE;
|
|
|
|
class DEVTERM {
|
|
public:
|
|
HIDKeyboard *Keyboard;
|
|
HIDMouse *Mouse;
|
|
HIDJoystick *Joystick;
|
|
HIDConsumer *Consumer;
|
|
KEYBOARD_STATE Keyboard_state;
|
|
USBCompositeSerial *_Serial;
|
|
//if not to use USBCompositeSerial,then use default Serial
|
|
//**Serial and USBCompositeSerial can not use together, otherwise the keyboard firmware uploading will be dead**
|
|
//and you will need to find a way out to flash the stm32duino bootloader once again
|
|
//USBSerial *_Serial;//_Serial = &Serial;
|
|
};
|
|
|
|
|
|
#endif
|