Revert 14083 && 14144 (#14150)

* Revert "Short term bodge for firmware size bloat (#14144)"

This reverts commit a8d6547346.

* Revert "Tidy up quantum.c now some of tmk_core has been merged (#14083)"

This reverts commit c4dbf4bf01.
This commit is contained in:
Joel Challis 2021-08-25 01:16:59 +01:00 committed by GitHub
parent 3855713ca0
commit a84de5e22b
Failed to generate hash of commit
8 changed files with 104 additions and 118 deletions

View file

@ -36,31 +36,6 @@ extern keymap_config_t keymap_config;
#include <inttypes.h>
uint8_t extract_mod_bits(uint16_t code) {
switch (code) {
case QK_MODS ... QK_MODS_MAX:
break;
default:
return 0;
}
uint8_t mods_to_send = 0;
if (code & QK_RMODS_MIN) { // Right mod flag is set
if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_RCTL);
if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_RSFT);
if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_RALT);
if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_RGUI);
} else {
if (code & QK_LCTL) mods_to_send |= MOD_BIT(KC_LCTL);
if (code & QK_LSFT) mods_to_send |= MOD_BIT(KC_LSFT);
if (code & QK_LALT) mods_to_send |= MOD_BIT(KC_LALT);
if (code & QK_LGUI) mods_to_send |= MOD_BIT(KC_LGUI);
}
return mods_to_send;
}
/* converts key to action */
action_t action_for_key(uint8_t layer, keypos_t key) {
// 16bit keycodes - important