aboutsummaryrefslogtreecommitdiff
path: root/keyboard/hhkb/keymap.c
diff options
context:
space:
mode:
authortmk <nobody@nowhere>2013-02-13 13:31:01 +0900
committertmk <nobody@nowhere>2013-02-13 13:31:01 +0900
commit7a31451a077a55e1ad97cf8b31a111c7cd311a4d (patch)
tree335730a0308cdb2e2ec094fe08ac63ee29ce4f80 /keyboard/hhkb/keymap.c
parent7054203e16af627a921b503a9508ce789913471d (diff)
parentc4421f585b085d3eef5e468ff1defcbc3b4ec8d3 (diff)
downloadqmk_firmware-7a31451a077a55e1ad97cf8b31a111c7cd311a4d.tar.gz
qmk_firmware-7a31451a077a55e1ad97cf8b31a111c7cd311a4d.zip
Merge branch 'actionfix'
Diffstat (limited to 'keyboard/hhkb/keymap.c')
-rw-r--r--keyboard/hhkb/keymap.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/keyboard/hhkb/keymap.c b/keyboard/hhkb/keymap.c
index a5b6d3ace..ef21282ff 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)
314/* translates key to keycode */ 314/* translates key to keycode */
315uint8_t keymap_key_to_keycode(uint8_t layer, key_t key) 315uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
316{ 316{
317 return pgm_read_byte(&keymaps[(layer)][(key.pos.row)][(key.pos.col)]); 317 return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
318} 318}
319 319
320/* translates Fn index to action */ 320/* translates Fn index to action */
@@ -330,11 +330,8 @@ action_t keymap_fn_to_action(uint8_t keycode)
330} 330}
331 331
332/* convert key to action */ 332/* convert key to action */
333action_t keymap_get_action(uint8_t layer, uint8_t row, uint8_t col) 333action_t action_for_key(uint8_t layer, key_t key)
334{ 334{
335 key_t key;
336 key.pos.row = row;
337 key.pos.col = col;
338 uint8_t keycode = keymap_key_to_keycode(layer, key); 335 uint8_t keycode = keymap_key_to_keycode(layer, key);
339 switch (keycode) { 336 switch (keycode) {
340 case KC_FN0 ... KC_FN31: 337 case KC_FN0 ... KC_FN31: