fix processing of vial_keycode_down/etc
This commit is contained in:
@ -396,18 +396,7 @@ void dynamic_keymap_set_buffer(uint16_t offset, uint16_t size, uint8_t *data) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extern uint16_t g_vial_magic_keycode_override;
|
|
||||||
|
|
||||||
uint16_t keycode_at_keymap_location(uint8_t layer_num, uint8_t row, uint8_t column) {
|
uint16_t keycode_at_keymap_location(uint8_t layer_num, uint8_t row, uint8_t column) {
|
||||||
#ifdef VIAL_ENABLE
|
|
||||||
/* Disable any keycode processing while unlocking */
|
|
||||||
if (vial_unlock_in_progress)
|
|
||||||
return KC_NO;
|
|
||||||
|
|
||||||
if (row == VIAL_MATRIX_MAGIC && column == VIAL_MATRIX_MAGIC)
|
|
||||||
return g_vial_magic_keycode_override;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (layer_num < DYNAMIC_KEYMAP_LAYER_COUNT && row < MATRIX_ROWS && column < MATRIX_COLS) {
|
if (layer_num < DYNAMIC_KEYMAP_LAYER_COUNT && row < MATRIX_ROWS && column < MATRIX_COLS) {
|
||||||
return dynamic_keymap_get_keycode(layer_num, row, column);
|
return dynamic_keymap_get_keycode(layer_num, row, column);
|
||||||
}
|
}
|
||||||
|
@ -186,8 +186,19 @@ action_t action_for_keycode(uint16_t keycode) {
|
|||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
extern uint16_t g_vial_magic_keycode_override;
|
||||||
|
|
||||||
// translates key to keycode
|
// translates key to keycode
|
||||||
__attribute__((weak)) uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) {
|
__attribute__((weak)) uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) {
|
||||||
|
#ifdef VIAL_ENABLE
|
||||||
|
/* Disable any keycode processing while unlocking */
|
||||||
|
if (vial_unlock_in_progress) {
|
||||||
|
return KC_NO;
|
||||||
|
}
|
||||||
|
if (key.row == VIAL_MATRIX_MAGIC && key.col == VIAL_MATRIX_MAGIC) {
|
||||||
|
return g_vial_magic_keycode_override;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
if (key.row < MATRIX_ROWS && key.col < MATRIX_COLS) {
|
if (key.row < MATRIX_ROWS && key.col < MATRIX_COLS) {
|
||||||
return keycode_at_keymap_location(layer, key.row, key.col);
|
return keycode_at_keymap_location(layer, key.row, key.col);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user