aboutsummaryrefslogtreecommitdiff
path: root/keyboard/gh60/keymap.c
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/gh60/keymap.c')
-rw-r--r--keyboard/gh60/keymap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/keyboard/gh60/keymap.c b/keyboard/gh60/keymap.c
index d2da50529..a17c11fc3 100644
--- a/keyboard/gh60/keymap.c
+++ b/keyboard/gh60/keymap.c
@@ -165,7 +165,7 @@ static const uint16_t PROGMEM fn_actions[] = {
165/* translates key to keycode */ 165/* translates key to keycode */
166uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) 166uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
167{ 167{
168 return pgm_read_byte(&keymaps[(layer)][(key.pos.row)][(key.pos.col)]); 168 return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
169} 169}
170 170
171/* translates Fn index to action */ 171/* translates Fn index to action */
@@ -181,11 +181,8 @@ action_t keymap_fn_to_action(uint8_t keycode)
181} 181}
182 182
183/* convert key to action */ 183/* convert key to action */
184action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col) 184action_t action_for_key(uint8_t layer, key_t key)
185{ 185{
186 key_t key;
187 key.pos.row = row;
188 key.pos.col = col;
189 uint8_t keycode = keymap_key_to_keycode(layer, key); 186 uint8_t keycode = keymap_key_to_keycode(layer, key);
190 switch (keycode) { 187 switch (keycode) {
191 case KC_FN0 ... KC_FN31: 188 case KC_FN0 ... KC_FN31: