diff options
Diffstat (limited to 'layouts/community/ortho_4x12/peej/keymap.c')
| -rw-r--r-- | layouts/community/ortho_4x12/peej/keymap.c | 73 |
1 files changed, 73 insertions, 0 deletions
diff --git a/layouts/community/ortho_4x12/peej/keymap.c b/layouts/community/ortho_4x12/peej/keymap.c new file mode 100644 index 000000000..d78f03da4 --- /dev/null +++ b/layouts/community/ortho_4x12/peej/keymap.c | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | /* Copyright 2020 Paul James | ||
| 2 | * | ||
| 3 | * This program is free software: you can redistribute it and/or modify | ||
| 4 | * it under the terms of the GNU General Public License as published by | ||
| 5 | * the Free Software Foundation, either version 2 of the License, or | ||
| 6 | * (at your option) any later version. | ||
| 7 | * | ||
| 8 | * This program is distributed in the hope that it will be useful, | ||
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 11 | * GNU General Public License for more details. | ||
| 12 | * | ||
| 13 | * You should have received a copy of the GNU General Public License | ||
| 14 | * along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
| 15 | */ | ||
| 16 | |||
| 17 | #define USE_2U_SPACE 1 | ||
| 18 | |||
| 19 | #include QMK_KEYBOARD_H | ||
| 20 | #include "peej.h" | ||
| 21 | |||
| 22 | const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
| 23 | |||
| 24 | [_BASE] = LAYOUT_PEEJ( | ||
| 25 | BASE_ROW_2, | ||
| 26 | BASE_ROW_3, | ||
| 27 | BASE_ROW_4, | ||
| 28 | BASE_ROW_5 | ||
| 29 | ), | ||
| 30 | |||
| 31 | [_SYMBOL] = LAYOUT_PEEJ( | ||
| 32 | SYMBOL_ROW_2, | ||
| 33 | SYMBOL_ROW_3, | ||
| 34 | SYMBOL_ROW_4, | ||
| 35 | SYMBOL_ROW_5 | ||
| 36 | ), | ||
| 37 | |||
| 38 | [_FUNCTION] = LAYOUT_PEEJ( | ||
| 39 | FUNCTION_ROW_2, | ||
| 40 | FUNCTION_ROW_3, | ||
| 41 | FUNCTION_ROW_4, | ||
| 42 | FUNCTION_ROW_5 | ||
| 43 | ), | ||
| 44 | |||
| 45 | [_ADJUST] = LAYOUT_PEEJ( | ||
| 46 | ADJUST_ROW_2, | ||
| 47 | ADJUST_ROW_3, | ||
| 48 | ADJUST_ROW_4, | ||
| 49 | ADJUST_ROW_5 | ||
| 50 | ) | ||
| 51 | |||
| 52 | }; | ||
| 53 | |||
| 54 | layer_state_t layer_state_set_user(layer_state_t state) { | ||
| 55 | #if defined(LED_RED) && defined(LED_GREEN) | ||
| 56 | writePinLow(LED_RED); | ||
| 57 | writePinLow(LED_GREEN); | ||
| 58 | |||
| 59 | switch (biton32(state)) { | ||
| 60 | case _FUNCTION: | ||
| 61 | writePinHigh(LED_RED); | ||
| 62 | break; | ||
| 63 | case _SYMBOL: | ||
| 64 | writePinHigh(LED_GREEN); | ||
| 65 | break; | ||
| 66 | case _ADJUST: | ||
| 67 | writePinHigh(LED_RED); | ||
| 68 | writePinHigh(LED_GREEN); | ||
| 69 | break; | ||
| 70 | } | ||
| 71 | #endif | ||
| 72 | return state; | ||
| 73 | } | ||
