Change key_t to keypos_t

example_keyboards
tmk 10 years ago
parent a996396045
commit e2077cad45

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// Keymap is not used. See matrix.c. // Keymap is not used. See matrix.c.
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return KC_NO; return KC_NO;
} }

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -209,7 +209,7 @@ static const uint16_t fn_actions[] PROGMEM = {
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -23,7 +23,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -165,7 +165,7 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
}; };
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -185,7 +185,7 @@ static const uint16_t PROGMEM fn_actions[] = {
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);

@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return KC_NO; return KC_NO;
} }

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -214,7 +214,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
} }
*/ */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -18,7 +18,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
} }

@ -103,7 +103,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);

@ -80,7 +80,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.col)][(key.row)]); return pgm_read_byte(&keymaps[(layer)][(key.col)][(key.row)]);

@ -74,7 +74,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);

@ -50,7 +50,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);

@ -54,7 +54,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);

@ -43,7 +43,7 @@ static const uint16_t PROGMEM fn_actions[] = {
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);

@ -128,7 +128,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0])) #define FN_ACTIONS_SIZE (sizeof(fn_actions) / sizeof(fn_actions[0]))
/* translates key to keycode */ /* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) uint8_t keymap_key_to_keycode(uint8_t layer, keypos_t key)
{ {
if (layer < KEYMAPS_SIZE) { if (layer < KEYMAPS_SIZE) {
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);

Loading…
Cancel
Save