Swap up and down on ab's layout to match default (#441)

This commit is contained in:
Anand Babu (AB) Periasamy 2016-06-24 10:43:12 -07:00 committed by Jack Humbert
parent 40bfc7231e
commit 0314620d26
3 changed files with 136 additions and 57 deletions

View file

@ -4,60 +4,118 @@
"author": "Anand Babu Periasamy" "author": "Anand Babu Periasamy"
}, },
[ [
"1\nF1\n!\n\n\n\n\n\n\nTab", {
"2\nF2\n@\n\n\n\n\n\n\nQ", "fa": [
"3\nF3\n#\n\n\n\n\n\n\nW", 2,
"4\nF4\n$\n\n\n\n\n\n\nE", 2,
"5\nF5\n%\n\n\n\n\n\n\nR", 0,
"6\nF6\n^\n\n\n\n\n\n\nT", 2
"7\nF7\n&\n\n\n\n\n\n\nY", ]
"8\nF8\n*\n\n\n\n\n\n\nU", },
"9\nF9\n(\n\n\n\n\n\n\nI", "F1\n1\n\n!\n\n\n\n\n\nTab",
"0\nF10\n)\n\n\n\n\n\n\nO", "F2\n2\n\n@\n\n\n\n\n\nQ",
"-\nF11\n_\n\n\n\n\n\n\nP", "F3\n3\n\n#\n\n\n\n\n\nW",
"=\nF12\n+\n\n\n\n\n\n\n<i class=\"fa fa-chevron-circle-left\" aria-hidden=\"true\"></i>" "F4\n4\n\n$\n\n\n\n\n\nE",
"F5\n5\n\n%\n\n\n\n\n\nR",
"F6\n6\n\n^\n\n\n\n\n\nT",
"F7\n7\n\n&\n\n\n\n\n\nY",
"F8\n8\n\n*\n\n\n\n\n\nU",
"F9\n9\n\n(\n\n\n\n\n\nI",
"F10\n0\n\n)\n\n\n\n\n\nO",
"F11\n-\n\n_\n\n\n\n\n\nP",
"F12\n=\n\n+\n\n\n\n\n\n<i class=\"fa fa-chevron-circle-left\" aria-hidden=\"true\"></i>"
], ],
[ [
{ {
"a": 7 "a": 7,
"f": 3
}, },
"Ctrl", "Ctrl",
{
"f": 3
},
"A", "A",
{
"f": 3
},
"S", "S",
{
"f": 3
},
"D", "D",
{ {
"a": 4 "a": 4,
"f": 3
}, },
"(\n\n\n\n\n\n\n\n\nF", "\n(\n\n\n\n\n\n\n\nF",
")\n\n\n\n\n\n\n\n\nG",
"{\n\n\n\n\n\n\n\n\nH",
"}\n\n\n\n\n\n\n\n\nJ",
{ {
"a": 7 "f": 3
},
"\n)\n\n\n\n\n\n\n\nG",
{
"f": 3
},
"\n{\n\n\n\n\n\n\n\nH",
{
"f": 3
},
"\n}\n\n\n\n\n\n\n\nJ",
{
"a": 7,
"f": 3
}, },
"K", "K",
{
"f": 3
},
"L", "L",
{ {
"a": 6 "a": 6,
"f": 3
}, },
";\n\n:", ";\n\n:",
{ {
"a": 7 "a": 7,
"f": 3
}, },
"Enter" "Enter"
], ],
[ [
{
"f": 3
},
"Shift", "Shift",
{
"f": 3
},
"Z", "Z",
{
"f": 3
},
"X", "X",
{
"f": 3
},
"C", "C",
{ {
"a": 4 "a": 4,
"fa": [
0,
2,
0,
2,
0,
0,
0,
0,
0,
2
]
}, },
"[\n`\n\n\n\n\n\n\n\nV", "\\\n[\n\n\n\n\n\n\n\nV",
"]\n~\n\n\n\n\n\n\n\nB", "|\n]\n\n\n\n\n\n\n\nB",
"'\n\\\n\n\n\n\n\n\n\nN", "`\n'\n\n\n\n\n\n\n\nN",
"\"\n|\n\n\n\n\n\n\n\nM", "~\n\"\n\n\n\n\n\n\n\nM",
{ {
"a": 6 "a": 6
}, },
@ -71,31 +129,57 @@
], ],
[ [
{ {
"a": 4 "a": 4,
"fa": [
2,
2
]
}, },
"<i class='fa fa-lightbulb-o'></i>\n<i class='fa fa-download'></i>\n\n\n\n\n\n\n\nCtrl", "<i class='fa fa-download'></i>\n<i class='fa fa-lightbulb-o'></i>\n\n\n\n\n\n\n\nCtrl",
{ {
"a": 7 "a": 7,
"f": 3
}, },
"Esc", "Esc",
"<i class='fa fa-linux'></i>",
"Alt",
"<i class='fa fa-sort-up'></i>",
{ {
"a": 4, "f": 3
"w": 2
}, },
"\nPgUP\n\nPgDn\n\n\n\n\n\nSpace", "<i class='fa fa-linux'></i>",
{ {
"a": 7 "f": 3
},
"Alt",
{
"f": 3
}, },
"<i class='fa fa-sort-down'></i>", "<i class='fa fa-sort-down'></i>",
{
"a": 4,
"f": 3,
"w": 2
},
"PgUp\nPgDn\n\n\n\n\n\n\n\nSpace",
{
"a": 7,
"f": 3
},
"<i class='fa fa-sort-up'></i>",
{
"f": 3
},
"<i class=\"fa fa-long-arrow-left\" aria-hidden=\"true\"></i>", "<i class=\"fa fa-long-arrow-left\" aria-hidden=\"true\"></i>",
{ {
"a": 4 "a": 4,
"f": 3
},
"\n<i class='fa fa-volume-down'></i>\n\n\n\n\n\n\n\n<i class=\"fa fa-long-arrow-down\" aria-hidden=\"true\"></i>",
{
"f": 3
},
"\n<i class='fa fa-volume-up'></i>\n\n\n\n\n\n\n\n<i class=\"fa fa-long-arrow-up\" aria-hidden=\"true\"></i>",
{
"f": 3
}, },
"\n<i class='fa fa-volume-down'></i>\n\n\n\n\n\n\n\n<i class=\"fa fa-long-arrow-up\" aria-hidden=\"true\"></i>",
"\n<i class='fa fa-volume-up'></i>\n\n\n\n\n\n\n\n<i class=\"fa fa-long-arrow-down\" aria-hidden=\"true\"></i>",
"\n<i class='fa fa-volume-off'></i>\n\n\n\n\n\n\n\n<i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i>" "\n<i class='fa fa-volume-off'></i>\n\n\n\n\n\n\n\n<i class=\"fa fa-long-arrow-right\" aria-hidden=\"true\"></i>"
] ]
] ]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View file

@ -12,8 +12,8 @@ extern keymap_config_t keymap_config;
// Symbolic names for macro IDs. // Symbolic names for macro IDs.
#define _QWERTY 0 // QUERTY layer #define _QWERTY 0 // QUERTY layer
#define _RAISE 1 // Raise layer #define _LOWER 1 // Lower layer
#define _LOWER 2 // Lower layer #define _RAISE 2 // Raise layer
#define _CUSTOM 3 // Custom layer #define _CUSTOM 3 // Custom layer
#define _BL 4 // Backlight #define _BL 4 // Backlight
#define _MOBILE 5 // Mobile# #define _MOBILE 5 // Mobile#
@ -21,8 +21,8 @@ extern keymap_config_t keymap_config;
#define _CUSTOM2 7 // Custom macro 2 #define _CUSTOM2 7 // Custom macro 2
// Macro shortcuts. // Macro shortcuts.
#define RAISE M(_RAISE)
#define LOWER M(_LOWER) #define LOWER M(_LOWER)
#define RAISE M(_RAISE)
#define CUSTOM M(_CUSTOM) // RAISE + LOWER #define CUSTOM M(_CUSTOM) // RAISE + LOWER
#define BL M(_BL) #define BL M(_BL)
#define MOBILE M(_MOBILE) #define MOBILE M(_MOBILE)
@ -35,19 +35,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC},
{KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT},
{KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, FUNC(3)}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, FUNC(3)},
{KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, RAISE, KC_SPC, KC_SPC, LOWER, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT} {KC_LCTL, KC_ESC, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
}, },
[_RAISE] = { /* RAISE */ [_LOWER] = { /* LOWER */
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL}, {KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
{BL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} {BL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}
}, },
[_LOWER] = { /* LOWER */ [_RAISE] = { /* RAISE */
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_LCBR, KC_BSLS, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_PIPE, KC_GRV, KC_TILD, KC_LBRC, KC_LBRC, KC_TRNS, KC_TRNS},
{RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGDN, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE} {RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_PGUP, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE}
}, },
[_CUSTOM] = { /* CUSTOM */ [_CUSTOM] = { /* CUSTOM */
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS},
@ -57,11 +57,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
} }
}; };
// Enable these functions using FUNC(n) macro. They seem to be buggy mostly. // Enable these functions using FUNC(n) macro.
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP), // Tap for PgUp, hold for RAISE [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN), // Tap for PgDn, hold for LOWER
[1] = ACTION_LAYER_TAP_KEY(_LOWER, KC_PGDN), // Tap for PgDn, hold for LOWER [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_PGUP), // Tap for PgUp, hold for RAISE
[2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), // Tap for Caps, hold for Ctrl [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_CAPS), // Tap for Caps, hold for Ctrl (DOESN'T SEEM TO WORK)
[3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Tap for Enter, hold for Shift [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Tap for Enter, hold for Shift
}; };
@ -75,11 +75,6 @@ void persistant_default_layer_set(uint16_t default_layer) {
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {
switch(id) { switch(id) {
case _QWERTY: // Default QWERTY layer. // This case not used for now.
if (record->event.pressed) {
persistant_default_layer_set(1UL<<_QWERTY);
}
break;
case _RAISE: // Raised layer. case _RAISE: // Raised layer.
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_RAISE); layer_on(_RAISE);