Skip to content

Instantly share code, notes, and snippets.

/keymap.c Secret

Created Jul 21, 2016
Embed
What would you like to do?
#include "planck.h"
extern keymap_config_t keymap_config;
#define _TEST 0
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_TEST] = {
{M(0), M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11)},
{M(12), M(13), M(14), M(15), M(16), M(17), M(18), M(19), M(20), M(21), M(22), M(23)},
{M(24), M(25), M(26), M(27), M(28), M(29), M(30), M(31), M(32), M(33), M(34), M(35)},
{M(36), M(37), M(38), M(39), M(40), M(41), M(42), M(43), M(44), M(45), M(46), M(47)}
},
};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // this is the function signature -- just copy/paste it into your keymap file as it is.
{
switch(id) {
case 0:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(0), T(ENT), END);
}
break;
case 1:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(1), T(ENT), END);
}
break;
case 2:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(2), T(ENT), END);
}
break;
case 3:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(3), T(ENT), END);
}
break;
case 4:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(4), T(ENT), END);
}
break;
case 5:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(5), T(ENT), END);
}
break;
case 6:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(6), T(ENT), END);
}
break;
case 7:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(7), T(ENT), END);
}
break;
case 8:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(8), T(ENT), END);
}
break;
case 9:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(9), T(ENT), END);
}
break;
case 10:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(A), T(ENT), END);
}
break;
case 11:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(0), T(C), T(B), T(ENT), END);
}
break;
case 12:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(0), T(ENT), END);
}
break;
case 13:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(1), T(ENT), END);
}
break;
case 14:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(2), T(ENT), END);
}
break;
case 15:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(3), T(ENT), END);
}
break;
case 16:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(4), T(ENT), END);
}
break;
case 17:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(5), T(ENT), END);
}
break;
case 18:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(6), T(ENT), END);
}
break;
case 19:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(7), T(ENT), END);
}
break;
case 20:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(8), T(ENT), END);
}
break;
case 21:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(9), T(ENT), END);
}
break;
case 22:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(A), T(ENT), END);
}
break;
case 23:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(1), T(C), T(B), T(ENT), END);
}
break;
case 24:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(0), T(ENT), END);
}
break;
case 25:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(1), T(ENT), END);
}
break;
case 26:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(2), T(ENT), END);
}
break;
case 27:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(3), T(ENT), END);
}
break;
case 28:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(4), T(ENT), END);
}
break;
case 29:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(5), T(ENT), END);
}
break;
case 30:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(6), T(ENT), END);
}
break;
case 31:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(7), T(ENT), END);
}
break;
case 32:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(8), T(ENT), END);
}
break;
case 33:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(9), T(ENT), END);
}
break;
case 34:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(A), T(ENT), END);
}
break;
case 35:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(2), T(C), T(B), T(ENT), END);
}
break;
case 36:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(0), T(ENT), END);
}
break;
case 37:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(1), T(ENT), END);
}
break;
case 38:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(2), T(ENT), END);
}
break;
case 39:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(3), T(ENT), END);
}
break;
case 40:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(4), T(ENT), END);
}
break;
case 41:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(5), T(ENT), END);
}
break;
case 42:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(6), T(ENT), END);
}
break;
case 43:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(7), T(ENT), END);
}
break;
case 44:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(8), T(ENT), END);
}
break;
case 45:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(9), T(ENT), END);
}
break;
case 46:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(A), T(ENT), END);
}
break;
case 47:
if (record -> event.pressed) {
return MACRO(I(25), T(R), T(3), T(C), T(B), T(ENT), END);
}
break;
}
return MACRO_NONE;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment