1
0

update for action_t

This commit is contained in:
di0ib 2016-09-30 16:11:28 -10:00
parent f442303e33
commit 91dbfbbeb1
11 changed files with 3 additions and 74 deletions

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)]) };
}

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( \

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) {
}

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)]) };
}

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( \

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),

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)]) };
}

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),

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)]) };
}

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( \

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),