more explicit types
parent
0f953d4d4a
commit
ec2820d15b
|
@ -242,16 +242,16 @@ class Layout
|
|||
|
||||
HEADER
|
||||
|
||||
keys = keys_to_matrix "uint8_t", :code
|
||||
downs = keys_to_matrix "void_funptr_t", :down
|
||||
ups = keys_to_matrix "void_funptr_t", :up
|
||||
keys = keys_to_matrix "keycode", :code
|
||||
downs = keys_to_matrix "keyfunc", :down
|
||||
ups = keys_to_matrix "keyfunc", :up
|
||||
|
||||
File.open(LayoutFile, "w+") do |f|
|
||||
f.puts header
|
||||
f.puts "#define KB_LAYERS #{Key::Layers.size}"
|
||||
f.puts "static const uint8_t PROGMEM _kb_layout[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{keys} };"
|
||||
f.puts "static const void_funptr_t PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{downs} };"
|
||||
f.puts "static const void_funptr_t PROGMEM _kb_layout_release[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{ups} };"
|
||||
f.puts "static const keycode PROGMEM _kb_layout[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{keys} };"
|
||||
f.puts "static const keyfunc PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{downs} };"
|
||||
f.puts "static const keyfunc PROGMEM _kb_layout_release[KB_LAYERS][KB_ROWS][KB_COLUMNS] = { #{ups} };"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
File diff suppressed because it is too large
Load Diff
200
src/main.c
200
src/main.c
|
@ -22,7 +22,8 @@
|
|||
// types and forward declarations
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
typedef void (*void_funptr_t)(void);
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
|
||||
typedef enum StickyState {
|
||||
StickyNone,
|
||||
|
@ -31,6 +32,12 @@ typedef enum StickyState {
|
|||
StickyLock,
|
||||
} StickyState;
|
||||
|
||||
typedef u8 keycode;
|
||||
typedef u16 media_keycode;
|
||||
typedef u8 layer;
|
||||
|
||||
typedef void (*keyfunc)(void);
|
||||
|
||||
#include "./main.h"
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -40,33 +47,34 @@ typedef enum StickyState {
|
|||
#include "./keyboard/layout.c"
|
||||
// defines:
|
||||
// #define KB_Layers #{Layers.size}
|
||||
// static const uint8_t PROGMEM _kb_layout[KB_LAYERS][KB_ROWS][KB_COLUMNS];
|
||||
// static const void_funptr_t PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS];
|
||||
// static const void_funptr_t PROGMEM _kb_layout_release[KB_LAYERS][KB_ROWS][KB_COLUMNS];
|
||||
// static const keycode PROGMEM _kb_layout[KB_LAYERS][KB_ROWS][KB_COLUMNS];
|
||||
// static const keyfunc PROGMEM _kb_layout_press[KB_LAYERS][KB_ROWS][KB_COLUMNS];
|
||||
// static const keyfunc PROGMEM _kb_layout_release[KB_LAYERS][KB_ROWS][KB_COLUMNS];
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// globals
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static bool _kb_is_pressed[KB_ROWS][KB_COLUMNS];
|
||||
static bool (*kb_is_pressed)[KB_ROWS][KB_COLUMNS] = &_kb_is_pressed;
|
||||
|
||||
static bool _kb_was_pressed[KB_ROWS][KB_COLUMNS];
|
||||
static bool (*kb_was_pressed)[KB_ROWS][KB_COLUMNS] = &_kb_was_pressed;
|
||||
|
||||
static bool kb_was_transparent[KB_ROWS][KB_COLUMNS];
|
||||
static uint8_t layers_pressed[KB_ROWS][KB_COLUMNS];
|
||||
static bool kb_was_transparent[KB_ROWS][KB_COLUMNS];
|
||||
static layer layers_pressed[KB_ROWS][KB_COLUMNS];
|
||||
|
||||
static uint8_t current_layer;
|
||||
static uint8_t layer_offset;
|
||||
static uint8_t current_row;
|
||||
static uint8_t current_col;
|
||||
static bool current_is_pressed;
|
||||
static bool non_trans_key_pressed;
|
||||
static bool trans_key_pressed;
|
||||
static layer current_layer;
|
||||
static layer layer_offset;
|
||||
static u8 current_row;
|
||||
static u8 current_col;
|
||||
static bool current_is_pressed;
|
||||
static bool non_trans_key_pressed;
|
||||
static bool trans_key_pressed;
|
||||
|
||||
static bool layers_active[KB_LAYERS];
|
||||
static StickyState layers_sticky[KB_LAYERS];
|
||||
static uint8_t layers_top = 0;
|
||||
static layer layers_top = 0;
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
|
@ -105,8 +113,8 @@ void main_key_loop() {
|
|||
// - see the keyboard layout file ("keyboard/layout/*.c") for
|
||||
// which key is assigned which function (per layer)
|
||||
// - see "lib/key-functions/public/*.c" for the function definitions
|
||||
for (uint8_t row=0; row<KB_ROWS; row++) {
|
||||
for (uint8_t col=0; col<KB_COLUMNS; col++) {
|
||||
for (u8 row=0; row<KB_ROWS; row++) {
|
||||
for (u8 col=0; col<KB_COLUMNS; col++) {
|
||||
current_is_pressed = (*kb_is_pressed)[row][col];
|
||||
bool was_pressed = (*kb_was_pressed)[row][col];
|
||||
|
||||
|
@ -144,18 +152,18 @@ void main_key_loop() {
|
|||
// ----------------------------------------------------------------------------
|
||||
|
||||
void init_layers() {
|
||||
for (uint8_t layer=0; layer < KB_LAYERS; layer++) {
|
||||
layers_active[layer] = false;
|
||||
layers_sticky[layer] = StickyNone;
|
||||
for (layer l=0; l < KB_LAYERS; l++) {
|
||||
layers_active[l] = false;
|
||||
layers_sticky[l] = StickyNone;
|
||||
}
|
||||
layers_active[0] = true;
|
||||
}
|
||||
|
||||
|
||||
// find highest active layer
|
||||
uint8_t _highest_active_layer(uint8_t offset) {
|
||||
layer _highest_active_layer(layer offset) {
|
||||
if (offset < layers_top) {
|
||||
for (uint8_t l = layers_top - offset; l > 0 && l < KB_LAYERS; l--) {
|
||||
for (layer l = layers_top - offset; l > 0 && l < KB_LAYERS; l--) {
|
||||
if (layers_active[l]) { return l; }
|
||||
}
|
||||
}
|
||||
|
@ -170,38 +178,38 @@ StickyState layer_top_sticky() {
|
|||
}
|
||||
|
||||
// return if layer is sticky
|
||||
StickyState layer_sticky(uint8_t layer) {
|
||||
if (layer < KB_LAYERS) {
|
||||
return layers_sticky[layer];
|
||||
StickyState layer_sticky(layer l) {
|
||||
if (l < KB_LAYERS) {
|
||||
return layers_sticky[l];
|
||||
}
|
||||
return StickyNone;
|
||||
}
|
||||
|
||||
// enable a layer
|
||||
void layer_enable(uint8_t layer, StickyState sticky) {
|
||||
if (layer >= KB_LAYERS) { return; }
|
||||
void layer_enable(layer l, StickyState sticky) {
|
||||
if (l >= KB_LAYERS) { return; }
|
||||
|
||||
layers_active[layer] = true;
|
||||
layers_sticky[layer] = sticky;
|
||||
layers_active[l] = true;
|
||||
layers_sticky[l] = sticky;
|
||||
|
||||
if (layer > layers_top) {
|
||||
layers_top = layer;
|
||||
if (l > layers_top) {
|
||||
layers_top = l;
|
||||
}
|
||||
}
|
||||
|
||||
// disable a layer
|
||||
void layer_disable(uint8_t layer) {
|
||||
void layer_disable(layer l) {
|
||||
// base layer stays always on
|
||||
if (layer >= KB_LAYERS || layer == 0) { return; }
|
||||
if (l >= KB_LAYERS || l == 0) { return; }
|
||||
|
||||
layers_active[layer] = false;
|
||||
layers_active[l] = false;
|
||||
|
||||
if (layers_sticky[layer] != StickyNone) {
|
||||
debug_printf("sticky %d up!\n", layer);
|
||||
if (layers_sticky[l] != StickyNone) {
|
||||
debug_printf("sticky %d up!\n", l);
|
||||
}
|
||||
layers_sticky[layer] = StickyNone;
|
||||
layers_sticky[l] = StickyNone;
|
||||
|
||||
if (layer == layers_top) {
|
||||
if (l == layers_top) {
|
||||
layers_top = _highest_active_layer(1);
|
||||
}
|
||||
}
|
||||
|
@ -212,7 +220,7 @@ void layer_disable_top() {
|
|||
}
|
||||
|
||||
// return layer offset elements below the top
|
||||
uint8_t layer_peek(uint8_t offset) {
|
||||
layer layer_peek(layer offset) {
|
||||
return _highest_active_layer(offset);
|
||||
}
|
||||
|
||||
|
@ -236,16 +244,16 @@ void exec_key(void) {
|
|||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
uint8_t kb_layout_get(uint8_t layer, uint8_t row, uint8_t column) {
|
||||
return (uint8_t) pgm_read_byte(&(_kb_layout[layer][row][column] ));
|
||||
keycode kb_layout_get(layer l, u8 row, u8 col) {
|
||||
return (keycode) pgm_read_byte(&(_kb_layout[l][row][col] ));
|
||||
}
|
||||
|
||||
void_funptr_t kb_layout_press_get(uint8_t layer, uint8_t row, uint8_t column) {
|
||||
return (void_funptr_t) pgm_read_word(&(_kb_layout_press[layer][row][column] ));
|
||||
keyfunc kb_layout_press_get(layer l, u8 row, u8 col) {
|
||||
return (keyfunc) pgm_read_word(&(_kb_layout_press[l][row][col] ));
|
||||
}
|
||||
|
||||
void_funptr_t kb_layout_release_get(uint8_t layer, uint8_t row, uint8_t column) {
|
||||
return (void_funptr_t) pgm_read_word(&(_kb_layout_release[layer][row][column]));
|
||||
keyfunc kb_layout_release_get(layer l, u8 row, u8 col) {
|
||||
return (keyfunc) pgm_read_word(&(_kb_layout_release[l][row][col]));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -260,22 +268,22 @@ void_funptr_t kb_layout_release_get(uint8_t layer, uint8_t row, uint8_t column)
|
|||
* or remove 'keycode' from the list of currently pressed keys, to be sent at
|
||||
* the end of the current cycle (see main.c)
|
||||
*/
|
||||
void _kbfun_press_release(bool press, uint8_t keycode) {
|
||||
void _kbfun_press_release(bool press, keycode key) {
|
||||
// no-op
|
||||
if (keycode == 0) {
|
||||
if (key == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (press) {
|
||||
_kbfun_press(keycode);
|
||||
_kbfun_press(key);
|
||||
} else {
|
||||
_kbfun_release(keycode);
|
||||
_kbfun_release(key);
|
||||
}
|
||||
}
|
||||
|
||||
void _kbfun_press(uint8_t keycode) {
|
||||
void _kbfun_press(keycode key) {
|
||||
// modifier keys
|
||||
switch (keycode) {
|
||||
switch (key) {
|
||||
case KEY_LeftControl: keyboard_modifier_keys |= (1<<0); return;
|
||||
case KEY_LeftShift: keyboard_modifier_keys |= (1<<1); return;
|
||||
case KEY_LeftAlt: keyboard_modifier_keys |= (1<<2); return;
|
||||
|
@ -287,17 +295,17 @@ void _kbfun_press(uint8_t keycode) {
|
|||
}
|
||||
|
||||
// all others
|
||||
for (uint8_t i=0; i<6; i++) {
|
||||
for (u8 i=0; i<6; i++) {
|
||||
if (keyboard_keys[i] == 0) {
|
||||
keyboard_keys[i] = keycode;
|
||||
keyboard_keys[i] = key;
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void _kbfun_release(uint8_t keycode) {
|
||||
void _kbfun_release(keycode key) {
|
||||
// modifier keys
|
||||
switch (keycode) {
|
||||
switch (key) {
|
||||
case KEY_LeftControl: keyboard_modifier_keys &= ~(1<<0); return;
|
||||
case KEY_LeftShift: keyboard_modifier_keys &= ~(1<<1); return;
|
||||
case KEY_LeftAlt: keyboard_modifier_keys &= ~(1<<2); return;
|
||||
|
@ -309,8 +317,8 @@ void _kbfun_release(uint8_t keycode) {
|
|||
}
|
||||
|
||||
// all others
|
||||
for (uint8_t i=0; i<6; i++) {
|
||||
if (keyboard_keys[i] == keycode) {
|
||||
for (u8 i=0; i<6; i++) {
|
||||
if (keyboard_keys[i] == key) {
|
||||
keyboard_keys[i] = 0;
|
||||
return;
|
||||
}
|
||||
|
@ -320,9 +328,9 @@ void _kbfun_release(uint8_t keycode) {
|
|||
/*
|
||||
* Is the given keycode pressed?
|
||||
*/
|
||||
bool _kbfun_is_pressed(uint8_t keycode) {
|
||||
bool _kbfun_is_pressed(keycode key) {
|
||||
// modifier keys
|
||||
switch (keycode) {
|
||||
switch (key) {
|
||||
case KEY_LeftControl: if (keyboard_modifier_keys & (1<<0)) { return true; }
|
||||
case KEY_LeftShift: if (keyboard_modifier_keys & (1<<1)) { return true; }
|
||||
case KEY_LeftAlt: if (keyboard_modifier_keys & (1<<2)) { return true; }
|
||||
|
@ -334,28 +342,28 @@ bool _kbfun_is_pressed(uint8_t keycode) {
|
|||
}
|
||||
|
||||
// all others
|
||||
for (uint8_t i=0; i<6; i++)
|
||||
if (keyboard_keys[i] == keycode) {
|
||||
for (u8 i=0; i<6; i++)
|
||||
if (keyboard_keys[i] == key) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void _kbfun_mediakey_press_release(bool press, uint8_t keycode) {
|
||||
uint16_t mediakey_code = _media_code_lookup_table[keycode];
|
||||
void _kbfun_mediakey_press_release(bool press, keycode key) {
|
||||
media_keycode media_key = _media_code_lookup_table[key];
|
||||
if (press) {
|
||||
consumer_key = mediakey_code;
|
||||
consumer_key = media_key;
|
||||
} else {
|
||||
// Only one key can be pressed at a time so only clear the keypress for
|
||||
// active key (most recently pressed)
|
||||
if (mediakey_code == consumer_key) {
|
||||
if (media_key == consumer_key) {
|
||||
consumer_key = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
uint8_t _kbfun_get_keycode() {
|
||||
keycode _kbfun_get_keycode() {
|
||||
return kb_layout_get(current_layer, current_row, current_col);
|
||||
}
|
||||
|
||||
|
@ -382,37 +390,37 @@ void kbfun_press_release() {
|
|||
* defining the key to be transparent for the layer.
|
||||
*/
|
||||
void kbfun_press_release_preserve_sticky() {
|
||||
uint8_t keycode = _kbfun_get_keycode();
|
||||
_kbfun_press_release(current_is_pressed, keycode);
|
||||
keycode key = _kbfun_get_keycode();
|
||||
_kbfun_press_release(current_is_pressed, key);
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// layer helper functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
static bool is_layer_enable(void_funptr_t f) {
|
||||
static bool is_layer_enable(keyfunc f) {
|
||||
if (f == &kbfun_layer_enable || f == &kbfun_layer_sticky) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool is_layer_disable(void_funptr_t f) {
|
||||
static bool is_layer_disable(keyfunc f) {
|
||||
if (f == &kbfun_layer_disable || f == &kbfun_layer_sticky) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
static void layer_enable_upto(uint8_t max_layer) {
|
||||
static void layer_enable_upto(layer max_layer) {
|
||||
// FIXME clean this up
|
||||
|
||||
// pressing a key implicitly activates all lower layers as well
|
||||
for (uint8_t layer=0; layer <= KB_LAYERS; layer++) {
|
||||
void (*key_function)(void) = kb_layout_press_get(layer, current_row, current_col);
|
||||
for (layer l=0; l <= KB_LAYERS; l++) {
|
||||
void (*key_function)(void) = kb_layout_press_get(l, current_row, current_col);
|
||||
|
||||
if (is_layer_enable(key_function)) {
|
||||
uint8_t enable_layer = kb_layout_get(layer, current_row, current_col);
|
||||
layer enable_layer = (layer) kb_layout_get(l, current_row, current_col);
|
||||
if (enable_layer <= max_layer) {
|
||||
layer_enable(enable_layer, StickyNone);
|
||||
}
|
||||
|
@ -426,30 +434,30 @@ static void layer_enable_upto(uint8_t max_layer) {
|
|||
|
||||
// enable given layer
|
||||
void kbfun_layer_enable() {
|
||||
uint8_t layer = _kbfun_get_keycode();
|
||||
layer l = (layer) _kbfun_get_keycode();
|
||||
|
||||
// FIXME useful for anything?
|
||||
// Only the topmost layer on the stack should be in sticky once state, pop
|
||||
// the top layer if it is in sticky once state
|
||||
/* uint8_t topSticky = layer_top_sticky(); */
|
||||
/* StickyState topSticky = layer_top_sticky(); */
|
||||
/* if (topSticky == StickyOnceDown || topSticky == StickyOnceUp) { */
|
||||
/* layer_disable_top(); */
|
||||
/* } */
|
||||
|
||||
layer_enable_upto(layer);
|
||||
layer_enable_upto(l);
|
||||
}
|
||||
|
||||
// disable given layer
|
||||
void kbfun_layer_disable() {
|
||||
/* uint8_t layer = _kbfun_get_keycode(); */
|
||||
/* layer l = _kbfun_get_keycode(); */
|
||||
// FIXME clean this up
|
||||
|
||||
// letting go off a key releases *all* layers on that key
|
||||
for (uint8_t layer=0; layer <= KB_LAYERS; layer++) {
|
||||
void (*key_function)(void) = kb_layout_release_get(layer, current_row, current_col);
|
||||
for (layer l=0; l <= KB_LAYERS; l++) {
|
||||
void (*key_function)(void) = kb_layout_release_get(l, current_row, current_col);
|
||||
|
||||
if (is_layer_disable(key_function)) {
|
||||
uint8_t disable_layer = kb_layout_get(layer, current_row, current_col);
|
||||
layer disable_layer = (layer) kb_layout_get(l, current_row, current_col);
|
||||
layer_disable(disable_layer);
|
||||
}
|
||||
}
|
||||
|
@ -471,37 +479,37 @@ void kbfun_layer_disable() {
|
|||
* popped if the function is invoked on a subsequent keypress.
|
||||
*/
|
||||
void kbfun_layer_sticky() {
|
||||
uint8_t layer = _kbfun_get_keycode();
|
||||
layer l = (layer) _kbfun_get_keycode();
|
||||
StickyState topSticky = layer_top_sticky();
|
||||
|
||||
if (current_is_pressed) {
|
||||
if (layer == layers_top) {
|
||||
if (l == layers_top) {
|
||||
// FIXME
|
||||
/* if (topSticky == StickyOnceUp) { */
|
||||
/* layer_enable(layer, StickyLock); */
|
||||
/* layer_enable(l, StickyLock); */
|
||||
/* } */
|
||||
} else {
|
||||
// only the topmost layer on the stack should be in sticky once state
|
||||
if (topSticky == StickyOnceDown || topSticky == StickyOnceUp) {
|
||||
layer_disable_top();
|
||||
}
|
||||
layer_enable(layer, StickyOnceDown);
|
||||
debug_printf("sticky %d down!\n", layer);
|
||||
layer_enable(l, StickyOnceDown);
|
||||
debug_printf("sticky %d down!\n", l);
|
||||
|
||||
// this should be the only place we care about this flag being cleared
|
||||
non_trans_key_pressed = false;
|
||||
}
|
||||
} else {
|
||||
if (layer_sticky(layer) == StickyOnceDown) {
|
||||
if (layer_sticky(l) == StickyOnceDown) {
|
||||
// When releasing this sticky key, pop the layer always
|
||||
layer_disable(layer);
|
||||
layer_disable(l);
|
||||
|
||||
if (!non_trans_key_pressed) {
|
||||
// If no key defined for this layer (a non-transparent key)
|
||||
// was pressed, push the layer again, but in the
|
||||
// StickyOnceUp state
|
||||
layer_enable(layer, StickyOnceUp);
|
||||
debug_printf("sticky %d still down!\n", layer);
|
||||
layer_enable(l, StickyOnceUp);
|
||||
debug_printf("sticky %d still down!\n", l);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -538,16 +546,16 @@ void kbfun_control_press_release(void) {
|
|||
* shifts will be restored
|
||||
*/
|
||||
void kbfun_2_keys_capslock_press_release(void) {
|
||||
static uint8_t keys_pressed;
|
||||
static bool lshift_pressed;
|
||||
static bool rshift_pressed;
|
||||
static u8 keys_pressed;
|
||||
static bool lshift_pressed;
|
||||
static bool rshift_pressed;
|
||||
|
||||
uint8_t keycode = _kbfun_get_keycode();
|
||||
keycode key = _kbfun_get_keycode();
|
||||
|
||||
if (!current_is_pressed) { keys_pressed--; }
|
||||
|
||||
// take care of the key that was actually pressed
|
||||
_kbfun_press_release(current_is_pressed, keycode);
|
||||
_kbfun_press_release(current_is_pressed, key);
|
||||
|
||||
// take care of capslock (only on the press of the 2nd key)
|
||||
if (keys_pressed == 1 && current_is_pressed) {
|
||||
|
@ -574,6 +582,6 @@ void kbfun_2_keys_capslock_press_release(void) {
|
|||
* Generate a keypress for a media key
|
||||
*/
|
||||
void kbfun_mediakey_press_release(void) {
|
||||
uint8_t keycode = _kbfun_get_keycode();
|
||||
_kbfun_mediakey_press_release(current_is_pressed, keycode);
|
||||
keycode key = _kbfun_get_keycode();
|
||||
_kbfun_mediakey_press_release(current_is_pressed, key);
|
||||
}
|
||||
|
|
28
src/main.h
28
src/main.h
|
@ -8,22 +8,22 @@ void kbfun_layer_sticky();
|
|||
void kbfun_layer_enable();
|
||||
void kbfun_press_release_preserve_sticky();
|
||||
void kbfun_press_release();
|
||||
uint8_t _kbfun_get_keycode();
|
||||
void _kbfun_mediakey_press_release(bool press,uint8_t keycode);
|
||||
bool _kbfun_is_pressed(uint8_t keycode);
|
||||
void _kbfun_release(uint8_t keycode);
|
||||
void _kbfun_press(uint8_t keycode);
|
||||
void _kbfun_press_release(bool press,uint8_t keycode);
|
||||
uint8_t kb_layout_get(uint8_t layer,uint8_t row,uint8_t column);
|
||||
void_funptr_t kb_layout_release_get(uint8_t layer,uint8_t row,uint8_t column);
|
||||
void_funptr_t kb_layout_press_get(uint8_t layer,uint8_t row,uint8_t column);
|
||||
uint8_t layer_peek(uint8_t offset);
|
||||
keycode _kbfun_get_keycode();
|
||||
void _kbfun_mediakey_press_release(bool press,keycode key);
|
||||
bool _kbfun_is_pressed(keycode key);
|
||||
void _kbfun_release(keycode key);
|
||||
void _kbfun_press(keycode key);
|
||||
void _kbfun_press_release(bool press,keycode key);
|
||||
keycode kb_layout_get(layer l,u8 row,u8 col);
|
||||
keyfunc kb_layout_release_get(layer l,u8 row,u8 col);
|
||||
keyfunc kb_layout_press_get(layer l,u8 row,u8 col);
|
||||
layer layer_peek(layer offset);
|
||||
void layer_disable_top();
|
||||
void layer_disable(uint8_t layer);
|
||||
void layer_enable(uint8_t layer,StickyState sticky);
|
||||
StickyState layer_sticky(uint8_t layer);
|
||||
void layer_disable(layer l);
|
||||
void layer_enable(layer l,StickyState sticky);
|
||||
StickyState layer_sticky(layer l);
|
||||
StickyState layer_top_sticky();
|
||||
uint8_t _highest_active_layer(uint8_t offset);
|
||||
layer _highest_active_layer(layer offset);
|
||||
void exec_key(void);
|
||||
void main_key_loop();
|
||||
void init_layers();
|
||||
|
|
Loading…
Reference in New Issue