Архивировано
1
0

kimera: Reduce memory cost of keymap

Этот коммит содержится в:
Kai Ryu 2014-05-26 16:58:34 +09:00
родитель 3ff2d2f330
Коммит 1f93c27553
7 изменённых файлов: 95 добавлений и 163 удалений

Просмотреть файл

@ -32,8 +32,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define MATRIX_COLS 24
/* keymap in eeprom */
#define MATRIX_SIZE 16 * 16
#define FN_ACTIONS_COUNT 32
#define KEYMAPS_COUNT 3
#define KEYMAPS_COUNT 8
/* define if matrix has ghost */
//#define MATRIX_HAS_GHOST

Просмотреть файл

@ -15,12 +15,13 @@ You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "keymap_common.h"
#include "matrix.h"
/* translates key to keycode */
uint8_t keymap_key_to_keycode(uint8_t layer, key_t key)
{
#ifndef KEYMAP_IN_EEPROM_ENABLE
return pgm_read_byte(&keymaps[(layer)][(key.row)][(key.col)]);
return pgm_read_byte(&keymaps[(layer)][(key.row) * matrix_cols() + (key.col)]);
#else
return eeconfig_read_keymap_key(layer, key.row, key.col);
#endif

Просмотреть файл

@ -28,64 +28,47 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include "print.h"
#include "debug.h"
#include "keymap.h"
#include "keymap_ex.h"
#include "keymap_in_eeprom.h"
extern const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS];
extern const uint8_t keymaps[][MATRIX_SIZE];
extern const uint16_t fn_actions[];
/* Full keymap definition macro */
#define KEYMAP( \
KAA, KAB, KAC, KAD, KAE, KAF, KAG, KAH, KAJ, KAK, KAL, KAM, KAN, KAP, KAQ, KAR, KAS, KAT, KAU, KAV, KAW, KAX, KAY, KAZ, \
KBA, KBB, KBC, KBD, KBE, KBF, KBG, KBH, KBJ, KBK, KBL, KBM, KBN, KBP, KBQ, KBR, KBS, KBT, KBU, KBV, KBW, KBX, KBY, KBZ, \
KCA, KCB, KCC, KCD, KCE, KCF, KCG, KCH, KCJ, KCK, KCL, KCM, KCN, KCP, KCQ, KCR, KCS, KCT, KCU, KCV, KCW, KCX, KCY, KCZ, \
KDA, KDB, KDC, KDD, KDE, KDF, KDG, KDH, KDJ, KDK, KDL, KDM, KDN, KDP, KDQ, KDR, KDS, KDT, KDU, KDV, KDW, KDX, KDY, KDZ, \
KEA, KEB, KEC, KED, KEE, KEF, KEG, KEH, KEJ, KEK, KEL, KEM, KEN, KEP, KEQ, KER, KES, KET, KEU, KEV, KEW, KEX, KEY, KEZ, \
KFA, KFB, KFC, KFD, KFE, KFF, KFG, KFH, KFJ, KFK, KFL, KFM, KFN, KFP, KFQ, KFR, KFS, KFT, KFU, KFV, KFW, KFX, KFY, KFZ, \
KGA, KGB, KGC, KGD, KGE, KGF, KGG, KGH, KGJ, KGK, KGL, KGM, KGN, KGP, KGQ, KGR, KGS, KGT, KGU, KGV, KGW, KGX, KGY, KGZ, \
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, KHJ, KHK, KHL, KHM, KHN, KHP, KHQ, KHR, KHS, KHT, KHU, KHV, KHW, KHX, KHY, KHZ, \
KJA, KJB, KJC, KJD, KJE, KJF, KJG, KJH, KJJ, KJK, KJL, KJM, KJN, KJP, KJQ, KJR, KJS, KJT, KJU, KJV, KJW, KJX, KJY, KJZ, \
KKA, KKB, KKC, KKD, KKE, KKF, KKG, KKH, KKJ, KKK, KKL, KKM, KKN, KKP, KKQ, KKR, KKS, KKT, KKU, KKV, KKW, KKX, KKY, KKZ, \
KLA, KLB, KLC, KLD, KLE, KLF, KLG, KLH, KLJ, KLK, KLL, KLM, KLN, KLP, KLQ, KLR, KLS, KLT, KLU, KLV, KLW, KLX, KLY, KLZ, \
KMA, KMB, KMC, KMD, KME, KMF, KMG, KMH, KMJ, KMK, KML, KMM, KMN, KMP, KMQ, KMR, KMS, KMT, KMU, KMV, KMW, KMX, KMY, KMZ, \
KNA, KNB, KNC, KND, KNE, KNF, KNG, KNH, KNJ, KNK, KNL, KNM, KNN, KNP, KNQ, KNR, KNS, KNT, KNU, KNV, KNW, KNX, KNY, KNZ, \
KPA, KPB, KPC, KPD, KPE, KPF, KPG, KPH, KPJ, KPK, KPL, KPM, KPN, KPP, KPQ, KPR, KPS, KPT, KPU, KPV, KPW, KPX, KPY, KPZ, \
KQA, KQB, KQC, KQD, KQE, KQF, KQG, KQH, KQJ, KQK, KQL, KQM, KQN, KQP, KQQ, KQR, KQS, KQT, KQU, KQV, KQW, KQX, KQY, KQZ, \
KRA, KRB, KRC, KRD, KRE, KRF, KRG, KRH, KRJ, KRK, KRL, KRM, KRN, KRP, KRQ, KRR, KRS, KRT, KRU, KRV, KRW, KRX, KRY, KRZ, \
KSA, KSB, KSC, KSD, KSE, KSF, KSG, KSH, KSJ, KSK, KSL, KSM, KSN, KSP, KSQ, KSR, KSS, KST, KSU, KSV, KSW, KSX, KSY, KSZ, \
KTA, KTB, KTC, KTD, KTE, KTF, KTG, KTH, KTJ, KTK, KTL, KTM, KTN, KTP, KTQ, KTR, KTS, KTT, KTU, KTV, KTW, KTX, KTY, KTZ, \
KUA, KUB, KUC, KUD, KUE, KUF, KUG, KUH, KUJ, KUK, KUL, KUM, KUN, KUP, KUQ, KUR, KUS, KUT, KUU, KUV, KUW, KUX, KUY, KUZ, \
KVA, KVB, KVC, KVD, KVE, KVF, KVG, KVH, KVJ, KVK, KVL, KVM, KVN, KVP, KVQ, KVR, KVS, KVT, KVU, KVV, KVW, KVX, KVY, KVZ, \
KWA, KWB, KWC, KWD, KWE, KWF, KWG, KWH, KWJ, KWK, KWL, KWM, KWN, KWP, KWQ, KWR, KWS, KWT, KWU, KWV, KWW, KWX, KWY, KWZ, \
KXA, KXB, KXC, KXD, KXE, KXF, KXG, KXH, KXJ, KXK, KXL, KXM, KXN, KXP, KXQ, KXR, KXS, KXT, KXU, KXV, KXW, KXX, KXY, KXZ, \
KYA, KYB, KYC, KYD, KYE, KYF, KYG, KYH, KYJ, KYK, KYL, KYM, KYN, KYP, KYQ, KYR, KYS, KYT, KYU, KYV, KYW, KYX, KYY, KYZ, \
KZA, KZB, KZC, KZD, KZE, KZF, KZG, KZH, KZJ, KZK, KZL, KZM, KZN, KZP, KZQ, KZR, KZS, KZT, KZU, KZV, KZW, KZX, KZY, KZZ \
/* 16 rows, 16 cols */
#define KEYMAP_16x16( \
KAA, KAB, KAC, KAD, KAE, KAF, KAG, KAH, KAJ, KAK, KAL, KAM, KAN, KAP, KAQ, KAR, \
KBA, KBB, KBC, KBD, KBE, KBF, KBG, KBH, KBJ, KBK, KBL, KBM, KBN, KBP, KBQ, KBR, \
KCA, KCB, KCC, KCD, KCE, KCF, KCG, KCH, KCJ, KCK, KCL, KCM, KCN, KCP, KCQ, KCR, \
KDA, KDB, KDC, KDD, KDE, KDF, KDG, KDH, KDJ, KDK, KDL, KDM, KDN, KDP, KDQ, KDR, \
KEA, KEB, KEC, KED, KEE, KEF, KEG, KEH, KEJ, KEK, KEL, KEM, KEN, KEP, KEQ, KER, \
KFA, KFB, KFC, KFD, KFE, KFF, KFG, KFH, KFJ, KFK, KFL, KFM, KFN, KFP, KFQ, KFR, \
KGA, KGB, KGC, KGD, KGE, KGF, KGG, KGH, KGJ, KGK, KGL, KGM, KGN, KGP, KGQ, KGR, \
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, KHJ, KHK, KHL, KHM, KHN, KHP, KHQ, KHR, \
KJA, KJB, KJC, KJD, KJE, KJF, KJG, KJH, KJJ, KJK, KJL, KJM, KJN, KJP, KJQ, KJR, \
KKA, KKB, KKC, KKD, KKE, KKF, KKG, KKH, KKJ, KKK, KKL, KKM, KKN, KKP, KKQ, KKR, \
KLA, KLB, KLC, KLD, KLE, KLF, KLG, KLH, KLJ, KLK, KLL, KLM, KLN, KLP, KLQ, KLR, \
KMA, KMB, KMC, KMD, KME, KMF, KMG, KMH, KMJ, KMK, KML, KMM, KMN, KMP, KMQ, KMR, \
KNA, KNB, KNC, KND, KNE, KNF, KNG, KNH, KNJ, KNK, KNL, KNM, KNN, KNP, KNQ, KNR, \
KPA, KPB, KPC, KPD, KPE, KPF, KPG, KPH, KPJ, KPK, KPL, KPM, KPN, KPP, KPQ, KPR, \
KQA, KQB, KQC, KQD, KQE, KQF, KQG, KQH, KQJ, KQK, KQL, KQM, KQN, KQP, KQQ, KQR, \
KRA, KRB, KRC, KRD, KRE, KRF, KRG, KRH, KRJ, KRK, KRL, KRM, KRN, KRP, KRQ, KRR \
) { \
{ KC_##KAA, KC_##KAB, KC_##KAC, KC_##KAD, KC_##KAE, KC_##KAF, KC_##KAG, KC_##KAH, KC_##KAJ, KC_##KAK, KC_##KAL, KC_##KAM, KC_##KAN, KC_##KAP, KC_##KAQ, KC_##KAR, KC_##KAS, KC_##KAT, KC_##KAU, KC_##KAV, KC_##KAW, KC_##KAX, KC_##KAY, KC_##KAZ }, \
{ KC_##KBA, KC_##KBB, KC_##KBC, KC_##KBD, KC_##KBE, KC_##KBF, KC_##KBG, KC_##KBH, KC_##KBJ, KC_##KBK, KC_##KBL, KC_##KBM, KC_##KBN, KC_##KBP, KC_##KBQ, KC_##KBR, KC_##KBS, KC_##KBT, KC_##KBU, KC_##KBV, KC_##KBW, KC_##KBX, KC_##KBY, KC_##KBZ }, \
{ KC_##KCA, KC_##KCB, KC_##KCC, KC_##KCD, KC_##KCE, KC_##KCF, KC_##KCG, KC_##KCH, KC_##KCJ, KC_##KCK, KC_##KCL, KC_##KCM, KC_##KCN, KC_##KCP, KC_##KCQ, KC_##KCR, KC_##KCS, KC_##KCT, KC_##KCU, KC_##KCV, KC_##KCW, KC_##KCX, KC_##KCY, KC_##KCZ }, \
{ KC_##KDA, KC_##KDB, KC_##KDC, KC_##KDD, KC_##KDE, KC_##KDF, KC_##KDG, KC_##KDH, KC_##KDJ, KC_##KDK, KC_##KDL, KC_##KDM, KC_##KDN, KC_##KDP, KC_##KDQ, KC_##KDR, KC_##KDS, KC_##KDT, KC_##KDU, KC_##KDV, KC_##KDW, KC_##KDX, KC_##KDY, KC_##KDZ }, \
{ KC_##KEA, KC_##KEB, KC_##KEC, KC_##KED, KC_##KEE, KC_##KEF, KC_##KEG, KC_##KEH, KC_##KEJ, KC_##KEK, KC_##KEL, KC_##KEM, KC_##KEN, KC_##KEP, KC_##KEQ, KC_##KER, KC_##KES, KC_##KET, KC_##KEU, KC_##KEV, KC_##KEW, KC_##KEX, KC_##KEY, KC_##KEZ }, \
{ KC_##KFA, KC_##KFB, KC_##KFC, KC_##KFD, KC_##KFE, KC_##KFF, KC_##KFG, KC_##KFH, KC_##KFJ, KC_##KFK, KC_##KFL, KC_##KFM, KC_##KFN, KC_##KFP, KC_##KFQ, KC_##KFR, KC_##KFS, KC_##KFT, KC_##KFU, KC_##KFV, KC_##KFW, KC_##KFX, KC_##KFY, KC_##KFZ }, \
{ KC_##KGA, KC_##KGB, KC_##KGC, KC_##KGD, KC_##KGE, KC_##KGF, KC_##KGG, KC_##KGH, KC_##KGJ, KC_##KGK, KC_##KGL, KC_##KGM, KC_##KGN, KC_##KGP, KC_##KGQ, KC_##KGR, KC_##KGS, KC_##KGT, KC_##KGU, KC_##KGV, KC_##KGW, KC_##KGX, KC_##KGY, KC_##KGZ }, \
{ KC_##KHA, KC_##KHB, KC_##KHC, KC_##KHD, KC_##KHE, KC_##KHF, KC_##KHG, KC_##KHH, KC_##KHJ, KC_##KHK, KC_##KHL, KC_##KHM, KC_##KHN, KC_##KHP, KC_##KHQ, KC_##KHR, KC_##KHS, KC_##KHT, KC_##KHU, KC_##KHV, KC_##KHW, KC_##KHX, KC_##KHY, KC_##KHZ }, \
{ KC_##KJA, KC_##KJB, KC_##KJC, KC_##KJD, KC_##KJE, KC_##KJF, KC_##KJG, KC_##KJH, KC_##KJJ, KC_##KJK, KC_##KJL, KC_##KJM, KC_##KJN, KC_##KJP, KC_##KJQ, KC_##KJR, KC_##KJS, KC_##KJT, KC_##KJU, KC_##KJV, KC_##KJW, KC_##KJX, KC_##KJY, KC_##KJZ }, \
{ KC_##KKA, KC_##KKB, KC_##KKC, KC_##KKD, KC_##KKE, KC_##KKF, KC_##KKG, KC_##KKH, KC_##KKJ, KC_##KKK, KC_##KKL, KC_##KKM, KC_##KKN, KC_##KKP, KC_##KKQ, KC_##KKR, KC_##KKS, KC_##KKT, KC_##KKU, KC_##KKV, KC_##KKW, KC_##KKX, KC_##KKY, KC_##KKZ }, \
{ KC_##KLA, KC_##KLB, KC_##KLC, KC_##KLD, KC_##KLE, KC_##KLF, KC_##KLG, KC_##KLH, KC_##KLJ, KC_##KLK, KC_##KLL, KC_##KLM, KC_##KLN, KC_##KLP, KC_##KLQ, KC_##KLR, KC_##KLS, KC_##KLT, KC_##KLU, KC_##KLV, KC_##KLW, KC_##KLX, KC_##KLY, KC_##KLZ }, \
{ KC_##KMA, KC_##KMB, KC_##KMC, KC_##KMD, KC_##KME, KC_##KMF, KC_##KMG, KC_##KMH, KC_##KMJ, KC_##KMK, KC_##KML, KC_##KMM, KC_##KMN, KC_##KMP, KC_##KMQ, KC_##KMR, KC_##KMS, KC_##KMT, KC_##KMU, KC_##KMV, KC_##KMW, KC_##KMX, KC_##KMY, KC_##KMZ }, \
{ KC_##KNA, KC_##KNB, KC_##KNC, KC_##KND, KC_##KNE, KC_##KNF, KC_##KNG, KC_##KNH, KC_##KNJ, KC_##KNK, KC_##KNL, KC_##KNM, KC_##KNN, KC_##KNP, KC_##KNQ, KC_##KNR, KC_##KNS, KC_##KNT, KC_##KNU, KC_##KNV, KC_##KNW, KC_##KNX, KC_##KNY, KC_##KNZ }, \
{ KC_##KPA, KC_##KPB, KC_##KPC, KC_##KPD, KC_##KPE, KC_##KPF, KC_##KPG, KC_##KPH, KC_##KPJ, KC_##KPK, KC_##KPL, KC_##KPM, KC_##KPN, KC_##KPP, KC_##KPQ, KC_##KPR, KC_##KPS, KC_##KPT, KC_##KPU, KC_##KPV, KC_##KPW, KC_##KPX, KC_##KPY, KC_##KPZ }, \
{ KC_##KQA, KC_##KQB, KC_##KQC, KC_##KQD, KC_##KQE, KC_##KQF, KC_##KQG, KC_##KQH, KC_##KQJ, KC_##KQK, KC_##KQL, KC_##KQM, KC_##KQN, KC_##KQP, KC_##KQQ, KC_##KQR, KC_##KQS, KC_##KQT, KC_##KQU, KC_##KQV, KC_##KQW, KC_##KQX, KC_##KQY, KC_##KQZ }, \
{ KC_##KRA, KC_##KRB, KC_##KRC, KC_##KRD, KC_##KRE, KC_##KRF, KC_##KRG, KC_##KRH, KC_##KRJ, KC_##KRK, KC_##KRL, KC_##KRM, KC_##KRN, KC_##KRP, KC_##KRQ, KC_##KRR, KC_##KRS, KC_##KRT, KC_##KRU, KC_##KRV, KC_##KRW, KC_##KRX, KC_##KRY, KC_##KRZ }, \
{ KC_##KSA, KC_##KSB, KC_##KSC, KC_##KSD, KC_##KSE, KC_##KSF, KC_##KSG, KC_##KSH, KC_##KSJ, KC_##KSK, KC_##KSL, KC_##KSM, KC_##KSN, KC_##KSP, KC_##KSQ, KC_##KSR, KC_##KSS, KC_##KST, KC_##KSU, KC_##KSV, KC_##KSW, KC_##KSX, KC_##KSY, KC_##KSZ }, \
{ KC_##KTA, KC_##KTB, KC_##KTC, KC_##KTD, KC_##KTE, KC_##KTF, KC_##KTG, KC_##KTH, KC_##KTJ, KC_##KTK, KC_##KTL, KC_##KTM, KC_##KTN, KC_##KTP, KC_##KTQ, KC_##KTR, KC_##KTS, KC_##KTT, KC_##KTU, KC_##KTV, KC_##KTW, KC_##KTX, KC_##KTY, KC_##KTZ }, \
{ KC_##KUA, KC_##KUB, KC_##KUC, KC_##KUD, KC_##KUE, KC_##KUF, KC_##KUG, KC_##KUH, KC_##KUJ, KC_##KUK, KC_##KUL, KC_##KUM, KC_##KUN, KC_##KUP, KC_##KUQ, KC_##KUR, KC_##KUS, KC_##KUT, KC_##KUU, KC_##KUV, KC_##KUW, KC_##KUX, KC_##KUY, KC_##KUZ }, \
{ KC_##KVA, KC_##KVB, KC_##KVC, KC_##KVD, KC_##KVE, KC_##KVF, KC_##KVG, KC_##KVH, KC_##KVJ, KC_##KVK, KC_##KVL, KC_##KVM, KC_##KVN, KC_##KVP, KC_##KVQ, KC_##KVR, KC_##KVS, KC_##KVT, KC_##KVU, KC_##KVV, KC_##KVW, KC_##KVX, KC_##KVY, KC_##KVZ }, \
{ KC_##KWA, KC_##KWB, KC_##KWC, KC_##KWD, KC_##KWE, KC_##KWF, KC_##KWG, KC_##KWH, KC_##KWJ, KC_##KWK, KC_##KWL, KC_##KWM, KC_##KWN, KC_##KWP, KC_##KWQ, KC_##KWR, KC_##KWS, KC_##KWT, KC_##KWU, KC_##KWV, KC_##KWW, KC_##KWX, KC_##KWY, KC_##KWZ }, \
{ KC_##KXA, KC_##KXB, KC_##KXC, KC_##KXD, KC_##KXE, KC_##KXF, KC_##KXG, KC_##KXH, KC_##KXJ, KC_##KXK, KC_##KXL, KC_##KXM, KC_##KXN, KC_##KXP, KC_##KXQ, KC_##KXR, KC_##KXS, KC_##KXT, KC_##KXU, KC_##KXV, KC_##KXW, KC_##KXX, KC_##KXY, KC_##KXZ }, \
{ KC_##KYA, KC_##KYB, KC_##KYC, KC_##KYD, KC_##KYE, KC_##KYF, KC_##KYG, KC_##KYH, KC_##KYJ, KC_##KYK, KC_##KYL, KC_##KYM, KC_##KYN, KC_##KYP, KC_##KYQ, KC_##KYR, KC_##KYS, KC_##KYT, KC_##KYU, KC_##KYV, KC_##KYW, KC_##KYX, KC_##KYY, KC_##KYZ }, \
{ KC_##KZA, KC_##KZB, KC_##KZC, KC_##KZD, KC_##KZE, KC_##KZF, KC_##KZG, KC_##KZH, KC_##KZJ, KC_##KZK, KC_##KZL, KC_##KZM, KC_##KZN, KC_##KZP, KC_##KZQ, KC_##KZR, KC_##KZS, KC_##KZT, KC_##KZU, KC_##KZV, KC_##KZW, KC_##KZX, KC_##KZY, KC_##KZZ }, \
KC_##KAA, KC_##KAB, KC_##KAC, KC_##KAD, KC_##KAE, KC_##KAF, KC_##KAG, KC_##KAH, KC_##KAJ, KC_##KAK, KC_##KAL, KC_##KAM, KC_##KAN, KC_##KAP, KC_##KAQ, KC_##KAR, \
KC_##KBA, KC_##KBB, KC_##KBC, KC_##KBD, KC_##KBE, KC_##KBF, KC_##KBG, KC_##KBH, KC_##KBJ, KC_##KBK, KC_##KBL, KC_##KBM, KC_##KBN, KC_##KBP, KC_##KBQ, KC_##KBR, \
KC_##KCA, KC_##KCB, KC_##KCC, KC_##KCD, KC_##KCE, KC_##KCF, KC_##KCG, KC_##KCH, KC_##KCJ, KC_##KCK, KC_##KCL, KC_##KCM, KC_##KCN, KC_##KCP, KC_##KCQ, KC_##KCR, \
KC_##KDA, KC_##KDB, KC_##KDC, KC_##KDD, KC_##KDE, KC_##KDF, KC_##KDG, KC_##KDH, KC_##KDJ, KC_##KDK, KC_##KDL, KC_##KDM, KC_##KDN, KC_##KDP, KC_##KDQ, KC_##KDR, \
KC_##KEA, KC_##KEB, KC_##KEC, KC_##KED, KC_##KEE, KC_##KEF, KC_##KEG, KC_##KEH, KC_##KEJ, KC_##KEK, KC_##KEL, KC_##KEM, KC_##KEN, KC_##KEP, KC_##KEQ, KC_##KER, \
KC_##KFA, KC_##KFB, KC_##KFC, KC_##KFD, KC_##KFE, KC_##KFF, KC_##KFG, KC_##KFH, KC_##KFJ, KC_##KFK, KC_##KFL, KC_##KFM, KC_##KFN, KC_##KFP, KC_##KFQ, KC_##KFR, \
KC_##KGA, KC_##KGB, KC_##KGC, KC_##KGD, KC_##KGE, KC_##KGF, KC_##KGG, KC_##KGH, KC_##KGJ, KC_##KGK, KC_##KGL, KC_##KGM, KC_##KGN, KC_##KGP, KC_##KGQ, KC_##KGR, \
KC_##KHA, KC_##KHB, KC_##KHC, KC_##KHD, KC_##KHE, KC_##KHF, KC_##KHG, KC_##KHH, KC_##KHJ, KC_##KHK, KC_##KHL, KC_##KHM, KC_##KHN, KC_##KHP, KC_##KHQ, KC_##KHR, \
KC_##KJA, KC_##KJB, KC_##KJC, KC_##KJD, KC_##KJE, KC_##KJF, KC_##KJG, KC_##KJH, KC_##KJJ, KC_##KJK, KC_##KJL, KC_##KJM, KC_##KJN, KC_##KJP, KC_##KJQ, KC_##KJR, \
KC_##KKA, KC_##KKB, KC_##KKC, KC_##KKD, KC_##KKE, KC_##KKF, KC_##KKG, KC_##KKH, KC_##KKJ, KC_##KKK, KC_##KKL, KC_##KKM, KC_##KKN, KC_##KKP, KC_##KKQ, KC_##KKR, \
KC_##KLA, KC_##KLB, KC_##KLC, KC_##KLD, KC_##KLE, KC_##KLF, KC_##KLG, KC_##KLH, KC_##KLJ, KC_##KLK, KC_##KLL, KC_##KLM, KC_##KLN, KC_##KLP, KC_##KLQ, KC_##KLR, \
KC_##KMA, KC_##KMB, KC_##KMC, KC_##KMD, KC_##KME, KC_##KMF, KC_##KMG, KC_##KMH, KC_##KMJ, KC_##KMK, KC_##KML, KC_##KMM, KC_##KMN, KC_##KMP, KC_##KMQ, KC_##KMR, \
KC_##KNA, KC_##KNB, KC_##KNC, KC_##KND, KC_##KNE, KC_##KNF, KC_##KNG, KC_##KNH, KC_##KNJ, KC_##KNK, KC_##KNL, KC_##KNM, KC_##KNN, KC_##KNP, KC_##KNQ, KC_##KNR, \
KC_##KPA, KC_##KPB, KC_##KPC, KC_##KPD, KC_##KPE, KC_##KPF, KC_##KPG, KC_##KPH, KC_##KPJ, KC_##KPK, KC_##KPL, KC_##KPM, KC_##KPN, KC_##KPP, KC_##KPQ, KC_##KPR, \
KC_##KQA, KC_##KQB, KC_##KQC, KC_##KQD, KC_##KQE, KC_##KQF, KC_##KQG, KC_##KQH, KC_##KQJ, KC_##KQK, KC_##KQL, KC_##KQM, KC_##KQN, KC_##KQP, KC_##KQQ, KC_##KQR, \
KC_##KRA, KC_##KRB, KC_##KRC, KC_##KRD, KC_##KRE, KC_##KRF, KC_##KRG, KC_##KRH, KC_##KRJ, KC_##KRK, KC_##KRL, KC_##KRM, KC_##KRN, KC_##KRP, KC_##KRQ, KC_##KRR \
}
/* 8 rows, 24 cols */
@ -98,7 +81,7 @@ extern const uint16_t fn_actions[];
KFA, KFB, KFC, KFD, KFE, KFF, KFG, KFH, KFJ, KFK, KFL, KFM, KFN, KFP, KFQ, KFR, KFS, KFT, KFU, KFV, KFW, KFX, KFY, KFZ, \
KGA, KGB, KGC, KGD, KGE, KGF, KGG, KGH, KGJ, KGK, KGL, KGM, KGN, KGP, KGQ, KGR, KGS, KGT, KGU, KGV, KGW, KGX, KGY, KGZ, \
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, KHJ, KHK, KHL, KHM, KHN, KHP, KHQ, KHR, KHS, KHT, KHU, KHV, KHW, KHX, KHY, KHZ \
) KEYMAP( \
) KEYMAP_16x16( \
KAA, KAB, KAC, KAD, KAE, KAF, KAG, KAH, KAJ, KAK, KAL, KAM, KAN, KAP, KAQ, KAR, KAS, KAT, KAU, KAV, KAW, KAX, KAY, KAZ, \
KBA, KBB, KBC, KBD, KBE, KBF, KBG, KBH, KBJ, KBK, KBL, KBM, KBN, KBP, KBQ, KBR, KBS, KBT, KBU, KBV, KBW, KBX, KBY, KBZ, \
KCA, KCB, KCC, KCD, KCE, KCF, KCG, KCH, KCJ, KCK, KCL, KCM, KCN, KCP, KCQ, KCR, KCS, KCT, KCU, KCV, KCW, KCX, KCY, KCZ, \
@ -109,74 +92,9 @@ extern const uint16_t fn_actions[];
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, KHJ, KHK, KHL, KHM, KHN, KHP, KHQ, KHR, KHS, KHT, KHU, KHV, KHW, KHX, KHY, KHZ, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO \
)
/* 16 rows, 16 cols */
#define KEYMAP_16x16( \
KAA, KAB, KAC, KAD, KAE, KAF, KAG, KAH, KAJ, KAK, KAL, KAM, KAN, KAP, KAQ, KAR, KAS, KAT, KAU, KAV, KAW, KAX, KAY, KAZ, \
KBA, KBB, KBC, KBD, KBE, KBF, KBG, KBH, KBJ, KBK, KBL, KBM, KBN, KBP, KBQ, KBR, KBS, KBT, KBU, KBV, KBW, KBX, KBY, KBZ, \
KCA, KCB, KCC, KCD, KCE, KCF, KCG, KCH, KCJ, KCK, KCL, KCM, KCN, KCP, KCQ, KCR, KCS, KCT, KCU, KCV, KCW, KCX, KCY, KCZ, \
KDA, KDB, KDC, KDD, KDE, KDF, KDG, KDH, KDJ, KDK, KDL, KDM, KDN, KDP, KDQ, KDR, KDS, KDT, KDU, KDV, KDW, KDX, KDY, KDZ, \
KEA, KEB, KEC, KED, KEE, KEF, KEG, KEH, KEJ, KEK, KEL, KEM, KEN, KEP, KEQ, KER, KES, KET, KEU, KEV, KEW, KEX, KEY, KEZ, \
KFA, KFB, KFC, KFD, KFE, KFF, KFG, KFH, KFJ, KFK, KFL, KFM, KFN, KFP, KFQ, KFR, KFS, KFT, KFU, KFV, KFW, KFX, KFY, KFZ, \
KGA, KGB, KGC, KGD, KGE, KGF, KGG, KGH, KGJ, KGK, KGL, KGM, KGN, KGP, KGQ, KGR, KGS, KGT, KGU, KGV, KGW, KGX, KGY, KGZ, \
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, KHJ, KHK, KHL, KHM, KHN, KHP, KHQ, KHR, KHS, KHT, KHU, KHV, KHW, KHX, KHY, KHZ, \
KJA, KJB, KJC, KJD, KJE, KJF, KJG, KJH, KJJ, KJK, KJL, KJM, KJN, KJP, KJQ, KJR, KJS, KJT, KJU, KJV, KJW, KJX, KJY, KJZ, \
KKA, KKB, KKC, KKD, KKE, KKF, KKG, KKH, KKJ, KKK, KKL, KKM, KKN, KKP, KKQ, KKR, KKS, KKT, KKU, KKV, KKW, KKX, KKY, KKZ, \
KLA, KLB, KLC, KLD, KLE, KLF, KLG, KLH, KLJ, KLK, KLL, KLM, KLN, KLP, KLQ, KLR, KLS, KLT, KLU, KLV, KLW, KLX, KLY, KLZ, \
KMA, KMB, KMC, KMD, KME, KMF, KMG, KMH, KMJ, KMK, KML, KMM, KMN, KMP, KMQ, KMR, KMS, KMT, KMU, KMV, KMW, KMX, KMY, KMZ, \
KNA, KNB, KNC, KND, KNE, KNF, KNG, KNH, KNJ, KNK, KNL, KNM, KNN, KNP, KNQ, KNR, KNS, KNT, KNU, KNV, KNW, KNX, KNY, KNZ, \
KPA, KPB, KPC, KPD, KPE, KPF, KPG, KPH, KPJ, KPK, KPL, KPM, KPN, KPP, KPQ, KPR, KPS, KPT, KPU, KPV, KPW, KPX, KPY, KPZ, \
KQA, KQB, KQC, KQD, KQE, KQF, KQG, KQH, KQJ, KQK, KQL, KQM, KQN, KQP, KQQ, KQR, KQS, KQT, KQU, KQV, KQW, KQX, KQY, KQZ, \
KRA, KRB, KRC, KRD, KRE, KRF, KRG, KRH, KRJ, KRK, KRL, KRM, KRN, KRP, KRQ, KRR, KRS, KRT, KRU, KRV, KRW, KRX, KRY, KRZ, \
KSA, KSB, KSC, KSD, KSE, KSF, KSG, KSH, KSJ, KSK, KSL, KSM, KSN, KSP, KSQ, KSR, KSS, KST, KSU, KSV, KSW, KSX, KSY, KSZ, \
KTA, KTB, KTC, KTD, KTE, KTF, KTG, KTH, KTJ, KTK, KTL, KTM, KTN, KTP, KTQ, KTR, KTS, KTT, KTU, KTV, KTW, KTX, KTY, KTZ, \
KUA, KUB, KUC, KUD, KUE, KUF, KUG, KUH, KUJ, KUK, KUL, KUM, KUN, KUP, KUQ, KUR, KUS, KUT, KUU, KUV, KUW, KUX, KUY, KUZ, \
KVA, KVB, KVC, KVD, KVE, KVF, KVG, KVH, KVJ, KVK, KVL, KVM, KVN, KVP, KVQ, KVR, KVS, KVT, KVU, KVV, KVW, KVX, KVY, KVZ, \
KWA, KWB, KWC, KWD, KWE, KWF, KWG, KWH, KWJ, KWK, KWL, KWM, KWN, KWP, KWQ, KWR, KWS, KWT, KWU, KWV, KWW, KWX, KWY, KWZ, \
KXA, KXB, KXC, KXD, KXE, KXF, KXG, KXH, KXJ, KXK, KXL, KXM, KXN, KXP, KXQ, KXR, KXS, KXT, KXU, KXV, KXW, KXX, KXY, KXZ, \
KYA, KYB, KYC, KYD, KYE, KYF, KYG, KYH, KYJ, KYK, KYL, KYM, KYN, KYP, KYQ, KYR, KYS, KYT, KYU, KYV, KYW, KYX, KYY, KYZ, \
KZA, KZB, KZC, KZD, KZE, KZF, KZG, KZH, KZJ, KZK, KZL, KZM, KZN, KZP, KZQ, KZR, KZS, KZT, KZU, KZV, KZW, KZX, KZY, KZZ \
) KEYMAP( \
KAA, KAB, KAC, KAD, KAE, KAF, KAG, KAH, KAJ, KAK, KAL, KAM, KAN, KAP, KAQ, KAR, NO, NO, NO, NO, NO, NO, NO, NO, \
KBA, KBB, KBC, KBD, KBE, KBF, KBG, KBH, KBJ, KBK, KBL, KBM, KBN, KBP, KBQ, KBR, NO, NO, NO, NO, NO, NO, NO, NO, \
KCA, KCB, KCC, KCD, KCE, KCF, KCG, KCH, KCJ, KCK, KCL, KCM, KCN, KCP, KCQ, KCR, NO, NO, NO, NO, NO, NO, NO, NO, \
KDA, KDB, KDC, KDD, KDE, KDF, KDG, KDH, KDJ, KDK, KDL, KDM, KDN, KDP, KDQ, KDR, NO, NO, NO, NO, NO, NO, NO, NO, \
KEA, KEB, KEC, KED, KEE, KEF, KEG, KEH, KEJ, KEK, KEL, KEM, KEN, KEP, KEQ, KER, NO, NO, NO, NO, NO, NO, NO, NO, \
KFA, KFB, KFC, KFD, KFE, KFF, KFG, KFH, KFJ, KFK, KFL, KFM, KFN, KFP, KFQ, KFR, NO, NO, NO, NO, NO, NO, NO, NO, \
KGA, KGB, KGC, KGD, KGE, KGF, KGG, KGH, KGJ, KGK, KGL, KGM, KGN, KGP, KGQ, KGR, NO, NO, NO, NO, NO, NO, NO, NO, \
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, KHJ, KHK, KHL, KHM, KHN, KHP, KHQ, KHR, NO, NO, NO, NO, NO, NO, NO, NO, \
KJA, KJB, KJC, KJD, KJE, KJF, KJG, KJH, KJJ, KJK, KJL, KJM, KJN, KJP, KJQ, KJR, NO, NO, NO, NO, NO, NO, NO, NO, \
KKA, KKB, KKC, KKD, KKE, KKF, KKG, KKH, KKJ, KKK, KKL, KKM, KKN, KKP, KKQ, KKR, NO, NO, NO, NO, NO, NO, NO, NO, \
KLA, KLB, KLC, KLD, KLE, KLF, KLG, KLH, KLJ, KLK, KLL, KLM, KLN, KLP, KLQ, KLR, NO, NO, NO, NO, NO, NO, NO, NO, \
KMA, KMB, KMC, KMD, KME, KMF, KMG, KMH, KMJ, KMK, KML, KMM, KMN, KMP, KMQ, KMR, NO, NO, NO, NO, NO, NO, NO, NO, \
KNA, KNB, KNC, KND, KNE, KNF, KNG, KNH, KNJ, KNK, KNL, KNM, KNN, KNP, KNQ, KNR, NO, NO, NO, NO, NO, NO, NO, NO, \
KPA, KPB, KPC, KPD, KPE, KPF, KPG, KPH, KPJ, KPK, KPL, KPM, KPN, KPP, KPQ, KPR, NO, NO, NO, NO, NO, NO, NO, NO, \
KQA, KQB, KQC, KQD, KQE, KQF, KQG, KQH, KQJ, KQK, KQL, KQM, KQN, KQP, KQQ, KQR, NO, NO, NO, NO, NO, NO, NO, NO, \
KRA, KRB, KRC, KRD, KRE, KRF, KRG, KRH, KRJ, KRK, KRL, KRM, KRN, KRP, KRQ, KRR, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO \
)
/* 24 rows, 8 cols */
#define KEYMAP_24x8( \
@ -204,31 +122,39 @@ extern const uint16_t fn_actions[];
KXA, KXB, KXC, KXD, KXE, KXF, KXG, KXH, \
KYA, KYB, KYC, KYD, KYE, KYF, KYG, KYH, \
KZA, KZB, KZC, KZD, KZE, KZF, KZG, KZH \
) KEYMAP( \
KAA, KAB, KAC, KAD, KAE, KAF, KAG, KAH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KBA, KBB, KBC, KBD, KBE, KBF, KBG, KBH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KCA, KCB, KCC, KCD, KCE, KCF, KCG, KCH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KDA, KDB, KDC, KDD, KDE, KDF, KDG, KDH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KEA, KEB, KEC, KED, KEE, KEF, KEG, KEH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KFA, KFB, KFC, KFD, KFE, KFF, KFG, KFH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KGA, KGB, KGC, KGD, KGE, KGF, KGG, KGH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KJA, KJB, KJC, KJD, KJE, KJF, KJG, KJH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KKA, KKB, KKC, KKD, KKE, KKF, KKG, KKH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KLA, KLB, KLC, KLD, KLE, KLF, KLG, KLH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KMA, KMB, KMC, KMD, KME, KMF, KMG, KMH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KNA, KNB, KNC, KND, KNE, KNF, KNG, KNH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KPA, KPB, KPC, KPD, KPE, KPF, KPG, KPH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KQA, KQB, KQC, KQD, KQE, KQF, KQG, KQH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KRA, KRB, KRC, KRD, KRE, KRF, KRG, KRH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KSA, KSB, KSC, KSD, KSE, KSF, KSG, KSH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KTA, KTB, KTC, KTD, KTE, KTF, KTG, KTH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KUA, KUB, KUC, KUD, KUE, KUF, KUG, KUH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KVA, KVB, KVC, KVD, KVE, KVF, KVG, KVH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KWA, KWB, KWC, KWD, KWE, KWF, KWG, KWH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KXA, KXB, KXC, KXD, KXE, KXF, KXG, KXH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KYA, KYB, KYC, KYD, KYE, KYF, KYG, KYH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \
KZA, KZB, KZC, KZD, KZE, KZF, KZG, KZH, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO \
) KEYMAP_16x16( \
KAA, KAB, KAC, KAD, KAE, KAF, KAG, KAH, \
KBA, KBB, KBC, KBD, KBE, KBF, KBG, KBH, \
KCA, KCB, KCC, KCD, KCE, KCF, KCG, KCH, \
KDA, KDB, KDC, KDD, KDE, KDF, KDG, KDH, \
KEA, KEB, KEC, KED, KEE, KEF, KEG, KEH, \
KFA, KFB, KFC, KFD, KFE, KFF, KFG, KFH, \
KGA, KGB, KGC, KGD, KGE, KGF, KGG, KGH, \
KHA, KHB, KHC, KHD, KHE, KHF, KHG, KHH, \
KJA, KJB, KJC, KJD, KJE, KJF, KJG, KJH, \
KKA, KKB, KKC, KKD, KKE, KKF, KKG, KKH, \
KLA, KLB, KLC, KLD, KLE, KLF, KLG, KLH, \
KMA, KMB, KMC, KMD, KME, KMF, KMG, KMH, \
KNA, KNB, KNC, KND, KNE, KNF, KNG, KNH, \
KPA, KPB, KPC, KPD, KPE, KPF, KPG, KPH, \
KQA, KQB, KQC, KQD, KQE, KQF, KQG, KQH, \
KRA, KRB, KRC, KRD, KRE, KRF, KRG, KRH, \
KSA, KSB, KSC, KSD, KSE, KSF, KSG, KSH, \
KTA, KTB, KTC, KTD, KTE, KTF, KTG, KTH, \
KUA, KUB, KUC, KUD, KUE, KUF, KUG, KUH, \
KVA, KVB, KVC, KVD, KVE, KVF, KVG, KVH, \
KWA, KWB, KWC, KWD, KWE, KWF, KWG, KWH, \
KXA, KXB, KXC, KXD, KXE, KXF, KXG, KXH, \
KYA, KYB, KYC, KYD, KYE, KYF, KYG, KYH, \
KZA, KZB, KZC, KZD, KZE, KZF, KZG, KZH, \
NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO, \
NO, NO, NO, NO, NO, NO, NO, NO \
)
/* ANSI 104 keymap */

Просмотреть файл

@ -2,9 +2,9 @@
// Default
#ifdef KEYMAP_SECTION_ENABLE
const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_ROWS][MATRIX_COLS] __attribute__ ((section (".keymap.keymaps"))) = {
const uint8_t keymaps[KEYMAPS_COUNT][MATRIX_SIZE] __attribute__ ((section (".keymap.keymaps"))) = {
#else
const uint8_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = {
const uint8_t keymaps[][MATRIX_SIZE] PROGMEM = {
#endif
/* Keymap 0: Default Layer
* ,---------------------------------------------------------------------------------------.
@ -67,9 +67,9 @@ const uint16_t fn_actions[] PROGMEM = {
[3] = ACTION_BACKLIGHT_INCREASE(),
};
#ifdef KEYMAP_EX_ENABLE
#ifdef KEYMAP_IN_EEPROM_ENABLE
uint16_t keys_count(void) {
return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_ROWS * MATRIX_COLS;
return sizeof(keymaps) / sizeof(keymaps[0]) * MATRIX_SIZE;
}
uint16_t fn_actions_count(void) {

Просмотреть файл

@ -34,6 +34,8 @@ uint8_t col_mapping[MATRIX_COLS] = {
16, 17, 18, 19, 20, 21, 22, 23,
24, 25, 26, 27, 28, 29, 30, 31
};
uint8_t row_max_count = MUX_PORTS * 1;
uint8_t col_max_count = MUX_PORTS * (MUX_COUNT - 1);
uint16_t shift_out_cache = 0;
void kimera_init(void)
@ -58,8 +60,8 @@ uint8_t read_matrix_mapping(void)
{
uint8_t error = 0;
uint8_t mux_config = 0;
uint8_t row_max_count = 0;
uint8_t col_max_count = 0;
row_max_count = 0;
col_max_count = 0;
mux_config = eeprom_read_byte(EECONFIG_MUX_MAPPING);
if (mux_config & (1<<7)) {
@ -106,8 +108,8 @@ uint8_t read_matrix_mapping(void)
void write_matrix_mapping(void)
{
uint8_t mux_config = 0;
uint8_t row_max_count = 0;
uint8_t col_max_count = 0;
row_max_count = 0;
col_max_count = 0;
for (uint8_t i = 0; i < MUX_COUNT; i++) {
mux_config |= (mux_mapping[i] << i);

Просмотреть файл

@ -159,7 +159,7 @@ const uint16_t PROGMEM mux_inh_to_shift_out[] = {
#define EECONFIG_MUX_MAPPING (uint8_t *)7
#define EECONFIG_ROW_COL_MAPPING (uint8_t *)8
#define MATRIX_MAPPING_SIZE MUX_COUNT * MUX_PORTS
#define EECONFIG_KEYMAP_EX 40
#define EECONFIG_KEYMAP_IN_EEPROM 40
typedef struct {
uint8_t mux_mapping;

Просмотреть файл

@ -38,17 +38,19 @@ static uint8_t debouncing = DEBOUNCE;
static matrix_row_t matrix[MATRIX_ROWS];
static matrix_row_t matrix_debouncing[MATRIX_ROWS];
extern uint8_t row_max_count;
extern uint8_t col_max_count;
inline
uint8_t matrix_rows(void)
{
return MATRIX_ROWS;
return row_max_count;
}
inline
uint8_t matrix_cols(void)
{
return MATRIX_COLS;
return col_max_count;
}
void matrix_init(void)
@ -64,7 +66,7 @@ void matrix_init(void)
init_cols();
// initialize matrix state: all keys off
for (uint8_t i=0; i < MATRIX_ROWS; i++) {
for (uint8_t i=0; i < matrix_rows(); i++) {
matrix[i] = 0;
matrix_debouncing[i] = 0;
}
@ -72,7 +74,7 @@ void matrix_init(void)
uint8_t matrix_scan(void)
{
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
for (uint8_t i = 0; i < matrix_rows(); i++) {
select_row(i);
_delay_us(30); // without this wait read unstable value.
matrix_row_t cols = read_cols();
@ -90,7 +92,7 @@ uint8_t matrix_scan(void)
if (--debouncing) {
_delay_ms(1);
} else {
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
for (uint8_t i = 0; i < matrix_rows(); i++) {
matrix[i] = matrix_debouncing[i];
}
}
@ -120,7 +122,7 @@ matrix_row_t matrix_get_row(uint8_t row)
void matrix_print(void)
{
print("\nr/c 0123456789ABCDEF\n");
for (uint8_t row = 0; row < MATRIX_ROWS; row++) {
for (uint8_t row = 0; row < matrix_rows(); row++) {
phex(row); print(": ");
pbin_reverse16(matrix_get_row(row));
print("\n");
@ -130,7 +132,7 @@ void matrix_print(void)
uint8_t matrix_key_count(void)
{
uint8_t count = 0;
for (uint8_t i = 0; i < MATRIX_ROWS; i++) {
for (uint8_t i = 0; i < matrix_rows(); i++) {
count += bitpop16(matrix[i]);
}
return count;