aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--keyboards/gonnerd/keymaps/default/keymap.c22
-rw-r--r--keyboards/gonnerd/keymaps/mauin/keymap.c50
-rw-r--r--keyboards/gonnerd/readme.md4
3 files changed, 60 insertions, 16 deletions
diff --git a/keyboards/gonnerd/keymaps/default/keymap.c b/keyboards/gonnerd/keymaps/default/keymap.c
index a37005939..d74f949dc 100644
--- a/keyboards/gonnerd/keymaps/default/keymap.c
+++ b/keyboards/gonnerd/keymaps/default/keymap.c
@@ -1,14 +1,24 @@
1#include "gonnerd.h" 1#include "gonnerd.h"
2 2
3// Keymap layers 3#define __x__ KC_NO
4 4
5// Keymap layers
5const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 6const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
6 [0] = KEYMAP_60( /* Base */ 7 [0] = KEYMAP_60( /* Base */
7 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_BSPC,\ 8 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_BSPC, \
8 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_BSLS,\ 9 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_BSLS, \
9 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_NO, KC_ENT, \ 10 KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
10 KC_LSFT,KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT,KC_NO, \ 11 KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
11 KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,MO(1), KC_RCTL), 12 KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL \
13 ),
14
15 [1] = KEYMAP_60( /* System layer to have access to RESET button */
16 RESET, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
17 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
18 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
19 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
20 __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
21 ),
12}; 22};
13 23
14const uint16_t PROGMEM fn_actions[] = { 24const uint16_t PROGMEM fn_actions[] = {
diff --git a/keyboards/gonnerd/keymaps/mauin/keymap.c b/keyboards/gonnerd/keymaps/mauin/keymap.c
index 1a1d515a9..5979a7ca4 100644
--- a/keyboards/gonnerd/keymaps/mauin/keymap.c
+++ b/keyboards/gonnerd/keymaps/mauin/keymap.c
@@ -23,11 +23,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
23 * `-----------------------------------------------------------' 23 * `-----------------------------------------------------------'
24 */ 24 */
25 [BASE_LAYER] = KEYMAP_60( 25 [BASE_LAYER] = KEYMAP_60(
26 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_BSPC, \ 26 F(0), 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_BSPC, \
27 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_BSLS, \ 27 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_BSLS, \
28 MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \ 28 MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, __x__, KC_ENT, \
29 KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \ 29 KC_LSFT, __x__, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, __x__, \
30 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(3), KC_RCTL \ 30 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, MO(2), KC_RCTL \
31 ), 31 ),
32 32
33 /* Layer 1: Function Layer 33 /* Layer 1: Function Layer
@@ -45,10 +45,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
45 */ 45 */
46 [FUNCTION_LAYER] = KEYMAP_60( 46 [FUNCTION_LAYER] = KEYMAP_60(
47 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_DEL, \ 47 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_DEL, \
48 __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \ 48 __x__, KC_MPRV, KC_MPLY, KC_MNXT, __x__, __x__, KC_PGUP, KC_HOME, KC_UP, KC_END, __x__, KC_SLCK, KC_PAUS, __x__, \
49 KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \ 49 KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, __x__, __x__, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, __x__, __x__, __x__, __x__, \
50 KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ 50 KC_LSFT, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
51 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \ 51 KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, __x__, __x__, __x__, __x__ \
52 ), 52 ),
53 53
54 /* Layer 2: System Layer 54 /* Layer 2: System Layer
@@ -69,10 +69,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
69 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ 69 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
70 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ 70 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
71 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \ 71 __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, __x__, \
72 __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \ 72 __x__, __x__, __x__, __x__, __x__, __x__, KC_TRNS, __x__ \
73 ), 73 ),
74}; 74};
75 75
76const uint16_t PROGMEM fn_actions[] = { 76enum function_id {
77 ESC_GRV, // Makes Esc behave like `~ when pressed with the left GUI modifier. This is the "switch between windows of the same application" key combination in macOS
78};
77 79
80const uint16_t PROGMEM fn_actions[] = {
81 [0] = ACTION_FUNCTION(ESC_GRV),
78}; 82};
83
84void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
85 static uint8_t esc_grv_mask;
86 switch (id) {
87 case ESC_GRV:
88 esc_grv_mask = get_mods() & MOD_BIT(KC_LGUI);
89 if (record->event.pressed) {
90 if (esc_grv_mask) {
91 add_key(KC_GRV);
92 send_keyboard_report();
93 } else {
94 add_key(KC_ESC);
95 send_keyboard_report();
96 }
97 } else {
98 if (esc_grv_mask) {
99 del_key(KC_GRV);
100 send_keyboard_report();
101 } else {
102 del_key(KC_ESC);
103 send_keyboard_report();
104 }
105 }
106 break;
107 }
108}
diff --git a/keyboards/gonnerd/readme.md b/keyboards/gonnerd/readme.md
index 1224ff6b0..807df308a 100644
--- a/keyboards/gonnerd/readme.md
+++ b/keyboards/gonnerd/readme.md
@@ -11,6 +11,10 @@ It is possible to change the bootloader of the GON NerD with an ISP programmer.
11_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will 11_After changing the bootloader on your GON NerD PCB you will not be able to go back to the original firmware and the official configuration software will
12not work anymore. You will lose your warranty and official support from GON!_ 12not work anymore. You will lose your warranty and official support from GON!_
13 13
14## Reset button
15
16To run the `make dfu` command to flash keymaps onto the board, you need to put the board into DFU mode. As the GON NerD PCBs do not have a reset button on the board to put it into DFU mode, be sure to include a `RESET` button on your keymap. Otherwise you'll have to unscrew your keyboard from the case and short the GND and RST pins.
17
14## Building 18## Building
15 19
16Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. 20Download or clone the whole firmware and navigate to the keyboards/gonnerd folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file.