summaryrefslogtreecommitdiff
path: root/keyboards/ergo42
diff options
context:
space:
mode:
Diffstat (limited to 'keyboards/ergo42')
-rw-r--r--keyboards/ergo42/keymaps/shinze/config.h33
-rw-r--r--keyboards/ergo42/keymaps/shinze/keymap.c39
-rw-r--r--keyboards/ergo42/matrix.c14
-rw-r--r--keyboards/ergo42/rev1/config.h2
4 files changed, 80 insertions, 8 deletions
diff --git a/keyboards/ergo42/keymaps/shinze/config.h b/keyboards/ergo42/keymaps/shinze/config.h
new file mode 100644
index 0000000000..360d6a5621
--- /dev/null
+++ b/keyboards/ergo42/keymaps/shinze/config.h
@@ -0,0 +1,33 @@
+/*
+This is the c configuration file for the keymap
+
+Copyright 2012 Jun Wako <wakojun@gmail.com>
+Copyright 2015 Jack Humbert
+
+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/>.
+*/
+
+#pragma once
+
+/* Use I2C or Serial, not both */
+
+#define USE_SERIAL
+// #define USE_I2C
+
+/* Select hand configuration */
+
+#define MASTER_LEFT
+// #define MASTER_RIGHT
+// #define EE_HANDS
+
diff --git a/keyboards/ergo42/keymaps/shinze/keymap.c b/keyboards/ergo42/keymaps/shinze/keymap.c
new file mode 100644
index 0000000000..4f4247deb6
--- /dev/null
+++ b/keyboards/ergo42/keymaps/shinze/keymap.c
@@ -0,0 +1,39 @@
+#include QMK_KEYBOARD_H
+#include "keymap_bepo.h"
+#include "keymap_french.h"
+
+extern keymap_config_t keymap_config;
+
+#define BASE 0
+#define NUMB 1
+#define SHORT 2
+
+// Special keys
+#define COPY RGUI(BP_C)
+#define PASTE RGUI(BP_V)
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [BASE] = LAYOUT( \
+ KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_ESC, KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, \
+ BP_W, BP_A, BP_U, BP_I, BP_E, BP_COMM, _______, _______, BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, \
+ KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, _______, _______, BP_APOS, BP_Q, BP_G, BP_H, BP_F, BP_CCED, \
+ MO(SHORT), KC_LCTL, _______, KC_LALT, KC_LGUI, KC_SPC, MO(NUMB), KC_RGUI, KC_RSFT, KC_SPC, _______, _______, _______, _______ \
+ ),
+
+ [NUMB] = LAYOUT( \
+ BP_HASH, BP_DQOT, BP_LDQT, BP_RDQT, BP_LPRN, BP_RPRN, BP_AT, BP_PLUS, BP_MINS, BP_SLSH, BP_ASTR, BP_EQL, BP_PERC, KC_BSPC, \
+ BP_DLR, BP_1, BP_2, BP_3, BP_4, BP_5, KC_LBRC, KC_RBRC, BP_6, BP_7, BP_8, BP_9, BP_0, BP_DEGR, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ ),
+
+ [SHORT] = LAYOUT( \
+ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, \
+ _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \
+ _______, _______, COPY, PASTE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \
+ )
+
+};
+
diff --git a/keyboards/ergo42/matrix.c b/keyboards/ergo42/matrix.c
index fc42dd14d9..328d16c77b 100644
--- a/keyboards/ergo42/matrix.c
+++ b/keyboards/ergo42/matrix.c
@@ -37,11 +37,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
# include "serial.h"
#endif
-#ifndef DEBOUNCING_DELAY
-# define DEBOUNCING_DELAY 5
+#ifndef DEBOUNCE
+# define DEBOUNCE 5
#endif
-#if (DEBOUNCING_DELAY > 0)
+#if (DEBOUNCE > 0)
static uint16_t debouncing_time;
static bool debouncing = false;
#endif
@@ -145,7 +145,7 @@ uint8_t _matrix_scan(void)
#if (DIODE_DIRECTION == COL2ROW)
// Set row, read cols
for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) {
-# if (DEBOUNCING_DELAY > 0)
+# if (DEBOUNCE > 0)
bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row);
if (matrix_changed) {
@@ -162,7 +162,7 @@ uint8_t _matrix_scan(void)
#elif (DIODE_DIRECTION == ROW2COL)
// Set col, read rows
for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) {
-# if (DEBOUNCING_DELAY > 0)
+# if (DEBOUNCE > 0)
bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col);
if (matrix_changed) {
debouncing = true;
@@ -175,8 +175,8 @@ uint8_t _matrix_scan(void)
}
#endif
-# if (DEBOUNCING_DELAY > 0)
- if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) {
+# if (DEBOUNCE > 0)
+ if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCE)) {
for (uint8_t i = 0; i < ROWS_PER_HAND; i++) {
matrix[i+offset] = matrix_debouncing[i+offset];
}
diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h
index f9d909cc7e..68a5e2bbe5 100644
--- a/keyboards/ergo42/rev1/config.h
+++ b/keyboards/ergo42/rev1/config.h
@@ -52,7 +52,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
// #define BACKLIGHT_LEVELS 3
/* Set 0 if debouncing isn't needed */
-#define DEBOUNCING_DELAY 5
+#define DEBOUNCE 5
/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */
#define LOCKING_SUPPORT_ENABLE