From bf1987e23311b6ea19899e4d12eec26b02539379 Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Wed, 22 Apr 2015 00:45:03 -0400 Subject: [PATCH 01/10] updated makefile --- keyboard/planck/Makefile | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 3716f0db92..68a4181f9a 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -48,18 +48,22 @@ TOP_DIR = ../.. TARGET_DIR = . # # project specific files -# SRC = keymap_common.c \ -# matrix_handwire.c \ -# led.c \ -# backlight.c +ifdef COMMON +SRC = keymap_common.c \ + matrix_handwire.c \ + led.c \ + backlight.c -# ifdef KEYMAP -# SRC := keymap_$(KEYMAP).c $(SRC) -# else -# SRC := keymap_jack.c $(SRC) -# endif +ifdef KEYMAP + SRC := keymap_$(KEYMAP).c $(SRC) +else + SRC := keymap_jack.c $(SRC) +endif + +else # project specific files + SRC = extended_keymap_common.c \ matrix_handwire.c \ led.c \ @@ -71,6 +75,8 @@ else SRC := extended_keymap_jack.c $(SRC) endif +endif + CONFIG_H = config.h # MCU name From 480b313b1ede34adb2e339ee8885e44b1c8a699f Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Wed, 22 Apr 2015 21:39:43 -0400 Subject: [PATCH 02/10] Added keymap w/ game mode --- keyboard/planck/keymap_reed.c | 60 +++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 keyboard/planck/keymap_reed.c diff --git a/keyboard/planck/keymap_reed.c b/keyboard/planck/keymap_reed.c new file mode 100644 index 0000000000..601da44b0d --- /dev/null +++ b/keyboard/planck/keymap_reed.c @@ -0,0 +1,60 @@ +#include "keymap_common.h" + +/* + * This layout works off of Jack's layout, making some changes that I + * feel significantly improve the function of the keyboard. + * + */ +const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP_GRID( /* Reed */ + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, + TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, + LCTL, CAPS, LALT, LGUI, FN2, FN7, SPC, FN1, LEFT, DOWN, UP, RGHT), + +[1] = KEYMAP_GRID( /* Reed EXTREME GAMING */ + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC, + TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN5, + LCTL, 1, 2, 3, 4, SPC, FN2, FN1, LEFT, DOWN, UP, RGHT), + +[2] = KEYMAP_GRID( /* Reed RAISE */ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, + TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, + TRNS, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, TRNS, + TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, MNXT, VOLD, VOLU, MPLY), + +[3] = KEYMAP_GRID( /* Reed LOWER */ + TRNS , FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, + TRNS, TRNS, TRNS, PAUSE, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, + TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, + TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), +}; +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay RAISE + [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay LOWER + + [3] = ACTION_DEFAULT_LAYER_SET(0), + [4] = ACTION_DEFAULT_LAYER_SET(1), + [5] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ENT), + [7] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPC), + + [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), + [11] = ACTION_MODS_KEY(MOD_LSFT, KC_2), + [12] = ACTION_MODS_KEY(MOD_LSFT, KC_3), + [13] = ACTION_MODS_KEY(MOD_LSFT, KC_4), + [14] = ACTION_MODS_KEY(MOD_LSFT, KC_5), + [15] = ACTION_MODS_KEY(MOD_LSFT, KC_6), + [16] = ACTION_MODS_KEY(MOD_LSFT, KC_7), + [17] = ACTION_MODS_KEY(MOD_LSFT, KC_8), + [18] = ACTION_MODS_KEY(MOD_LSFT, KC_9), + [19] = ACTION_MODS_KEY(MOD_LSFT, KC_0), + [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), + [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), + [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), + [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), + [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), + [28] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), + + [29] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), +}; From 0541af4ff9a7f510f3d0f1ef55df86f995023748 Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Thu, 23 Apr 2015 04:31:39 -0400 Subject: [PATCH 03/10] Updated makefile to properly handle non extended keymaps --- keyboard/planck/Makefile | 11 ++++++----- keyboard/planck/keymap_reed.c | 20 ++++++++++++++------ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile index 68a4181f9a..ef11e3d32b 100644 --- a/keyboard/planck/Makefile +++ b/keyboard/planck/Makefile @@ -47,9 +47,12 @@ TOP_DIR = ../.. # Directory keyboard dependent files exist TARGET_DIR = . + + # # project specific files -ifdef COMMON -SRC = keymap_common.c \ +ifdef COMMON_KEYMAP + + SRC = keymap_common.c \ matrix_handwire.c \ led.c \ backlight.c @@ -62,9 +65,7 @@ endif else -# project specific files - -SRC = extended_keymap_common.c \ +SRC = extended_keymap_common.c \ matrix_handwire.c \ led.c \ backlight.c diff --git a/keyboard/planck/keymap_reed.c b/keyboard/planck/keymap_reed.c index 601da44b0d..097bf395d8 100644 --- a/keyboard/planck/keymap_reed.c +++ b/keyboard/planck/keymap_reed.c @@ -1,8 +1,15 @@ #include "keymap_common.h" /* + * make KEYMAP=reed COMMON_KEYMAP=true + * + * * This layout works off of Jack's layout, making some changes that I - * feel significantly improve the function of the keyboard. + * feel significantly improve the function of the keyboard. Major changes + * include adding a "gaming mode" that will allow users to still access + * the number keys 1 through 4 easily for games that require it. Also + * included is the ability to use the tap/hold function for easy use of + * right shift and thumb shift with their tapped companions. * */ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -21,22 +28,23 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [2] = KEYMAP_GRID( /* Reed RAISE */ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, - TRNS, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, TRNS, + TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, MNXT, VOLD, VOLU, MPLY), [3] = KEYMAP_GRID( /* Reed LOWER */ TRNS , FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, TRNS, TRNS, TRNS, PAUSE, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, - TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, + TRNS, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, TRNS, TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay RAISE - [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay LOWER + [1] = ACTION_LAYER_MOMENTARY(2), // to Fn overlay - RAISE + [2] = ACTION_LAYER_MOMENTARY(3), // to Fn overlay - LOWER [3] = ACTION_DEFAULT_LAYER_SET(0), [4] = ACTION_DEFAULT_LAYER_SET(1), - [5] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ENT), + // Actions for the tap/hold modifiers listed above + [5] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), [7] = ACTION_MODS_TAP_KEY(MOD_LSFT, KC_BSPC), [10] = ACTION_MODS_KEY(MOD_LSFT, KC_1), From b060714efd5cb809f14264253ea4987732f1def5 Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Fri, 24 Apr 2015 00:40:04 -0400 Subject: [PATCH 04/10] Changed del key and added docs --- keyboard/planck/keymap_reed.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/keyboard/planck/keymap_reed.c b/keyboard/planck/keymap_reed.c index 097bf395d8..f19957ac5c 100644 --- a/keyboard/planck/keymap_reed.c +++ b/keyboard/planck/keymap_reed.c @@ -1,8 +1,14 @@ #include "keymap_common.h" /* - * make KEYMAP=reed COMMON_KEYMAP=true + * BUILD: + * Simply run the command below in the keyboard/planck directory + * to build against this keymap * + * make KEYMAP=reed COMMON_KEYMAP=true + * + * + * DETAILS: * * This layout works off of Jack's layout, making some changes that I * feel significantly improve the function of the keyboard. Major changes @@ -26,13 +32,13 @@ const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LCTL, 1, 2, 3, 4, SPC, FN2, FN1, LEFT, DOWN, UP, RGHT), [2] = KEYMAP_GRID( /* Reed RAISE */ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC, TRNS, FN3, FN4, PAUSE, TRNS, TRNS, TRNS, MINS, EQL, LBRC, RBRC, BSLS, TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN1, MNXT, VOLD, VOLU, MPLY), [3] = KEYMAP_GRID( /* Reed LOWER */ - TRNS , FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, BSPC, + TRNS , FN10, FN11, FN12, FN13, FN14, FN15, FN16, FN17, FN18, FN19, DEL, TRNS, TRNS, TRNS, PAUSE, TRNS, TRNS, TRNS, FN20, FN21, FN23, FN24, FN28, TRNS, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, TRNS, TRNS, TRNS, TRNS, TRNS, FN2, TRNS, TRNS, TRNS, MNXT, VOLD, VOLU, MPLY), From e3ebae521e0113edf09f7f3825435d03525b6920 Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Fri, 24 Apr 2015 18:28:03 -0400 Subject: [PATCH 05/10] Updated readme with new build info --- keyboard/planck/README.md | 31 ++++++++++++++++++++++++++----- 1 file changed, 26 insertions(+), 5 deletions(-) diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md index 1b76c559a7..d59956d925 100644 --- a/keyboard/planck/README.md +++ b/keyboard/planck/README.md @@ -18,13 +18,31 @@ If you include extended_keymap_common.h instead of keymap_common.h at the top of ## Build -Follow [this guide](http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html) to setup your development environment before anything else. +Follow [this guide](http://deskthority.net/workshop-f7/how-to-build-your-very-own-keyboard-firmware-t7177.html) to setup your development environment before anything else. Abbreviated instructions are provide at the [bottom of this document](https://github.com/rswiernik/tmk_keyboard/tree/rswiernik_dev/keyboard/planck#environment-setup) -Download the whole firmware [here](https://github.com/jackhumbert/tmk_keyboard/archive/master.zip) and navigate to the keyboard/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex that you can load with the Teensy app onto your Planck (once you've hit reset/shorted GND & RST). +Download the whole firmware [here](https://github.com/jackhumbert/tmk_keyboard/archive/master.zip) and navigate to the keyboard/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex that you can load with the Teensy app onto your Planck (once you've hit reset/shorted GND & RST). -Move to this directory then just run `make` like: +Depending on which keymap you would like to use, you will have to compile slightly differently. - $ make +**Extended Keymaps (default)** +Extended keymaps need to be specified as follows: +``` +$ make KEYMAP=[common|jack|] +``` +Applicable keymaps should follow the format **__extended\_keymap\_name.c__** + +**Common Keymaps** +Common keymaps need to be specified as follows: +``` +$ make KEYMAP=[common|jack|] COMMON=true +``` +Applicable keymaps should follow the format **__keymap\_name.c__** + + +To build the default keymap, simply move to the tmk\_keyboard/keyboard/planck/ and run `make` as follows: +``` +$ make +``` ## Keymap Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. @@ -37,4 +55,7 @@ To build firmware binary hex file with a certain keymap just do `make` with `KEY - [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) - [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c) - [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck) -- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) \ No newline at end of file +- [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) + +## Environment Setup + From c85f68d9cd2963e0a00dfe05fea75b824d5f4fcc Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Fri, 24 Apr 2015 18:29:50 -0400 Subject: [PATCH 06/10] Update README.md Changed formatting mistake --- keyboard/planck/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md index d59956d925..b106fd8c4d 100644 --- a/keyboard/planck/README.md +++ b/keyboard/planck/README.md @@ -25,6 +25,7 @@ Download the whole firmware [here](https://github.com/jackhumbert/tmk_keyboard/a Depending on which keymap you would like to use, you will have to compile slightly differently. **Extended Keymaps (default)** + Extended keymaps need to be specified as follows: ``` $ make KEYMAP=[common|jack|] @@ -32,6 +33,7 @@ $ make KEYMAP=[common|jack|] Applicable keymaps should follow the format **__extended\_keymap\_name.c__** **Common Keymaps** + Common keymaps need to be specified as follows: ``` $ make KEYMAP=[common|jack|] COMMON=true From 835207193a8d5c366d783c8953d4aeaee5ee094a Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Fri, 24 Apr 2015 18:35:57 -0400 Subject: [PATCH 07/10] Update README.md Updated formatting again... --- keyboard/planck/README.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md index b106fd8c4d..84d5000bb4 100644 --- a/keyboard/planck/README.md +++ b/keyboard/planck/README.md @@ -24,7 +24,13 @@ Download the whole firmware [here](https://github.com/jackhumbert/tmk_keyboard/a Depending on which keymap you would like to use, you will have to compile slightly differently. -**Extended Keymaps (default)** +####Default +To build the default keymap, simply move to the tmk\_keyboard/keyboard/planck/ and run `make` as follows: +``` +$ make +``` + +####**Extended Keymaps** Extended keymaps need to be specified as follows: ``` @@ -32,7 +38,7 @@ $ make KEYMAP=[common|jack|] ``` Applicable keymaps should follow the format **__extended\_keymap\_name.c__** -**Common Keymaps** +####**Common Keymaps** Common keymaps need to be specified as follows: ``` @@ -40,12 +46,6 @@ $ make KEYMAP=[common|jack|] COMMON=true ``` Applicable keymaps should follow the format **__keymap\_name.c__** - -To build the default keymap, simply move to the tmk\_keyboard/keyboard/planck/ and run `make` as follows: -``` -$ make -``` - ## Keymap Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. From d0391d9ed7d74e0a6cbf82db1700e7eaa456d386 Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Fri, 24 Apr 2015 18:36:57 -0400 Subject: [PATCH 08/10] Update README.md This stupid readme... --- keyboard/planck/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md index 84d5000bb4..0e573652e4 100644 --- a/keyboard/planck/README.md +++ b/keyboard/planck/README.md @@ -36,7 +36,7 @@ Extended keymaps need to be specified as follows: ``` $ make KEYMAP=[common|jack|] ``` -Applicable keymaps should follow the format **__extended\_keymap\_name.c__** +Applicable keymaps should follow the format **__extended\_keymap\_.c__** ####**Common Keymaps** @@ -44,7 +44,7 @@ Common keymaps need to be specified as follows: ``` $ make KEYMAP=[common|jack|] COMMON=true ``` -Applicable keymaps should follow the format **__keymap\_name.c__** +Applicable keymaps should follow the format **__keymap\_.c__** ## Keymap Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. From 79f70b20d993f92c676112986b1d137109b35ce7 Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Fri, 24 Apr 2015 18:49:49 -0400 Subject: [PATCH 09/10] Update README.md Switched around more readme stuff --- keyboard/planck/README.md | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md index 0e573652e4..8931b5fccf 100644 --- a/keyboard/planck/README.md +++ b/keyboard/planck/README.md @@ -25,33 +25,29 @@ Download the whole firmware [here](https://github.com/jackhumbert/tmk_keyboard/a Depending on which keymap you would like to use, you will have to compile slightly differently. ####Default -To build the default keymap, simply move to the tmk\_keyboard/keyboard/planck/ and run `make` as follows: +To build with the default keymap, simply move to the tmk\_keyboard/keyboard/planck/ and run `make` as follows: ``` $ make ``` +## Keymap +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. + ####**Extended Keymaps** -Extended keymaps need to be specified as follows: +To build the firmware binary hex file with an extended keymap just do `make` with `KEYMAP` option like: ``` $ make KEYMAP=[common|jack|] ``` -Applicable keymaps should follow the format **__extended\_keymap\_.c__** +_The only applicable keymaps will work with this option._ Extended keymaps follow the format **__extended\_keymap\_\.c__** ####**Common Keymaps** -Common keymaps need to be specified as follows: +Building with a common keymap is as simple as adding the COMMON option. Note that only ``` $ make KEYMAP=[common|jack|] COMMON=true ``` -Applicable keymaps should follow the format **__keymap\_.c__** - -## Keymap -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `keymap_.c` and see keymap document (you can find in top README.md) and existent keymap files. - -To build firmware binary hex file with a certain keymap just do `make` with `KEYMAP` option like: - - $ make KEYMAP=[] +_The only applicable keymaps will work with this option._ Common keymaps follow the format **__keymap\_\.c__** ## Notable TMK forks (which some of the keymap files are from) - [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck) From eadb08b113e26468a7915d1ea60a3f166527c3b0 Mon Sep 17 00:00:00 2001 From: Reed Swiernik Date: Fri, 24 Apr 2015 18:54:03 -0400 Subject: [PATCH 10/10] Update README.md --- keyboard/planck/README.md | 3 --- 1 file changed, 3 deletions(-) diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md index 8931b5fccf..ee824d26e0 100644 --- a/keyboard/planck/README.md +++ b/keyboard/planck/README.md @@ -54,6 +54,3 @@ _The only applicable keymaps will work with this option._ Common keymaps follow - [Pierre's Fork](https://github.com/pcarrier/tmk_keyboard/blob/pcarrier/planck/keyboard/gh60/keymap_planck.c) - [Nathan's Fork](https://github.com/nathanrosspowell/tmk_keyboard/tree/planck-jack/keyboard/planck) - [Matthew's Fork](https://github.com/pepers/tmk_keyboard/tree/master/keyboard/planck_grid) - -## Environment Setup -