From c09ed00e5a50e042001bdf73e78dd2679cb707c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1szl=C3=B3=20Monda?= Date: Sun, 26 Feb 2017 00:46:47 +0100 Subject: [PATCH] Extract keyToAction() --- right/src/action.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/right/src/action.c b/right/src/action.c index 2afe047..e727dc8 100644 --- a/right/src/action.c +++ b/right/src/action.c @@ -7,13 +7,6 @@ static uint8_t ActiveLayer = LAYER_ID_BASE; -static key_action_t keyToAction(uint8_t slotId, uint8_t keyId) -{ - key_action_t key = CurrentKeymap[ActiveLayer][slotId][keyId]; - - return key; -} - static bool pressKey(key_action_t key, int scancodeIdx, usb_keyboard_report_t *report) { if (key.type != KEY_ACTION_KEYSTROKE) { @@ -137,7 +130,7 @@ void HandleKeyboardEvents() { break; } - key_action_t action = keyToAction(slotId, keyId); + key_action_t action = CurrentKeymap[ActiveLayer][slotId][keyId]; if (action.type == KEY_ACTION_MOUSE) { HandleMouseKey(&UsbMouseReport, action, PreviousKeyStates[slotId], CurrentKeyStates[slotId], keyId);