Browse Source

update for action_t

master
di0ib 5 years ago
parent
commit
91dbfbbeb1

+ 0
- 13
keyboard/i75_TeensyLC/keymap_common.c View File

@@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"


/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
}

/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
}

+ 0
- 5
keyboard/i75_TeensyLC/keymap_common.h View File

@@ -29,11 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "keymap.h"


extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];


/* i75 keymap definition macro
*/
#define KEYMAP( \

+ 0
- 4
keyboard/i75_TeensyLC/keymap_i75.c View File

@@ -21,7 +21,3 @@ KEYMAP(
const action_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_MOMENTARY(1),
};

void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {

}

+ 0
- 13
keyboard/stm32_f103_planck/keymap_common.c View File

@@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"


/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
}

/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
}

+ 0
- 5
keyboard/stm32_f103_planck/keymap_common.h View File

@@ -29,11 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "keymap.h"


extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];


/* TV44 keymap definition macro
*/
#define KEYMAP( \

+ 1
- 1
keyboard/stm32_f103_planck/keymap_planck.c View File

@@ -26,7 +26,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END),
};

const uint16_t PROGMEM fn_actions[] = {
const action_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(3, KC_TAB),
[1] = ACTION_LAYER_TAP_KEY(1, KC_SPC),
[2] = ACTION_LAYER_TAP_KEY(2, KC_SPC),

+ 0
- 13
keyboard/teensy_lc_planck/keymap_common.c View File

@@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"


/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
}

/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
}

+ 1
- 1
keyboard/teensy_lc_planck/keymap_planck.c View File

@@ -26,7 +26,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,HOME,PGDN,PGUP, END),
};

const uint16_t PROGMEM fn_actions[] = {
const action_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(3, KC_TAB),
[1] = ACTION_LAYER_TAP_KEY(1, KC_SPC),
[2] = ACTION_LAYER_TAP_KEY(2, KC_SPC),

+ 0
- 13
keyboard/teensy_lc_tv44/keymap_common.c View File

@@ -15,16 +15,3 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"


/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
}

/* translates Fn keycode to action */
action_t keymap_fn_to_action(uint8_t keycode)
{
return (action_t){ .code = pgm_read_word(&fn_actions[FN_INDEX(keycode)]) };
}

+ 0
- 5
keyboard/teensy_lc_tv44/keymap_common.h View File

@@ -29,11 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "debug.h"
#include "keymap.h"


extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint16_t fn_actions[];


/* TV44 keymap definition macro
*/
#define KEYMAP( \

+ 1
- 1
keyboard/teensy_lc_tv44/keymap_tv44.c View File

@@ -26,7 +26,7 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TRNS, TRNS, TRNS, TRNS, TRNS, LEFT, DOWN, RGHT),
};

const uint16_t PROGMEM fn_actions[] = {
const action_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(3, KC_TAB),
[1] = ACTION_LAYER_TAP_KEY(1, KC_SPC),
[2] = ACTION_LAYER_TAP_KEY(2, KC_SPC),

Loading…
Cancel
Save