Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gBoards GergoPlex #8928

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions keyboards/gboards/gergoplex/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/*
Copyright 2012 Jun Wako <[email protected]>
Copyright 2013 Oleg Kostyuk <[email protected]>

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

// Copy and worked on with love from the EZ team

#pragma once
#include "config_common.h"

#define BOOTMAGIC_LITE_ROW 9
#define BOOTMAGIC_LITE_COLUMN 2

#define VERBOSE

/* USB Device descriptor parameter */
#define VENDOR_ID 0x0007
#define PRODUCT_ID 0x0002
#define DEVICE_VER 0x0001
#define MANUFACTURER g Heavy Industries
#define PRODUCT GergoPlex
#define DESCRIPTION More ErgoGergo

/* key matrix size */
#define MATRIX_ROWS 10
#define MATRIX_ROWS_PER_SIDE (MATRIX_ROWS / 2)
#define MATRIX_COLS 4

#define MOUSEKEY_INTERVAL 20
#define MOUSEKEY_DELAY 0
#define MOUSEKEY_TIME_TO_MAX 60
#define MOUSEKEY_MAX_SPEED 7
#define MOUSEKEY_WHEEL_DELAY 0
#define TAPPING_TOGGLE 1
#define TAPPING_TERM 200
#define IGNORE_MOD_TAP_INTERRUPT
#define LOCKING_SUPPORT_ENABLE
#define LOCKING_RESYNC_ENABLE
#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)))

#define DEBOUNCE 5
#define COMBO_TERM 40
80 changes: 80 additions & 0 deletions keyboards/gboards/gergoplex/gergoplex.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
#include QMK_KEYBOARD_H
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include QMK_KEYBOARD_H
#include "gergoplex.h"


bool i2c_initialized = 0;
i2c_status_t mcp23018_status = 0x20;

void matrix_init_kb(void) {
// (tied to Vcc for hardware convenience)
// DDRB &= ~(1<<4); // set B(4) as input
// PORTB &= ~(1<<4); // set B(4) internal pull-up disabled

// unused pins - C7, D4, D5, D7, E6
// set as input with internal pull-up enabled
DDRB &= ~(1 << 0 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 7);
PORTB |= (1 << 0 | 1 << 4 | 1 << 5 | 1 << 6 | 1 << 7);

DDRC &= ~(1 << 6);
PORTC |= (1 << 6);

PORTD |= (1 << 5 | 1 << 4 | 1 << 6 | 1 << 7);
DDRD &= ~(1 << 5 | 1 << 4 | 1 << 6 | 1 << 7);

DDRE &= ~(1 << 6);
PORTE |= (1 << 6);

DDRF &= ~(1 << 0 | 1 << 7);
PORTF |= (1 << 0 | 1 << 7);
Comment on lines +13 to +26
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We rather use the GPIO control functions: https://docs.qmk.fm/#/internals_gpio_control?id=functions

Also, if this is not needed for the matrix initialization, they should be moved to keyboard_post_init_kb.


matrix_init_user();
}
uint8_t init_mcp23018(void) {
print("starting init");
mcp23018_status = 0x20;

// I2C subsystem

// uint8_t sreg_prev;
// sreg_prev=SREG;
// cli();

if (i2c_initialized == 0) {
i2c_init(); // on pins D(1,0)
i2c_initialized = true;
_delay_ms(1000);
}
// i2c_init(); // on pins D(1,0)
// _delay_ms(1000);

// set pin direction
// - unused : input : 1
// - input : input : 1
// - driving : output : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(IODIRA, I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11000001, I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11111111, I2C_TIMEOUT);
if (mcp23018_status) goto out;
i2c_stop();

// set pull-up
// - unused : on : 1
// - input : on : 1
// - driving : off : 0
mcp23018_status = i2c_start(I2C_ADDR_WRITE, I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(GPPUA, I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11000001, I2C_TIMEOUT);
if (mcp23018_status) goto out;
mcp23018_status = i2c_write(0b11111111, I2C_TIMEOUT);
if (mcp23018_status) goto out;

out:
i2c_stop();
// SREG=sreg_prev;
// uprintf("Init %x\n", mcp23018_status);
return mcp23018_status;
}
37 changes: 37 additions & 0 deletions keyboards/gboards/gergoplex/gergoplex.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#pragma once

#include "quantum.h"
#include <stdint.h>
#include <stdbool.h>
Comment on lines +4 to +5
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#include <stdint.h>
#include <stdbool.h>

I believe these are implicitly included. Maybe the others, too.
Test it though. :D

#include "i2c_master.h"
#include <util/delay.h>

extern i2c_status_t mcp23018_status;
#define I2C_TIMEOUT 1000
#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n))
#define CPU_16MHz 0x00

// I2C aliases and register addresses (see "mcp23018.md")
//#define I2C_ADDR 0b0100000
#define I2C_ADDR 0x20
#define I2C_ADDR_WRITE ((I2C_ADDR << 1) | I2C_WRITE)
#define I2C_ADDR_READ ((I2C_ADDR << 1) | I2C_READ)
#define IODIRA 0x00 // i/o direction register
#define IODIRB 0x01
#define GPPUA 0x0C // GPIO pull-up resistor register
#define GPPUB 0x0D
#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT)
#define GPIOB 0x13
#define OLATA 0x14 // output latch register
#define OLATB 0x15

uint8_t init_mcp23018(void);

/* -------- LEFT HAND------RIGHT HAND ---------- */
#define LAYOUT_gergoplex(L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, L30, L31, L32, R30, R31, R32) \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#define LAYOUT_gergoplex(L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, L30, L31, L32, R30, R31, R32) \
#define LAYOUT_split_3x5_3(L00, L01, L02, L03, L04, R00, R01, R02, R03, R04, L10, L11, L12, L13, L14, R10, R11, R12, R13, R14, L20, L21, L22, L23, L24, R20, R21, R22, R23, R24, L30, L31, L32, R30, R31, R32) \

This is a new "standardized" macro from #9562.
The purpose of this is to make this macro generic and allow users to share keymaps between keyboards with the same layout.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Erovia I really love the cleaniness of defining layouts with LAYOUT_kc, i.e:

    [_ALPHA] = LAYOUT_kc(
    // ,-------------------------------.      ,-------------------------------.
           Q   ,  W  ,  E  ,  R  ,  T  ,         Y  ,  U  ,  I  ,  O  ,   P   ,
    // |-------+-----+-----+-----+-----|      |-----+-----+-----+-----+-------|
         CTL_A ,  S  ,  D  ,  F  ,  G  ,         H  ,  J  ,  K  ,  L  , CTL_CL,
    // |-------+-----+-----+-----+-----|      |-----+-----+-----+-----+-------|
         SFT_Z ,  X  ,  C  ,  V  ,  B  ,         N  ,  M  ,COMMA, DOT , SFT_SL,
    // '-------------------------------'      '-------------------------------'

There's a comment I've found:

/*This special definition is used for S60-X keymaps that were ported from TMK
 * QMK has a lot of keycodes that don't start with KC_, so using the regular KEYMAP macro is recommended
 */
#define LAYOUT_kc( \

There's actually just one non-KC keycode used in the keymap, CMB_TOG.
Also, there's a number of gergoplex-specific definitions:

#define KC_CMB_TOG CMB_TOG  // A hack to allow KC_-less keycode along with KC_-ful ones

#define KC_CTL_A  MT(MOD_LCTL, KC_A)     // Tap for A, hold for Control
#define KC_CTL_CL MT(MOD_LCTL, KC_SCLN)  // Tap for colon, hold for Control

What prevents users of a different keyboard from picking the layout above and using it? How is it supposed to be done?

Is it sufficient to add LAYOUTS = split_3x5_3 to rules.mk?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/* matrix positions */ \
{ \
{L04, L14, L24, KC_NO}, {L03, L13, L23, L32}, {L02, L12, L22, L31}, {L01, L11, L21, L30}, {L00, L10, L20, KC_NO}, \
\
{R00, R10, R20, KC_NO}, {R01, R11, R21, R30}, {R02, R12, R22, R31}, {R03, R13, R23, R32}, {R04, R14, R24, KC_NO}, \
}
12 changes: 12 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/default/combos.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// List any combo dictionaries you want loaded to
// your device below!

// QMK wide includes
#include "combos/germ-vim-helpers.def"
#include "combos/germ-mouse-keys.def"

// User includes
#include "gergoplex.def"

// Word completion
// #include "combos/eng-combos.def"
2 changes: 2 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/default/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#define COMBO_ALLOW_ACTION_KEYS
#define COMBO_VARIABLE_LEN
12 changes: 12 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/default/gergoplex.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Gergoplex specfic combos

COMB(opBacksl, KC_BSLS, KC_O, KC_P)
COMB(hjLess, KC_LT, KC_H, KC_J)
COMB(klGreat, KC_GT, KC_K, KC_L)
COMB(xcDash, KC_MINS, KC_X, KC_C)
COMB(mcUnds, KC_UNDS, KC_M, KC_COMM)
COMB(nmQuot, KC_QUOT, KC_N, KC_M)
COMB(gbClic, KC_BTN1, KC_G, KC_B)
COMB(fvClic, KC_BTN2, KC_F, KC_V)

SUBS(pasta, "I'd just like to interject for a moment.", KC_H, KC_J, KC_K, KC_L)
75 changes: 75 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
/* Good on you for modifying your layout! if you don't have
* time to read the QMK docs, a list of keycodes can be found at
*
* https://github.com/qmk/qmk_firmware/blob/master/docs/keycodes.md
*
* There's also a template for adding new layers at the bottom of this file!
*/

#include QMK_KEYBOARD_H
#include "g/keymap_combo.h"

#define BASE 0 // default layer
#define SYMB 1 // symbols
#define NUMB 2 // numbers/motion

/* Combomap
*
* ,-----------------------------. ,--------------------------------.
* | | ESC | | | | | ESC | BSLH |
* |-----+-----+-----+-----+------| |--------------------------------|
* | | BSPC ENT | | | LES COLN GRT | |
* |-----+-----+-----+--RMB+-LMB--+ |--------------------------------|
* | | MINS | | | | QUO UNDR | | |
* `------+-----+-----+------+----' `--------------------------------'
* .-------------------------. .-----------------.
* | | | | | | | |
* '-------------------------' '-----------------'
*/

// Blank template at the bottom
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,-----------------------------. ,--------------------------------.
* | Q | W | E | R | T | | Y | U | I | O | P |
* |-----+-----+-----+-----+------| |--------------------------------|
* |CTRL/A| S | D | F | G | | H | J | K | L | CTRL/; |
* |-----+-----+-----+-----+------+ |--------------------------------|
* |SHFT/Z| X | C | V | B | | N | M | < | > | SHFT/? |
* `------+-----+-----+------+----' `--------------------------------'
* .-------------------------. .-----------------.
* |ESC/META|ENT/ALT|SPC(SYM)| |SPC(NUM)|BSPC|TAB|
* '-------------------------' '-----------------'
*/
[BASE] = LAYOUT_gergoplex(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, MT(MOD_LCTL, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN), MT(MOD_RSFT, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[BASE] = LAYOUT_gergoplex(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, MT(MOD_LCTL, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN), MT(MOD_RSFT, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),
[BASE] = LAYOUT_split_3x5_3(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, MT(MOD_LCTL, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN), MT(MOD_RSFT, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),


MT(MOD_LGUI, KC_ESC), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), // Left
LT(NUMB, KC_SPC), KC_LSFT, MT(MOD_RSFT, KC_TAB) // Right
),
/* Keymap 1: Symbols layer
* ,-----------------------------. ,--------------------------------.
* | ! | @ | { | } | | ` | ~ | | | \ |
* |-----+-----+-----+-----+------| |--------------------------------|
* | # | $ | ( | ) | LMB | | + | - | / | * | ' |
* |-----+-----+-----+-----+------+ |--------------------------------|
* | % | ^ | [ | ] | RMB | | & | = | , | . | - |
* `------+-----+-----+------+----' `--------------------------------'
* .-----------------. .------------------.
* |MMB | ; | = | | = | ; | DEL |
* '-----------------' '------------------'
*/
[SYMB] = LAYOUT_gergoplex(KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, CMB_TOG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[SYMB] = LAYOUT_gergoplex(KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, CMB_TOG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
[SYMB] = LAYOUT_split_3x5_3(KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, CMB_TOG, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),

/* Keymap 2: Pad/Function layer
* ,-----------------------------. ,-------------------------------.
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
* |-----+-----+-----+-----+------| |-------------------------------|
* | F1 | F2 | F3 | F4 | F5 | | LFT | DWN | UP | RGT | VOLUP |
* |-----+-----+-----+-----+------+ |-------------------------------|
* | F6 | F7 | F8 | F9 | F10 | |MLFT | MDWN| MUP | MRGT| VOLDN |
* `------+-----+-----+------+----' `-------------------------------'
* .-----------------. .-----------------.
* | F11 | F12| | | | PLY | SKP |
* '-----------------' '-----------------'
*/
[NUMB] = LAYOUT_gergoplex(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT)};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[NUMB] = LAYOUT_gergoplex(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT)};
[NUMB] = LAYOUT_split_3x5_3(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT)};

24 changes: 24 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/default/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#----------------------------------------------------------------------------
# make gergo:germ:dfu
# Make sure you have dfu-programmer installed!
#----------------------------------------------------------------------------
# Firmware options
MOUSEKEY_ENABLE = no

#Debug options
VERBOSE = yes
DEBUG_MATRIX_SCAN_RATE = no
DEBUG_MATRIX = yes
CONSOLE_ENABLE = yes
Comment on lines +9 to +12
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why enable the debug features?


#Combos!
VPATH += keyboards/gboards/

# A bunch of stuff that you shouldn't touch unless you
# know what you're doing.
#
# No touchy, capiche?
SRC += matrix.c i2c_master.c
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
SRC += matrix.c i2c_master.c

ifeq ($(strip $(DEBUG_MATRIX)), yes)
OPT_DEFS += -DDEBUG_MATRIX
endif
4 changes: 4 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/default/testing.def
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
// Gergoplex specfic combos

COMB(overlap1, KC_Q, KC_B, KC_V)
COMB(overlap2, KC_R, KC_C, KC_V, KC_B)
3 changes: 3 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/via/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#define COMBO_COUNT 16
#define COMBO_ALLOW_ACTION_KEYS
#define COMBO_TERM 50
55 changes: 55 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/via/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
// This is a via keymap! It lacks decent QMK features like combos!

#include QMK_KEYBOARD_H

#define BASE 0 // default layer
#define SYMB 1 // symbols
#define NUMB 2 // numbers/motion
#define FREE 3 //

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: Basic layer
*
* ,-----------------------------. ,--------------------------------.
* | Q | W | E | R | T | | Y | U | I | O | P |
* |-----+-----+-----+-----+------| |--------------------------------|
* |CTRL/A| S | D | F | G | | H | J | K | L | CTRL/; |
* |-----+-----+-----+-----+------+ |--------------------------------|
* |SHFT/Z| X | C | V | B | | N | M | < | > | SHFT/? |
* `------+-----+-----+------+----' `--------------------------------'
* .-------------------------. .-----------------.
* |ESC/META|ENT/ALT|SPC(SYM)| |SPC(NUM)|BSPC|TAB|
* '-------------------------' '-----------------'
*/
[BASE] = LAYOUT_gergoplex(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, MT(MOD_LCTL, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN), MT(MOD_RSFT, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[BASE] = LAYOUT_gergoplex(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, MT(MOD_LCTL, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN), MT(MOD_RSFT, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),
[BASE] = LAYOUT_split_3x5_3(KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, MT(MOD_LCTL, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, MT(MOD_LCTL, KC_SCLN), MT(MOD_RSFT, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),


MT(MOD_LGUI, KC_ESC), MT(MOD_LALT, KC_ENT), LT(SYMB, KC_SPC), // Left
LT(NUMB, KC_SPC), KC_LSFT, MT(MOD_RSFT, KC_TAB) // Right
),
/* Keymap 1: Symbols layer
* ,-----------------------------. ,--------------------------------.
* | ! | @ | { | } | | ` | ~ | | | \ |
* |-----+-----+-----+-----+------| |--------------------------------|
* | # | $ | ( | ) | LMB | | + | - | / | * | ' |
* |-----+-----+-----+-----+------+ |--------------------------------|
* | % | ^ | [ | ] | RMB | | & | = | , | . | - |
* `------+-----+-----+------+----' `--------------------------------'
* .-----------------. .------------------.
* |MMB | ; | = | | = | ; | DEL |
* '-----------------' '------------------'
*/
[SYMB] = LAYOUT_gergoplex(KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, KC_BTN3, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[SYMB] = LAYOUT_gergoplex(KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, KC_BTN3, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),
[SYMB] = LAYOUT_split_3x5_3(KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_GRV, KC_TILD, KC_TRNS, KC_TRNS, KC_BSLS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_BTN2, KC_PLUS, KC_MINS, KC_SLSH, KC_ASTR, KC_QUOT, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_BTN1, KC_AMPR, KC_EQL, KC_COMM, KC_DOT, KC_MINS, KC_BTN3, KC_SCLN, KC_EQL, KC_EQL, KC_SCLN, KC_DEL),

/* Keymap 2: Pad/Function layer
* ,-----------------------------. ,-------------------------------.
* | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 |
* |-----+-----+-----+-----+------| |-------------------------------|
* | F1 | F2 | F3 | F4 | F5 | | LFT | DWN | UP | RGT | VOLUP |
* |-----+-----+-----+-----+------+ |-------------------------------|
* | F6 | F7 | F8 | F9 | F10 | |MLFT | MDWN| MUP | MRGT| VOLDN |
* `------+-----+-----+------+----' `-------------------------------'
* .-----------------. .-----------------.
* | F11 | F12| | | | PLY | SKP |
* '-----------------' '-----------------'
*/
[NUMB] = LAYOUT_gergoplex(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[NUMB] = LAYOUT_gergoplex(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT),
[NUMB] = LAYOUT_split_3x5_3(KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_VOLU, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_VOLD, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_MPLY, KC_MNXT),

[FREE] = LAYOUT_gergoplex(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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
[FREE] = LAYOUT_gergoplex(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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};
[FREE] = LAYOUT_split_3x5_3(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, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS)};

24 changes: 24 additions & 0 deletions keyboards/gboards/gergoplex/keymaps/via/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# MCU name
MCU = atmega32u4

# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu

CUSTOM_MATRIX = yes
COMBO_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
BOOTMAGIC_ENABLE = lite
VIA_ENABLE = yes

DEBOUNCE_TYPE = eager_pr
SRC += matrix.c
QUANTUM_LIB_SRC += i2c_master.c
Comment on lines +1 to +24
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# MCU name
MCU = atmega32u4
# Bootloader selection
# Teensy halfkay
# Pro Micro caterina
# Atmel DFU atmel-dfu
# LUFA DFU lufa-dfu
# QMK DFU qmk-dfu
# ATmega32A bootloadHID
# ATmega328P USBasp
BOOTLOADER = atmel-dfu
CUSTOM_MATRIX = yes
COMBO_ENABLE = yes
EXTRAKEY_ENABLE = yes
CONSOLE_ENABLE = yes
COMMAND_ENABLE = yes
BOOTMAGIC_ENABLE = lite
VIA_ENABLE = yes
DEBOUNCE_TYPE = eager_pr
SRC += matrix.c
QUANTUM_LIB_SRC += i2c_master.c
VIA_ENABLE = yes

Loading