diff options
Diffstat (limited to 'keyboards/keebio/levinson/keymaps')
-rw-r--r-- | keyboards/keebio/levinson/keymaps/numpad/config.h | 34 | ||||
-rw-r--r-- | keyboards/keebio/levinson/keymaps/numpad/keymap.c | 123 | ||||
-rw-r--r-- | keyboards/keebio/levinson/keymaps/numpad/readme.md | 4 | ||||
-rw-r--r-- | keyboards/keebio/levinson/keymaps/numpad/rules.mk | 3 |
4 files changed, 164 insertions, 0 deletions
diff --git a/keyboards/keebio/levinson/keymaps/numpad/config.h b/keyboards/keebio/levinson/keymaps/numpad/config.h new file mode 100644 index 000000000..7e10bc445 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/numpad/config.h @@ -0,0 +1,34 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen <danny@keeb.io> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// #define USE_I2C +// Need to flip the rows +#undef MATRIX_COL_PINS +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS + +/* Time in ms until oneshot layer times out */ +#define ONESHOT_TIMEOUT 3000 diff --git a/keyboards/keebio/levinson/keymaps/numpad/keymap.c b/keyboards/keebio/levinson/keymaps/numpad/keymap.c new file mode 100644 index 000000000..32a1113c5 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/numpad/keymap.c @@ -0,0 +1,123 @@ +#include QMK_KEYBOARD_H + +/* Add the stings you want to send as macros, see + * https://docs.qmk.fm/#/feature_macros for what all can be used + */ +#define MACRO_0 "zero" +#define MACRO_1 "one" +#define MACRO_2 "two" +#define MACRO_3 "three" +#define MACRO_4 "four" +#define MACRO_5 "five" +#define MACRO_6 "six" +#define MACRO_7 "seven" +#define MACRO_8 "eight" +#define MACRO_9 "nine" + +enum macro_keycodes { + M0 = SAFE_RANGE, + M1, + M2, + M3, + M4, + M5, + M6, + M7, + M8, + M9 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | 0 | 1 | 4 | 7 | BkSp |OSL(1)| | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | , | 2 | 5 | 8 | / | Down | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | . | 3 | 6 | 9 | * | Up | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Enter | + | - | = | MO(1)| | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[0] = LAYOUT_ortho_4x12( \ + KC_KP_0, KC_KP_1, KC_KP_4, KC_KP_7, KC_BSPACE, OSL(1), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_COMMA, KC_KP_2, KC_KP_5, KC_KP_8, KC_KP_SLASH, KC_DOWN, KC_NO, KC_A, KC_B, KC_C, KC_D, KC_NO, \ + KC_KP_DOT, KC_KP_3, KC_KP_6, KC_KP_9, KC_KP_ASTERISK, KC_UP, KC_NO, KC_E, KC_F, KC_G, KC_H, KC_NO, \ + KC_KP_ENTER, KC_NO, KC_KP_PLUS, KC_KP_MINUS, KC_KP_EQUAL, MO(1), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +), +/* Macro layer - the number keys are macros, + * other functions on remaining keys + * ,-----------------------------------------. + * | M(0) | M(1) | M(4) | M(7) | | Esc | + * |------+------+------+------+------+------| + * | Left | M(2) | M(5) | M(8) | | | + * |------+------+------+------+------+------| + * | Right| M(3) | M(6) | M(9) | | | + * |------+------+------+------+------+------| + * | NumLock | RESET| | | Calc | + * `-----------------------------------------' + */ +[1] = LAYOUT_ortho_4x12( \ + M0, M1, M4, M7, KC_NO, KC_ESC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_LEFT, M2, M5, M8, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_RIGHT, M3, M6, M8, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_NUMLOCK, RESET, KC_NO, KC_NO, KC_CALC, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ +) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case M0: + if (record->event.pressed) { + SEND_STRING(MACRO_0); + } + break; + case M1: + if (record->event.pressed) { + SEND_STRING(MACRO_1); + } + break; + case M2: + if (record->event.pressed) { + SEND_STRING(MACRO_2); + } + break; + case M3: + if (record->event.pressed) { + SEND_STRING(MACRO_3); + } + break; + case M4: + if (record->event.pressed) { + SEND_STRING(MACRO_4); + } + break; + case M5: + if (record->event.pressed) { + SEND_STRING(MACRO_5); + } + break; + case M6: + if (record->event.pressed) { + SEND_STRING(MACRO_6); + } + break; + case M7: + if (record->event.pressed) { + SEND_STRING(MACRO_7); + } + break; + case M8: + if (record->event.pressed) { + SEND_STRING(MACRO_8); + } + break; + case M9: + if (record->event.pressed) { + SEND_STRING(MACRO_9); + } + break; + } + return true; +}; diff --git a/keyboards/keebio/levinson/keymaps/numpad/readme.md b/keyboards/keebio/levinson/keymaps/numpad/readme.md new file mode 100644 index 000000000..0c15ac54d --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/numpad/readme.md @@ -0,0 +1,4 @@ +# Numpad Layout +[Layout Example](http://www.keyboard-layout-editor.com/##@@_c=%23ffd100&a:7%3B&=&_c=%23909596&f:5%3B&=&=&=%3B&@_c=%23c4c8c5&st=MX1A-L1xx&f:6%3B&=Esc&=%2F%2F&=*&=%3F%3B&@=7&=8&=9&=%E2%80%93%3B&@=4&_n:true%3B&=5&=6&=+%3B&@=1&=2&=3&_c=%23ffd100&h:2%3B&=%3B&@_c=%23c4c8c5%3B&=0&_a:5%3B&=%3C%0A,&=%3E%0A.) + +Uses a single half of the Levinson a vertical 4x6 numpad/macropad. diff --git a/keyboards/keebio/levinson/keymaps/numpad/rules.mk b/keyboards/keebio/levinson/keymaps/numpad/rules.mk new file mode 100644 index 000000000..639c76834 --- /dev/null +++ b/keyboards/keebio/levinson/keymaps/numpad/rules.mk @@ -0,0 +1,3 @@ +# Build Options +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow |