From 9bc82bf61c342ca96e6f942b169b7c88b6bf95cf Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 13 Feb 2013 11:47:19 +0900 Subject: Change action API --- keyboard/hhkb/keymap.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'keyboard/hhkb') diff --git a/keyboard/hhkb/keymap.c b/keyboard/hhkb/keymap.c index a5b6d3ace0..b1407e1ad8 100644 --- a/keyboard/hhkb/keymap.c +++ b/keyboard/hhkb/keymap.c @@ -330,11 +330,8 @@ action_t keymap_fn_to_action(uint8_t keycode) } /* convert key to action */ -action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col) +action_t action_for_key(uint8_t layer, key_t key) { - key_t key; - key.pos.row = row; - key.pos.col = col; uint8_t keycode = keymap_key_to_keycode(layer, key); switch (keycode) { case KC_FN0 ... KC_FN31: -- cgit v1.2.3 From c4421f585b085d3eef5e468ff1defcbc3b4ec8d3 Mon Sep 17 00:00:00 2001 From: tmk Date: Wed, 13 Feb 2013 12:16:24 +0900 Subject: Change struct key_t --- keyboard/hhkb/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboard/hhkb') diff --git a/keyboard/hhkb/keymap.c b/keyboard/hhkb/keymap.c index b1407e1ad8..ef21282ff1 100644 --- a/keyboard/hhkb/keymap.c +++ b/keyboard/hhkb/keymap.c @@ -314,7 +314,7 @@ void keymap_call_function(keyrecord_t *record, uint8_t id, uint8_t opt) /* translates key to keycode */ uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) { - return pgm_read_byte(&keymaps[(layer)][(key.pos.row)][(key.pos.col)]); + return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]); } /* translates Fn index to action */ -- cgit v1.2.3