diff options
Diffstat (limited to 'keyboards/input_club/ergodox_infinity')
41 files changed, 5741 insertions, 0 deletions
diff --git a/keyboards/input_club/ergodox_infinity/MEMO.txt b/keyboards/input_club/ergodox_infinity/MEMO.txt new file mode 100644 index 0000000000..e2886aa002 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/MEMO.txt @@ -0,0 +1,385 @@ +flabbergast's TMK/ChibiOS port +============================== +2015/10/16 + + +Build +----- +$ git clone -b chibios https://github.com/flabbergast/tmk_keyboard.git + +$ cd tmk_keyboard +$ git submodule add -f -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios +or +$ cd tmk_keyboard/tmk_core/tool/chibios +$ git clone -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios + +$ cd tmk_keyboard/keyboard/infinity_chibios +$ make + + + + +Chibios Configuration +--------------------- +halconf.h: for HAL configuration + placed in project directory + read in chibios/os/hal/hal.mk + included in chibios/os/hal/include/hal.h +mcuconf.h: for MCU configuration + placed in project directory + included in halconf.h + + +Chibios Term +------------ +PAL = Port Abstraction Layer + palWritePad + palReadPad + palSetPad + chibios/os/hal/include/pal.h + +LLD = Low Level Driver + + +Makefile +-------- + # <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = KL2x + + # - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ + # or <this_dir>/ld/ + MCU_LDSCRIPT = MKL26Z64 + + # - it should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP = kl2x + + # Board: it should exist either in <chibios>/os/hal/boards/ + # or <this_dir>/boards + BOARD = PJRC_TEENSY_LC + + MCU = cortex-m0 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 6 + + +halconf.h +--------- + + +mcuconf.h +--------- + + +chconf.h +-------- + + +ld script +--------- +--- ../../tmk_core/tool/chibios/chibios/os/common/ports/ARMCMx/compilers/GCC/ld/MKL26Z64.ld 2015-10-15 09:08:58.732904304 +0900 ++++ ld/MKL26Z64.ld 2015-10-15 08:48:06.430215496 +0900 +@@ -27,7 +27,8 @@ + { + flash0 : org = 0x00000000, len = 0xc0 + flashcfg : org = 0x00000400, len = 0x10 +- flash : org = 0x00000410, len = 64k - 0x410 ++ flash : org = 0x00000410, len = 62k - 0x410 ++ eeprom_emu : org = 0x0000F800, len = 2k + ram : org = 0x1FFFF800, len = 8k + } + +@@ -35,6 +36,10 @@ + __ram_size__ = LENGTH(ram); + __ram_end__ = __ram_start__ + __ram_size__; + ++__eeprom_workarea_start__ = ORIGIN(eeprom_emu); ++__eeprom_workarea_size__ = LENGTH(eeprom_emu); ++__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; ++ + SECTIONS + { + . = 0; + + + +Configuration/Startup for Infinity 60% +-------------------------------------- +Configuration: + + +Clock: +Inifinity + FEI(FLL Engaged Internal) mode with core clock:48MHz, bus clock:48MHz, flash clock:24MHz + Clock dividor: + SIM_CLKDIV1[OUTDIV1] = 0 divide-by-1 for core clock + SIM_CLKDIV1[OUTDIV2] = 0 divide-by-1 for bus clock + SIM_CLKDIV1[OUTDIV4] = 1 divide-by-2 for flash clock + Internal reference clock: + MCG_C1[IREFS] = 1 Internal Reference Select for clock source for FLL + MCG_C1[IRCLKEN] = 1 Internal Reference Clock Enable + FLL multipilication: + MCG_C4[DMX32] = 1 + MCG_C4[DRST_DRS] = 01 FLL factor 1464 * 32.768kHz = 48MHz + +chibios/os/hal/ports/KINETIS/K20x/hal_lld.c + k20x_clock_init(): called in __early_init() defined in board.c + disable watchdog and configure clock + + configurable macros: + KINETIS_NO_INIT: whether init or not + KINETIS_MCG_MODE: clock mode + KINETIS_MCG_MODE_FEI + KINETIS_MCG_MODE_PEE + hal/ports/KINETIS/K20x/hal_lld.h + + +chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h + PALConfig pal_default_config + boardInit() + __early_init() + macro definitions for board infos, freq and mcu type + +chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.c + +USB + + +Startup +------- + common/ports/ARMCMx/GCC/crt0_v[67]m.s + Reset_Handler: startup code + common/ports/ARMCMx/GCC/crt1.c + __core_init(): weak + __early_init(): weak + __late_init(): weak + __default_exit(): weak + called from Reset_Handler of crt0 + common/ports/ARMCMx/GCC/vector.c + common/ports/ARMCMx/GCC/ld/*.ld + +chibios/os/common/ports/ARMCMx/compilers/GCC/ +├── crt0_v6m.s +├── crt0_v7m.s +├── crt1.c +├── ld +│ ├── MK20DX128BLDR3.ld +│ ├── MK20DX128BLDR4.ld +│ ├── MK20DX128.ld +│ ├── MK20DX256.ld +│ ├── MKL25Z128.ld +│ ├── MKL26Z128.ld +│ ├── MKL26Z64.ld +│ └── STM32L476xG.ld +├── mk +│ ├── startup_k20x5.mk +│ ├── startup_k20x7.mk +│ ├── startup_k20x.mk +│ ├── startup_kl2x.mk +│ └── startup_stm32l4xx.mk +├── rules.ld +├── rules.mk +└── vectors.c + +chibios/os/hal/ +├── boards +│ ├── FREESCALE_FREEDOM_K20D50M +│ │ ├── board.c +│ │ ├── board.h +│ │ └── board.mk +│ ├── MCHCK_K20 +│ │ ├── board.c +│ │ ├── board.h +│ │ └── board.mk +│ ├── PJRC_TEENSY_3 +│ │ ├── board.c +│ │ ├── board.h +│ │ └── board.mk +│ ├── PJRC_TEENSY_3_1 +│ │ ├── board.c +│ │ ├── board.h +│ │ └── board.mk +│ ├── PJRC_TEENSY_LC +│ │ ├── board.c +│ │ ├── board.h +│ │ └── board.mk +│ ├── readme.txt +│ ├── simulator +│ │ ├── board.c +│ │ ├── board.h +│ │ └── board.mk +│ ├── ST_NUCLEO_F030R8 +│ │ ├── board.c +│ │ ├── board.h +│ │ ├── board.mk +│ │ └── cfg +│ │ └── board.chcfg +├── hal.mk +├── include +│ ├── adc.h +│ ├── can.h +│ ├── dac.h +│ ├── ext.h +│ ├── gpt.h +│ ├── hal_channels.h +│ ├── hal_files.h +│ ├── hal.h +│ ├── hal_ioblock.h +│ ├── hal_mmcsd.h +│ ├── hal_queues.h +│ ├── hal_streams.h +│ ├── i2c.h +│ ├── i2s.h +│ ├── icu.h +│ ├── mac.h +│ ├── mii.h +│ ├── mmc_spi.h +│ ├── pal.h +│ ├── pwm.h +│ ├── rtc.h +│ ├── sdc.h +│ ├── serial.h +│ ├── serial_usb.h +│ ├── spi.h +│ ├── st.h +│ ├── uart.h +│ └── usb.h +├── lib +│ └── streams +│ ├── chprintf.c +│ ├── chprintf.h +│ ├── memstreams.c +│ ├── memstreams.h +│ ├── nullstreams.c +│ └── nullstreams.h +├── osal +│ ├── nil +│ │ ├── osal.c +│ │ ├── osal.h +│ │ └── osal.mk +│ ├── os-less +│ │ └── ARMCMx +│ │ ├── osal.c +│ │ ├── osal.h +│ │ └── osal.mk +│ └── rt +│ ├── osal.c +│ ├── osal.h +│ └── osal.mk +├── ports +│ ├── AVR +│ ├── common +│ │ └── ARMCMx +│ │ ├── mpu.h +│ │ ├── nvic.c +│ │ └── nvic.h +│ ├── KINETIS +│ │ ├── K20x +│ │ │ ├── hal_lld.c +│ │ │ ├── hal_lld.h +│ │ │ ├── kinetis_registry.h +│ │ │ ├── platform.dox +│ │ │ ├── platform.mk +│ │ │ ├── pwm_lld.c +│ │ │ ├── pwm_lld.h +│ │ │ ├── spi_lld.c +│ │ │ └── spi_lld.h +│ │ ├── KL2x +│ │ │ ├── hal_lld.c +│ │ │ ├── hal_lld.h +│ │ │ ├── kinetis_registry.h +│ │ │ ├── platform.mk +│ │ │ ├── pwm_lld.c +│ │ │ └── pwm_lld.h +│ │ ├── LLD +│ │ │ ├── adc_lld.c +│ │ │ ├── adc_lld.h +│ │ │ ├── ext_lld.c +│ │ │ ├── ext_lld.h +│ │ │ ├── gpt_lld.c +│ │ │ ├── gpt_lld.h +│ │ │ ├── i2c_lld.c +│ │ │ ├── i2c_lld.h +│ │ │ ├── pal_lld.c +│ │ │ ├── pal_lld.h +│ │ │ ├── serial_lld.c +│ │ │ ├── serial_lld.h +│ │ │ ├── st_lld.c +│ │ │ ├── st_lld.h +│ │ │ ├── usb_lld.c +│ │ │ └── usb_lld.h +│ │ └── README.md +│ ├── LPC +│ ├── simulator +│ └── STM32 +├── src +│ ├── adc.c +│ ├── can.c +│ ├── dac.c +│ ├── ext.c +│ ├── gpt.c +│ ├── hal.c +│ ├── hal_mmcsd.c +│ ├── hal_queues.c +│ ├── i2c.c +│ ├── i2s.c +│ ├── icu.c +│ ├── mac.c +│ ├── mmc_spi.c +│ ├── pal.c +│ ├── pwm.c +│ ├── rtc.c +│ ├── sdc.c +│ ├── serial.c +│ ├── serial_usb.c +│ ├── spi.c +│ ├── st.c +│ ├── uart.c +│ └── usb.c +└── templates + ├── adc_lld.c + ├── adc_lld.h + ├── can_lld.c + ├── can_lld.h + ├── dac_lld.c + ├── dac_lld.h + ├── ext_lld.c + ├── ext_lld.h + ├── gpt_lld.c + ├── gpt_lld.h + ├── halconf.h + ├── hal_lld.c + ├── hal_lld.h + ├── i2c_lld.c + ├── i2c_lld.h + ├── i2s_lld.c + ├── i2s_lld.h + ├── icu_lld.c + ├── icu_lld.h + ├── mac_lld.c + ├── mac_lld.h + ├── mcuconf.h + ├── osal + │ ├── osal.c + │ ├── osal.h + │ └── osal.mk + ├── pal_lld.c + ├── pal_lld.h + ├── platform.mk + ├── pwm_lld.c + ├── pwm_lld.h + ├── rtc_lld.c + ├── rtc_lld.h + ├── sdc_lld.c + ├── sdc_lld.h + ├── serial_lld.c + ├── serial_lld.h + ├── spi_lld.c + ├── spi_lld.h + ├── st_lld.c + ├── st_lld.h + ├── uart_lld.c + ├── uart_lld.h + ├── usb_lld.c + └── usb_lld.h diff --git a/keyboards/input_club/ergodox_infinity/chconf.h b/keyboards/input_club/ergodox_infinity/chconf.h new file mode 100644 index 0000000000..710d8aa437 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/chconf.h @@ -0,0 +1,37 @@ +/* Copyright 2020 QMK + * + * 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/>. + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/ergodox_infinity/chconf.h -r platforms/chibios/common/configs/chconf.h` + */ + +#pragma once + +#define CH_CFG_ST_TIMEDELTA 0 + +#define CH_CFG_TIME_QUANTUM 20 + +#define CH_CFG_USE_REGISTRY TRUE + +#define CH_CFG_USE_WAITEXIT TRUE + +#define CH_CFG_USE_HEAP TRUE + +#define CH_CFG_USE_DYNAMIC TRUE + +#include_next <chconf.h> + diff --git a/keyboards/input_club/ergodox_infinity/config.h b/keyboards/input_club/ergodox_infinity/config.h new file mode 100644 index 0000000000..e6f1b81f54 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/config.h @@ -0,0 +1,157 @@ +/* +Copyright 2015 Jun Wako <wakojun@gmail.com> + +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 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1c11 +#define PRODUCT_ID 0xb04d +#define DEVICE_VER 0x0001 +#define MANUFACTURER Input Club +#define PRODUCT Infinity_Ergodox/QMK + +#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 if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* key matrix size */ +#define MATRIX_ROWS 18 +#define MATRIX_COLS 5 + +// For some reason, the rows are colums in the schematic, and vice versa +#define MATRIX_ROW_PINS { B2, B3, B18, B19, C0, C9, C10, C11, D0 } +#define MATRIX_COL_PINS { D1, D4, D5, D6, D7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Serial config (for communication between halves) */ +#define SERIAL_USART_DRIVER SD1 // Only true for the master half +#define SERIAL_USART_CONFIG { (SERIAL_USART_SPEED), } // Only field is speed +#define SERIAL_USART_FULL_DUPLEX + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define LED_BRIGHTNESS_LO 100 +#define LED_BRIGHTNESS_HI 255 + +/* LED matrix driver */ +#define LED_DRIVER_ADDR_1 0x74 +#define LED_DRIVER_COUNT 1 +#define DRIVER_LED_TOTAL 76 +#define LED_MATRIX_SPLIT { 38, 38 } +#define LED_DISABLE_WHEN_USB_SUSPENDED + +// LED Matrix Animation modes. Explicitly enabled +// For full list of effects, see: +// https://docs.qmk.fm/#/feature_led_matrix?id=led-matrix-effects +#define ENABLE_LED_MATRIX_ALPHAS_MODS +#define ENABLE_LED_MATRIX_BREATHING +#define ENABLE_LED_MATRIX_BAND +#define ENABLE_LED_MATRIX_BAND_PINWHEEL +#define ENABLE_LED_MATRIX_BAND_SPIRAL +#define ENABLE_LED_MATRIX_CYCLE_LEFT_RIGHT +#define ENABLE_LED_MATRIX_CYCLE_UP_DOWN +#define ENABLE_LED_MATRIX_CYCLE_OUT_IN +#define ENABLE_LED_MATRIX_DUAL_BEACON +#if defined(LED_MATRIX_KEYREACTIVE_ENABLED) +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_SIMPLE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_WIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTIWIDE +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_CROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTICROSS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_NEXUS +# define ENABLE_LED_MATRIX_SOLID_REACTIVE_MULTINEXUS +# define ENABLE_LED_MATRIX_SPLASH +# define ENABLE_LED_MATRIX_MULTISPLASH +#endif +#define ENABLE_LED_MATRIX_WAVE_LEFT_RIGHT +#define ENABLE_LED_MATRIX_WAVE_UP_DOWN + +/* i2c (for LED matrix) */ +#define I2C1_CLOCK_SPEED 400000 +#define I2C1_SCL_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SDA_PAL_MODE PAL_MODE_ALTERNATIVE_2 +#define I2C1_SCL_PIN B0 +#define I2C1_SDA_PIN B1 + +#ifdef ST7565_ENABLE +/* LCD driver */ +# define ST7565_A0_PIN C7 +# define ST7565_RST_PIN C8 +# define ST7565_SS_PIN C4 +# define ST7565_SPI_CLK_DIVISOR 2 +# define ST7565_CONTRAST 22 +# define ST7565_DISPLAY_WIDTH 128 +# define ST7565_DISPLAY_HEIGHT 32 + +/* SPI (for LCD) */ +# define SPI_DRIVER SPID1 +# define SPI_SCK_PIN C5 +# define SPI_SCK_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define SPI_MOSI_PIN C6 +# define SPI_MOSI_PAL_MODE PAL_MODE_ALTERNATIVE_2 +# define SPI_MISO_PIN A4 // Just an unused pin, the "normal" MISO pin (C7) is used for other things +# define SPI_MISO_PAL_MODE PAL_MODE_ALTERNATIVE_7 // Default for A4 +#endif + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.c b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c new file mode 100644 index 0000000000..e6ac2c4559 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.c @@ -0,0 +1,363 @@ +#include QMK_KEYBOARD_H +#include <ch.h> +#include <hal.h> +#include <string.h> +#include "eeconfig.h" + +#define RED_PIN 1 +#define GREEN_PIN 2 +#define BLUE_PIN 3 +#define CHANNEL_RED FTM0->CHANNEL[0] +#define CHANNEL_GREEN FTM0->CHANNEL[1] +#define CHANNEL_BLUE FTM0->CHANNEL[2] + +#define RGB_PORT PORTC +#define RGB_PORT_GPIO GPIOC + +// Base FTM clock selection (72 MHz system clock) +// @ 0xFFFF period, 72 MHz / (0xFFFF * 2) = Actual period +// Higher pre-scalar will use the most power (also look the best) +// Pre-scalar calculations +// 0 - 72 MHz -> 549 Hz +// 1 - 36 MHz -> 275 Hz +// 2 - 18 MHz -> 137 Hz +// 3 - 9 MHz -> 69 Hz (Slightly visible flicker) +// 4 - 4 500 kHz -> 34 Hz (Visible flickering) +// 5 - 2 250 kHz -> 17 Hz +// 6 - 1 125 kHz -> 9 Hz +// 7 - 562 500 Hz -> 4 Hz +// Using a higher pre-scalar without flicker is possible but FTM0_MOD will need to be reduced +// Which will reduce the brightness range +#define PRESCALAR_DEFINE 0 +void lcd_backlight_hal_init(void) { + // Setup Backlight + SIM->SCGC6 |= SIM_SCGC6_FTM0; + FTM0->CNT = 0; // Reset counter + + // PWM Period + // 16-bit maximum + FTM0->MOD = 0xFFFF; + + // Set FTM to PWM output - Edge Aligned, Low-true pulses +#define CNSC_MODE FTM_SC_CPWMS | FTM_SC_PS(4) | FTM_SC_CLKS(0) + CHANNEL_RED.CnSC = CNSC_MODE; + CHANNEL_GREEN.CnSC = CNSC_MODE; + CHANNEL_BLUE.CnSC = CNSC_MODE; + + // System clock, /w prescalar setting + FTM0->SC = FTM_SC_CLKS(1) | FTM_SC_PS(PRESCALAR_DEFINE); + + CHANNEL_RED.CnV = 0; + CHANNEL_GREEN.CnV = 0; + CHANNEL_BLUE.CnV = 0; + + RGB_PORT_GPIO->PDDR |= (1 << RED_PIN); + RGB_PORT_GPIO->PDDR |= (1 << GREEN_PIN); + RGB_PORT_GPIO->PDDR |= (1 << BLUE_PIN); + +#define RGB_MODE PORTx_PCRn_SRE | PORTx_PCRn_DSE | PORTx_PCRn_MUX(4) + RGB_PORT->PCR[RED_PIN] = RGB_MODE; + RGB_PORT->PCR[GREEN_PIN] = RGB_MODE; + RGB_PORT->PCR[BLUE_PIN] = RGB_MODE; +} + +static uint16_t cie_lightness(uint16_t v) { + // The CIE 1931 formula for lightness + // Y = luminance (output) 0-1 + // L = lightness input 0 - 100 + + // Y = (L* / 902.3) if L* <= 8 + // Y = ((L* + 16) / 116)^3 if L* > 8 + + float l = 100.0f * (v / 65535.0f); + float y = 0.0f; + if (l <= 8.0f) { + y = l / 902.3; + } else { + y = ((l + 16.0f) / 116.0f); + y = y * y * y; + if (y > 1.0f) { + y = 1.0f; + } + } + return y * 65535.0f; +} + +void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b) { + CHANNEL_RED.CnV = cie_lightness(r); + CHANNEL_GREEN.CnV = cie_lightness(g); + CHANNEL_BLUE.CnV = cie_lightness(b); +} + +__attribute__ ((weak)) void matrix_init_user(void) {} + +__attribute__ ((weak)) void matrix_scan_user(void) {} + + +void keyboard_pre_init_kb() { +#ifdef LED_MATRIX_ENABLE + // Turn on LED controller + setPinOutput(B16); + writePinHigh(B16); +#endif + // The backlight always has to be initialized, otherwise it will stay lit + lcd_backlight_hal_init(); +#ifdef ST7565_ENABLE + ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); +#endif + keyboard_pre_init_user(); +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + +#ifdef LED_MATRIX_ENABLE + /* + * Since K20x is stuck with a 32 byte EEPROM (see tmk_core/common/chibios/eeprom_teensy.c), + * and neither led_matrix_eeconfig.speed or .flags fit in this boundary, just force their values to default on boot. + */ +# if !defined(LED_MATRIX_STARTUP_SPD) +# define LED_MATRIX_STARTUP_SPD UINT8_MAX / 2 +# endif + led_matrix_set_speed(LED_MATRIX_STARTUP_SPD); + led_matrix_set_flags(LED_FLAG_ALL); +#endif + + matrix_init_user(); +} + +__attribute__ ((weak)) void ergodox_board_led_on(void) {} + +__attribute__ ((weak)) void ergodox_right_led_1_on(void) {} + +__attribute__ ((weak)) void ergodox_right_led_2_on(void) {} + +__attribute__ ((weak)) void ergodox_right_led_3_on(void) {} + +__attribute__ ((weak)) void ergodox_board_led_off(void) {} + +__attribute__ ((weak)) void ergodox_right_led_1_off(void) {} + +__attribute__ ((weak)) void ergodox_right_led_2_off(void) {} + +__attribute__ ((weak)) void ergodox_right_led_3_off(void) {} + +__attribute__ ((weak)) void ergodox_right_led_1_set(uint8_t n) {} + +__attribute__ ((weak)) void ergodox_right_led_2_set(uint8_t n) {} + +__attribute__ ((weak)) void ergodox_right_led_3_set(uint8_t n) {} + +#ifdef SWAP_HANDS_ENABLE +__attribute__ ((weak)) +const keypos_t PROGMEM hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + {{0, 9}, {1, 9}, {2, 9}, {3, 9}, {4, 9}}, + {{0, 10}, {1, 10}, {2, 10}, {3, 10}, {4, 10}}, + {{0, 11}, {1, 11}, {2, 11}, {3, 11}, {4, 11}}, + {{0, 12}, {1, 12}, {2, 12}, {3, 12}, {4, 12}}, + {{0, 13}, {1, 13}, {2, 13}, {3, 13}, {4, 13}}, + {{0, 14}, {1, 14}, {2, 14}, {3, 14}, {4, 14}}, + {{0, 15}, {1, 15}, {2, 15}, {3, 15}, {4, 15}}, + {{0, 16}, {1, 16}, {2, 16}, {3, 16}, {4, 16}}, + {{0, 17}, {1, 17}, {2, 17}, {3, 17}, {4, 17}}, + {{0, 0}, {1, 0}, {2, 0}, {3, 0}, {4, 0}}, + {{0, 1}, {1, 1}, {2, 1}, {3, 1}, {4, 1}}, + {{0, 2}, {1, 2}, {2, 2}, {3, 2}, {4, 2}}, + {{0, 3}, {1, 3}, {2, 3}, {3, 3}, {4, 3}}, + {{0, 4}, {1, 4}, {2, 4}, {3, 4}, {4, 4}}, + {{0, 5}, {1, 5}, {2, 5}, {3, 5}, {4, 5}}, + {{0, 6}, {1, 6}, {2, 6}, {3, 6}, {4, 6}}, + {{0, 7}, {1, 7}, {2, 7}, {3, 7}, {4, 7}}, + {{0, 8}, {1, 8}, {2, 8}, {3, 8}, {4, 8}}, +}; +#endif + +#ifdef LED_MATRIX_ENABLE +const is31_led PROGMEM g_is31_leds[DRIVER_LED_TOTAL] = { +// The numbers in the comments are the led numbers DXX on the PCB +/* Refer to IS31 manual for these locations + * driver + * | LED address + * | | */ +// Left half +// 45 44 43 42 41 40 39 + { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 }, +// 52 51 50 49 48 47 46 + { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 }, +// 58 57 56 55 54 53 + { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 }, +// 67 66 65 64 63 62 61 + { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 }, +// 76 75 74 73 72 + { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 }, +// 60 59 + { 0, C2_5 }, { 0, C1_5 }, +// 68 + { 0, C5_6 }, +// 71 70 69 + { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 }, +// Right half (mirrored) +// Due to how LED_MATRIX_SPLIT is implemented, only the first half of g_is31_leds is actually used. +// Luckily, the right half has the same LED pinouts, just mirrored. +// 45 44 43 42 41 40 39 + { 0, C2_2 }, { 0, C1_2 }, { 0, C5_1 }, { 0, C4_1 }, { 0, C3_1 }, { 0, C2_1 }, { 0, C1_1 }, +// 52 51 50 49 48 47 46 + { 0, C4_3 }, { 0, C3_3 }, { 0, C2_3 }, { 0, C1_3 }, { 0, C5_2 }, { 0, C4_2 }, { 0, C3_2 }, +// 58 57 56 55 54 53 + { 0, C5_4 }, { 0, C4_4 }, { 0, C3_4 }, { 0, C2_4 }, { 0, C1_4 }, { 0, C5_3 }, +// 67 66 65 64 63 62 61 + { 0, C4_6 }, { 0, C3_6 }, { 0, C2_6 }, { 0, C1_6 }, { 0, C5_5 }, { 0, C4_5 }, { 0, C3_5 }, +// 76 75 74 73 72 + { 0, C4_8 }, { 0, C3_8 }, { 0, C2_8 }, { 0, C1_8 }, { 0, C4_7 }, +// 60 59 + { 0, C2_5 }, { 0, C1_5 }, +// 68 + { 0, C5_6 }, +// 71 70 69 + { 0, C3_7 }, { 0, C2_7 }, { 0, C1_7 }, +}; + +led_config_t g_led_config = { + { + // Key Matrix to LED Index + // Left half + { NO_LED, NO_LED, NO_LED, 33, 34 }, + { NO_LED, NO_LED, NO_LED, 32, 37 }, + { 6, 13, NO_LED, 26, 36 }, + { 5, 12, 19, 25, 35 }, + { 4, 11, 18, 24, 31 }, + { 3, 10, 17, 23, 30 }, + { 2, 9, 16, 22, 29 }, + { 1, 8, 15, 21, 28 }, + { 0, 7, 14, 20, 27 }, + // Right half + { NO_LED, NO_LED, NO_LED, 71, 72 }, + { NO_LED, NO_LED, NO_LED, 70, 75 }, + { 44, 51, NO_LED, 64, 74 }, + { 43, 50, 57, 63, 73 }, + { 42, 49, 56, 62, 69 }, + { 41, 48, 55, 61, 68 }, + { 40, 47, 54, 60, 67 }, + { 39, 46, 53, 59, 66 }, + { 38, 45, 52, 58, 65 }, + }, { + // LED Index to Physical Position (assumes a reasonable gap between halves) + // Left half + { 0, 3 }, { 15, 3 }, { 27, 1 }, { 39, 0 }, { 51, 1 }, { 63, 2 }, { 75, 2 }, + { 0, 13 }, { 15, 13 }, { 27, 11 }, { 39, 10 }, { 51, 11 }, { 63, 12 }, { 78, 17 }, + { 0, 23 }, { 15, 23 }, { 27, 21 }, { 39, 20 }, { 51, 21 }, { 63, 22 }, + { 0, 33 }, { 15, 33 }, { 27, 31 }, { 39, 30 }, { 51, 31 }, { 63, 32 }, { 78, 32 }, + { 4, 43 }, { 15, 43 }, { 27, 41 }, { 39, 40 }, { 51, 41 }, + { 89, 41 }, { 100, 46 }, + { 95, 55 }, + { 72, 54 }, { 83, 59 }, { 90, 64 }, + // Right half (mirrored) + { 224, 3 }, { 209, 3 }, { 197, 1 }, { 185, 0 }, { 173, 1 }, { 161, 2 }, { 149, 2 }, + { 224, 13 }, { 209, 13 }, { 197, 11 }, { 185, 10 }, { 173, 11 }, { 161, 12 }, { 146, 17 }, + { 224, 23 }, { 209, 23 }, { 197, 21 }, { 185, 20 }, { 173, 21 }, { 161, 22 }, + { 224, 33 }, { 209, 33 }, { 197, 31 }, { 185, 30 }, { 173, 31 }, { 161, 32 }, { 146, 32 }, + { 220, 43 }, { 209, 43 }, { 197, 41 }, { 185, 40 }, { 173, 41 }, + { 135, 41 }, { 124, 46 }, + { 129, 55 }, + { 152, 54 }, { 141, 59 }, { 134, 64 }, + }, { + // LED Index to Flag + // Left half + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, + 1, 1, + 1, + 1, 1, 1, + // Right half (mirrored) + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, 1, + 1, 4, 4, 4, 4, 4, + 1, 4, 4, 4, 4, 4, 1, + 1, 1, 1, 1, 1, + 1, 1, + 1, + 1, 1, 1, + } +}; +#endif + +#ifdef ST7565_ENABLE +__attribute__((weak)) void st7565_on_user(void) { + ergodox_infinity_lcd_color(UINT16_MAX / 2, UINT16_MAX / 2, UINT16_MAX / 2); +} + +__attribute__((weak)) void st7565_off_user(void) { + ergodox_infinity_lcd_color(0, 0, 0); +} + +static void format_layer_bitmap_string(char* buffer, uint8_t offset) { + for (int i = 0; i < 16 && i + offset < MAX_LAYER; i++) { + if (i == 0 || i == 4 || i == 8 || i == 12) { + *buffer = ' '; + ++buffer; + } + + uint8_t layer = i + offset; + if (layer_state_cmp(default_layer_state, layer)) { + *buffer = 'D'; + } else if (layer_state_is(layer)) { + *buffer = '1'; + } else { + *buffer = '_'; + } + ++buffer; + } + *buffer = 0; +} + +__attribute__((weak)) void st7565_task_user(void) { + if (is_keyboard_master()) { + // Draw led and layer status + led_t leds = host_keyboard_led_state(); + if(leds.num_lock) { st7565_write("Num ", false); } + if(leds.caps_lock) { st7565_write("Cap ", false); } + if(leds.scroll_lock) { st7565_write("Scrl ", false); } + if(leds.compose) { st7565_write("Com ", false); } + if(leds.kana) { st7565_write("Kana", false); } + st7565_advance_page(true); + + char layer_buffer[16 + 5]; // 3 spaces and one null terminator + st7565_set_cursor(0, 1); + format_layer_bitmap_string(layer_buffer, 0); + st7565_write_ln(layer_buffer, false); + format_layer_bitmap_string(layer_buffer, 16); + st7565_write_ln(layer_buffer, false); + st7565_write_ln(" 1=On D=Default", false); + } else { + // Draw logo + static const char qmk_logo[] = { + 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, + 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4, + 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00 + }; + + st7565_write(qmk_logo, false); + st7565_write(" Infinity Ergodox ", false); + } +} +#endif + +#if defined(SPLIT_KEYBOARD) +void usart_master_init(SerialDriver **driver) { + PORTA->PCR[1] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(2); + PORTA->PCR[2] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(2); + + // driver is set to SD1 in config.h +} + +void usart_slave_init(SerialDriver **driver) { + PORTE->PCR[0] = PORTx_PCRn_PE | PORTx_PCRn_PS | PORTx_PCRn_PFE | PORTx_PCRn_MUX(3); + PORTE->PCR[1] = PORTx_PCRn_DSE | PORTx_PCRn_SRE | PORTx_PCRn_MUX(3); + + *driver = &SD2; +} +#endif diff --git a/keyboards/input_club/ergodox_infinity/ergodox_infinity.h b/keyboards/input_club/ergodox_infinity/ergodox_infinity.h new file mode 100644 index 0000000000..b9636b69be --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/ergodox_infinity.h @@ -0,0 +1,153 @@ +#pragma once + +#include "quantum.h" + +void ergodox_board_led_on(void); +void ergodox_right_led_1_on(void); +void ergodox_right_led_2_on(void); +void ergodox_right_led_3_on(void); + +inline void ergodox_right_led_on(uint8_t led) { + switch (led) { + case 0: + ergodox_right_led_1_on(); + break; + case 1: + ergodox_right_led_2_on(); + break; + case 2: + ergodox_right_led_3_on(); + break; + } +} + +void ergodox_board_led_off(void); +void ergodox_right_led_1_off(void); +void ergodox_right_led_2_off(void); +void ergodox_right_led_3_off(void); +inline void ergodox_right_led_off(uint8_t led) { + switch (led) { + case 0: + ergodox_right_led_1_off(); + break; + case 1: + ergodox_right_led_2_off(); + break; + case 2: + ergodox_right_led_3_off(); + break; + } +} + +inline void ergodox_led_all_on(void) +{ + ergodox_board_led_on(); + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); +} + +inline void ergodox_led_all_off(void) +{ + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +} + +void ergodox_right_led_1_set(uint8_t n); +void ergodox_right_led_2_set(uint8_t n); +void ergodox_right_led_3_set(uint8_t n); + +inline void ergodox_right_led_set(uint8_t led, uint8_t n){ + switch (led) { + case 0: + ergodox_right_led_1_set(n); + break; + case 1: + ergodox_right_led_2_set(n); + break; + case 2: + ergodox_right_led_3_set(n); + break; + } +} + +inline void ergodox_led_all_set(uint8_t n) { + ergodox_right_led_1_set(n); + ergodox_right_led_2_set(n); + ergodox_right_led_3_set(n); +} + +void ergodox_infinity_lcd_color(uint16_t r, uint16_t g, uint16_t b); + +#define XXX KC_NO + +#define LAYOUT_ergodox( \ + A80, A70, A60, A50, A40, A30, A20, \ + A81, A71, A61, A51, A41, A31, A21, \ + A82, A72, A62, A52, A42, A32, \ + A83, A73, A63, A53, A43, A33, A23, \ + A84, A74, A64, A54, A44, \ + A13, A03, \ + A04, \ + A34, A24, A14, \ +\ + B20, B30, B40, B50, B60, B70, B80, \ + B21, B31, B41, B51, B61, B71, B81, \ + B32, B42, B52, B62, B72, B82, \ + B23, B33, B43, B53, B63, B73, B83, \ + B44, B54, B64, B74, B84, \ + B03, B13, \ + B04, \ + B14, B24, B34 \ +) { \ + { XXX, XXX, XXX, A03, A04 }, \ + { XXX, XXX, XXX, A13, A14 }, \ + { A20, A21, XXX, A23, A24 }, \ + { A30, A31, A32, A33, A34 }, \ + { A40, A41, A42, A43, A44 }, \ + { A50, A51, A52, A53, A54 }, \ + { A60, A61, A62, A63, A64 }, \ + { A70, A71, A72, A73, A74 }, \ + { A80, A81, A82, A83, A84 }, \ + { XXX, XXX, XXX, B03, B04 }, \ + { XXX, XXX, XXX, B13, B14 }, \ + { B20, B21, XXX, B23, B24 }, \ + { B30, B31, B32, B33, B34 }, \ + { B40, B41, B42, B43, B44 }, \ + { B50, B51, B52, B53, B54 }, \ + { B60, B61, B62, B63, B64 }, \ + { B70, B71, B72, B73, B74 }, \ + { B80, B81, B82, B83, B84 } \ +} + +#define LAYOUT_ergodox_pretty( \ + A80, A70, A60, A50, A40, A30, A20, B20, B30, B40, B50, B60, B70, B80, \ + A81, A71, A61, A51, A41, A31, A21, B21, B31, B41, B51, B61, B71, B81, \ + A82, A72, A62, A52, A42, A32, B32, B42, B52, B62, B72, B82, \ + A83, A73, A63, A53, A43, A33, A23, B23, B33, B43, B53, B63, B73, B83, \ + A84, A74, A64, A54, A44, B44, B54, B64, B74, B84, \ + A13, A03, B03, B13, \ + A04, B04, \ + A34, A24, A14, B14, B24, B34 \ +) { \ + { XXX, XXX, XXX, A03, A04 }, \ + { XXX, XXX, XXX, A13, A14 }, \ + { A20, A21, XXX, A23, A24 }, \ + { A30, A31, A32, A33, A34 }, \ + { A40, A41, A42, A43, A44 }, \ + { A50, A51, A52, A53, A54 }, \ + { A60, A61, A62, A63, A64 }, \ + { A70, A71, A72, A73, A74 }, \ + { A80, A81, A82, A83, A84 }, \ + { XXX, XXX, XXX, B03, B04 }, \ + { XXX, XXX, XXX, B13, B14 }, \ + { B20, B21, XXX, B23, B24 }, \ + { B30, B31, B32, B33, B34 }, \ + { B40, B41, B42, B43, B44 }, \ + { B50, B51, B52, B53, B54 }, \ + { B60, B61, B62, B63, B64 }, \ + { B70, B71, B72, B73, B74 }, \ + { B80, B81, B82, B83, B84 } \ +} diff --git a/keyboards/input_club/ergodox_infinity/halconf.h b/keyboards/input_club/ergodox_infinity/halconf.h new file mode 100644 index 0000000000..8c050a2d5c --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/halconf.h @@ -0,0 +1,33 @@ +/* Copyright 2020 QMK + * + * 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/>. + */ + +/* + * This file was auto-generated by: + * `qmk chibios-confmigrate -i keyboards/ergodox_infinity/halconf.h -r platforms/chibios/common/configs/halconf.h` + */ + +#pragma once + +#define HAL_USE_I2C TRUE + +#define HAL_USE_SERIAL TRUE + +#define HAL_USE_SPI TRUE + +#define SERIAL_BUFFERS_SIZE 128 + +#include_next <halconf.h> + diff --git a/keyboards/input_club/ergodox_infinity/info.json b/keyboards/input_club/ergodox_infinity/info.json new file mode 100644 index 0000000000..22b20eec39 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/info.json @@ -0,0 +1,52 @@ +{ + "keyboard_name": "Infinity Ergodox", + "layouts": { + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + } + } +} diff --git a/keyboards/input_club/ergodox_infinity/keymaps/default/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/default/keymap.c new file mode 100644 index 0000000000..cd65001803 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/default/keymap.c @@ -0,0 +1,189 @@ +#include QMK_KEYBOARD_H +#include "version.h" + +enum custom_layers { + BASE, // default layer + SYMB, // symbols + MDIA, // media keys +}; + + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DEL, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |EEP_RST| | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + EEP_RST,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + RGB_MOD,KC_TRNS, + KC_TRNS, + RGB_VAD,RGB_VAI,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + RGB_TOG, RGB_SLD, + KC_TRNS, + KC_TRNS, RGB_HUD, RGB_HUI +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +} diff --git a/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/README.md b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/README.md new file mode 100644 index 0000000000..a0e4565b10 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/README.md @@ -0,0 +1,30 @@ +# DudeOfAwesome's ErgoDox Infinity Layout + +A basic ErgoDox layout with Planck-like tri-layer support. + +![ErgoDox Layout](https://i.imgur.com/ae0Phzb.png) + +## Features + +- Base Layers + - QWERTY + - Workman + - Dvorak + - Colemak +- Planck-like tri-layer +- In-progress gaming layer +- Numpad layer + ![numpad layer](https://i.imgur.com/oHDYpzf.png) +- LCD colors are linked together, like the default KLL firmware + +## Building and flashing + +1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware +1. Flash left half: + ```bash + $ make ergodox_infinity:dudeofawesome:dfu-util + ``` +1. Flash right half: + ```bash + $ make ergodox_infinity:dudeofawesome:dfu-util MASTER=right + ``` diff --git a/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/config.h b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/config.h new file mode 100644 index 0000000000..9dcf8a7f43 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#undef TAPPING_TOGGLE + +#include "../../config.h" +#include "dudeofawesome.h" + +#endif diff --git a/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/keymap.c new file mode 100644 index 0000000000..675b56edec --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/keymap.c @@ -0,0 +1,551 @@ +#include QMK_KEYBOARD_H +#include "version.h" +#include "layers.h" + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + WORKMAN, + DVORAK, + COLEMAK, + LOWER, + RAISE, + GAME, + MOUSE, + EPRM, + VRSN, + RGB_SLD, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic QWERTY layer + * + * ,---------------------------------------------. ,---------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | + * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| + * | Tab | Q | W | E | R | T | [{ | | ]} | Y | U | I | O | P | BSPC | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | ESC | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | Enter | + * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' + * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | + * `------------------------------' `------------------------------' + * ,------------. ,------------. + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' + */ +[_QWERTY] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRACKET, + KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + + KC_MPLY, _______, + KC_LALT, + KC_SPACE, LOWER, KC_LGUI, + + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_RBRACKET, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPACE, + KC_H, KC_J, KC_K, KC_L, KC_SCOLON, KC_QUOTE, + _______, KC_N, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + + _______, KC_MPLY, + KC_LALT, + KC_LGUI, RAISE, KC_SPACE +), + +/* Keymap 0: Basic Workman layer + * + * ,---------------------------------------------. ,--------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | + * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| + * | Tab | Q | D | R | W | B | [{ | | ]} | J | F | U | P | ; | BSPC | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | ESC | A | S | H | T | G |------| |------| Y | N | E | O | I | ' | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | LShift | Z | X | M | C | V | | | | K | L | , | . | / | Enter | + * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' + * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | + * `------------------------------' `------------------------------' + * ,------------. ,------------. + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' + */ +[_WORKMAN] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_LBRACKET, + KC_ESC, KC_A, KC_S, KC_H, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, _______, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + + KC_MPLY, _______, + KC_LALT, + KC_SPACE, LOWER, KC_LGUI, + + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_RBRACKET, KC_J, KC_F, KC_U, KC_P, KC_SCOLON, KC_BSPACE, + KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOTE, + _______, KC_K, KC_L, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + + _______, KC_MPLY, + KC_LALT, + KC_LGUI, RAISE, KC_SPACE +), + +/* Keymap 0: Basic Dvorak layer + * + * ,---------------------------------------------. ,--------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | + * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| + * | Tab | ' | , | . | P | Y | [{ | | ]} | F | G | C | R | L | BSPC | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | ESC | A | O | E | U | I |------| |------| D | H | T | N | S | / | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | Enter | + * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' + * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | + * `------------------------------' `------------------------------' + * ,------------. ,------------. + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' + */ +[_DVORAK] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRACKET, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, _______, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + + KC_MPLY, _______, + KC_LALT, + KC_SPACE, LOWER, KC_LGUI, + + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_RBRACKET, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPACE, + KC_D, KC_H, KC_T, KC_N, KC_S, LT(MOUSE, KC_SLSH), + _______, KC_B, KC_M, KC_W, KC_V, KC_Z, RSFT_T(KC_ENT), + RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + + _______, KC_MPLY, + KC_LALT, + KC_LGUI, RAISE, KC_SPACE +), + +/* Keymap 0: Basic Colemak layer + * + * ,---------------------------------------------. ,--------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Esc | | Esc | 6 | 7 | 8 | 9 | 0 | Del | + * |--------+-----+-----+-----+-----+------------| |------+-----+-----+-----+-----+-----+--------| + * | Tab | Q | W | F | P | G | [{ | | ]} | J | L | U | Y | ; | BSPC | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | ESC | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * |--------+-----+-----+-----+-----+-----| | | |-----+-----+-----+-----+-----+--------| + * | LShift | Z | X | C | V | B | | | | K | M | , | . | / | Enter | + * `--------+-----+-----+-----+-----+------------' `------------+-----+-----+-----+-----+--------' + * | Num |Ctrl | Alt |LGUI |Lower| |Raise|Left |Down | Up |Right | + * `------------------------------' `------------------------------' + * ,------------. ,------------. + * |Play | | | |Play | + * ,-----|-----|------| |------+-----+-----. + * | | | Alt | | Alt | | | + * |Space|LOWER|------| |------|RAISE|Space| + * | | | LGUI | | LGUI | | | + * `------------------' `------------------' + */ +[_COLEMAK] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_LBRACKET, + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + TT(_NUM), KC_LCTL, KC_LALT, KC_LGUI, LOWER, + + KC_MPLY, _______, + KC_LALT, + KC_SPACE, LOWER, KC_LGUI, + + // right hand + KC_ESC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_RBRACKET, KC_J, KC_L, KC_U, KC_Y, KC_SCOLON, KC_BSPACE, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOTE, + _______, KC_K, KC_M, KC_COMM, KC_DOT, LT(_MOUSE, KC_SLSH), RSFT_T(KC_ENT), + RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, + + _______, KC_MPLY, + KC_LALT, + KC_LGUI, RAISE, KC_SPACE +), + +/* Lower + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ~ | ! | @ | # | $ | % | F6 | | F5 | ^ | & | * | ( | ) | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | | + * |---------+------+------+------+------+------| F12 | | F11 |------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | Home | End | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | Play | Vol- | Vol+ | Next | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_LOWER] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_F6, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______, + + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_F5, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT, + + _______, _______, + _______, + _______, _______, _______ +), + +/* Raise + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | Version | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ` | 1 | 2 | 3 | 4 | 5 | F6 | | F5 | 6 | 7 | 8 | 9 | 0 | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Del | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ | + * |---------+------+------+------+------+------| F12 | | F11 |------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | Play | Vol- | Vol+ | Next | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_RAISE] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F6, + KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______, + + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_F5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, KC_MPLY, KC_VOLD, KC_VOLU, KC_MNXT, + + _______, _______, + _______, + _______, _______, _______ +), + +/* Adjust + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |Reset |Debug | | | | | | | |TRM on|TRMoff| | | Del | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CPSLCK | | | | |AG Nrm|------| |------|AG Swp|QWERTY|Wrkman|Dvorak|Colmak| | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_ADJUST] = LAYOUT_ergodox( + // left hand + VRSN, _______, _______, _______, _______, _______, _______, + _______, RESET, DEBUG, BL_TOGG, BL_STEP, _______, _______, + KC_CAPS, _______, _______, _______, _______, AG_NORM, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______, + + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, TERM_ON, TERM_OFF, _______, _______, KC_DEL, + AG_SWAP, QWERTY, WORKMAN, DVORAK, COLEMAK, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + _______, _______, _______ +), + +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk |Wh Up | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght|Wh Dn |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | |Brwser|Brwser| + * | Lclk | Rclk |------| |------|Back |Fwd | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MOUSE +[_MOUSE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BTN2, KC_MS_U, KC_BTN1, KC_WH_D, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, + _______, _______, KC_WH_L, KC_BTN3, KC_WH_R, _______, TO(_GAME), + _______, _______, _______, _______, _______, + + _______, _______, + KC_WH_D, + KC_BTN1, KC_BTN2, KC_WH_U, + + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, + TO(_GAME), _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + + _______, _______, + _______, + _______, KC_WBAK, KC_WFWD +), + +/* Keymap 2: GAME + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | |Brwser|Brwser| + * | Lclk | Rclk |------| |------|Back |Fwd | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_GAME] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + _______, _______, + _______, + KC_SPACE, KC_LGUI, KC_LALT, + + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + + TG(_MOUSE), TT(_NUM), + _______, + _______, _______, _______ +), + +/* Keymap 2: NUMPAD + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | ✗ | ✗ | ✗ | ✗ | ✗ | ✗ | | ✗ | ✗ | ✗ | / | * | - | | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ✗ | Home | Up | End | PgUp | | | | ✗ | 7 | 8 | 9 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ✗ | Left | Down | Right| PgDn |------| |------| ✗ | 4 | 5 | 6 | + | ✗ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | / | * | - | + | Enter| | | | ✗ | 1 | 2 | 3 | Enter| Enter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | ✗ | | 0 | 0 | . | Enter| = | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_NUM] = LAYOUT_ergodox( + // left hand + _______, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + _______, KC_NO, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_NO, + _______, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + _______, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_PENT, KC_NO, + _______, _______, _______, _______, KC_NO, + + _______, _______, + _______, + _______, _______, _______, + + // right hand + KC_NO, KC_NO, KC_NO, KC_PSLS, KC_PAST, KC_PMNS, _______, + KC_NO, KC_NO, KC_P7, KC_P8, KC_P9, KC_PPLS, _______, + KC_NO, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, + KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, + KC_P0, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, + + _______, _______, + _______, + _______, _______, _______ +), + +}; + +void matrix_init_user() { + led_matrix_enable_noeeprom(); + led_matrix_set_val_noeeprom(UINT8_MAX); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + case WORKMAN: + if (record->event.pressed) { + set_single_persistent_default_layer(_WORKMAN); + } + return false; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_DVORAK); + } + return false; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + if (IS_LAYER_ON(_ADJUST)) { + layer_off(_LOWER); + layer_off(_RAISE); + } + } else { + layer_off(_LOWER); + if (IS_LAYER_ON(_ADJUST)) { + layer_off(_ADJUST); + layer_on(_RAISE); + } + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + if (IS_LAYER_ON(_ADJUST)) { + layer_off(_RAISE); + layer_off(_LOWER); + } + } else { + layer_off(_RAISE); + if (IS_LAYER_ON(_ADJUST)) { + layer_off(_ADJUST); + layer_on(_LOWER); + } + } + return false; + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + } + return true; +} diff --git a/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/layers.h b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/layers.h new file mode 100644 index 0000000000..d852fe9803 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/dudeofawesome/layers.h @@ -0,0 +1,14 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _WORKMAN, + _DVORAK, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST, + _GAME, + _MOUSE, + _NUM, +}; diff --git a/keyboards/input_club/ergodox_infinity/keymaps/gordon/config.h b/keyboards/input_club/ergodox_infinity/keymaps/gordon/config.h new file mode 100644 index 0000000000..772ce0bac9 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/gordon/config.h @@ -0,0 +1,29 @@ +/* +Copyright 2018 Daniel Gordon <Dgordon8765@gmail.com> + +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/>. +*/ + +#undef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT + +#undef PERMISSIVE_HOLD +// #define PERMISSIVE_HOLD + +#define ONESHOT_TAP_TOGGLE 2 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#define FORCE_NKRO diff --git a/keyboards/input_club/ergodox_infinity/keymaps/gordon/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/gordon/keymap.c new file mode 100644 index 0000000000..c321d546fb --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/gordon/keymap.c @@ -0,0 +1,394 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "process_keycode/process_tap_dance.h" +#include "gordon.h" + +#include "keymap_german.h" + +#include "keymap_nordic.h" + + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD, +}; + + +// Custom tapping terms for each key. +// Requires changes to action_taping.c +// uint16_t get_tapping_term(keyevent_t* event) { +// uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key); +// if (keycode == NAV_E ) { +// return TAPPING_TERM + 50; +// } +// return TAPPING_TERM; +// } + + +// _XXXXXX_ is a symbol that means, "DO NOT ASSIGN THIS KEY TO ANTYING", because the key +// underneath this layer is the key that sends you to/from this layer. +// Meaning, if you were to put something here - then you will be stuck in this layer. +// It is simply a visual reminder not to use that key for this layer. +// Example: On the numpad layer, under the letter `D` is `_XXXXXXX_`, because pressing and holding +// `D` sends you to the numpad layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +//**************************FIRST LAYER - LAYER ZERO ************************************** + [_QWERTY] = LAYOUT_ergodox( + + SHF6_AF7, F1_F13 , F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11, + SPRK_TCK , Q_ESC , CTR_SH_W, NAV_E, ALT_SH_R, KC_T, PRINTSCR, + KC_TAB , KC_A , MEH_S, NUMPAD_D, CTRL_F, WIN_G, + OSL(_ONESHOT), CTRL_Z , HYPER_X, MOUSE_C, ALT_V, KC_B, OSL(_MOUSE), + KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT, + + LSFT(KC_INSERT), TT(_QWERTY_KIDS), + ________ , + KC_LSHIFT, SYMB_BSP, KC_INSERT , + + F12_RUN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, TD(CALCCOMP), + CALTDEL , KC_Y, KC_U, KC_I, KC_O, KC_P, MODRESET, + WIN_H, CTRL_J, APP_SW_K, MEH_L, COL_MOUS, END_HOME, + OSL(_ONESHOT), KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, ID_MAN_IP, + KC_UP, KC_DOWN,KC_DELETE, KC_TILD, KC_UNDS, + + TT(_STREET_FIGHTER), ________, + KC_PGUP, + KC_PGDOWN, LT(_NAV,KC_ENTER), SPAC_TXT), + + + //**************************SYMBOLS LAYER************************** + [_SYMBOLS] = LAYOUT_ergodox( + ________, ________, ________, ________, ________, ________, ________, + ________, DEREF , KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________, + ________, KC_EXLM, KC_HASH, KC_LPRN, KC_RPRN, ________, + ________,KC_DOLLAR, KC_PERC, LSQUIGLY, RSQUIGLY, ________, ________, + ________,TICK3 , ________, ________, ________, + + ________,________, + ________, + ________,_XXXXXX_,________, + + + ________, ________, ________, ________, ________, ________, NUMLOCK, + ________,TIL_SLASH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK, + EQRIGHT, KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________, + ________, KC_M, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________, + ________,________ ,________,TILD3,________, + ________,________, + ________, + ________,________,_XXXXXX_), + + //**************************MOUSE MOVEMENT LAYER************************** + [_MOUSE] = LAYOUT_ergodox(UP_ENTER_RESET,________,________,________,________,________,MODRESET, + RESET,KC_SECRET_5,________,KC_MS_UP,KC_SECRET_4,KC_MS_WH_UP,________, + ________,________,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_MS_WH_DOWN, + KC_SECRET_5,KC_SECRET_4,KC_SECRET_3,_XXXXXX_,KC_SECRET_2,KC_SECRET_1,_XXXXXX_, + ________,________,HYPR(KC_F15),KC_MS_WH_LEFT,KC_MS_WH_RIGHT, + + ________,________, + ________, + KC_MS_BTN1,KC_MS_BTN2,________, + + + ________,________,________,________,________,________,________, + ________,________,________,KC_UP,________,KC_MEDIA_PLAY_PAUSE,________, + ________,KC_LEFT,KC_DOWN,KC_RIGHT,_XXXXXX_,________, + ________,KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_MUTE,________,________, + KC_MS_WH_UP,KC_MS_WH_DOWN,________,________,________, + ________,________, + ________, + ________,KC_WWW_BACK,KC_WWW_FORWARD), + + + + + //**************************WINDOWS NAVIGATION LAYER************************** + + [_NAV] = LAYOUT_ergodox(________,________,________,________,________,________,________, + ________,________,SNAPLEFT,_XXXXXX_,SNAPRGHT,________,________, + ________,KC_WWW_BACK,PREVTAB,________,NEXTTAB,SNAPUP, + ________,________,WORKLEFT,________,WORKRIGHT,SNAPDOWN,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,SNAPUP ,KC_UP ,SNAPDOWN,________,________, + ________,KC_LEFT ,KC_DOWN ,KC_RIGHT,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), + + //****************************NUMPAD LAYER**************************** + [_NUMPAD] = LAYOUT_ergodox(________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,KC_DOT ,KC_SPACE,_XXXXXX_, KC_ESC ,________, + ________,DBMS_OUT,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + KC_PLUS,KC_MINUS,________, + + BL_TOGG ,BL_STEP ,________,________,________,________,________, + ________,________,KC_7 ,KC_8 ,KC_9 ,________,________, + ________,KC_4 ,KC_5 ,KC_6 ,________,________, + ________,KC_DOT, KC_1 ,KC_2 ,KC_3 ,________,________, + KC_0 ,KC_DOT , KC_DOT ,________,________, + + ________,________, + ________, + ________,________,KC_0), + + //****************************APP SWITCH LAYER**************************** + [_APPSWITCH] = LAYOUT_ergodox(________,________,________,________,________,________,________, + ________,________ , ________ , ________ ,________ ,________,________, + ________,APP_5,APP_6,APP_7,APP_8,________, + ________,DBMS_OUT,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + KC_PLUS,________,________, + + ________,________,________,________,________,________,________, + ________,________,APP_3 ,________,APP_4 ,________,________, + ________,APP_1 ,_XXXXXX_,APP_2 ,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________), + + + [_ONESHOT] = LAYOUT_ergodox( UP_ENTER_RESET , ________, ________, ________, ________, ________, ________, + ________, ________, ________, KC_UP , ________, ________, ________, + ________, ________, KC_LEFT , KC_DOWN , KC_RIGHT, ________, + MAGIC_TOGGLE_NKRO, ________, ________, ________, ________, ________, ________, + ________, ________, ________, ________, ________, + + ________, ________, + ________, + ________, ________, ________, + + ________, ________, ________, ________, ________, ________, ________, + ________, ________, KC_7, KC_8, KC_9, KC_PLUS, ________, + ________, KC_4, KC_5, KC_6, KC_EQUAL, ________, + ________, ________, KC_1, KC_2, KC_3, KC_ASTR, ________, + ________, ________, KC_0, ________, ________, + + ________, ________, + ________, + ________, ________, ________), + //****************************TEXT/INTELLIJ NAVIGATION LAYER**************************** + [_TEXTNAV] = LAYOUT_ergodox(________,________,________,________,________,________,________, + ________,MEH(KC_Q),LSFT(KC_ESCAPE),MEH(KC_D),MEH(KC_2),LALT(LSFT(KC_UP)),________, + ________,________,LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)), + ________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________, + ________,________,________,________,________, + + ________,________,________,________,________,________, + + LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)), + ________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)), + LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________, + ________,________,________,________,________,________,________,________,________,_XXXXXX_), + [_QWERTY_KIDS] = LAYOUT_ergodox( + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_Q , KC_W, KC_E, KC_R, KC_T, KC_NO , + KC_NO , KC_A , KC_S, KC_D, KC_F, KC_G , + KC_NO , KC_Z , KC_X, KC_C, KC_V, KC_B, KC_NO , + KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT, + + KC_NO , TT(_QWERTY_KIDS) , + KC_NO , + KC_LSHIFT, KC_BSPACE, KC_NO , + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO , + KC_H, KC_J, KC_K, KC_L, KC_SCOLON , KC_NO, + KC_NO , KC_N, KC_M, KC_COMMA , KC_DOT , KC_SLASH, KC_NO , + KC_UP, KC_DOWN, KC_DELETE, KC_TILD, KC_UNDS, + + KC_NO , KC_NO , + KC_NO, + KC_NO, KC_ENTER, KC_SPACE), + + [_STREET_FIGHTER] = LAYOUT_ergodox( + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO , DIE_1000X_LEFT, KC_UP, DIE_1000X_RIGHT, KC_NO, KC_NO , + KC_NO , KC_NO , KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO , + KC_NO , KC_NO , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + + ________ , ________ , + ________ , + ________, ________, ________ , + + KC_NO, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO, KC_G, KC_H, KC_J, KC_NO, KC_NO , + KC_NO, KC_B, KC_N, KC_M, KC_K , KC_NO, + KC_NO , KC_NO, KC_NO, KC_NO , KC_NO , KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + + TT(_STREET_FIGHTER) , ________ , + ________, + ________, ________, ________), + + + //************************Windows navigation to directories************************* + [_DIRNAV] = LAYOUT_ergodox( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,KC_A,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,_______,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), + + + [_TEXT_MACROS] = LAYOUT_ergodox( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,KC_A,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,_______,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________) + + +/* FOR FORMATTING FUTURE LAYERS + NO KEY CODES SHOULD BE MORE THAN 8 CHARACTERS + GOES LEFT HAND THEN RIGHT HAND + [_DIRNAV] = LAYOUT_ergodox( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), */ + + + + +}; + +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_on(); + ergodox_led_all_on(); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + // _delay_ms(45); + + switch (layer) + { + case _SYMBOLS: + ergodox_right_led_1_on(); + break; + case _MOUSE: + ergodox_right_led_2_on(); + break; + case _NUMPAD: + ergodox_right_led_3_on(); + break; + case _NAV: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case _MACROS: + //layer unused right now + break; + case _FUNCTION: + //layer unused right nowex + break; + case _APPSWITCH: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _ONESHOT: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _TEXTNAV: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case _QWERTY_KIDS: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _STREET_FIGHTER: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + default: + break; + } +}; diff --git a/keyboards/input_club/ergodox_infinity/keymaps/gordon/rules.mk b/keyboards/input_club/ergodox_infinity/keymaps/gordon/rules.mk new file mode 100644 index 0000000000..9a56408f8e --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/gordon/rules.mk @@ -0,0 +1,2 @@ +TAP_DANCE_ENABLE = yes + diff --git a/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/config.h b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/config.h new file mode 100644 index 0000000000..bca8571e79 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2015 Jun Wako <wakojun@gmail.com> + +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 + +/* + * music mode options + * midi enabled + * keymask disabled + * so typing normally will result in music + * + */ +#define MUSIC_MASK keycode != KC_NO diff --git a/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/keymap.c new file mode 100644 index 0000000000..3870dd8ffd --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/keymap.c @@ -0,0 +1,514 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "keymap_steno.h" +#ifndef MIDI_ENABLE +#error "Midi is not enabled" +#endif +#define QWERTY 0 // qwerty layer +#define HALFQWERTY 1 // mirrored qwerty layer +#define DVORAK 2 // dvorak layer +#define HALFDVORAK 3 // mirrored dvorak layer +//no layer 4 +#define SYMB 5 // symbols +#define HALFSYMB 6 // media keys +#define PLVR 7 // steno plover layout +#define SHORTCUTS 8 //layer with shortcut keys and other layer nav +#define FUNCTION 9 //all F-keys, all day +#define PROPERSTENO 10 //real steno layout + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: qwerty + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | RMB | | \ | 6 | 7 | 8 | 9 | 0 | BSPC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER | + * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | RGui| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Symbol|LMB | |Plover|HalfSymb| + * ,------|------|------| |------+--------+------. + * | | |MU_TOG| | PgUp | | | + * | Space|DELETE|------| |------| Tab |Enter | + * |mirror| | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[QWERTY] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BTN2, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_EQL, + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MINUS, + KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), MO(SHORTCUTS), + KC_LGUI, KC_BTN1, + MU_ON, + KC_SPACE,KC_DEL,KC_END, + // right hand + KC_BTN2, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLASH, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_EQL,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT, + MO(SHORTCUTS), KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_BTN1, KC_RGUI, + MU_OFF, + KC_PGDN,KC_TAB, LT(HALFQWERTY, KC_ENT) + ), +/* Keymap 1: mirrored qwerty + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | BSPC | 0 | 9 | 8 | 7 | 6 | \ | | ` | 5 | 4 | 3 | 2 | 1 | ESC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ' | P | O | I | U | Y | ] | | [ | T | R | E | W | Q | TAB | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ENTER | ; | L | K | J | H |------| |------| G | F | D | S | A | BSPC | + * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------| + * | LShift | / | . | , | M | N | | | | B | V | C | X | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | RGui| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|DELETE|------| |------| Tab |Enter | + * |mirror| | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[HALFQWERTY] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_TRNS, + KC_BSLS, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_LBRC, + KC_ENT, KC_SCLN, KC_L, KC_K, KC_J, KC_H, + KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_RBRC, + KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRANSPARENT,KC_DEL,KC_END, + // right hand + KC_TRNS, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC, + KC_MINUS, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS, + KC_G, KC_F, KC_D, KC_S, KC_A, KC_ENT, + KC_EQL,KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT, + KC_TRNS, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_TRANSPARENT, KC_TRNS, + KC_TRNS, + KC_PGDN,KC_TAB, KC_TRANSPARENT + ), +/* Keymap 2: dvorak + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | ` | | \ | 6 | 7 | 8 | 9 | 0 | BSPC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | / | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | O | E | U | I |------| |------| D | H | T | N | S |ENTER | + * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------| + * | LShift | ; | Q | J | K | X | | | | B | M | W | V | Z | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | Mouse| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Alt | | | |Alt | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|DELETE|------| |------| Tab |Enter | + * |mirror| | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[DVORAK] = LAYOUT_ergodox( // layer 2 : dvorak + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_MINUS, + KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_EQL, + KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS, + KC_TRNS, KC_TRANSPARENT, + KC_UP, + LT(HALFDVORAK, KC_SPACE),KC_DEL,KC_DOWN, + // right hand + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_LBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, + KC_RBRC,KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_TRNS, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_PGUP, + KC_PGDN,KC_TAB, LT(HALFDVORAK, KC_ENT) + ), +/* Keymap 3: mirrored dvorak + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | BSPC | 0 | 9 | 8 | 7 | 6 | \ | | ` | 5 | 4 | 3 | 2 | 1 | ESC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | / | L | R | C | G | F | L1 | | L1 | Y | P | . | , | ' | TAB | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ENTER | S | N | T | H | D |------| |------| I | U | E | O | A |BSPC | + * |--------+------+------+------+------+------| = | | - |------+------+------+------+------+--------| + * | LShift | Z | V | W | M | B | | | | X | K | J | Q | ; | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | MOUSE| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Alt | | | |Alt | + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|DELETE|------| |------| Tab |Enter | + * |mirror| | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[HALFDVORAK] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_TRNS, + KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, KC_LBRC, + KC_ENT, KC_S, KC_N, KC_T, KC_H, KC_D, + KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, KC_RBRC, + KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_TRNS, + KC_TRANSPARENT,KC_ENT,KC_TRNS, + // right hand + KC_TRNS, KC_5, KC_4, KC_3, KC_2, KC_5, KC_ESC, + KC_MINUS, KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB, + KC_I, KC_U, KC_E, KC_O, KC_A, KC_BSPC, + KC_EQL,KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT, + KC_TRNS, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_TRANSPARENT, KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TAB, KC_TRANSPARENT + ), +/* Keymap 5: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 |BkSp | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | / | \ | { | } | | | | | | Up | 7 | 8 | 9 | * | / | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ' | ; | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | - | ENTER | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | - | = | [ | ] | ~ | | | | & | 1 | 2 | 3 | + | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EPRM | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |mirror| |------| |------| |mirror| + * |space | | | | | |enter | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_NO,KC_SLASH,KC_BSLS, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_NO,KC_QUOT,KC_SCLN, KC_LPRN,KC_RPRN,KC_GRV, + KC_NO,KC_MINUS,KC_EQL,KC_LBRC,KC_RBRC,KC_TILD,KC_NO, + EPRM,KC_NO,KC_NO,KC_NO,KC_TRNS, + KC_TRNS,KC_NO, + KC_NO, + LT(HALFSYMB, KC_SPACE),KC_NO,KC_NO, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSPC, + KC_NO, KC_UP, KC_KP_7, KC_KP_8, KC_KP_9,KC_KP_ASTERISK, KC_KP_SLASH, + KC_DOWN, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_ENTER, + KC_NO,KC_AMPR,KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_NO, + KC_TRNS,KC_DOT, KC_0, KC_KP_EQUAL, KC_NO, + BL_OFF, KC_TRNS, + BL_ON, + KC_NO, KC_NO, LT(HALFSYMB, KC_ENT) +), +/* Keymap 6: Mirrored Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * |delete | F12 | F11 | F10 | F9 | F8 | F7 | | F6 | F5 | F4 | F3 | F2 | F1 |BkSp | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | | 7 | 8 | 9 | * | / | | | | | { | } | / | \ | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | 4 | 5 | 6 | - |------| |------| ` | ( | ) | ; | ' | | + * |---------+------+------+------+------+------|enter | | |------+------+------+------+------+--------| + * | | | 1 | 2 | 3 | + | | | | ~ | [ | ] | = | - | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EPRM | | 0 | . | = | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[HALFSYMB] = LAYOUT_ergodox( + // left hand + KC_BSPC, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, + KC_NO,KC_NO,KC_KP_7, KC_KP_8, KC_KP_9,KC_KP_ASTERISK,KC_KP_SLASH, + KC_ENTER,KC_NO,KC_KP_4, KC_KP_5, KC_KP_6,KC_KP_MINUS, + KC_NO,KC_NO,KC_KP_1, KC_KP_2, KC_KP_3,KC_KP_PLUS,KC_KP_ENTER, + EPRM,KC_NO,KC_KP_0,KC_KP_DOT,KC_KP_EQUAL, + KC_TRNS,KC_NO, + KC_TRNS, + KC_TRANSPARENT,KC_NO,KC_NO, + // right hand + KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_BSPC, + KC_NO,KC_PIPE,KC_LCBR,KC_RCBR, KC_SLASH, KC_BSLS, KC_NO, + KC_GRV,KC_LPRN,KC_RPRN, KC_SCLN, KC_QUOT, KC_NO, + KC_NO, KC_TILD,KC_LBRC,KC_RBRC, KC_EQL, KC_MINUS, KC_NO, + KC_TRNS,KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_TRNS, + KC_TRNS, + KC_NO, KC_NO, KC_TRANSPARENT +), +/* Keymap 7: Steno for Plover from https://github.com/shayneholmes/tmk_keyboard/commit/11290f8489013018f778627db725160c745e75bd + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | q | w | e | r | t |------| |------| y | u | i | o | p | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | a | s | d | f | g | | | | h | j | k | l | ; | ' | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | c | v |------| |------| n | m | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +[PLVR] = LAYOUT_ergodox( // layout: layer 7: Steno for Plover + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_NO, + KC_C, KC_V, KC_NO, + // right hand + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, KC_N, KC_M +), + +/* Keymap 8: shortcuts + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | TAB | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER | + * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCTRL|ALT |CTLShTab|CTL-TAB| | | RGui| UP | DOWN | ALT | RCTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |SYMBOLS|Dvorak| |Steno |Plover| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|DELETE|------| |------| Tab |Enter | + * |mirror| | End | | PgDn | |mirror| + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[SHORTCUTS] = LAYOUT_ergodox( // layer 0 : default + // left hand + RGB_MODE_KNIGHT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_TAB, LCTL(KC_Q), LCTL(KC_W),LCTL(KC_E),LCTL(KC_R),LCTL(KC_T), KC_NO, + KC_BSPC, LCTL(KC_A), LCTL(KC_S),LCTL(KC_D),LCTL(KC_F),LCTL(KC_G), + KC_LSFT, LCTL(KC_Z), LCTL(KC_X),LCTL(KC_C),LCTL(KC_V),LCTL(KC_B), KC_MINUS, + RESET, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRANSPARENT, + TG(SYMB), TG(DVORAK), + + TG(FUNCTION), + KC_NO,KC_NO,KC_NO, +// right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + TG(SYMB),LCTL(KC_Y),LCTL(KC_U),LCTL(KC_I),LCTL(KC_O),LCTL(KC_P),KC_BSLS, + LCTL(KC_H),LCTL(KC_J),LCTL(KC_K),LCTL(KC_L),LCTL(KC_SCLN),KC_ENT, + KC_EQL,LCTL(KC_N),LCTL(KC_M),LCTL(KC_COMM),LCTL(KC_DOT),LCTL(KC_SLASH),KC_RSFT, + KC_TRNS, KC_UP,KC_DOWN,KC_RALT, RESET, + TG(PROPERSTENO),TG(PLVR), + KC_NO, + KC_NO,KC_NO, KC_NO + ), + /* Keymap 9: Functions + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F1 | F2 | F3 | F4 | F5 | F6 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | F13 | F14 | F15 | F16 | F17 | F18 |------| |------| F13 | F14 | F15 | F16 | F17 | F18 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | F19 | F20 | F21 | F22 | F23 | F24 | | | | F19 | F20 | F21 | F22 | F23 | F24 | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | c | v |------| |------| n | m | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +[FUNCTION] = LAYOUT_ergodox( // layout: layer 9 + // left hand + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, + KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, KC_NO, KC_NO, + // right hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, + KC_NO,KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, KC_NO, KC_NO +), + /* Keymap 10: Steno + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | q | w | e | r | t |------| |------| y | u | i | o | p | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | a | s | d | f | g | | | | h | j | k | l | ; | ' | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | c | v |------| |------| n | m | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +[PROPERSTENO] = LAYOUT_ergodox( // layout: layer 10 + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, KC_NO, + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + STN_A, STN_O, KC_NO, + // right hand + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC, + STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + KC_NO,STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, STN_E, STN_U +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + steno_set_mode(STENO_MODE_GEMINI); // or STENO_MODE_BOLT +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/rules.mk b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/rules.mk new file mode 100644 index 0000000000..04cd01b2b7 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/halfkeyboard/rules.mk @@ -0,0 +1,4 @@ +STENO_ENABLE = yes +MIDI_ENABLE = yes +MIDI_ADVANCED = yes +MUSIC_MODE = yes diff --git a/keyboards/input_club/ergodox_infinity/keymaps/input_club/README.md b/keyboards/input_club/ergodox_infinity/keymaps/input_club/README.md new file mode 100644 index 0000000000..31ae23ac40 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/input_club/README.md @@ -0,0 +1,23 @@ +# Input Club ErgoDox Infinity Layout + +A basic ErgoDox layout that duplicates the default Input Club layout + +## Features + +Base Layers + +- QWERTY +- Function Keys +- Numpad + +## Building and flashing + +1. Put your board in DFU mode with either the button on the bottom, or with a software key in your current firmware +2. Flash left half: + ```bash + make ergodox_infinity:input_club:dfu-util + ``` +3. Flash right half: + ```bash + make ergodox_infinity:input_club:dfu-util MASTER=right + ``` diff --git a/keyboards/input_club/ergodox_infinity/keymaps/input_club/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/input_club/keymap.c new file mode 100644 index 0000000000..545429fca0 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/input_club/keymap.c @@ -0,0 +1,245 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define L0 0 // default layer +#define L1 1 +#define L2 2 + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[L0] = LAYOUT_ergodox( // layer 0 : default +/* + * left hand + * +-------+-----+-----+-----+-----+-----+-----+ + * | = | 0 | 2 | 3 | 4 | 5 | ESC | + * +-------+-----+-----+-----+-----+-----+-----+ + * | \ | Q | W | E | R | T |LCK-1| + * +-------+-----+-----+-----+-----+-----+ | + * | TAB | A | S | D | F | G +-----+ + * +-------+-----+-----+-----+-----+-----+ f1 | + * | LSHIFT| Z | X | C | V | B | | + * +-+-----+-----+-----+-----+-----+-----+-----+ + * |LGUI | ` | \ |LEFT |RIGHT| + * +-----+-----+-----+-----+-----+ +-----+-----+ + * |LCTRL| LALT| + * +-----+-----+-----+ + * | | | HOME| + * |BKSPC| DEL +-----+ + * | | | END | + * +-----+-----+-----+ + */ + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_ESC, + KC_BSLS, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(L1), + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(L1), + KC_LGUI, KC_GRV, KC_BSLS, KC_LEFT, KC_RGHT, + KC_LCTL, KC_LALT, + KC_HOME, + KC_BSPC, KC_DEL, KC_END, +/* right hand + * +-----+-----+-----+-----+-----+-----+-------+ + * |LCK-2| 6 | 7 | 8 | 9 | 0 | - | + * +-----+-----+-----+-----+-----+-----+-------+ + * | [ | Y | U | I | O | P | ] | + * | +-----+-----+-----+-----+-----+-------+ + * +-----+ H | J | K | L | ; | ' | + * | f1 +-----+-----+-----+-----+-----+-------+ + * | | N | M | , | . | / | RSHIFT| + * +-----+-----+-----+-----+-----+-----+-----+-+ + * |LEFT |DOWN | UP |RIGHT| RGUI| + * +-----+-----+ +-----+-----+-----+-----+-----+ + * | RALT|RCTRL| + * +-----+-----+-----+ + * | PGUP| | | + * +-----+ ENT | SPC | + * | PGDN| | | + * +-----+-----+-----+ + */ + TG(L2), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MO(L1), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RGUI, + KC_RALT, KC_RCTL, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC + ), + +[L1] = LAYOUT_ergodox( // layer 1 : function layers +/* left hand + * +-------+-----+-----+-----+-----+-----+-----+ + * | | f1 | f2 | f3 | f4 | f5 | f11 | + * +-------+-----+-----+-----+-----+-----+-----+ + * | | | | | | | | + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | +-----+ + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | | | + * +-+-----+-----+-----+-----+-----+-----+-----+ + * | | | | | | + * +-----+-----+-----+-----+-----+ +-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * | | +-----+ + * | | | | + * +-----+-----+-----+ + */ + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + 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, +/* right hand + * +-----+-----+-----+-----+-----+-----+-------+ + * | f12 | f6 | f7 | f8 | f9 | f10 | | + * +-----+-----+-----+-----+-----+-----+-------+ + * | | | | | | | | + * | +-----+-----+-----+-----+-----+-------+ + * +-----+ | | | | | | + * | +-----+-----+-----+-----+-----+-------+ + * | | | | | | | | + * +-----+-----+-----+-----+-----+-----+-----+-+ + * | | | | | | + * +-----+-----+ +-----+-----+-----+-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * +-----+ | | + * | | | | + * +-----+-----+-----+ + */ + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, 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 +), +[L2] = LAYOUT_ergodox( +/* Left hand + * +-------+-----+-----+-----+-----+-----+-----+ + * | FLASH | | | | | | | + * +-------+-----+-----+-----+-----+-----+-----+ + * | | | | | | | | + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | +-----+ + * +-------+-----+-----+-----+-----+-----+ | + * | | | | | | | | + * +-+-----+-----+-----+-----+-----+-----+-----+ + * | | | | | | + * +-----+-----+-----+-----+-----+ +-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * | | +-----+ + * | | | | + * +-----+-----+-----+ + */ + RESET, 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, KC_TRNS, +/* right hand + * +-----+-----+-----+-----+-----+-----+-------+ + * | | |NMLCK| P/ | P* | P- | | + * +-----+-----+-----+-----+-----+-----+-------+ + * | | | P7 | P8 | P9 | P+ | | + * | +-----+-----+-----+-----+-----+-------+ + * +-----+ | P4 | P5 | P6 | P+ | | + * | +-----+-----+-----+-----+-----+-------+ + * | | | P1 | P2 | P3 |PENT | | + * +-----+-----+-----+-----+-----+-----+-----+-+ + * | | | P. |PENT | | + * +-----+-----+ +-----+-----+-----+-----+-----+ + * | | | + * +-----+-----+-----+ + * | | | | + * +-----+ | P0 | + * | | | | + * +-----+-----+-----+ + */ + KC_TRNS, KC_TRNS, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS, KC_TRNS, + KC_TRNS, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_PLUS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER, KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_DOT, KC_KP_ENTER, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_KP_0 +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h b/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h new file mode 100644 index 0000000000..d5ed0a8e9e --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/config.h @@ -0,0 +1,15 @@ +#pragma once + +#undef TAPPING_TERM +#define TAPPING_TERM 150 + +#define COMBO_TERM 20 +#define COMBO_COUNT 1 + +#define IGNORE_MOD_TAP_INTERRUPT +#define PERMISSIVE_HOLD + +#undef MOUSEKEY_DELAY +#define MOUSEKEY_DELAY 100 + +#define USB_POLLING_INTERVAL_MS 1 diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/default.png.md b/keyboards/input_club/ergodox_infinity/keymaps/narze/default.png.md new file mode 100644 index 0000000000..744e7d172a --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/default.png.md @@ -0,0 +1 @@ +https://i.imgur.com/fKX0Zbs.png diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/default_highres.png.md b/keyboards/input_club/ergodox_infinity/keymaps/narze/default_highres.png.md new file mode 100644 index 0000000000..074e0634d2 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/default_highres.png.md @@ -0,0 +1 @@ +https://i.imgur.com/giAc3M9.jpg diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/narze/keymap.c new file mode 100644 index 0000000000..dd721e9a78 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/keymap.c @@ -0,0 +1,697 @@ +#include QMK_KEYBOARD_H +#include "narze.h" +#include "version.h" +#include "keymap_colemak.h" + +extern keymap_config_t keymap_config; + +enum ergodox_layers { + _QWERTY, + _COLEMAK, + _QWOC, + _LOWER, + _RAISE, + _PLOVER, + // Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet) + _SUPERDUPER, + _DEV, + _MOUSE, + _ADJUST, + _MDIA, + _SYMB, +}; + +enum ergodox_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + QWOC, + LOWER, + RAISE, + PLOVER, + SUPERDUPER, + DEV, + MOUSE, + BACKLIT, + EXT_PLV, + SDTOGG, // Toggle SuperDuper + EPRM, + VRSN, + RGB_SLD, + GUI_UNDS, + LSFT_LPRN, + RSFT_RPRN, +}; + +// Narze : Custom Macros +#define SFT_PO LSFT_LPRN +#define SFT_PC RSFT_RPRN + +enum process_combo_event { + CB_SUPERDUPER, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Mdia | | Mdia | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Symb | | Symb | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Hp/Esc | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | Sft/( | Z/Dv | X | C | V | B | | | | N | M | , | . | SD-/ | Sft/) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse/B| Bksp | Alt | Ctrl | Low/] | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Enter| LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space| Back |------| |------| Back |Enter | + * | | Space| End | | PgDn | Space | | + * `--------------------' `----------------------' + */ +[_QWERTY] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, LT(_SYMB, KC_NO), + HPR_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + SFT_PO, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(_SYMB, KC_NO), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, + RAISE, KC_BSPC,ALT_COLN,KC_RCTL, LT(_LOWER, KC_RBRC), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), +/* Colemak + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | Mdia | | Mdia | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | F | P | G | Symb | | Symb | J | L | U | Y | ; | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Hp/Esc | A | R | S | T | D |------| |------| H | N | E | I | O | ' | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | Sft/( | Z/Dv | X | C | V | B | | | | K | M | , | . | SD-/ | Sft/) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Rse/[ | Ctrl | Alt | Gui/_| Lwr | | Rse/B| Bksp | Alt | Ctrl | Low/] | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Enter| LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space| Back |------| |------| Back |Enter | + * | | Space| End | | PgDn | Space | | + * `--------------------' `----------------------' + */ +[_COLEMAK] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, LT(_SYMB, KC_NO), + HPR_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, + SFT_PO, LT(_DEV, KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(_SYMB, KC_NO), KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + MEH_T(KC_NO),KC_K, KC_M, KC_COMM,KC_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, + RAISE, KC_BSPC,ALT_COLN,KC_RCTL, LT(_LOWER, KC_RBRC), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), +/* Qwerty on software Colemak : Useful for gaming with qwerty keymaps! */ +[_QWOC] = LAYOUT_ergodox( + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, LT(_MDIA, KC_NO), + KC_TAB, CM_Q, CM_W, CM_E, CM_R, CM_T, LT(_SYMB, KC_NO), + HPR_ESC, CM_A, CM_S, CM_D, CM_F, CM_G, + SFT_PO, LT(_MOUSE, CM_Z), CM_X, CM_C, CM_V, CM_B, ALL_T(KC_NO), + LT(_RAISE, KC_LBRC),KC_LCTL, KC_LALT, GUI_UNDS, LOWER, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + LT(_MDIA, KC_NO), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + LT(_SYMB, KC_NO), CM_Y, CM_U, CM_I, CM_O, CM_P, KC_BSLS, + CM_H, CM_J, CM_K, CM_L, CM_SCLN, KC_QUOT, + MEH_T(KC_NO),CM_N, CM_M, CM_COMM,CM_DOT, LT(_SUPERDUPER, KC_SLSH), SFT_PC, + RAISE, KC_BSPC,ALT_COLN,KC_RCTL, LT(_LOWER, KC_RBRC), + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), +/* Lower + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | _ | + | { | } | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_LOWER] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), +/* Raise + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F1 | F2 | F3 | F4 | F5 |------| |------| F6 | - | = | [ | ] | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F7 | F8 | F9 | F10 | F11 | | | | F12 |ISO ~ |ISO | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[_RAISE] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, _______, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_F12,S(KC_NUHS),S(KC_NUBS), _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), + +/* Plover + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | # | # | # | # | # | # | | | | # | # | # | # | # | # | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | # | # | # | # | # | | | | # | # | # | # | # | # | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Hp/Esc | S | T | P | H | * |------| |------| * | F | P | L | T | D | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Sft/( | S | K | W | R | * | | | | * | R | B | G | S | Z | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Exit | | | A | O | | E | U | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Enter| LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space| Back |------| |------| Back |Enter | + * | | Space| End | | PgDn | Space | | + * `--------------------' `----------------------' + */ +[_PLOVER] = LAYOUT_ergodox( + // left hand + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, XXXXXXX, + EXT_PLV, XXXXXXX, XXXXXXX,KC_C, KC_V, + KC_ENT, KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + XXXXXXX, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_N, KC_M,XXXXXXX,XXXXXXX, XXXXXXX, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_BSPC, KC_ENT + ), + +/* SuperDuper : https://gist.github.com/narze/861e2167784842d38771 + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | T← | T→ | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | A | [SuperDuper]| Bksp | Gui |------| |------| ← | ↓ | ↑ | → | Del | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | Shift| |------| |------| |Shift | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[_SUPERDUPER] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, KC_LALT, _______, _______, KC_BSPC, KC_LGUI, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + KC_LSFT,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, S(LGUI(KC_LBRC)), S(LGUI(KC_RBRC)), _______, _______, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_DEL, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, KC_LSFT + ), + +/* Dev Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | - | + | ( | ) | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| _ | [ | ] | { | } | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | = | | | < | > | ? | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[_DEV] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_MINS, S(KC_EQL), S(KC_9), S(KC_0), _______, + S(KC_MINS), KC_LBRC, KC_RBRC, S(KC_LBRC), S(KC_RBRC), _______, + _______, KC_EQL, S(KC_BSLASH), S(KC_COMM), S(KC_DOT), S(KC_SLSH), _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, _______ + ), + +/* Mouse + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | S↑ | M↑ | S↓ | | | | | | | S↑ | S↓ | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | M← | M↓ | M→ | |------| |------| M← | M↓ | M↑ | M→ | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |[Mouse| | | | M3 | | | | M3 | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | M2 | | M2 | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | Left | |------| |------| | Left | + * | Click| | | | | | Click| + * `--------------------' `----------------------' + */ +[_MOUSE] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_WH_U, KC_MS_U, KC_WH_D, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, KC_BTN3, _______, + _______, _______, _______, _______, KC_BTN2, + _______, _______, + _______, + KC_BTN1,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_WH_U, KC_WH_D, _______, _______, + KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, _______, _______, + _______, KC_BTN3, _______, _______, _______, _______, _______, + KC_BTN2, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______, KC_BTN1 + ), + +/* Adjust (Lower + Raise) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | |Reset | | | | | | | | | | | | | Del | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | |AGnorm|------| |------|AGswap|Qwerty|Colemk|QwOnCo|Plover| | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | |SDTogg| | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | BACKLIT| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[_ADJUST] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, RESET, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, AG_NORM, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______,_______,_______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_DEL, + AG_SWAP, QWERTY, COLEMAK, QWOC, PLOVER, _______, + _______, SDTOGG, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BACKLIT, + _______, _______, + _______, + _______,_______, _______ + ), + +/* Layers below are not actively used but kept for future reference */ + +/* Symbol + * ,---------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | EPRM | | | | | | | . | 0 | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| | |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[_SYMB] = LAYOUT_ergodox( + // left hand + VRSN, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + _______,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,_______, + _______,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + _______,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,_______, + EPRM,_______,_______,_______,_______, + RGB_MOD,_______, + _______, + RGB_VAD,RGB_VAI,_______, + // right hand + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, _______, + _______,KC_DOT, KC_0, KC_EQL, _______, + RGB_TOG, RGB_SLD, + _______, + _______, RGB_HUD, RGB_HUI +), +/* Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[_MDIA] = LAYOUT_ergodox( + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_MS_U, _______, _______, _______, + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_BTN1, KC_BTN2, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, KC_MPLY, + _______, _______, _______, KC_MPRV, KC_MNXT, _______, _______, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + _______, _______, KC_WBAK +) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + + set_superduper_key_combo_layer(_QWERTY); + } + return false; + + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + + set_superduper_key_combo_layer(_COLEMAK); + } + return false; + + case QWOC: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWOC); + + set_superduper_key_combo_layer(_QWOC); + } + return false; + + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + + case PLOVER: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; + + case SDTOGG: + if (record->event.pressed) { + toggle_superduper_mode(); + } + return false; + + case VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + + // Macros + + // 1. Hold for LGUI, tap for Underscore + case GUI_UNDS: + perform_space_cadet(record, keycode, KC_LGUI, KC_LSFT, KC_MINS); + return false; + + // 2. Hold for LSHIFT, tap for Parens open + case LSFT_LPRN: + perform_space_cadet(record, keycode, KC_LSFT, KC_LSFT, KC_9); + return false; + + // 3. Hold for RSHIFT, tap for Parens close + case RSFT_RPRN: + perform_space_cadet(record, keycode, KC_RSFT, KC_RSFT, KC_0); + return false; + + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_setup(void) { + set_superduper_key_combos(); +} + +void matrix_scan_user(void) { + // uint8_t layer = biton32(layer_state); + + // ergodox_board_led_off(); + // ergodox_right_led_1_off(); + // ergodox_right_led_2_off(); + // ergodox_right_led_3_off(); + // switch (layer) { + // // TODO: Make this relevant to the ErgoDox EZ. + // case 1: + // ergodox_right_led_1_on(); + // break; + // case 2: + // ergodox_right_led_2_on(); + // break; + // default: + // // none + // break; + // } +} + +// Combos + +void process_combo_event(uint16_t combo_index, bool pressed) { + if (pressed) { + switch(combo_index) { + case CB_SUPERDUPER: + layer_on(_SUPERDUPER); + ergodox_board_led_on(); + break; + } + } else { + layer_off(_SUPERDUPER); + ergodox_board_led_off(); + unregister_mods(MOD_BIT(KC_LGUI) | MOD_BIT(KC_LCTL) | MOD_BIT(KC_LALT)); // Sometimes mods are held, unregister them + } +} diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/readme.md b/keyboards/input_club/ergodox_infinity/keymaps/narze/readme.md new file mode 100644 index 0000000000..3094b021e0 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/readme.md @@ -0,0 +1,31 @@ +# narze's layout + +## Notes +- SuperDuper mode for Ergodox is still under development, since combo keys does not work very well on Ergodox firmware. + Now it is using multiple layers as a workaround. Actual implementation using combos are on my Planck layout. + +## Key features +- Qwerty + [Colemak](https://colemak.com) layouts, and you can type Qwerty on software-level Colemak as well. Very useful for gaming or when your friend wanna type something but don't use Colemak. +- [(S)uper (D)uper Mode](/users/narze/readme.md) +- Mouse keys with Z + +## Build instructions +If your environment is ready to build with `make`, don't use docker since it takes 5m+ to compile. +Use the instructions in Ergodox Infinity's readme. + +#### Left side (Docker) +``` +cd /path/to/qmk_firmware +util/docker_build.sh ergodox_infinity:narze +avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_left.bin +dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_left.bin +``` + +#### Right side (Docker) +You have to override `usb_args` in order to pass `MASTER=right` to docker using provided build script. +``` +cd /path/to/qmk_firmware +usb_args="-e MASTER=right" util/docker_build.sh ergodox_infinity:narze +avr-objcopy -Iihex -Obinary .build/ergodox_infinity_narze.hex .build/ergodox_infinity_narze_right.bin +dfu-util --device 1c11:b007 -D .build/ergodox_infinity_narze_right.bin +``` diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/rules.mk b/keyboards/input_club/ergodox_infinity/keymaps/narze/rules.mk new file mode 100644 index 0000000000..4a4ed58610 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/rules.mk @@ -0,0 +1,23 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +COMBO_ENABLE = yes diff --git a/keyboards/input_club/ergodox_infinity/keymaps/narze/visualizer.c b/keyboards/input_club/ergodox_infinity/keymaps/narze/visualizer.c new file mode 100644 index 0000000000..88f658d6b9 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/narze/visualizer.c @@ -0,0 +1,94 @@ +/* +Copyright 2017 Fred Sundvik + +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/>. +*/ + +#include "simple_visualizer.h" +#include "util.h" + +// Copied from keymap.c +enum ergodox_layers { + _QWERTY, + _COLEMAK, + _QWOC, + _LOWER, + _RAISE, + _PLOVER, +// Intermediate layers for SuperDuper (Combo keys does not work on Infinity yet) + _SUPER, + _DUPER, + _SUPERDUPER, + _MOUSE, + _ADJUST, + _MDIA, + _SYMB, +}; + +// This function should be implemented by the keymap visualizer +// Don't change anything else than state->target_lcd_color and state->layer_text as that's the only thing +// that the simple_visualizer assumes that you are updating +// Also make sure that the buffer passed to state->layer_text remains valid until the previous animation is +// stopped. This can be done by either double buffering it or by using constant strings +static void get_visualizer_layer_and_color(visualizer_state_t* state) { + uint8_t saturation = 255; + + uint8_t layer = biton32(state->status.layer); + state->target_lcd_color = LCD_COLOR(layer << 2, saturation, 0xFF); + + switch(layer) { + case _QWERTY: + state->layer_text = "QWERTY"; + break; + case _COLEMAK: + state->layer_text = "COLEMAK"; + break; + case _QWOC: + state->layer_text = "QWERTY on COLEMAK"; + break; + case _LOWER: + state->layer_text = "LOWER"; + break; + case _RAISE: + state->layer_text = "RAISE"; + break; + case _PLOVER: + state->layer_text = "PLOVER"; + break; + case _SUPERDUPER: + state->layer_text = "SUPERDUPER"; + break; + case _SUPER: + state->layer_text = "SUPER"; + break; + case _DUPER: + state->layer_text = "DUPER"; + break; + case _MOUSE: + state->layer_text = "MOUSE"; + break; + case _ADJUST: + state->layer_text = "ADJUST"; + break; + case _MDIA: + state->layer_text = "MDIA"; + break; + case _SYMB: + state->layer_text = "SYMB"; + break; + default: + state->layer_text = "NONE"; + break; + } +} diff --git a/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/keymap.c new file mode 100644 index 0000000000..d08b96cc6e --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/keymap.c @@ -0,0 +1,243 @@ +// Nordic layout for Ergodox infinity +#include QMK_KEYBOARD_H +#include "version.h" +#include "keymap_nordic.h" +#include "keymap_german.h" + +enum layer_names { + BASE, + FUNCL, + SYMB, + MDIA +}; + +enum custom_keycodes { + VRSN = SAFE_RANGE, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | §½ | | PRSC | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Å | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | Ö | Ä | + * |--------+------+------+------+------+------| L2 | | L2 |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | - | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Ctrl | ¨^ | <|> | LGui | Alt | | Ctrl | Alt | ´` | + | RGui | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | LEFT |RIGHT | | DOWN | UP | + * ,------+------+------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Del |------| |------| Enter | Bkspc| + * | | | End | | PgDn | | | + * `--------------------' `----------------------' + */ + +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRV, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(2), + KC_LCTRL, MO(3), KC_EQL, KC_LGUI, KC_LALT, + KC_NLCK, KC_SLCK, + KC_HOME, + KC_SPC, KC_DEL, KC_END, + + // right hand + KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + MO(2), KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_NONUS_BSLASH, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_RBRC, + KC_RGUI, KC_RALT, + KC_PGUP, + KC_PGDN, KC_ENT, KC_BSPC +), +/* Keymap 1: Basic layer with functions + * + * + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | ¨ | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------+------+------| |------+--------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `----------------------' + */ + +[FUNCL] = LAYOUT_ergodox( // layer 1 : functions + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), + +/* Keymap 2: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Animat| BLTOG| |Toggle|Solid | + * ,------|------|------| |------+------+------. + * |Bright|Bright| BL+ | | |Hue- |Hue+ | + * |ness- |ness+ |------| |------| | | + * | | | BL- | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = LAYOUT_ergodox( + // left hand + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, DE_EXLM, DE_AT, DE_LCBR, DE_RCBR, DE_PIPE, _______, + _______, DE_HASH, DE_DLR, DE_LPRN, DE_RPRN, DE_GRV, + _______, DE_PERC, DE_CIRC, DE_LBRC, DE_RBRC, DE_TILD, _______, + _______, _______, _______, _______, _______, + RGB_MOD, BL_TOGG, + BL_INC, + RGB_VAD, RGB_VAI, BL_DEC, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + _______, KC_UP, KC_7, KC_8, KC_9, DE_ASTR, _______, + KC_DOWN, KC_4, KC_5, KC_6, DE_PLUS, _______, + _______, DE_AMPR, KC_1, KC_2, KC_3, DE_BSLS, _______, + _______, KC_DOT, KC_0, DE_EQL, _______, + RGB_TOG, RGB_SLD, + _______, + _______, RGB_HUD, RGB_HUI +), + +/* Keymap 3: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | | | | | |VolDwn| Mute |VolUp | | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | Btn4 |MsLeft|MsDown|MsRght| Btn5 |------| |------| | Prev | Stop | Play | Next | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |WhRght|WhDown| WhUp |WhLeft|WhClk | | | |BwSrch|BwBack|BwHome|BwRefr|BwFwd | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | |MsAcl0|MsAcl1|MsAcl2| | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | |Brwser|Brwser| + * | Lclk | Rclk |------| |------|Back |Forwd | + * | | | | | | | | + * `--------------------' `--------------------' + */ + +// MEDIA AND MOUSE +[MDIA] = LAYOUT_ergodox( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, + _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, _______, _______, + _______, KC_BTN4, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN5, + _______, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, KC_BTN3, _______, + _______, _______, KC_ACL0, KC_ACL1, KC_ACL2, + _______, _______, + _______, + KC_BTN1, KC_BTN2, _______, + // right hand + KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, _______, + _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, _______, + _______, KC_WSCH, KC_WBAK, KC_WHOM, KC_WREF, KC_WFWD, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_WBAK, KC_WFWD +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case VRSN: + if (record->event.pressed) { + SEND_STRING(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(1); +#endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void){ + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + default: + break; + } +}; diff --git a/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/readme.md b/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/readme.md new file mode 100644 index 0000000000..2ed5268649 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/nordic_ergo/readme.md @@ -0,0 +1,9 @@ +# Nordic Ergodox Infinity layout + +QWERTY Nordic layout for ergodox infinity. + +Features: + +- Basic ISO Nordic qwerty layout. +- Backlight control. +- Still work in progress.
\ No newline at end of file diff --git a/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c new file mode 100644 index 0000000000..8cf51842a2 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/keymap.c @@ -0,0 +1,292 @@ +#include QMK_KEYBOARD_H + +/* +NQN is not-quite-neo +A layout based on neo2 +*/ + +#include "action_layer.h" +#include "version.h" + +#include "nqn-keys-on-quertz-de-latin1.h" +#include "nqn-basic-layout.h" + +// Since our quirky block definitions are basically a list of comma separated +// arguments, we need a wrapper in order for these definitions to be +// expanded before being used as arguments to the LAYOUT_xxx macro. +#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) + +#ifdef LEADER_TIMEOUT +#undef LEADER_TIMEOUT +#endif +#define LEADER_TIMEOUT 300 + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + + +// Automatic number generation of important keywords +enum my_keycodes{ + // Layer numbers follow the neo2 terminology, i.e. base layer = layer 1 + L01 = 0, + /* L02, SHIFT is not (yet) implemented as a fully customizable layer */ + L03, + L04, + L05, + /* L06, UNSPECIFIED not (yet) needed */ + LFN +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* L01 -> default: BASE LAYER + * ,--------------------------------------------------. ,--------------------------------------------------. + * | TAB | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | BACKSP | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | ESC | | LEADR| | LEADR| | ENTER | + * |--------+ | | | | +--------| + * | L03 | L01_LEFT |------| |------| L01_RIGHT | L03 | + * |--------+ | LFN | | LFN | +--------| + * | SHIFT | | | | | | SHIFT | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | CTRL | GUI | ALT | L05 | L04 | | L04 | L05 | ALTGR| LFN | CTRL | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | HOME | END | | LEFT | RIGHT| + * ,------|------|------| |------+------+------. + * | | | PGUP | | UP | | | + * | SPACE| SHIFT|------| |------| SHIFT| SPACE| + * | | | PGDN | | DOWN | | | + * `--------------------' `--------------------' + */ +[L01] = LAYOUT_ergodox_wrapper( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, XXXXXXX, + KC_ESC, L01_LEFT_01, KC_LEAD, + MO(L03), L01_LEFT_02, + KC_LSHIFT, L01_LEFT_03, MO(LFN), + KC_LCTRL,KC_LGUI,KC_LALT, MO(L05), MO(L04), + XXXXXXX, XXXXXXX, + KC_PGUP, + KC_SPACE,KC_LSHIFT,KC_PGDN, + //-- + XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPACE, + KC_LEAD, L01_RIGHT_01, KC_ENTER, + L01_RIGHT_02, MO(L03), + MO(LFN), L01_RIGHT_03, KC_RSHIFT, + MO(L04), MO(L05), KC_RALT, MO(LFN), KC_RCTRL, + KC_LEFT, KC_RIGHT, + KC_UP, + KC_DOWN, KC_RSHIFT, KC_SPACE +), + + +/* +L02 -> MO(L02): SHIFT (as a layer not used, not defined, not reachable) + */ + + +/* L03 -> MO(L03): PROGRAMMING + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | + * |--------+ | | | | +--------| + * | | L03_LEFT |------| |------| L03_RIGHT | | + * |--------+ | | | | +--------| + * | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[L03] = LAYOUT_ergodox_wrapper( + _______, _______, _______, _______, _______, _______, _______, + _______, L03_LEFT_01, _______, + _______, L03_LEFT_02, + _______, L03_LEFT_03, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + //-- + _______, _______, _______, _______, _______, _______, _______, + _______, L03_RIGHT_01, _______, + L03_RIGHT_02, _______, + _______, L03_RIGHT_03, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), + +/* L04 -> MO(L04): NAVIGATION AND NUMBERS + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | + * |--------+ | | | | +--------| + * | | L04_LEFT |------| |------| L04_RIGHT | | + * |--------+ | | | | +--------| + * | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | 0 | |------| |------| | 0 | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[L04] = LAYOUT_ergodox_wrapper( + _______, _______, _______, _______, _______, _______, _______, + _______, L04_LEFT_01, _______, + _______, L04_LEFT_02, + _______, L04_LEFT_03, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + KC_0, _______, _______, + //-- + _______, _______, _______, _______, _______, _______, _______, + _______, L04_RIGHT_01, _______, + L04_RIGHT_02, _______, + _______, L04_RIGHT_03, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, KC_0 +), + + +/* L05 -> MO(L05): ALTERNATE + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | + * |--------+ | | | | +--------| + * | | L05_LEFT |------| |------| L05_RIGHT | | + * |--------+ | | | | +--------| + * | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[L05] = LAYOUT_ergodox_wrapper( + _______, _______, _______, _______, _______, _______, _______, + _______, L05_LEFT_01, _______, + _______, L05_LEFT_02, + _______, L05_LEFT_03, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + //-- + _______, _______, _______, _______, _______, _______, _______, + _______, L05_RIGHT_01, _______, + L05_RIGHT_02, _______, + _______, L05_RIGHT_03, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), + + +/* +L06 -> <TBD>: UNSPECIFIED +*/ + + +/* LFN -> MO(FN): FUNCTION + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | RESET | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | BACKSPC| + * |--------+ | | | | +--------| + * | | L06_LEFT |------| |------| L06_RIGHT | INSERT | + * |--------+ | | | | +--------| + * | | | | | | | DELETE | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | VOL+ | VOL- | MUTE | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LFN] = LAYOUT_ergodox_wrapper( + RESET, _______, _______, _______, _______, _______, _______, + _______, L06_LEFT_01, _______, + _______, L06_LEFT_02, + _______, L06_LEFT_03, _______, + _______, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, + //-- + _______, _______, _______, _______, _______, _______, RESET, + _______, L06_RIGHT_01, KC_BSPACE, + L06_RIGHT_02, KC_INSERT, + _______, L06_RIGHT_03, KC_DELETE, + KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, + _______, _______, + _______, + _______, _______, _______ +) + +}; + + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + set_unicode_input_mode(UC_LNX); +}; + + +LEADER_EXTERNS(); + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_ONE_KEY (KC_1) { + // ¯\_(ツ)_/¯ + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + register_code (KC_RALT); TAP_ONCE (KC_MINS); unregister_code (KC_RALT); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_9); TAP_ONCE(KC_7); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + } + + SEQ_ONE_KEY (KC_2) { + // 凸(ツ)凸 + unicode_input_start(); register_hex(0x51F8); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_8); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x51F8); unicode_input_finish(); + } + } +} diff --git a/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/readme.md b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/readme.md new file mode 100644 index 0000000000..3fcb4edf0d --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/readme.md @@ -0,0 +1,5 @@ +# not-quite-neo + +This is my personal take on porting the [neo2 layout](https://www.neo-layout.org/) to support multiple keyboards. + +Refer to the [readme.md](../../../../users/not-quite-neo/readme.md) of the generic parts of the implementation.
\ No newline at end of file diff --git a/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/rules.mk b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/rules.mk new file mode 100644 index 0000000000..74505bd69e --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/not-quite-neo/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes +UNICODE_ENABLE = yes +LEADER_ENABLE = yes diff --git a/keyboards/input_club/ergodox_infinity/keymaps/rask/README.md b/keyboards/input_club/ergodox_infinity/keymaps/rask/README.md new file mode 100644 index 0000000000..8a13994301 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/rask/README.md @@ -0,0 +1,20 @@ +# rask's Infinity ErgoDox Layout + +A basic ErgoDox layout that follows regular-ish QWERTY where it +makes sense. + +![ErgoDox Layout](https://i.imgur.com/jYDInaY.png) + +## Features + +- Regular QWERTY alphas and symbols (apart from `[]{}\|` and shifted `/?`) +- Regular numrow to make Fn-F-row simpler +- CapsLock Fn1 with F-row behind it +- Media controls and mouse controls on Fn2 +- Dedicated arrows + +## Building and flashing + +Follow the main Infinity ErgoDox guide but use the following layout: + + $ sudo make ergodox_infinity:rask diff --git a/keyboards/input_club/ergodox_infinity/keymaps/rask/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/rask/keymap.c new file mode 100644 index 0000000000..e31c1c5d6b --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/rask/keymap.c @@ -0,0 +1,201 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define FL1 1 // symbols +#define FL2 2 // media keys + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | - | = | Del | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | Bsp | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Fn1 | A | S | D | F | G |------| |------| H | J | K | L | ; | Enter | + * |--------+------+------+------+------+------| \ | | Meh |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | Up | ' | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Ctrl | Home | LGui | End | LAlt | | RAlt | Fn2 | Le | Do | Ri | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | Ins | PtSc | | Calc | Esc | + * ,------|------|------| |------+--------+------. + * | | | Del | | PgUp | | | + * | Space| Bsp |------| |------| Enter |Space | + * | | | Tab | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB ,KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + MO(FL1),KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSLS, + KC_LCTL,KC_HOME,KC_LGUI,KC_END,KC_LALT, + KC_INS, KC_PSCR, + KC_DEL, + KC_SPC, KC_BSPC,KC_TAB, + // right hand + KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, + KC_RBRC,KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, KC_UP, KC_SLSH, + KC_RALT,MO(FL2),KC_LEFT,KC_DOWN,KC_RIGHT, + KC_CALC, KC_ESC, + KC_PGUP, + KC_PGDN,KC_ENT, KC_SPC + ), +/* Keymap 1: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | Version | | | | | | | | | | | | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | PgUp | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | Home | PgDn | End | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[FL1] = LAYOUT_ergodox( + // left hand + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + VRSN, 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, + EPRM,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, 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_PGUP, KC_TRNS, + KC_TRNS,KC_TRNS, KC_HOME, KC_PGDN, KC_END, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | Prev | Play | Next | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | CapsLk | |MsLeft|MsDown|MsRght| |------| |------| | VolD | Mute | VolU | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Stop | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |EEPROM| Menu | | Lclk | Rclk | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | Reset| | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[FL2] = LAYOUT_ergodox( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + EPRM, KC_APP, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RESET, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/keymap.c new file mode 100644 index 0000000000..31d218ebfb --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/keymap.c @@ -0,0 +1,381 @@ +/** + * Copyright 2021 Rob Hilgefort <@rjhilgefort> + * + * 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/>. + */ + +#include QMK_KEYBOARD_H +#include "version.h" + + +enum custom_layers { + BASEMAC, // Base Mac Layer + BASELNX, // Base Linux Layer + SYMB, // Symbols Layer + MANMAC, // Media Numbers Mac Layer + MANLNX, // Media Numbers Linux Layer + EXA, // Extra Layer +}; + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + VRSN, +}; + +#define ALT_ESC ALT_T(KC_ESC) +#define CTL_ESC CTL_T(KC_ESC) +#define GUI_ESC GUI_T(KC_ESC) +#define HYPER LGUI(LSFT(KC_LALT)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Base (Mac) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Bksp | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Ct/Esc | A | S | D | F | G |------| |------| H | J | K | L |Ctrl/;| ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | N | M | , | . |Ctrl//| Enter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | |Shift | Tab | ↑ L3 |Alt/Ec| | ↑ L2 |Hyper | ' |Enter | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | | | | | | + * ,------+------+------| |------+--------+------. + * | | | | | | | | + * | LGui | Bksp |------| |------| Bksp | Spc | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[BASEMAC] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, + CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + _______, KC_LSFT, KC_TAB, MO(MANMAC), ALT_ESC, + _______, _______, + _______, + KC_LGUI, KC_BSPC, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_H, KC_J, KC_K, KC_L, CTL_T(KC_SCLN), KC_QUOT, + _______, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_ENTER, + MO(SYMB), HYPER, KC_QUOT, KC_ENTER, _______, + _______, _______, + _______, + _______, KC_BSPC, KC_SPC +), + +/* Keymap 1: Base (Linux) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Bksp | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Ct/Esc | A | S | D | F | G |------| |------| H | J | K | L |Ctrl/;| ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Shift | Z | X | C | V | B | | | | N | M | , | . |Ctrl//| Enter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | |Shift | Tab | ↑ L4 |Gui/Ec| | ↑ L2 | Hyper| ' |Enter | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,---------------. + * | | | | | | + * ,------+------+------| |------+--------+------. + * | | | | | | | | + * | Ctrl | Bksp |------| |------| Bksp | Spc | + * | | | | | | | | + * `--------------------' `----------------------' + */ +[BASELNX] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, _______, + ALT_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, + _______, KC_LSFT, KC_TAB, MO(MANLNX), GUI_ESC, + _______, _______, + _______, + KC_LCTRL, KC_BSPC, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_H, KC_J, KC_K, KC_L, CTL_T(KC_SCLN), KC_QUOT, + _______, KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_ENTER, + MO(SYMB), HYPER, KC_QUOT, KC_ENTER, _______, + _______, _______, + _______, + _______, KC_BSPC, KC_SPC +), + +/* Keymap 2: Symbol Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | \ | / | [ | ] | ~ | | | | | | = | + | - | _ | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | { | } | ( | ) | ` |------| |------| ← | ↓ | ↑ | → | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | ↑ L5 | | | TRNS | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------+------+------| |------+------+------. + * | | | | | | | | + * | | Del |------| |------| Del | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[SYMB] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_BSLS, KC_SLSH, KC_LBRC, KC_RBRC, KC_TILD, _______, + _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_GRV, + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, _______, _______, MO(EXA), _______, + _______, _______, + _______, + _______, KC_DEL, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, KC_PIPE, KC_EQL, KC_PLUS, KC_MINS, KC_UNDS, _______, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_TRNS, _______, _______, _______, _______, + _______, _______, + _______, + _______, KC_DEL, _______ +), + +/* Keymap 3: Media & Numbers (MAC) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | |Scrn -| Vol+ |Scrn +| | | | | | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |VolMut|Trak ←|Ply/Ps|Trak →| |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | Vol- | | | | | | | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | TRNS | | | ↑ L5 | 0 | . | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------+------+------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | 0 | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[MANMAC] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BRMD, KC_VOLU, KC_BRMU, _______, _______, + _______, KC_MUTE, KC_MRWD, KC_MPLY, KC_MFFD, _______, + _______, _______, _______, KC_VOLD, _______, _______, _______, + _______, _______, _______, KC_TRNS, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______, + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, _______, KC_1, KC_2, KC_3, KC_BSLS, _______, + MO(EXA), KC_0, KC_DOT, KC_EQL, _______, + _______, _______, + _______, + _______, _______, KC_0 +), + +/* Keymap 4: Media & Numbers (Linux) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | |Scrn -| Vol+ |Scrn +| | | | | | 7 | 8 | 9 | * | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | |VolMut|Trak ←|Ply/Ps|Trak →| |------| |------| | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | Vol- | | | | | | | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | TRNS | | | ↑ L5 | 0 | . | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------+------+------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | 0 | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[MANLNX] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_BRID, KC_VOLU, KC_BRIU, _______, _______, + _______, KC_MUTE, KC_MPRV, KC_MPLY, KC_MNXT, _______, + _______, _______, _______, KC_VOLD, _______, _______, _______, + _______, _______, _______, KC_TRNS, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_7, KC_8, KC_9, KC_ASTR, _______, + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, + _______, _______, KC_1, KC_2, KC_3, KC_BSLS, _______, + MO(EXA), KC_0, KC_DOT, KC_EQL, _______, + _______, _______, + _______, + _______, _______, KC_0 +), + +/* Keymap 5: Extra + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | → L0 | → L1 | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| Home | PGDN | PGUP | End | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | TRNS | | | TRNS | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------+------+ |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[EXA] = LAYOUT_ergodox( + // left hand + _______, _______, _______, _______, _______, _______, _______, + _______, DF(BASEMAC), DF(BASELNX), _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_TRNS, _______, + _______, _______, + _______, + _______, _______, _______, + // right hand + _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, + _______, _______, _______, _______, _______, _______, _______, + KC_TRNS, _______, _______, _______, _______, + _______, _______, + _______, + _______, _______, _______ +), + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + } + return true; +} + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 2: + ergodox_right_led_2_on(); + break; + case 3: + ergodox_right_led_3_on(); + break; + case 4: + ergodox_right_led_3_on(); + break; + case 5: + ergodox_right_led_1_on(); + break; + default: + // none + break; + } + +}; + +/* + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------+------+ |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +/* + * [EXTRA] = LAYOUT_ergodox( + * // left hand + * _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, + * _______, _______, + * _______, + * _______, _______, _______, + * // right hand + * _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, _______, _______, + * _______, _______, _______, _______, _______, + * _______, _______, + * _______, + * _______, _______, _______ + * ), + */ diff --git a/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/readme.md b/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/readme.md new file mode 100644 index 0000000000..bb141b99dc --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/rjhilgefort/readme.md @@ -0,0 +1,175 @@ +# [🐦 @rjhilgefort](https://twitter.com/rjhilgefort)'s Ergodox Infinity Layout + +The layout is heavily inspired by my [Atreus 2](https://atreus.technomancy.us/2) and the layout I use for it. Hence, I basically treat my Ergodox Infinity like it's a 40% keyboard and have even taken off the caps of the keys that I don't make use of to further emphasize this. This allows for easy interop between my office setup (Ergodox) and my laptop setup (Atreus 2). + +![](https://imgur.com/rJnSjLq.jpg) +![](https://imgur.com/8aSSGP1.jpg) + +## Features + +Here's some highlights/features of the layout. + +- Inspired by 40% keyboards, doesn't use keys that don't exist on those boards. +- Ergonomic symbols layer. +- Media and Numpad layer. +- Planck-like extra tri-layer when holding the other two layers. +- Planck conformability- leaves gutter keys for familiarity if coming from there. +- Supports Mac and Linux as 1st class citizens giving each a dedicated base layer and a media layer for each that matches media keys for each OS. The Linux default layer focuses on `Ctrl` instead of `Super` and vice versa for Mac. (When you set Linux as your base layer, the Linux media layer is what you shift into. Same for the Mac layer when that's the base) + +## Layers + +#### Keymap 0: Base (Mac) + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Ct/Esc | A | S | D | F | G |------| |------| H | J | K | L |Ctrl/;| ' | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Shift | Z | X | C | V | B | | | | N | M | , | . |Ctrl//| Enter | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | |Shift | Tab | ↑ L3 |Alt/Ec| | ↑ L2 |Hyper | ' |Enter | | + `----------------------------------' `----------------------------------' + ,-------------. ,---------------. + | | | | | | + ,------+------+------| |------+--------+------. + | | | | | | | | + | LGui | Bksp |------| |------| Bkspc | Spc | + | | | | | | | | + `--------------------' `----------------------' +``` + +#### Keymap 1: Base (Linux) + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| Tab | Q | W | E | R | T | | | | Y | U | I | O | P | Bksp | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Ct/Esc | A | S | D | F | G |------| |------| H | J | K | L |Ctrl/;| ' | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| Shift | Z | X | C | V | B | | | LAlt | N | M | , | . |Ctrl//| Enter | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | |Shift | Tab | ↑ L4 |Gui/Ec| | ↑ L2 |Hyper | ' |Enter | | + `-----------------------------------' `----------------------------------' + ,-------------. ,---------------. + | | | | | | + ,------+------+------| |------+--------+------. + | | | | | | | | + | Ctrl | Bksp |------| |------| Bkspc | Spc | + | | | | | | | | + `--------------------' `----------------------' +``` + +#### Keymap 2: Symbol Layer + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| +| | \ | / | [ | ] | ~ | | | | | | = | + | - | _ | | +|---------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | { | } | ( | ) | ` |------| |------| ← | ↓ | ↑ | → | | | +|---------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | ! | @ | # | $ | % | | | | ^ | & | * | ( | ) | | +`---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | ↑ L5 | | | TRNS | | | | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------+------+------| |------+------+------. + | | | | | | | | + | | Del |------| |------| Del | | + | | | | | | | | + `--------------------' `--------------------' +``` + +#### Keymap 3: Media & Numbers (MAC) + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | |Scrn -| Vol+ |Scrn +| | | | | | 7 | 8 | 9 | * | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| |VolMut|Trak ←|Ply/Ps|Trak →| |------| |------| | 4 | 5 | 6 | + | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | Vol- | | | | | | | 1 | 2 | 3 | \ | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | TRNS | | | ↑ L5 | | . | = | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------+------+------| |------+------+------. + | | | | | | | | + | | |------| |------| | 0 | + | | | | | | | | + `--------------------' `--------------------' +``` + +#### Keymap 4: Media & Numbers (Linux) + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | |Scrn -| Vol+ |Scrn +| | | | | | 7 | 8 | 9 | * | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| |VolMut|Trak ←|Ply/Ps|Trak →| |------| |------| | 4 | 5 | 6 | + | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | Vol- | | | | | | | 1 | 2 | 3 | \ | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | TRNS | | | ↑ L5 | | . | = | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------+------+------| |------+------+------. + | | | | | | | | + | | |------| |------| | 0 | + | | | | | | | | + `--------------------' `--------------------' +``` + +#### Keymap 5: Extra + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | → L0 | → L1 | | | | | | | | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | |------| |------| Home | PGDN | PGUP | End | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | TRNS | | | TRNS | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------+------+ |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## TODO + +1. Get the LEDs to work: https://www.reddit.com/r/ergodox/comments/80hgxj/infinity_lcd_configuration_in_qmk/duxklzh/ + +## Building And Flashing + +See the default building and flashing documentation for the Ergodox Infinity, I don't do anything beyond that. + +## FAQs + +> What's the case you have for your Ergodox Infinity? + +It's a case made by Datamancer and I got it [on Drop.com as a group buy](https://drop.com/buy/datamancer-infinity-ergodox-hardwood-case). + +> Why don't you just use the other keys? + +I bounce between my Ergodox, Atreus 2, CorneKBD, and a couple of Planck keyboards. If I start using keys on my Ergo that I can't on my 40% boards, then my layouts start to diverge and muscle memory is diminished. I like to constrain my bigger boards to my smaller for continuity. diff --git a/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/README.md b/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/README.md new file mode 100644 index 0000000000..1e248742ee --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/README.md @@ -0,0 +1,3 @@ +# Truly Ergonomic like layout + +A basic ErgoDox layout that imitates the Truly Ergonomic keyboard layout. diff --git a/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/keymap.c b/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/keymap.c new file mode 100644 index 0000000000..02f409ad9e --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/keymaps/trulyergonomic/keymap.c @@ -0,0 +1,159 @@ +#include QMK_KEYBOARD_H +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define EXTRA 1 // extra + +enum custom_keycodes { + PLACEHOLDER = SAFE_RANGE, // can always be here + EPRM, + VRSN, + RGB_SLD +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | LGui | | LGui | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | Del | | Tab | Y | U | I | O | P | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | A | S | D | F | G |------| |------| H | J | K | L | ; | RShift | + * |--------+------+------+------+------+------| Back | | Back |------+------+------+------+------+--------| + * | LCtrl | Z | X | C | V | B | space| | space| N | M | , | . | ' | RCtrl | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | LAlt | Home | PgUp | PgDn | End | | Left | Up | Down | Rigth| RAlt | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ~ | | | | [ | ] | + * ,------|------|------| |------+------+------. + * | | | L1 | | Grv | | | + * | Space|Enter |------| |------| Enter|Space | + * | | | / | | \ | | | + * `--------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = LAYOUT_ergodox( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, + KC_LALT, KC_HOME, KC_PGUP, KC_PGDN, KC_END, + KC_TILD, KC_PIPE, + TG(EXTRA), + KC_SPC, KC_ENT, KC_SLSH, + // right hand + KC_LGUI, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + KC_TAB, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_EQL, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RSFT, + KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_QUOT, KC_RCTL, + KC_LEFT, KC_UP, KC_DOWN, KC_RGHT, KC_RALT, + KC_LBRC, KC_RBRC, + KC_GRV, + KC_BSLS, KC_ENT, KC_SPC + ), +/* Keymap 1: Extra Layer + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | PSCR | F6 | F7 | F8 | F9 | F10 | F11 | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | 0 | , | . | = | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |VolUp |VolDn | | Prev | Next | + * ,------|------|------| |------+------+------. + * | | | | | Stop |Bright|Bright| + * | Mute |Pause |------| |------|ness- |ness+ | + * | | | | | Play | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[EXTRA] = LAYOUT_ergodox( + // left hand + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_CAPS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_VOLU,KC_VOLD, + KC_TRNS, + KC_MUTE,KC_PAUS,KC_TRNS, + // right hand + KC_PSCR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_0, KC_COMM, KC_DOT, KC_EQL, KC_TRNS, + KC_MPRV, KC_MNXT, + KC_STOP, + KC_MPLY, RGB_VAD, RGB_VAI +), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + // dynamically generate these. + case EPRM: + if (record->event.pressed) { + eeconfig_init(); + } + return false; + break; + case VRSN: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + return false; + break; + case RGB_SLD: + if (record->event.pressed) { + #ifdef RGBLIGHT_ENABLE + rgblight_mode(1); + #endif + } + return false; + break; + } + return true; +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/input_club/ergodox_infinity/mcuconf.h b/keyboards/input_club/ergodox_infinity/mcuconf.h new file mode 100644 index 0000000000..f6730b99ca --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/mcuconf.h @@ -0,0 +1,74 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define K20x_MCUCONF + +/* + * HAL driver system settings. + */ + +#define K20x7 + +/* Select the MCU clocking mode below by enabling the appropriate block. */ + +#define KINETIS_NO_INIT FALSE + +/* PEE mode - 48MHz system clock driven by external crystal. */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE +#define KINETIS_PLLCLK_FREQUENCY 72000000UL +#define KINETIS_SYSCLK_FREQUENCY 72000000UL +#define KINETIS_BUSCLK_FREQUENCY 36000000UL +#define KINETIS_FLASHCLK_FREQUENCY 24000000UL + +#if 0 +/* FEI mode - 48 MHz with internal 32.768 kHz crystal */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI +#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ +#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ +#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ +#define KINETIS_CLKDIV1_OUTDIV1 1 +#define KINETIS_CLKDIV1_OUTDIV2 1 +#define KINETIS_CLKDIV1_OUTDIV4 2 +#define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY +#define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2 +#endif + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE +#define KINETIS_SERIAL_USE_UART1 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE +/* Need to redefine this, since the default is for K20x */ +/* This is for Teensy LC; you should comment it out (or change to 5) + * for Teensy 3.x */ +#define KINETIS_USB_USB0_IRQ_PRIORITY 2 + +/* + * SPI driver system settings. + */ +#define KINETIS_SPI_USE_SPI0 TRUE + +#define KINETIS_I2C_USE_I2C0 TRUE + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/input_club/ergodox_infinity/readme.md b/keyboards/input_club/ergodox_infinity/readme.md new file mode 100644 index 0000000000..1f8b643340 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/readme.md @@ -0,0 +1,66 @@ +# ErgoDox Infinity + +The Infinity is two completely independent keyboards, and needs to be flashed +for the left and right halves seperately. To flash them: + + - Make sure you are in the top-level qmk_firmware directory + + - Build the firmware with `make input_club/ergodox_infinity:keymapname` + + - Plug in the left hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make input_club/ergodox_infinity:keymapname:dfu-util` + + - Plug in the right hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make input_club/ergodox_infinity:keymapname:dfu-util` + +More information on the Infinity firmware is available in the [TMK/chibios for +Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) + +## Infinity Two Halves + +The Infinity is two completely independent keyboards, that can connect together. +You have a few options in how you flash the firmware: + +- Add `#define EE_HANDS` to your config.h, initialize the EEPROM values (see below), + and then flash the same firmware to both halves. + +- Flash with the instructions above, which assume the left hand is connected to USB. + +- For minor changes such as changing only the keymap without having updated + any part of the firmware code itself, you can program only the half connected to USB, + but it is safest to program both halves. + +### EE_HANDS initialization + +To initialize the EEPROM values for `EE_HANDS` to work properly, these steps should work. +They only need to be done once, unless you reset the EEPROM later. + + - Plug in the left keyboard half to the computer, and press its program button. + + - Flash the left half with `make input_club/ergodox_infinity:default:dfu-util-split-left` + (If you need to use a different method to flash your keyboard, still run this command, + and abort it with Ctrl+C when the flashing attempts starts to print errors, + then flash the built firmware). + + - On the left half, press the top vertical 1.5U key (second from the top in the rightmost column) once, + then the 1U key at the bottom in the opposite corner (bottom left corner). + + - Plug in the right keyboard half to the computer, and press its program button. + + - Flash the right half with `make input_club/ergodox_infinity:default:dfu-util-split-right` + + - On the right half, press the top vertical 1.5U key (second from the top in the leftmost column) once, + then the 1U key at the bottom in the opposite corner (bottom right corner). + + - Add `#define EE_HANDS` to the config.h file of your keymap, and build your firmware using + `make input_club/ergodox_infinity:keymapname`. + + - After this, you can flash both halves with the same firmware, _without_ risking a mirrored keyboard when connected the wrong way. + If you reset your EEPROM later, you'll have to follow these steps again, though. + diff --git a/keyboards/input_club/ergodox_infinity/rules.mk b/keyboards/input_club/ergodox_infinity/rules.mk new file mode 100644 index 0000000000..c35f54de30 --- /dev/null +++ b/keyboards/input_club/ergodox_infinity/rules.mk @@ -0,0 +1,37 @@ +# MCU name +MCU = MK20DX256 + +# Bootloader selection +BOOTLOADER = kiibohd + +# Board: it should exist either in <chibios>/os/hal/boards/ +# or <this_dir>/boards +# This board was copied from PJRC_TEENSY_3_1. The only difference should be a +# hack to ensure the watchdog has started before trying to disable it, and an +# override to disable restart of USB driver after returning from suspend. +BOARD = IC_TEENSY_3_1 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Enable Bootmagic Lite +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Enable N-Key Rollover +UNICODE_ENABLE = yes # Unicode +SWAP_HANDS_ENABLE= yes # Allow swapping hands of keyboard +SLEEP_LED_ENABLE = yes + +RGBLIGHT_ENABLE = no + +SPLIT_KEYBOARD = yes +SERIAL_DRIVER = usart + +ST7565_ENABLE = yes + +LED_MATRIX_ENABLE = yes +LED_MATRIX_DRIVER = IS31FL3731 + +LAYOUTS = ergodox |