Files
lovedos/src/keyboard.h

32 lines
582 B
C
Raw Normal View History

2016-10-15 15:35:08 +01:00
/**
2016-09-22 19:30:56 +01:00
* Copyright (c) 2016 rxi
2014-06-13 21:01:19 +01:00
*
* This library is free software; you can redistribute it and/or modify it
* under the terms of the MIT license. See LICENSE for details.
*/
#ifndef KEYBOARD_H
#define KEYBOARD_H
2016-10-15 15:35:08 +01:00
typedef struct {
int type;
unsigned code;
const char *key;
char text[64];
int isrepeat;
} keyboard_Event;
enum {
KEYBOARD_PRESSED,
KEYBOARD_RELEASED,
2016-10-15 15:35:08 +01:00
KEYBOARD_TEXTINPUT
};
2014-06-13 21:01:19 +01:00
int keyboard_init(void);
void keyboard_deinit(void);
2016-10-15 15:35:08 +01:00
void keyboard_setKeyRepeat(int allow);
int keyboard_isDown(const char *key);
int keyboard_poll(keyboard_Event *e);
2014-06-13 21:01:19 +01:00
#endif