summaryrefslogtreecommitdiff
path: root/keyboard/planck
diff options
context:
space:
mode:
Diffstat (limited to 'keyboard/planck')
-rwxr-xr-xkeyboard/planck/CYGWIN_GUIDE.md14
-rw-r--r--keyboard/planck/Makefile2
-rw-r--r--keyboard/planck/README.md4
-rw-r--r--keyboard/planck/keymaps/default/keymap.c70
-rw-r--r--keyboard/planck/keymaps/lock/keymap.c2
-rw-r--r--keyboard/planck/old_keymap_files/common_keymaps/keymap_mitch.c49
-rw-r--r--keyboard/planck/planck.c46
-rw-r--r--keyboard/planck/planck.h5
8 files changed, 151 insertions, 41 deletions
diff --git a/keyboard/planck/CYGWIN_GUIDE.md b/keyboard/planck/CYGWIN_GUIDE.md
index 0b08a6aa1e..ac13e745d7 100755
--- a/keyboard/planck/CYGWIN_GUIDE.md
+++ b/keyboard/planck/CYGWIN_GUIDE.md
@@ -17,6 +17,9 @@ Download the `cygwin` setup ([x86_64](https://cygwin.com/setup-x86_64.exe)) and
- devel/make
- devel/texinfo
- devel/gettext-devel
+- devel/automake
+- devel/autoconfig
+- devel/libtool
- text/gettext
- libs/libgcc1
- interpreters/m4
@@ -60,7 +63,7 @@ These commands will set up the install directory and the `PATH` variable, which
$ PREFIX=$HOME/local/avr
$ export PREFIX
$ PATH=/usr/local/bin:/usr/local/lib:/usr/local/include:/bin:/lib:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS
-$ PATH=$PATH:$PREFIX/bin
+$ PATH=$PATH:$PREFIX/bin:$PREFIX/lib
$ export PATH
```
@@ -155,13 +158,13 @@ $ make install
We can either build our own, or use the precomplied binaries. The precompiled binaries don't play well with `cygwin` so it is better to build them ourselves. The procedure for the precompiled binaries is included at the end of this guide.
### Build and Install the `libusb`
-The `dfu-programmer` requires `libusb` so that it can interact with the USB system.
+The `dfu-programmer` requires `libusb` so that it can interact with the USB system. These repos must be bootstrapped in order to create an appropriate `./configure` and `Makefile` for your system.
```
$ cd ~/src
$ git clone https://github.com/libusb/libusb.git
$ cd libusb
$ ./bootstrap.sh
-$ ./configure --prefix=$PREFIX
+$ ./configure
$ make
$ make install
```
@@ -172,7 +175,7 @@ $ cd ~/src
$ git clone https://github.com/dfu-programmer/dfu-programmer.git
$ cd dfu-programmer
$ ./bootstrap.sh
-$ ./configure --prefix=$PREFIX
+$ ./configure
$ make
$ make install
```
@@ -180,7 +183,7 @@ $ make install
Verify the installation with:
```
$ which dfu-programmer
-/home/Kevin/local/avr/bin/dfu-programmer
+/usr/local/bin/dfu-programmer
$ dfu-programmer
dfu-programmer 0.7.2
@@ -315,7 +318,6 @@ These tools are for debugging your firmware, etc. before flashing. Theoretically
$ cd ~/src
$ git clone git://sourceware.org/git/binutils-gdb.git
$ cd binutils-gdb
-$ ./bootstrap
$ mkdir obj-avr
$ cd obj-avr
$ ../configure --prefix=$PREFIX --target=avr --build=x86_64-unknown-cygwin --with-gmp=/usr/local --with-mpfr=/usr/local --with-mpc=/usr/local --disable-nls --enable-static
diff --git a/keyboard/planck/Makefile b/keyboard/planck/Makefile
index 307b0c7f4f..03d2601761 100644
--- a/keyboard/planck/Makefile
+++ b/keyboard/planck/Makefile
@@ -143,7 +143,7 @@ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
# AUDIO_ENABLE = YES # Audio output on port C6
# UNICODE_ENABLE = YES # Unicode
# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID
-# RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with MIDI at the same time.
+# RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
ifdef BACKLIGHT_ENABLE
SRC += backlight.c
diff --git a/keyboard/planck/README.md b/keyboard/planck/README.md
index 3ba0cc1527..d9a1e3beee 100644
--- a/keyboard/planck/README.md
+++ b/keyboard/planck/README.md
@@ -16,13 +16,13 @@ Depending on which keymap you would like to use, you will have to compile slight
To build with the default keymap, simply run `make`.
### Other Keymaps
-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 `<name>.c` and see keymap document (you can find in top README.md) and existent keymap files.
+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 `<name>.c` in the keymaps folder, and see keymap document (you can find in top README.md) and existent keymap files.
To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like:
```
$ make KEYMAP=[default|jack|<name>]
```
-Keymaps follow the format **__<name\>.c__** and are stored in the `keymaps` folder.
+Keymaps follow the format **__\<name\>.c__** and are stored in the `keymaps` folder.
### Notable forks (which some of the keymap files are from)
- [Shane's Fork](https://github.com/shanecelis/tmk_keyboard/tree/master/keyboard/planck)
diff --git a/keyboard/planck/keymaps/default/keymap.c b/keyboard/planck/keymaps/default/keymap.c
index a9c2a06813..d995eb9e58 100644
--- a/keyboard/planck/keymaps/default/keymap.c
+++ b/keyboard/planck/keymaps/default/keymap.c
@@ -17,31 +17,91 @@
#define _RS 4
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-[_QW] = { /* Qwerty */
+
+/* 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 |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Raise | Space |Lower | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_QW] = {
{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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
-[_CM] = { /* Colemak */
+
+/* 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 |Raise | Space |Lower | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_CM] = {
{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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT },
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
-[_DV] = { /* Dvorak */
+
+/* Dvorak
+ * ,-----------------------------------------------------------------------------------.
+ * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Esc | A | O | E | U | I | D | H | T | N | S | / |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Raise | Space |Lower | Left | Down | Up |Right |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_DV] = {
{KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC},
{KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH},
{KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT },
{M(0), KC_LCTL, KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
},
-[_RS] = { /* RAISE */
+
+/* Raise
+ * ,-----------------------------------------------------------------------------------.
+ * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |Qwerty|Colemk|Dvorak| Reset|Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Raise | Space |Lower | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_RS] = {
{KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC},
{KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS},
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
{KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
-[_LW] = { /* LOWER */
+
+/* Lower
+ * ,-----------------------------------------------------------------------------------.
+ * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
+ * |------+------+------+------+------+-------------+------+------+------+------+------|
+ * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
+ * |------+------+------+------+------+------|------+------+------+------+------+------|
+ * | Shift| F7 | F8 | F9 | F10 | F11 | F12 |Qwerty|Colemk|Dvorak| Reset|Enter |
+ * |------+------+------+------+------+------+------+------+------+------+------+------|
+ * | Brite| Ctrl | Alt | GUI |Raise | Space |Lower | Next | Vol- | Vol+ | Play |
+ * `-----------------------------------------------------------------------------------'
+ */
+[_LW] = {
{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_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE},
{KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QW), DF(_CM), DF(_DV), RESET, KC_TRNS},
diff --git a/keyboard/planck/keymaps/lock/keymap.c b/keyboard/planck/keymaps/lock/keymap.c
index 9585764629..f1629492ef 100644
--- a/keyboard/planck/keymaps/lock/keymap.c
+++ b/keyboard/planck/keymaps/lock/keymap.c
@@ -150,7 +150,7 @@ float start_up[][2] = {
{440.0*pow(2.0,(64)/12.0), 1000},
};
-void * matrix_init_user(void) {
+void matrix_init_user(void) {
init_notes();
play_notes(&start_up, 9, false);
} \ No newline at end of file
diff --git a/keyboard/planck/old_keymap_files/common_keymaps/keymap_mitch.c b/keyboard/planck/old_keymap_files/common_keymaps/keymap_mitch.c
new file mode 100644
index 0000000000..f7df7bbbaa
--- /dev/null
+++ b/keyboard/planck/old_keymap_files/common_keymaps/keymap_mitch.c
@@ -0,0 +1,49 @@
+#include "keymap_common.h"
+
+const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+[0] = KEYMAP(
+ TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC,
+ LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT,
+ LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN3,
+ ESC, DEL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT),
+[1] = KEYMAP(
+ GRV, GRV, FN22, FN19, FN10, TRNS, TRNS, 7, 8, 9, 0, BSPC,
+ TRNS, LBRC, RBRC, FN23, FN24, TRNS, TRNS, 4, 5, 6, TRNS, BSLS,
+ TRNS, MINS, FN20, EQL, FN21, TRNS, TRNS, 1, 2, 3, TRNS, ENT,
+ TRNS, TRNS, TRNS, TRNS, TRNS, SPC, FN1, TRNS, PGDN, PGUP, TRNS),
+[2] = KEYMAP(
+ FN26, FN10, FN11, FN12, FN13, FN14, FN15, FN17, FN18, FN19, FN10, DEL,
+ TRNS, TRNS, MUTE, VOLD, VOLU, TRNS, BSPC, FN14, FN15, FN16, TRNS, FN25,
+ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN11, FN12, FN13, TRNS, ENT,
+ TRNS, TRNS, TRNS, TRNS, FN2, ENT, TRNS, TRNS, PGDN, PGUP, TRNS),
+};
+
+const uint16_t PROGMEM fn_actions[] = {
+ [1] = ACTION_LAYER_MOMENTARY(1), // Switch layer raise
+ [2] = ACTION_LAYER_MOMENTARY(2), // Switch layer lower
+
+ [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Right shift serves as Enter on tap
+
+ // Numeric shift modifiers
+ [10] = ACTION_MODS_KEY(MOD_LSFT, KC_0),
+ [11] = ACTION_MODS_KEY(MOD_LSFT, KC_1),
+ [12] = ACTION_MODS_KEY(MOD_LSFT, KC_2),
+ [13] = ACTION_MODS_KEY(MOD_LSFT, KC_3),
+ [14] = ACTION_MODS_KEY(MOD_LSFT, KC_4),
+ [15] = ACTION_MODS_KEY(MOD_LSFT, KC_5),
+ [16] = ACTION_MODS_KEY(MOD_LSFT, KC_6),
+ [17] = ACTION_MODS_KEY(MOD_LSFT, KC_7),
+ [18] = ACTION_MODS_KEY(MOD_LSFT, KC_8),
+ [19] = ACTION_MODS_KEY(MOD_LSFT, KC_9),
+
+ // Other shift modifiers
+ [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), // }
+ [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // |
+
+ // Switch windows in app
+ [26] = ACTION_MODS_KEY(MOD_LGUI, KC_GRV),
+};
diff --git a/keyboard/planck/planck.c b/keyboard/planck/planck.c
index 63ca54761c..4b39cf1e8b 100644
--- a/keyboard/planck/planck.c
+++ b/keyboard/planck/planck.c
@@ -1,36 +1,34 @@
#include "planck.h"
__attribute__ ((weak))
-void * matrix_init_user(void) {
-
-};
+void matrix_init_user(void) {}
__attribute__ ((weak))
-void * matrix_scan_user(void) {
+void matrix_scan_user(void) {}
-};
+__attribute__ ((weak))
+void process_action_user(keyrecord_t *record) {}
-void * matrix_init_kb(void) {
- #ifdef BACKLIGHT_ENABLE
- backlight_init_ports();
- #endif
+void matrix_init_kb(void) {
+#ifdef BACKLIGHT_ENABLE
+ backlight_init_ports();
+#endif
- #ifdef RGBLIGHT_ENABLE
- rgblight_init();
- #endif
+#ifdef RGBLIGHT_ENABLE
+ rgblight_init();
+#endif
+ // Turn status LED on
+ DDRE |= (1<<6);
+ PORTE |= (1<<6);
- // Turn status LED on
- DDRE |= (1<<6);
- PORTE |= (1<<6);
+ matrix_init_user();
+}
- if (matrix_init_user) {
- (*matrix_init_user)();
- }
-};
+void matrix_scan_kb(void) {
+ matrix_scan_user();
+}
-void * matrix_scan_kb(void) {
- if (matrix_scan_user) {
- (*matrix_scan_user)();
- }
-};
+void process_action_kb(keyrecord_t *record) {
+ process_action_user(record);
+}
diff --git a/keyboard/planck/planck.h b/keyboard/planck/planck.h
index 00b01b54df..edcb5fbff6 100644
--- a/keyboard/planck/planck.h
+++ b/keyboard/planck/planck.h
@@ -40,7 +40,8 @@
{ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \
}
-void * matrix_init_user(void);
-void * matrix_scan_user(void);
+void matrix_init_user(void);
+void matrix_scan_user(void);
+void process_action_user(keyrecord_t *record);
#endif