2012-07-31 23:48:31 +02:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* key functions : basic : code
|
|
|
|
* ----------------------------------------------------------------------------
|
|
|
|
* Copyright (c) 2012 Ben Blazak <benblazak.dev@gmail.com>
|
|
|
|
* Released under The MIT License (MIT) (see "license.md")
|
|
|
|
* Project located at <https://github.com/benblazak/ergodox-firmware>
|
|
|
|
* ------------------------------------------------------------------------- */
|
|
|
|
|
|
|
|
|
2012-08-07 00:57:23 +02:00
|
|
|
#include "../../../main.h"
|
|
|
|
#include "../../../keyboard/layout.h"
|
2012-07-31 23:48:31 +02:00
|
|
|
#include "../public.h"
|
|
|
|
#include "../private.h"
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
#define MAX_LAYER_PUSH_POP_FUNCTIONS 10
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2012-08-07 00:57:23 +02:00
|
|
|
// convenience macros
|
2012-11-30 21:06:41 +01:00
|
|
|
#define LAYER main_arg_layer
|
|
|
|
#define LAYER_OFFSET main_arg_layer_offset
|
|
|
|
#define ROW main_arg_row
|
|
|
|
#define COL main_arg_col
|
|
|
|
#define IS_PRESSED main_arg_is_pressed
|
|
|
|
#define WAS_PRESSED main_arg_was_pressed
|
2012-08-07 00:57:23 +02:00
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2012-07-31 23:48:31 +02:00
|
|
|
/*
|
2012-08-23 10:31:25 +02:00
|
|
|
* [name]
|
|
|
|
* Press|Release
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Generate a normal keypress or keyrelease
|
2012-07-31 23:48:31 +02:00
|
|
|
*/
|
2012-08-07 00:57:23 +02:00
|
|
|
void kbfun_press_release(void) {
|
2013-04-08 09:49:35 +02:00
|
|
|
if (!main_arg_trans_key_pressed)
|
|
|
|
main_arg_any_non_trans_key_pressed = true;
|
2013-04-08 19:54:49 +02:00
|
|
|
kbfun_press_release_preserve_sticky();
|
2012-07-31 23:48:31 +02:00
|
|
|
}
|
2013-04-08 19:54:49 +02:00
|
|
|
//TODO:
|
2012-07-31 23:48:31 +02:00
|
|
|
|
2013-04-08 19:54:49 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Press|Release and preserve top layer sticky key state
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Generate a normal keypress or keyrelease
|
|
|
|
* While basing the sticky key state transition on whether
|
|
|
|
* kbfun_press_release() was called after kbfun_transparent() generally
|
|
|
|
* works in practice, it is not always the desired behavior. One of the
|
|
|
|
* benefits of sticky keys is avoiding key chording, so we want to make sure
|
|
|
|
* that standard modifiers do not interrupt the sticky key cycle. Use
|
|
|
|
* kbfun_press_release_preserve_sticky() if you want to define a standard
|
|
|
|
* modifier key (shift, control, alt, gui) on the sticky layer instead of
|
|
|
|
* defining the key to be transparent for the layer.
|
|
|
|
*/
|
|
|
|
void kbfun_press_release_preserve_sticky(void) {
|
|
|
|
uint8_t keycode = kb_layout_get(LAYER, ROW, COL);
|
|
|
|
_kbfun_press_release(IS_PRESSED, keycode);
|
|
|
|
}
|
2012-07-31 23:48:31 +02:00
|
|
|
/*
|
2012-08-23 10:31:25 +02:00
|
|
|
* [name]
|
|
|
|
* Toggle
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Toggle the key pressed or unpressed
|
2012-07-31 23:48:31 +02:00
|
|
|
*/
|
2012-08-07 00:57:23 +02:00
|
|
|
void kbfun_toggle(void) {
|
2012-11-30 21:06:41 +01:00
|
|
|
uint8_t keycode = kb_layout_get(LAYER, ROW, COL);
|
2012-08-07 00:57:23 +02:00
|
|
|
|
|
|
|
if (_kbfun_is_pressed(keycode))
|
|
|
|
_kbfun_press_release(false, keycode);
|
2012-07-31 23:48:31 +02:00
|
|
|
else
|
2012-08-07 00:57:23 +02:00
|
|
|
_kbfun_press_release(true, keycode);
|
2012-07-31 23:48:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
2012-08-23 10:31:25 +02:00
|
|
|
* [name]
|
2012-11-30 21:06:41 +01:00
|
|
|
* Transparent
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Execute the key that would have been executed if the current layer was not
|
|
|
|
* active
|
|
|
|
*/
|
|
|
|
void kbfun_transparent(void) {
|
2013-04-08 09:49:35 +02:00
|
|
|
main_arg_trans_key_pressed = true;
|
2012-11-30 21:06:41 +01:00
|
|
|
LAYER_OFFSET++;
|
|
|
|
LAYER = main_layers_peek(LAYER_OFFSET);
|
2012-12-04 01:19:12 +01:00
|
|
|
main_layers_pressed[ROW][COL] = LAYER;
|
2012-11-30 21:06:41 +01:00
|
|
|
main_exec_key();
|
|
|
|
}
|
|
|
|
|
2012-12-05 01:11:01 +01:00
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* layer push/pop functions
|
|
|
|
* ------------------------------------------------------------------------- */
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
// While there are only MAX_LAYER_PUSH_POP_FUNCTIONS number of layer functions,
|
2013-04-08 17:46:25 +02:00
|
|
|
// there are 1 + MAX_LAYER_PUSH_POP_FUNCTIONS layer ids because we still have
|
|
|
|
// layer 0 even if we will never have a push or pop function for it
|
2013-04-08 09:49:35 +02:00
|
|
|
static uint8_t layer_ids[1 + MAX_LAYER_PUSH_POP_FUNCTIONS];
|
2012-11-30 21:06:41 +01:00
|
|
|
|
|
|
|
static void layer_push(uint8_t local_id) {
|
|
|
|
uint8_t keycode = kb_layout_get(LAYER, ROW, COL);
|
|
|
|
main_layers_pop_id(layer_ids[local_id]);
|
2013-04-08 09:49:35 +02:00
|
|
|
// 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 = main_layers_peek_sticky(0);
|
2013-04-08 17:46:25 +02:00
|
|
|
if (topSticky == eStickyOnceDown || topSticky == eStickyOnceUp) {
|
2013-04-08 09:49:35 +02:00
|
|
|
main_layers_pop_id(main_layers_peek(0));
|
|
|
|
}
|
|
|
|
layer_ids[local_id] = main_layers_push(keycode, eStickyNone);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void layer_sticky(uint8_t local_id) {
|
|
|
|
uint8_t keycode = kb_layout_get(LAYER, ROW, COL);
|
2013-04-08 17:46:25 +02:00
|
|
|
if (IS_PRESSED) {
|
2013-04-08 09:49:35 +02:00
|
|
|
uint8_t topLayer = main_layers_peek(0);
|
|
|
|
uint8_t topSticky = main_layers_peek_sticky(0);
|
|
|
|
main_layers_pop_id(layer_ids[local_id]);
|
2013-04-08 17:46:25 +02:00
|
|
|
if (topLayer == local_id) {
|
2013-04-08 09:49:35 +02:00
|
|
|
if (topSticky == eStickyOnceUp)
|
|
|
|
layer_ids[local_id] = main_layers_push(keycode, eStickyLock);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// only the topmost layer on the stack should be in sticky once state
|
2013-04-08 17:46:25 +02:00
|
|
|
if (topSticky == eStickyOnceDown || topSticky == eStickyOnceUp) {
|
2013-04-08 09:49:35 +02:00
|
|
|
main_layers_pop_id(layer_ids[topLayer]);
|
|
|
|
}
|
|
|
|
layer_ids[local_id] = main_layers_push(keycode, eStickyOnceDown);
|
|
|
|
// this should be the only place we care about this flag being cleared
|
|
|
|
main_arg_any_non_trans_key_pressed = false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
uint8_t topLayer = main_layers_peek(0);
|
|
|
|
uint8_t topSticky = main_layers_peek_sticky(0);
|
2013-04-08 17:46:25 +02:00
|
|
|
if (topLayer == local_id) {
|
|
|
|
if (topSticky == eStickyOnceDown) {
|
2013-04-08 09:49:35 +02:00
|
|
|
// When releasing this sticky key, pop the layer always
|
|
|
|
main_layers_pop_id(layer_ids[local_id]);
|
2013-04-08 17:46:25 +02:00
|
|
|
if (!main_arg_any_non_trans_key_pressed) {
|
2013-04-08 09:49:35 +02:00
|
|
|
// If no key defined for this layer (a non-transparent key)
|
|
|
|
// was pressed, push the layer again, but in the
|
|
|
|
// StickyOnceUp state
|
|
|
|
layer_ids[local_id] = main_layers_push(keycode, eStickyOnceUp);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2012-11-30 21:06:41 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
static void layer_pop(uint8_t local_id) {
|
|
|
|
main_layers_pop_id(layer_ids[local_id]);
|
|
|
|
layer_ids[local_id] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #1
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_1(void) {
|
|
|
|
layer_push(1);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #1
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* This function gives similar behavior to sticky keys for modifiers available
|
|
|
|
* on most operating systems. It is considered an accessibility feature
|
|
|
|
* because it alleviates the user from having to hold down modifiers while
|
|
|
|
* pressing a key to produce the modified key function. It is useful for fast
|
|
|
|
* touch typing because you can avoid chording motions which both strain your
|
|
|
|
* hands and take your hands out of home-row position while pressing normal
|
|
|
|
* alpha keys.
|
|
|
|
* This function emulates the 3-state behavior which is default on OS X and
|
|
|
|
* optional in Windows where the modifier cycles between Off->Once->Locked
|
|
|
|
* states. This is particularly handy for symbol layers where you typically
|
|
|
|
* only type one symbol before you want to return to unmodified typing (layer
|
|
|
|
* 0), e.g. 'if (condition) { a = "b" + "c"; }'. If you assign a symbol layer
|
|
|
|
* to a thumb key as a layer sticky cycle, you can type the entire line of
|
|
|
|
* code without taking your hands out of home row position and you do not need
|
|
|
|
* to toggle off the layer after each symbol is pressed, only immediately
|
|
|
|
* before keying the symbol.
|
|
|
|
* The exact behavior of the layer sticky cycle function is defined as follows
|
|
|
|
* for each state:
|
|
|
|
* 1) One time down (set on key press) - The layer was not active and the key
|
|
|
|
* has been pressed but not yet released. The layer is pushed in the one
|
|
|
|
* time down state.
|
|
|
|
* 2) One time up (set on key release) - The layer was active when the layer
|
|
|
|
* sticky key was released. If a key on this layer (not set to
|
|
|
|
* transparent) was pressed before the key was released, the layer will be
|
|
|
|
* popped. If a non-transparent key was not pressed, the layer is popped
|
|
|
|
* and pushed again in the one time up state.
|
|
|
|
* 3) Locked (set on key press) - The layer was active and in the one time up
|
|
|
|
* state when the layer sticky key was pressed again. The layer will be
|
|
|
|
* popped if the function is invoked on a subsequent keypress.
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_1 (void) {
|
|
|
|
layer_sticky(1);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #1
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_1(void) {
|
|
|
|
layer_pop(1);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #2
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_2(void) {
|
|
|
|
layer_push(2);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #2
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_2 (void) {
|
|
|
|
layer_sticky(2);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #2
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_2(void) {
|
|
|
|
layer_pop(2);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #3
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_3(void) {
|
|
|
|
layer_push(3);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #3
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_3 (void) {
|
|
|
|
layer_sticky(3);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #3
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_3(void) {
|
|
|
|
layer_pop(3);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #4
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_4(void) {
|
|
|
|
layer_push(4);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #4
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_4 (void) {
|
|
|
|
layer_sticky(4);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #4
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_4(void) {
|
|
|
|
layer_pop(4);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #5
|
2012-08-23 10:31:25 +02:00
|
|
|
*
|
|
|
|
* [description]
|
2012-11-30 21:06:41 +01:00
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
2012-07-31 23:48:31 +02:00
|
|
|
*/
|
2012-11-30 21:06:41 +01:00
|
|
|
void kbfun_layer_push_5(void) {
|
|
|
|
layer_push(5);
|
2012-07-31 23:48:31 +02:00
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #5
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_5 (void) {
|
|
|
|
layer_sticky(5);
|
|
|
|
}
|
|
|
|
|
2012-07-31 23:48:31 +02:00
|
|
|
/*
|
2012-08-23 10:31:25 +02:00
|
|
|
* [name]
|
2012-11-30 21:06:41 +01:00
|
|
|
* Layer pop #5
|
2012-08-23 10:31:25 +02:00
|
|
|
*
|
|
|
|
* [description]
|
2012-11-30 21:06:41 +01:00
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
2012-07-31 23:48:31 +02:00
|
|
|
*/
|
2012-11-30 21:06:41 +01:00
|
|
|
void kbfun_layer_pop_5(void) {
|
|
|
|
layer_pop(5);
|
2012-07-31 23:48:31 +02:00
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #6
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_6(void) {
|
|
|
|
layer_push(6);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #6
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_6 (void) {
|
|
|
|
layer_sticky(6);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #6
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_6(void) {
|
|
|
|
layer_pop(6);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #7
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_7(void) {
|
|
|
|
layer_push(7);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #7
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_7 (void) {
|
|
|
|
layer_sticky(7);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #7
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_7(void) {
|
|
|
|
layer_pop(7);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #8
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_8(void) {
|
|
|
|
layer_push(8);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #8
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_8 (void) {
|
|
|
|
layer_sticky(8);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #8
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_8(void) {
|
|
|
|
layer_pop(8);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #9
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_9(void) {
|
|
|
|
layer_push(9);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #9
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_9 (void) {
|
|
|
|
layer_sticky(9);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #9
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_9(void) {
|
|
|
|
layer_pop(9);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer push #10
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Push a layer element containing the layer value specified in the keymap to
|
|
|
|
* the top of the stack, and record the id of that layer element
|
|
|
|
*/
|
|
|
|
void kbfun_layer_push_10(void) {
|
|
|
|
layer_push(10);
|
|
|
|
}
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer sticky cycle #10
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* See the description of kbfun_layer_sticky_1()
|
|
|
|
*/
|
|
|
|
void kbfun_layer_sticky_10 (void) {
|
|
|
|
layer_sticky(10);
|
|
|
|
}
|
|
|
|
|
2012-11-30 21:06:41 +01:00
|
|
|
/*
|
|
|
|
* [name]
|
|
|
|
* Layer pop #10
|
|
|
|
*
|
|
|
|
* [description]
|
|
|
|
* Pop the layer element created by the corresponding "layer push" function
|
|
|
|
* out of the layer stack (no matter where it is in the stack, without
|
|
|
|
* touching any other elements)
|
|
|
|
*/
|
|
|
|
void kbfun_layer_pop_10(void) {
|
|
|
|
layer_pop(10);
|
|
|
|
}
|
|
|
|
|
|
|
|
/* ----------------------------------------------------------------------------
|
|
|
|
* ------------------------------------------------------------------------- */
|
|
|
|
|
2013-04-08 09:49:35 +02:00
|
|
|
|