From 8a7daf34a26fddcf1ddc5331cce7e160beea76c3 Mon Sep 17 00:00:00 2001 From: johannes Date: Fri, 3 Feb 2017 10:47:37 +0100 Subject: initial keymap --- keyboards/planck/config.h | 5 +- keyboards/planck/keymaps/johannes/Makefile | 25 +++++++ keyboards/planck/keymaps/johannes/keymap.c | 100 ++++++++++++++++++++++++++++ keyboards/planck/keymaps/johannes/readme.md | 2 + 4 files changed, 129 insertions(+), 3 deletions(-) create mode 100644 keyboards/planck/keymaps/johannes/Makefile create mode 100644 keyboards/planck/keymaps/johannes/keymap.c create mode 100644 keyboards/planck/keymaps/johannes/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 5cf96bb88c..fe59d8b50a 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -32,10 +32,9 @@ along with this program. If not, see . #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 MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B1, B3, B2, B6, B5, B4, D2, D7, C6, D4, D0, D1 } #define UNUSED_PINS - #define AUDIO_VOICES #define BACKLIGHT_PIN B7 diff --git a/keyboards/planck/keymaps/johannes/Makefile b/keyboards/planck/keymaps/johannes/Makefile new file mode 100644 index 0000000000..0c0632da09 --- /dev/null +++ b/keyboards/planck/keymaps/johannes/Makefile @@ -0,0 +1,25 @@ + + +# 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 = no # 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. + +# 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 \ No newline at end of file diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c new file mode 100644 index 0000000000..afbad2440c --- /dev/null +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -0,0 +1,100 @@ +#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 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | super|shift | Space|Raise | lower| alt | | |fn | + * `-----------------------------------------------------------------------------------' + */ +[0] = { + {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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {XXXXXXX, XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, XXXXXXX, XXXXXXX, M(3)} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | { | } | + | | | Å | Ä | Ö | _ | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | \ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Reset | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[1] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_UNDS, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | [ | ] | = | | left| down| up | right| - | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[2] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {_______, _______, KC_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +[3] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +}; + +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/johannes/readme.md b/keyboards/planck/keymaps/johannes/readme.md new file mode 100644 index 0000000000..3a4824b5b4 --- /dev/null +++ b/keyboards/planck/keymaps/johannes/readme.md @@ -0,0 +1,2 @@ +# A more basic Planck Layout for copying + -- cgit v1.2.3 From f936a3d5c23c1562bdcd237fcba6bd4e5223f0b8 Mon Sep 17 00:00:00 2001 From: johannes Date: Fri, 3 Feb 2017 14:10:19 +0100 Subject: stuff --- keyboards/planck/keymaps/johannes/keymap.c | 38 +++++++++++++++++++++++++++--- 1 file changed, 35 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index afbad2440c..d6c0ca81fe 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -19,14 +19,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | super|shift | Space|Raise | lower| alt | | |fn | + * | | | | super|shift | Space|Raise | lower| alt | altgr| |fn | * `-----------------------------------------------------------------------------------' */ [0] = { {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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {XXXXXXX, XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, XXXXXXX, XXXXXXX, M(3)} + {XXXXXXX, XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, KC_RALT, XXXXXXX, M(3)} }, /* Lower @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [1] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_UNDS, KC_PIPE}, + {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, M(4), M(5), M(6), KC_UNDS, _______}, {_______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -65,6 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, +// Fn-layer [3] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, @@ -94,6 +95,37 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } else { layer_off(2); } + break; + case 3: + if (record->event.pressed) { + layer_on(3); + } else { + layer_off(3); + } + break; + case 4: // å + if (record->event.pressed) { + register_code(KC_RALT); + register_code(KC_W); + } else { + unregister_code(KC_RALT); + } + break; + case 5: // ä + if (record->event.pressed) { + register_code(KC_RALT); + register_code(KC_Q); + } else { + unregister_code(KC_RALT); + } + break; + case 6: // ö + if (record->event.pressed) { + register_code(KC_RALT); + register_code(KC_P); + } else { + unregister_code(KC_RALT); + } break; } return MACRO_NONE; -- cgit v1.2.3 From 835adb7848f4a2d6feb848bdfab1e9990f5f430a Mon Sep 17 00:00:00 2001 From: Johannes Larsson Date: Wed, 12 Apr 2017 23:11:51 +0200 Subject: colemak layout maybe --- keyboards/planck/keymaps/johannes/keymap.c | 44 +++++++++++++++++++++--------- 1 file changed, 31 insertions(+), 13 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index d6c0ca81fe..51c8f7a095 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -11,22 +11,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[0] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {TG(1), XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, KC_RALT, XXXXXXX, M(3)} +}, + /* Qwerty * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Esc | A | S | D | F | G | H | J | K | L | ; | ' | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | super|shift | Space|Raise | lower| alt | altgr| |fn | * `-----------------------------------------------------------------------------------' */ -[0] = { +[1] = { {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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {XXXXXXX, XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, KC_RALT, XXXXXXX, M(3)} + {_______, XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, KC_RALT, XXXXXXX, M(3)} }, /* Lower @@ -40,9 +58,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Reset | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[1] = { +[2] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, M(4), M(5), M(6), KC_UNDS, _______}, + {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_P), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______}, {_______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -58,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[2] = { +[3] = { {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, {_______, _______, KC_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______}, @@ -66,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, // Fn-layer -[3] = { +[4] = { {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, @@ -84,23 +102,23 @@ 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); + layer_on(2); } else { - layer_off(1); + layer_off(2); } break; case 2: if (record->event.pressed) { - layer_on(2); + layer_on(3); } else { - layer_off(2); + layer_off(3); } break; case 3: if (record->event.pressed) { - layer_on(3); + layer_on(4); } else { - layer_off(3); + layer_off(4); } break; case 4: // å -- cgit v1.2.3 From 53b094934f2ddd9133da6482176ee214d4fbb86a Mon Sep 17 00:00:00 2001 From: Johannes Larsson Date: Mon, 22 May 2017 15:25:53 +0200 Subject: matrix layout --- keyboards/planck/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 5cf96bb88c..50438a5d5a 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -32,8 +32,8 @@ along with this program. If not, see . #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 MATRIX_ROW_PINS { F4, F5, F6, F7 } +#define MATRIX_COL_PINS { B1, B3, B2, B6, B5, B4, E6, D7, C6, D4, D0, D1 } #define UNUSED_PINS #define AUDIO_VOICES -- cgit v1.2.3 From a965e5b7356b7ebaee7b7cd64db19330758ec6ee Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Wed, 24 May 2017 07:56:41 -0400 Subject: tweaks default mouse speed constants --- keyboards/ergodox/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/config.h b/keyboards/ergodox/config.h index 994a8c6433..e870835d85 100644 --- a/keyboards/ergodox/config.h +++ b/keyboards/ergodox/config.h @@ -3,8 +3,8 @@ #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 5 -#define MOUSEKEY_MAX_SPEED 2 +#define MOUSEKEY_TIME_TO_MAX 40 +#define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 #define TAPPING_TOGGLE 1 -- cgit v1.2.3 From 690957cdbd77307b7f1c17acb70ab839eac86e3d Mon Sep 17 00:00:00 2001 From: Johannes Larsson Date: Wed, 24 May 2017 19:00:56 +0200 Subject: media keys and stuff --- keyboards/planck/config.h | 2 +- keyboards/planck/keymaps/johannes/keymap.c | 71 ++++++------------------------ 2 files changed, 15 insertions(+), 58 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 50438a5d5a..1311bb09b6 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -33,7 +33,7 @@ along with this program. If not, see . /* Planck PCB default pin-out */ #define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { B1, B3, B2, B6, B5, B4, E6, D7, C6, D4, D0, D1 } +#define MATRIX_COL_PINS { B1, B3, B2, B6, B5, B4, D2, D7, C6, D4, D0, D1 } #define UNUSED_PINS #define AUDIO_VOICES diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index 51c8f7a095..13bb11798d 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -8,6 +8,10 @@ // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO +#define QWERTY 0 +#define LOWER 1 +#define RAISE 2 +#define FUNCTION 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -21,13 +25,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' - */ + * [0] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, {TG(1), XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, KC_RALT, XXXXXXX, M(3)} -}, +},*/ /* Qwerty * ,-----------------------------------------------------------------------------------. @@ -40,11 +44,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | super|shift | Space|Raise | lower| alt | altgr| |fn | * `-----------------------------------------------------------------------------------' */ -[1] = { +[QWERTY] = { {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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {_______, XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, KC_RALT, XXXXXXX, M(3)} + {_______, XXXXXXX, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION)} }, /* Lower @@ -58,9 +62,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Reset | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[2] = { +[LOWER] = { {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, - {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_P), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______}, + {_______, _______, KC_LCBR, KC_RCBR, KC_PLUS, _______, _______, RALT(KC_W), RALT(KC_Q), RALT(KC_P), KC_UNDS, _______}, {_______, _______, _______, _______, _______, _______, _______,_______, _______,_______, KC_BSLS, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -76,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[3] = { +[RAISE] = { {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, {_______, _______, KC_LBRC, KC_RBRC, KC_EQL, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_MINS, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, _______}, @@ -84,11 +88,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, // Fn-layer -[4] = { +[FUNCTION] = { {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_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______} }, }; @@ -99,52 +103,5 @@ 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(2); - } else { - layer_off(2); - } - break; - case 2: - if (record->event.pressed) { - layer_on(3); - } else { - layer_off(3); - } - break; - case 3: - if (record->event.pressed) { - layer_on(4); - } else { - layer_off(4); - } - break; - case 4: // å - if (record->event.pressed) { - register_code(KC_RALT); - register_code(KC_W); - } else { - unregister_code(KC_RALT); - } - break; - case 5: // ä - if (record->event.pressed) { - register_code(KC_RALT); - register_code(KC_Q); - } else { - unregister_code(KC_RALT); - } - break; - case 6: // ö - if (record->event.pressed) { - register_code(KC_RALT); - register_code(KC_P); - } else { - unregister_code(KC_RALT); - } - break; - } return MACRO_NONE; }; -- cgit v1.2.3 From e4f1b238b3242c63bed332f3ca3c4bcfccc9ca14 Mon Sep 17 00:00:00 2001 From: Johannes Larsson Date: Wed, 24 May 2017 21:24:13 +0200 Subject: revert changes to config.h --- keyboards/planck/config.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 1311bb09b6..5cf96bb88c 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -32,8 +32,8 @@ along with this program. If not, see . #define MATRIX_COLS 12 /* Planck PCB default pin-out */ -#define MATRIX_ROW_PINS { F4, F5, F6, F7 } -#define MATRIX_COL_PINS { B1, B3, B2, B6, B5, B4, D2, D7, C6, D4, D0, D1 } +#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 AUDIO_VOICES -- cgit v1.2.3 From 6d08de5c67c8b9bf50ca319922a028b93c6a3f35 Mon Sep 17 00:00:00 2001 From: Johannes Larsson Date: Wed, 24 May 2017 21:35:31 +0200 Subject: readme, media keys fix --- keyboards/planck/keymaps/johannes/keymap.c | 40 +++++++++------------ .../planck/keymaps/johannes/planck-layout.png | Bin 0 -> 19661 bytes keyboards/planck/keymaps/johannes/readme.md | 6 +++- 3 files changed, 21 insertions(+), 25 deletions(-) create mode 100644 keyboards/planck/keymaps/johannes/planck-layout.png (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/johannes/keymap.c b/keyboards/planck/keymaps/johannes/keymap.c index 13bb11798d..a3376518ba 100644 --- a/keyboards/planck/keymaps/johannes/keymap.c +++ b/keyboards/planck/keymaps/johannes/keymap.c @@ -15,24 +15,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - * -[0] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {TG(1), XXXXXXX, XXXXXXX, KC_LGUI, KC_LSHIFT, KC_SPC, M(2), M(1), KC_LALT, KC_RALT, XXXXXXX, M(3)} -},*/ - /* Qwerty * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | @@ -41,14 +23,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Ctrl | Z | X | C | V | B | N | M | , | . | / |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | super|shift | Space|Raise | lower| alt | altgr| |fn | + * | | alt |play/p| super|shift | Space|Raise | lower| alt | altgr| |fn | * `-----------------------------------------------------------------------------------' */ [QWERTY] = { {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_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, {KC_LCTRL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {_______, XXXXXXX, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION)} + {_______, KC_LALT, LT(FUNCTION, KC_MPLY), KC_LGUI, KC_LSHIFT, KC_SPC, MO(RAISE), MO(LOWER), KC_LALT, KC_RALT, XXXXXXX, MO(FUNCTION)} }, /* Lower @@ -59,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | \ | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Reset | | | | | | | | | | | + * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [LOWER] = { @@ -87,12 +69,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -// Fn-layer +/* Fn + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 ' + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | prev | vol.d| vo.up| next | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | mute | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | CAPS | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ [FUNCTION] = { {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_MEDIA_PREV_TRACK, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_MEDIA_NEXT_TRACK, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______} + {_______, _______, _______, _______, _______, _______, _______, KC_AUDIO_MUTE, _______, _______, _______, _______}, + {_______, _______, _______, _______, KC_CAPS, _______, _______, _______, _______, _______, _______, _______} }, }; diff --git a/keyboards/planck/keymaps/johannes/planck-layout.png b/keyboards/planck/keymaps/johannes/planck-layout.png new file mode 100644 index 0000000000..e863b802cd Binary files /dev/null and b/keyboards/planck/keymaps/johannes/planck-layout.png differ diff --git a/keyboards/planck/keymaps/johannes/readme.md b/keyboards/planck/keymaps/johannes/readme.md index 3a4824b5b4..bbb7accf8f 100644 --- a/keyboards/planck/keymaps/johannes/readme.md +++ b/keyboards/planck/keymaps/johannes/readme.md @@ -1,2 +1,6 @@ -# A more basic Planck Layout for copying +# Planck layout for Swedish programmer +I.e. easy access to special keys and åäö. +![layout](planck-layout.png) + +[KBLE link](http://www.keyboard-layout-editor.com/#/gists/dc01cc2225899308a05ba3ef0031548b) -- cgit v1.2.3 From 81e85a1a4e4b1b7c5bbf1fcffe967a60639778c0 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Fri, 26 May 2017 20:35:31 +0200 Subject: - Added integration of IBM Trackpoint --- keyboards/handwired/trackpoint/Makefile | 3 + keyboards/handwired/trackpoint/README.md | 7 ++ keyboards/handwired/trackpoint/config.h | 75 ++++++++++++++++++++++ .../handwired/trackpoint/keymaps/default/keymap.c | 7 ++ keyboards/handwired/trackpoint/rules.mk | 25 ++++++++ keyboards/handwired/trackpoint/trackpoint.c | 5 ++ keyboards/handwired/trackpoint/trackpoint.h | 13 ++++ 7 files changed, 135 insertions(+) create mode 100644 keyboards/handwired/trackpoint/Makefile create mode 100644 keyboards/handwired/trackpoint/README.md create mode 100644 keyboards/handwired/trackpoint/config.h create mode 100644 keyboards/handwired/trackpoint/keymaps/default/keymap.c create mode 100644 keyboards/handwired/trackpoint/rules.mk create mode 100644 keyboards/handwired/trackpoint/trackpoint.c create mode 100644 keyboards/handwired/trackpoint/trackpoint.h (limited to 'keyboards') diff --git a/keyboards/handwired/trackpoint/Makefile b/keyboards/handwired/trackpoint/Makefile new file mode 100644 index 0000000000..191c6bb664 --- /dev/null +++ b/keyboards/handwired/trackpoint/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md new file mode 100644 index 0000000000..764ad984a4 --- /dev/null +++ b/keyboards/handwired/trackpoint/README.md @@ -0,0 +1,7 @@ +# IBM Trackpoint demonstration + +This is just a simple demo to show how to integrate IBM Trackpoint in QMK. + +Some documentation: +* [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint) +* [QMK documentation](https://docs.qmk.fm/) diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h new file mode 100644 index 0000000000..7558c03bf4 --- /dev/null +++ b/keyboards/handwired/trackpoint/config.h @@ -0,0 +1,75 @@ +#ifndef CONFIG_H + #define CONFIG_H + + #include "config_common.h" + + #define VENDOR_ID 0x1234 + #define PRODUCT_ID 0x5678 + #define DEVICE_VER 0x0001 + #define MANUFACTURER QMK + #define PRODUCT TRACKPOINT-DEMO + #define DESCRIPTION Simple demonstration for IBM Trackpoint integration + + #define MATRIX_ROWS 1 + #define MATRIX_COLS 3 + + #ifdef PS2_USE_USART + #define PS2_CLOCK_PORT PORTD + #define PS2_CLOCK_PIN PIND + #define PS2_CLOCK_DDR DDRD + #define PS2_CLOCK_BIT 5 + #define PS2_DATA_PORT PORTD + #define PS2_DATA_PIN PIND + #define PS2_DATA_DDR DDRD + #define PS2_DATA_BIT 2 + + /* synchronous, odd parity, 1-bit stop, 8-bit data, sample at falling edge */ + /* set DDR of CLOCK as input to be slave */ + #define PS2_USART_INIT() do { \ + PS2_CLOCK_DDR &= ~(1<mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + ) + +#endif diff --git a/keyboards/handwired/trackpoint/keymaps/default/keymap.c b/keyboards/handwired/trackpoint/keymaps/default/keymap.c new file mode 100644 index 0000000000..22e46d98a7 --- /dev/null +++ b/keyboards/handwired/trackpoint/keymaps/default/keymap.c @@ -0,0 +1,7 @@ +#include "trackpoint.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = KEYMAP( + KC_BTN1, KC_BTN3, KC_BTN2 \ + ) +}; diff --git a/keyboards/handwired/trackpoint/rules.mk b/keyboards/handwired/trackpoint/rules.mk new file mode 100644 index 0000000000..0609dd3043 --- /dev/null +++ b/keyboards/handwired/trackpoint/rules.mk @@ -0,0 +1,25 @@ +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT +OPT_DEFS += -DBOOTLOADER_SIZE=512 +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 ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +PS2_MOUSE_ENABLE ?= yes +PS2_USE_USART ?= yes + +ifndef QUANTUM_DIR + include ../../Makefile +endif diff --git a/keyboards/handwired/trackpoint/trackpoint.c b/keyboards/handwired/trackpoint/trackpoint.c new file mode 100644 index 0000000000..124995a642 --- /dev/null +++ b/keyboards/handwired/trackpoint/trackpoint.c @@ -0,0 +1,5 @@ +#include "trackpoint.h" + +void matrix_init_kb(void) { + +} diff --git a/keyboards/handwired/trackpoint/trackpoint.h b/keyboards/handwired/trackpoint/trackpoint.h new file mode 100644 index 0000000000..b5d73d7db5 --- /dev/null +++ b/keyboards/handwired/trackpoint/trackpoint.h @@ -0,0 +1,13 @@ +#ifndef TRACKPOINT_H +#define TRACKPOINT_H + +#include "quantum.h" + +#define KEYMAP( \ + k00, k01, k02 \ +) \ +{ \ + { k00, k01, k02} \ +} + +#endif -- cgit v1.2.3 From 6b994ecd82f660feb44bac376ae7d0147d40d818 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Fri, 26 May 2017 21:27:11 +0200 Subject: - Added schematic for Trackpoint demonstration --- keyboards/handwired/trackpoint/README.md | 3 +++ keyboards/handwired/trackpoint/wiring.png | Bin 0 -> 7217 bytes 2 files changed, 3 insertions(+) create mode 100644 keyboards/handwired/trackpoint/wiring.png (limited to 'keyboards') diff --git a/keyboards/handwired/trackpoint/README.md b/keyboards/handwired/trackpoint/README.md index 764ad984a4..a22fca295e 100644 --- a/keyboards/handwired/trackpoint/README.md +++ b/keyboards/handwired/trackpoint/README.md @@ -2,6 +2,9 @@ This is just a simple demo to show how to integrate IBM Trackpoint in QMK. +Wiring used in the demonstration: +![Wiring example](./wiring.png) + Some documentation: * [How to wire IBM Trackpoint](https://github.com/alonswartz/trackpoint) * [QMK documentation](https://docs.qmk.fm/) diff --git a/keyboards/handwired/trackpoint/wiring.png b/keyboards/handwired/trackpoint/wiring.png new file mode 100644 index 0000000000..45806e007b Binary files /dev/null and b/keyboards/handwired/trackpoint/wiring.png differ -- cgit v1.2.3 From 41fa638aa8bc9c10dc885218569ccd396d84abcb Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Sun, 28 May 2017 20:05:37 -0400 Subject: Adds prevent stuck modifiers to EZ default --- keyboards/ergodox/config.h | 2 +- keyboards/ergodox/ez/config.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/config.h b/keyboards/ergodox/config.h index e870835d85..2091999bb3 100644 --- a/keyboards/ergodox/config.h +++ b/keyboards/ergodox/config.h @@ -3,7 +3,7 @@ #define MOUSEKEY_INTERVAL 20 #define MOUSEKEY_DELAY 0 -#define MOUSEKEY_TIME_TO_MAX 40 +#define MOUSEKEY_TIME_TO_MAX 60 #define MOUSEKEY_MAX_SPEED 7 #define MOUSEKEY_WHEEL_DELAY 0 diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h index aa17c3e8d3..cc8aa3d40e 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox/ez/config.h @@ -60,6 +60,8 @@ along with this program. If not, see . /* Set 0 if debouncing isn't needed */ #define DEBOUNCE 15 +#define PREVENT_STUCK_MODIFIERS + #define USB_MAX_POWER_CONSUMPTION 500 /* -- cgit v1.2.3 From 7eebdd4760d92c87128d8c06d0a013b7d3aa1a60 Mon Sep 17 00:00:00 2001 From: Priyadi Iman Nurcahyo Date: Mon, 29 May 2017 23:10:34 +0700 Subject: Jokrik's Clueboard layout (#1340) --- keyboards/clueboard/keymaps/jokrik/keymap.c | 86 ++++++++++++++++++++++++++++ keyboards/clueboard/keymaps/jokrik/readme.md | 11 ++++ 2 files changed, 97 insertions(+) create mode 100644 keyboards/clueboard/keymaps/jokrik/keymap.c create mode 100644 keyboards/clueboard/keymaps/jokrik/readme.md (limited to 'keyboards') diff --git a/keyboards/clueboard/keymaps/jokrik/keymap.c b/keyboards/clueboard/keymaps/jokrik/keymap.c new file mode 100644 index 0000000000..acde4d9e16 --- /dev/null +++ b/keyboards/clueboard/keymaps/jokrik/keymap.c @@ -0,0 +1,86 @@ +#include "clueboard.h" + +// Helpful defines +#define GRAVE_MODS (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)|MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) +#define _______ KC_TRNS + +// 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. +#define _BL 0 +#define _FL 1 +#define _CL 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: Base Layer (Default Layer) + */ +[_BL] = KEYMAP( + KC_ESC, 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_BSLS, KC_GRV, KC_PSCR, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PAUS, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ + KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC,KC_SPC, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + */ +[_FL] = KEYMAP( + KC_GRV, 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_INS, KC_DEL, BL_STEP, \ + _______, _______, _______,_______,_______,_______,_______,_______,KC_PSCR,KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______,_______, _______, _______, MO(_FL), _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer + */ +[_CL] = KEYMAP( + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______,_______,RESET, _______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL),_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, \ + MO(_FL), _______, _______,_______,_______,_______,_______,_______,_______,_______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______,_______, RGB_MOD, RGB_MOD, _______, _______, MO(_FL), _______, RGB_HUD, RGB_SAD, RGB_HUI), +}; + +/* This is a list of user defined functions. F(N) corresponds to item N + of this list. + */ +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_FUNCTION(0), // Calls action_function() +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t mods_pressed; + static bool mod_flag; + + switch (id) { + case 0: + /* Handle the combined Grave/Esc key + */ + mods_pressed = get_mods()&GRAVE_MODS; // Check to see what mods are pressed + + if (record->event.pressed) { + /* The key is being pressed. + */ + if (mods_pressed) { + mod_flag = true; + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + /* The key is being released. + */ + if (mod_flag) { + mod_flag = false; + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +} diff --git a/keyboards/clueboard/keymaps/jokrik/readme.md b/keyboards/clueboard/keymaps/jokrik/readme.md new file mode 100644 index 0000000000..cc5eeba961 --- /dev/null +++ b/keyboards/clueboard/keymaps/jokrik/readme.md @@ -0,0 +1,11 @@ +``` + ___ _____ _ _ _ __ __ _ __ +|__ \ / ____| | | | | | / / / /(_) / / + ||) | | | | |_ _ ___| |__ ___ __ _ _ __ __| | / /_ / /_ / / + |/ / | | | | | | |/ _ \ '_ \ / _ \ / _` | '__/ _` | | '_ \| '_ \ / / + |_| | |____| | |_| | __/ |_) | (_) | (_| | | | (_| | | (_) | (_) / / _ + (_) \_____|_|\__,_|\___|_.__/ \___/ \__,_|_| \__,_| \___/ \___/_/ (_) +``` + +# Jokrik's Clueboard Layout + -- cgit v1.2.3