Move needs_special_handling definition into keys.c

This commit is contained in:
Kovid Goyal 2018-02-22 14:37:51 +05:30
parent 1e4963e727
commit 1fc605cbc0
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
3 changed files with 2 additions and 2 deletions

View File

@ -11,6 +11,8 @@
#include "glfw-wrapper.h"
#include "control-codes.h"
static bool needs_special_handling[128 * 16] = {0};
const char*
key_to_bytes(int glfw_key, bool smkx, bool extended, int mods, int action) {
if ((action & 3) == 3) return NULL;

1
kitty/keys.h generated
View File

@ -4,7 +4,6 @@
#include <stdint.h>
#include <stdbool.h>
#include <limits.h>
static bool needs_special_handling[2048] = {0};
// map glfw key numbers to 7-bit numbers for compact data storage
static const uint8_t key_map[349] = {
UINT8_MAX,

View File

@ -259,7 +259,6 @@ def generate_key_table():
w('#include <stdint.h>')
w('#include <stdbool.h>')
w('#include <limits.h>')
w('static bool needs_special_handling[%d] = {0};' % (128 * 16))
number_of_keys = defines.GLFW_KEY_LAST + 1
w('// map glfw key numbers to 7-bit numbers for compact data storage')
w('static const uint8_t key_map[%d] = {' % number_of_keys)