aboutsummaryrefslogtreecommitdiff
path: root/keyboards/gergo
diff options
context:
space:
mode:
authorJeremy Bernhardt <bernhardtjeremy@gmail.com>2019-04-29 18:29:00 -0600
committerDrashna Jaelre <drashna@live.com>2019-04-29 17:29:00 -0700
commit507805cd106ca5b5c739e08d37e9c689973b3b30 (patch)
tree981d1670e4a75ef444a8139eeb941a1590735502 /keyboards/gergo
parente77e46f4bf049c33bcb982325bf5e5bf27994550 (diff)
downloadqmk_firmware-507805cd106ca5b5c739e08d37e9c689973b3b30.tar.gz
qmk_firmware-507805cd106ca5b5c739e08d37e9c689973b3b30.zip
[Keyboard] Fixing drag-and-drop (#5728)
* Fixing drag-and-drop * Forgot to rtfm and do a full build. Added colemak * What
Diffstat (limited to 'keyboards/gergo')
-rw-r--r--keyboards/gergo/keymaps/colemak/keymap.c174
-rw-r--r--keyboards/gergo/keymaps/colemak/readme.md16
-rw-r--r--keyboards/gergo/keymaps/colemak/rules.mk36
-rw-r--r--keyboards/gergo/keymaps/default/rules.mk3
-rw-r--r--keyboards/gergo/keymaps/germ/rules.mk1
-rw-r--r--keyboards/gergo/matrix.c2
-rw-r--r--keyboards/gergo/rules.mk1
7 files changed, 230 insertions, 3 deletions
diff --git a/keyboards/gergo/keymaps/colemak/keymap.c b/keyboards/gergo/keymaps/colemak/keymap.c
new file mode 100644
index 000000000..b2e79114f
--- /dev/null
+++ b/keyboards/gergo/keymaps/colemak/keymap.c
@@ -0,0 +1,174 @@
1/* Good on you for modifying your layout! if you don't have
2 * time to read the QMK docs, a list of keycodes can be found at
3 *
4 * https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
5 *
6 * There's also a template for adding new layers at the bottom of this file!
7 */
8
9#include QMK_KEYBOARD_H
10
11#define IGNORE_MOD_TAP_INTERRUPT
12#define BASE 0 // default layer
13#define SYMB 1 // symbols
14#define NUMB 2 // numbers/motion
15
16enum custom_keycodes {
17 M1_STRING = SAFE_RANGE,
18 M2_URL,
19};
20
21// Blank template at the bottom
22
23const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
24/* Keymap 0: Basic layer
25 *
26 * ,-------------------------------------------. ,-------------------------------------------.
27 * | TAB | Q | W | F | P | G | | J | L | U | Y | ; : | | \ |
28 * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
29 * | Ctrl | A | R | S | T | D |O(CMD)| |O(CTL)| H | N | E | I | O | ' " |
30 * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
31 * | LShift | Z | X | C | V | B |O(ALT)| | | K | M | , < | . > | / ? | RShift |
32 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
33 * .----------. .-------. .------. .--------.
34 * | alt/del | | BKSP | | Space| |cmd/del |
35 * '----------' '-------' `------. '--------'
36 * ,-------. ,-------.
37 * | MMB | | : |
38 * ,------|-------| |-------|------.
39 * | NUMB | SYMB | | SYMB | NUMB |
40 * | Esc | F13 | | F14 | Enter|
41 * | | | | | |
42 * `--------------' `--------------'
43 */
44[BASE] = LAYOUT_gergo(
45KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y,KC_SCLN, KC_BSLS,
46KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, OSM(MOD_LGUI), OSM(MOD_LCTL), KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
47KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, OSM(MOD_LALT), KC_TRNS, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT,
48
49 ALT_T(KC_DEL), KC_BSPC, KC_SPC, CMD_T(KC_DEL),
50
51 KC_BTN3, KC_COLON,
52 LT(SYMB, KC_ESC), LT(NUMB, KC_F13), LT(NUMB, KC_F14), LT(SYMB, KC_ENT)),
53/* Keymap 1: Symbols layer
54 *
55 * ,-------------------------------------------. ,-------------------------------------------.
56 * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | VolUp |
57 * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
58 * | | [ | ] | { | } | ` | M1 | | | | - | _ | + | = | VolDn |
59 * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
60 * | | ` | ~ | | | ~ | M2 | | | | | Prev |Pl/Pau| Next | Mute |
61 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
62 * .------. .------. .------. .-----.
63 * | | | | | | | |
64 * '------' '------' `------. '-----'
65 * ,-------. ,-------.
66 * | | | |
67 * ,------|-------| |-------|------.
68 * | | | | | |
69 * | | | | | |
70 * | | | | | |
71 * `--------------' `--------------'
72 */
73[SYMB] = LAYOUT_gergo(
74KC_TRNS, KC_EXLM, KC_AT, KC_HASH,KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC__VOLUP,
75KC_TRNS, KC_LBRC, KC_RBRC, KC_LCBR,KC_RCBR, KC_PLUS, M1_STRING, KC_TRNS, KC_TRNS, KC_MINS, KC_UNDERSCORE, KC_PLUS, KC_EQL, KC__VOLDOWN,
76KC_TRNS, KC_GRV, KC_TILD,KC_TRNS,KC_TRNS, KC_EQL, M2_URL, KC_TRNS, KC_TRNS, KC_TRNS, KC_MEDIA_REWIND, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_FAST_FORWARD, KC__MUTE,
77
78 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
79
80 KC_TRNS, KC_TRNS,
81 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
82/* Keymap 2: Pad/Function layer
83 *
84 * ,-------------------------------------------. ,-------------------------------------------.
85 * | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | PgUp |
86 * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
87 * | F1 | F2 | F3 | F4 | F5 | F6 | BTN1 | | Home | LEFT | DOWN | UP | RIGHT| End | PgDn |
88 * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
89 * | F7 | F8 | F9 | F10 | F11 | F12 | BTN2 | | | MLFT | MDWN | MUP | MRGHT| | |
90 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
91 * .------. .------. .------. .-----.
92 * | | | | | ALT | | |
93 * '------' '------' `------. '-----'
94 * ,-------. ,-------.
95 * | | | |
96 * ,------|-------| |-------|------.
97 * | | | | | |
98 * | | | | | |
99 * | | | | | |
100 * `--------------' `--------------'
101 */
102[NUMB] = LAYOUT_gergo(
103KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PGUP,
104KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_BTN1, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_END, KC_PGDN,
105KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BTN2, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_TRNS, KC_TRNS,
106
107 KC_TRNS, KC_TRNS, KC_RALT, KC_TRNS,
108
109 KC_TRNS, KC_TRNS,
110 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)
111};
112
113/* Keymap template
114 *
115 * ,-------------------------------------------. ,-------------------------------------------.
116 * | | | | | | | | | | | | | |
117 * |--------+------+------+------+------+------|------. .------|------+------+------+------+------+--------|
118 * | | | | | | | | | | | | | | | |
119 * |--------+------+------+------+------+------|------| |------|------+------+------+------+------+--------|
120 * | | | | | | | | | | | | | | | |
121 * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------'
122 * .------. .------. .------. .-----.
123 * | | | | | | | |
124 * '------' '------' `------. '-----'
125 * ,-------. ,-------.
126 * | | | |
127 * ,------|-------| |-------|------.
128 * | | | | | |
129 * | | | | | |
130 * | | | | | |
131 * `--------------' `--------------'
132[SYMB] = LAYOUT_gergo(
133KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
134KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
135KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
136
137 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
138 KC_TRNS, KC_TRNS,
139 KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
140 */
141
142// Runs just one time when the keyboard initializes.
143void matrix_init_user(void) {
144
145};
146
147// Runs constantly in the background, in a loop.
148void matrix_scan_user(void) {
149 //uint8_t layer = biton32(layer_state);
150 biton32(layer_state);
151};
152
153
154bool process_record_user(uint16_t keycode, keyrecord_t *record) {
155 switch (keycode) {
156 case M1_STRING:
157 if (record->event.pressed) {
158 // when keycode QMKBEST is pressed
159 SEND_STRING("Hi!" SS_TAP(X_ENTER));
160 } else {
161 // when keycode QMKBEST is released
162 }
163 break;
164
165 case M2_URL:
166 if (record->event.pressed) {
167 SEND_STRING("https://ddg.gg" SS_TAP(X_ENTER));
168 }
169 break;
170
171 }
172 return true;
173};
174
diff --git a/keyboards/gergo/keymaps/colemak/readme.md b/keyboards/gergo/keymaps/colemak/readme.md
new file mode 100644
index 000000000..1c1cc7bde
--- /dev/null
+++ b/keyboards/gergo/keymaps/colemak/readme.md
@@ -0,0 +1,16 @@
1# [Gergo! By g Heavy Industries](http://gboards.ca)
2
3![Gergo image](https://4.bp.blogspot.com/-889nMXxgSM0/XCNxwnO5kUI/AAAAAAAA6mI/tZbWgZVCBW0dyZOCGJDkjN06DVax7j8XwCLcBGAs/s1600/48422820_967732713413298_485744639215665152_n.jpg)
4
5This is a [Colemak](https://colemak.com/) mapping for the Gergo,
6
7Unlike the default mapping, most symbols are at their original place on the number row to ease in the
8learning curve.
9
10You can view this layout over at
11[keyboad-layout-editor.com](http://www.keyboard-layout-editor.com/#/gists/f04d6a3b0cd3db91407c51f7ba36aeb3).
12
13## Settings
14To edit various settings, enable the 1u trackball and whatnot please modify /keyboards/gergo/keymaps/default/rules.mk
15
16Ideally you should copy this directory and make your changes there. If you come up with a good layout submit a PR!
diff --git a/keyboards/gergo/keymaps/colemak/rules.mk b/keyboards/gergo/keymaps/colemak/rules.mk
new file mode 100644
index 000000000..ddec12d1b
--- /dev/null
+++ b/keyboards/gergo/keymaps/colemak/rules.mk
@@ -0,0 +1,36 @@
1#----------------------------------------------------------------------------
2# make gergo:germ:dfu
3# Make sure you have dfu-programmer installed!
4#----------------------------------------------------------------------------
5# Firmware options
6BALLER = no # Enable to ball out
7BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
8SCROLLSTEP = 1 # Lines to scroll with ball
9MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
10
11#Debug options
12VERBOSE = no
13DEBUG_MATRIX_SCAN_RATE = no
14DEBUG_BALLER = no
15DEBUG_MATRIX = no
16
17# A bunch of stuff that you shouldn't touch unless you
18# know what you're doing.
19#
20# No touchy, capiche?
21SRC += matrix.c i2c_master.c
22ifneq ($(strip $(BALLSTEP)),)
23 OPT_DEFS += -DTRKSTEP=$(strip $(BALLSTEP))
24endif
25ifneq ($(strip $(SCROLLSTEP)),)
26 OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
27endif
28ifeq ($(strip $(BALLER)), yes)
29 OPT_DEFS += -DBALLER
30endif
31ifeq ($(strip $(DEBUG_BALLER)), yes)
32 OPT_DEFS += -DDEBUG_BALLER
33endif
34ifeq ($(strip $(DEBUG_MATRIX)), yes)
35 OPT_DEFS += -DDEBUG_MATRIX
36endif
diff --git a/keyboards/gergo/keymaps/default/rules.mk b/keyboards/gergo/keymaps/default/rules.mk
index 507cc97b7..da2d03af2 100644
--- a/keyboards/gergo/keymaps/default/rules.mk
+++ b/keyboards/gergo/keymaps/default/rules.mk
@@ -3,7 +3,7 @@
3# Make sure you have dfu-programmer installed! 3# Make sure you have dfu-programmer installed!
4#---------------------------------------------------------------------------- 4#----------------------------------------------------------------------------
5# Firmware options 5# Firmware options
6BALLER = yes # Enable to ball out 6BALLER = no # Enable to ball out
7BALLSTEP = 20 # Multiple in px to move, multiplied by layer number 7BALLSTEP = 20 # Multiple in px to move, multiplied by layer number
8SCROLLSTEP = 1 # Lines to scroll with ball 8SCROLLSTEP = 1 # Lines to scroll with ball
9MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller 9MOUSEKEY_ENABLE = yes # Mouse keys(+4700), needed for baller
@@ -26,6 +26,7 @@ ifneq ($(strip $(SCROLLSTEP)),)
26 OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP)) 26 OPT_DEFS += -DSCROLLSTEP=$(strip $(SCROLLSTEP))
27endif 27endif
28ifeq ($(strip $(BALLER)), yes) 28ifeq ($(strip $(BALLER)), yes)
29 POINTING_DEVICE_ENABLE = yes
29 OPT_DEFS += -DBALLER 30 OPT_DEFS += -DBALLER
30endif 31endif
31ifeq ($(strip $(DEBUG_BALLER)), yes) 32ifeq ($(strip $(DEBUG_BALLER)), yes)
diff --git a/keyboards/gergo/keymaps/germ/rules.mk b/keyboards/gergo/keymaps/germ/rules.mk
index 2f825a766..badfe7bb9 100644
--- a/keyboards/gergo/keymaps/germ/rules.mk
+++ b/keyboards/gergo/keymaps/germ/rules.mk
@@ -27,6 +27,7 @@ ifneq ($(strip $(SCROLLSTEP)),)
27endif 27endif
28ifeq ($(strip $(BALLER)), yes) 28ifeq ($(strip $(BALLER)), yes)
29 OPT_DEFS += -DBALLER 29 OPT_DEFS += -DBALLER
30 POINTING_DEVICE_ENABLE = yes
30endif 31endif
31ifeq ($(strip $(DEBUG_BALLER)), yes) 32ifeq ($(strip $(DEBUG_BALLER)), yes)
32 OPT_DEFS += -DDEBUG_BALLER 33 OPT_DEFS += -DDEBUG_BALLER
diff --git a/keyboards/gergo/matrix.c b/keyboards/gergo/matrix.c
index aa1dc4842..234160326 100644
--- a/keyboards/gergo/matrix.c
+++ b/keyboards/gergo/matrix.c
@@ -30,7 +30,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
30#include "debug.h" 30#include "debug.h"
31#include "util.h" 31#include "util.h"
32#include "debounce.h" 32#include "debounce.h"
33#include "pointing_device.h"
34#include QMK_KEYBOARD_H 33#include QMK_KEYBOARD_H
35#ifdef DEBUG_MATRIX_SCAN_RATE 34#ifdef DEBUG_MATRIX_SCAN_RATE
36# include "timer.h" 35# include "timer.h"
@@ -38,6 +37,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
38 37
39#ifdef BALLER 38#ifdef BALLER
40#include <avr/interrupt.h> 39#include <avr/interrupt.h>
40#include "pointing_device.h"
41#endif 41#endif
42 42
43#ifndef DEBOUNCE 43#ifndef DEBOUNCE
diff --git a/keyboards/gergo/rules.mk b/keyboards/gergo/rules.mk
index 2ce9e01e6..a33bfcec8 100644
--- a/keyboards/gergo/rules.mk
+++ b/keyboards/gergo/rules.mk
@@ -14,7 +14,6 @@ BOOTLOADER = atmel-dfu
14F_USB = $(F_CPU) 14F_USB = $(F_CPU)
15 15
16CUSTOM_MATRIX = yes 16CUSTOM_MATRIX = yes
17POINTING_DEVICE_ENABLE = yes
18EXTRAKEY_ENABLE = yes 17EXTRAKEY_ENABLE = yes
19CONSOLE_ENABLE = yes 18CONSOLE_ENABLE = yes
20COMMAND_ENABLE = yes 19COMMAND_ENABLE = yes