diff --git a/keyboards/planck/keymaps/sijmen/config.h b/keyboards/planck/keymaps/sijmen/config.h new file mode 100644 index 000000000..53604c123 --- /dev/null +++ b/keyboards/planck/keymaps/sijmen/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER OLKB +#define PRODUCT Planck +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define QMK_ESC_OUTPUT F1 +#define QMK_ESC_INPUT D5 +#define QMK_LED E6 +#define QMK_SPEAKER C6 + +#define AUDIO_VOICES +#define C6_AUDIO + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define TAPPING_TERM 200 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/planck/keymaps/sijmen/keymap.c b/keyboards/planck/keymaps/sijmen/keymap.c new file mode 100644 index 000000000..7685348f5 --- /dev/null +++ b/keyboards/planck/keymaps/sijmen/keymap.c @@ -0,0 +1,149 @@ +#pragma message "You may need to add LAYOUT_planck_grid to your keymap layers - see default for an example" +#include "planck.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define O_CTL_ALT OSM(MOD_LCTL | MOD_LALT) +#define O_SFT OSM(MOD_LSFT) +#define O_SFT_ALT OSM(MOD_LSFT | MOD_LALT) +#define O_CTL_GUI OSM(MOD_LCTL | MOD_LGUI) +#define O_SFT_CTL OSM(MOD_LSFT | MOD_LCTL) +#define O_SFT_GUI OSM(MOD_LSFT | MOD_LGUI) + +enum { + TD_QUOT = 0, +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_QUOT] = ACTION_TAP_DANCE_DOUBLE(KC_QUOT, S(KC_QUOT)), +}; + +#define LT_SYM_LEFT LT(1, KC_LEFT) +#define LT_LSFT_SPC LT(2, KC_SPC) +#define LT_RSFT_BSPC LT(3, KC_BSPC) +#define LT_LNUM_ESC LT(4, KC_ESC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Default + * ,-----------------------------------------------------------------------------------. + * | q | w | e | r | t | | | y | u | i | o | p | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | a | s | d | f | g | LSFT | LSFT | h | j | k | l | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | z | x | c | v | b | ENT | ENT | n | m | , | . | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LCTL | LALT | LGUI | ESC | SPC | TAB | BSPC | BSPC | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + */ +[0] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, O_CTL_ALT, O_CTL_GUI, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, O_SFT, O_SFT_CTL, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_ENT, KC_ENT, KC_N, KC_M, KC_COMM, KC_DOT, TD(TD_QUOT)}, + {KC_LCTL, KC_LALT, KC_LGUI, LT_LNUM_ESC, LT_LSFT_SPC, KC_TAB, KC_BSPC, LT_RSFT_BSPC, LT_SYM_LEFT, KC_DOWN, KC_UP, KC_RGHT }, +}, + +/* Symbol + * ,-----------------------------------------------------------------------------------. + * | { | . | * | & | } | | | + | HOME | UP | END | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | ( | ^ | % | $ | ) | LSFT | LSFT | = | LEFT | DOWN | RGHT | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | [ | # | @ | ! | ] | ENT | ENT | | PGDN | PGUP | | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LCTL | LALT | LGUI | ESC | SPC | TAB | BSPC | BSPC |[ SYM]| DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + */ +[1] = { + {KC_LCBR, KC_DOT, KC_ASTR, KC_AMPR, KC_RCBR, _______, _______, S(KC_EQL), KC_HOME, KC_UP, KC_END, XXXXXXX}, + {KC_LPRN, KC_CIRC, KC_PERC, KC_DLR, KC_RPRN, _______, _______, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT, _______}, + {KC_LBRC, KC_HASH, KC_AT, KC_EXLM, KC_RBRC, _______, _______, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, _______}, + {_______, _______, _______, KC_BSLS, KC_PIPE, _______, _______, _______, _______, _______, _______, _______}, +}, + +/* Left Shift + * ,-----------------------------------------------------------------------------------. + * | Q | W | E | R | T | | | Y | U | I | O | P | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | A | S | D | F | G | LSFT | LSFT | H | J | K | L | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Z | X | C | V | B | ENT | ENT | N | M | / | ? | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LCTL | LALT | LGUI | ESC |[LSFT]| TAB | BSPC | - | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + */ +[2] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), O_CTL_ALT, O_CTL_GUI, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P) }, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), O_SFT, O_SFT_CTL, S(KC_H), S(KC_J), S(KC_K), S(KC_L), S(KC_SCLN)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), O_SFT_ALT, O_SFT_GUI, S(KC_N), S(KC_M), KC_SLSH, S(KC_SLSH), S(TD_QUOT)}, + {_______, _______, _______, _______, _______, _______, KC_DEL, KC_MINS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }, +}, + +/* Right Shift + * ,-----------------------------------------------------------------------------------. + * | Q | W | E | R | T | | | Y | U | I | O | P | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | A | S | D | F | G | LSFT | LSFT | H | J | K | L | ; | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Z | X | C | V | B | ENT | ENT | N | M | , | . | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LCTL | LALT | LGUI | ESC | _ | TAB | BSPC |[RSFT]| LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + */ +[3] = { + {S(KC_Q), S(KC_W), S(KC_E), S(KC_R), S(KC_T), O_CTL_ALT, O_CTL_GUI, S(KC_Y), S(KC_U), S(KC_I), S(KC_O), S(KC_P) }, + {S(KC_A), S(KC_S), S(KC_D), S(KC_F), S(KC_G), O_SFT, O_SFT_CTL, S(KC_H), S(KC_J), S(KC_K), S(KC_L), S(KC_SCLN)}, + {S(KC_Z), S(KC_X), S(KC_C), S(KC_V), S(KC_B), O_SFT_ALT, O_SFT_GUI, S(KC_N), S(KC_M), KC_GRV, S(KC_GRV), S(TD_QUOT)}, + {_______, _______, _______, _______, S(KC_MINS), _______, KC_DEL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT }, +}, + +/* Left Number + * ,-----------------------------------------------------------------------------------. + * | | | | { | } | | | e | 7 | 8 | 9 | f | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | < | > | ( | ) | LSFT | LSFT | c | 4 | 5 | 6 | d | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | x | b | [ | ] | ENT | ENT | a | 1 | 2 | 3 | b | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | LCTL | LALT | LGUI | ESC | LSFT | TAB | BSPC | RSFT | LEFT | DOWN | UP | RGHT | + * `-----------------------------------------------------------------------------------' + */ +[4] = { + {XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR, KC_RCBR, _______, _______, KC_E, KC_7, KC_8, KC_9, KC_F}, + {XXXXXXX, S(KC_COMM), S(KC_DOT), KC_LPRN, KC_RPRN, _______, _______, KC_C, KC_4, KC_5, KC_6, KC_D}, + {XXXXXXX, KC_X, KC_B, KC_LBRC, KC_RBRC, _______, _______, KC_A, KC_1, KC_2, KC_3, KC_B}, + {_______, _______, _______, _______, KC_LSFT, _______, _______, KC_RSFT, KC_0, KC_DOT, KC_U, KC_I}, +}, +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 1: + if (record->event.pressed) { + layer_on(1); + } else { + layer_off(1); + } + break; + case 2: + if (record->event.pressed) { + layer_on(2); + } else { + layer_off(2); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/planck/keymaps/sijmen/rules.mk b/keyboards/planck/keymaps/sijmen/rules.mk new file mode 100644 index 000000000..69a7f8f7d --- /dev/null +++ b/keyboards/planck/keymaps/sijmen/rules.mk @@ -0,0 +1,26 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +TAP_DANCE_ENABLE = yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif