From ebe351a6905d5031d5383b4ad7fe551e0e844d52 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 15 Dec 2016 07:22:31 +0800 Subject: enable brackets using the - key on the right, and cleanups --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index f3d02f688..3d7e1893c 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -69,7 +69,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -209,12 +209,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BRACKETS] = KEYMAP( // left 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_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,M(OPEN_CLOSE_CURLY), M(OPEN_CLOSE_PAREN),M(OPEN_CLOSE_BRACKET), KC_TRNS,KC_TRNS, + KC_TRNS,KC_LPRN, KC_RPRN, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, KC_LCBR, KC_RCBR, 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 -- cgit v1.2.3 From 8377d5fdc57ab0a4f1757d9f787592ede1b94cfe Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 3 Jan 2017 23:41:52 -0800 Subject: Initial whitefox support --- keyboards/whitefox/Makefile | 3 + keyboards/whitefox/bootloader_defs.h | 1 + keyboards/whitefox/chconf.h | 524 ++++++++++++++++++++++++++++ keyboards/whitefox/config.h | 78 +++++ keyboards/whitefox/halconf.h | 353 +++++++++++++++++++ keyboards/whitefox/keymaps/default/keymap.c | 51 +++ keyboards/whitefox/keymaps/matt3o/keymap.c | 92 +++++ keyboards/whitefox/led.c | 24 ++ keyboards/whitefox/matrix.c | 132 +++++++ keyboards/whitefox/mcuconf.h | 66 ++++ keyboards/whitefox/rules.mk | 68 ++++ keyboards/whitefox/whitefox.c | 17 + keyboards/whitefox/whitefox.h | 54 +++ 13 files changed, 1463 insertions(+) create mode 100644 keyboards/whitefox/Makefile create mode 100644 keyboards/whitefox/bootloader_defs.h create mode 100644 keyboards/whitefox/chconf.h create mode 100644 keyboards/whitefox/config.h create mode 100644 keyboards/whitefox/halconf.h create mode 100644 keyboards/whitefox/keymaps/default/keymap.c create mode 100644 keyboards/whitefox/keymaps/matt3o/keymap.c create mode 100644 keyboards/whitefox/led.c create mode 100644 keyboards/whitefox/matrix.c create mode 100644 keyboards/whitefox/mcuconf.h create mode 100644 keyboards/whitefox/rules.mk create mode 100644 keyboards/whitefox/whitefox.c create mode 100644 keyboards/whitefox/whitefox.h (limited to 'keyboards') diff --git a/keyboards/whitefox/Makefile b/keyboards/whitefox/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/whitefox/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/whitefox/bootloader_defs.h b/keyboards/whitefox/bootloader_defs.h new file mode 100644 index 000000000..c67153be6 --- /dev/null +++ b/keyboards/whitefox/bootloader_defs.h @@ -0,0 +1 @@ +#define KIIBOHD_BOOTLOADER diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h new file mode 100644 index 000000000..43c845739 --- /dev/null +++ b/keyboards/whitefox/chconf.h @@ -0,0 +1,524 @@ +/* + 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. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 1000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h new file mode 100644 index 000000000..b7116341f --- /dev/null +++ b/keyboards/whitefox/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define PREVENT_STUCK_MODIFIERS + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0F0F +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER "Input Club" +#define USBSTR_MANUFACTURER 'I', '\x00', 'n', '\x00', 'p', '\x00', 'u', '\x00', 't', '\x00', ' ', '\x00', 'C', '\x00', 'l', '\x00', 'u', '\x00', 'b', '\x00' +#define PRODUCT "WhiteFox/QMK" +#define USBSTR_PRODUCT 'W', '\x00', 'h', '\x00', 'i', '\x00', 't', '\x00', 'e', '\x00', 'F', '\x00', 'o', '\x00', 'x', '\x00', ' ', '\x00' + +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 8 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 6 + +/* 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() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Keymap for Infinity prototype */ +//#define INFINITY_PROTOTYPE + +/* Keymap for Infinity 1.1a (first revision with LED support) */ +//#define INFINITY_LED + +/* + * 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 + +#endif diff --git a/keyboards/whitefox/halconf.h b/keyboards/whitefox/halconf.h new file mode 100644 index 000000000..46b37a4f4 --- /dev/null +++ b/keyboards/whitefox/halconf.h @@ -0,0 +1,353 @@ +/* + 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. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c new file mode 100644 index 000000000..426b226a0 --- /dev/null +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -0,0 +1,51 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ +#include "whitefox.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [0] = KEYMAP( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, INS, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ + CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ + LCTL,LGUI,LALT, SPC, RALT,FN0, RCTL, LEFT,DOWN,RGHT \ + ), + [1] = KEYMAP( \ + TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,MUTE,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS, TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ + TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + ), +}; + +const uint16_t fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), +}; diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c new file mode 100644 index 000000000..ecadcd284 --- /dev/null +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -0,0 +1,92 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ +#include "whitefox.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [0] = KEYMAP( \ + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, MUTE,\ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ + FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ + LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ + LCTL,LGUI,LALT, SPC, RALT,FN1, RCTL, LEFT,DOWN,RGHT \ + ), + [1] = KEYMAP( \ + TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,TRNS,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL , INS ,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ + TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ + TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + ), + [2] = KEYMAP( \ + SLEP,P1, P2, P3, P4, P5, P6, P7, P8, P9, P0, TRNS,TRNS,TRNS,TRNS,FN2, \ + TRNS,TRNS,FN5 ,FN6 ,TRNS,FN7 ,TRNS,TRNS,TRNS,TRNS,PSCR,TRNS,TRNS,TRNS, FN3, \ + CAPS,TRNS,TRNS,TRNS,FN4 ,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,\ + TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,MAIL,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,\ + TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS \ + ), +}; + +/* Give numbers some descriptive names */ +#define ACTION_LEDS_ALL 1 +#define ACTION_LEDS_GAME 2 + +const uint16_t fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_MOMENTARY(2), + [2] = ACTION_FUNCTION(ACTION_LEDS_ALL), + [3] = ACTION_FUNCTION(ACTION_LEDS_GAME), + + [4] = ACTION_USAGE_CONSUMER(0x1B4), + [5] = ACTION_USAGE_CONSUMER(0x196), + [6] = ACTION_USAGE_CONSUMER(0x1A6), + [7] = ACTION_USAGE_CONSUMER(0x1A0), + +}; + +/* custom action function */ +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + /* + (void)opt; + switch(id) { + case ACTION_LEDS_ALL: + if(record->event.pressed) { + // signal the LED controller thread + chMBPost(&led_mailbox, LED_MSG_GAME_TOGGLE, TIME_IMMEDIATE); + } + break; + case ACTION_LEDS_GAME: + if(record->event.pressed) { + // signal the LED controller thread + chMBPost(&led_mailbox, LED_MSG_ALL_TOGGLE, TIME_IMMEDIATE); + } + break; + } + */ +} diff --git a/keyboards/whitefox/led.c b/keyboards/whitefox/led.c new file mode 100644 index 000000000..aed66c7c0 --- /dev/null +++ b/keyboards/whitefox/led.c @@ -0,0 +1,24 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include "hal.h" + +#include "led.h" + + +void led_set(uint8_t usb_led) { +} diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c new file mode 100644 index 000000000..ce35bca28 --- /dev/null +++ b/keyboards/whitefox/matrix.c @@ -0,0 +1,132 @@ +#include +#include +#include +#include "hal.h" +#include "timer.h" +#include "wait.h" +#include "print.h" +#include "matrix.h" + + +/* + * Matt3o's WhiteFox + * Column pins are input with internal pull-down. Row pins are output and strobe with high. + * Key is high or 1 when it turns on. + * + * col: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } + * row: { PTB2, PTB3, PTB18, PTB19, PTC0, PTC8, PTC9, PTC10, PTC11 } + */ +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +static bool debouncing = false; +static uint16_t debouncing_time = 0; + + +void matrix_init(void) +{ +//debug_matrix = true; + /* Column(sense) */ + palSetPadMode(GPIOD, 0, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOC, 2, PAL_MODE_INPUT_PULLDOWN); + + /* Row(strobe) */ + palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 18, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 19, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 8, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 9, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 10, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 11, PAL_MODE_OUTPUT_PUSHPULL); + + memset(matrix, 0, MATRIX_ROWS); + memset(matrix_debouncing, 0, MATRIX_ROWS); +} + +uint8_t matrix_scan(void) +{ + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix_row_t data = 0; + + // strobe row + switch (row) { + case 0: palSetPad(GPIOB, 2); break; + case 1: palSetPad(GPIOB, 3); break; + case 2: palSetPad(GPIOB, 18); break; + case 3: palSetPad(GPIOB, 19); break; + case 4: palSetPad(GPIOC, 0); break; + case 5: palSetPad(GPIOC, 8); break; + case 6: palSetPad(GPIOC, 9); break; + case 7: palSetPad(GPIOC, 10); break; + case 8: palSetPad(GPIOC, 11); break; + } + + wait_us(1); // need wait to settle pin state + + // read col data: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } + data = ((palReadPort(GPIOC) & 0x06UL) << 5) | + ((palReadPort(GPIOD) & 0xF0UL) >> 2) | + (palReadPort(GPIOD) & 0x03UL); + + // un-strobe row + switch (row) { + case 0: palClearPad(GPIOB, 2); break; + case 1: palClearPad(GPIOB, 3); break; + case 2: palClearPad(GPIOB, 18); break; + case 3: palClearPad(GPIOB, 19); break; + case 4: palClearPad(GPIOC, 0); break; + case 5: palClearPad(GPIOC, 8); break; + case 6: palClearPad(GPIOC, 9); break; + case 7: palClearPad(GPIOC, 10); break; + case 8: palClearPad(GPIOC, 11); break; + } + + if (matrix_debouncing[row] != data) { + matrix_debouncing[row] = data; + debouncing = true; + debouncing_time = timer_read(); + } + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix[row] = matrix_debouncing[row]; + } + debouncing = false; + } + return 1; +} + +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +# - For Infinity KB, SERIES = K20x +MCU_FAMILY = KINETIS +MCU_SERIES = K20x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader +# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX256BLDR8 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 and Infinity KB +# - k20x7 for Teensy 3.1 and 3.2 +MCU_STARTUP = k20x7 + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +# - MCHCK_K20 for Infinity KB +BOARD = PJRC_TEENSY_3_1 + +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 7 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +#OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 +OPT_DEFS = + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +#CONSOLE_ENABLE ?= yes # Console for debug +COMMAND_ENABLE ?= yes # Commands for debug and configuration +#SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover +CUSTOM_MATRIX ?= yes # Custom matrix file diff --git a/keyboards/whitefox/whitefox.c b/keyboards/whitefox/whitefox.c new file mode 100644 index 000000000..d35bf8338 --- /dev/null +++ b/keyboards/whitefox/whitefox.c @@ -0,0 +1,17 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include "whitefox.h" diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h new file mode 100644 index 000000000..0ffcdca01 --- /dev/null +++ b/keyboards/whitefox/whitefox.h @@ -0,0 +1,54 @@ +/* +Copyright 2014 Jun Wako + +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 . +*/ +#ifndef WHITEFOX_H +#define WHITEFOX_H + +#include "quantum.h" + +/* WhiteFox + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Backs|Del| + * |---------------------------------------------------------------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| '|Enter |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |App |Alt |Gui | |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + +#define KEYMAP( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \ + K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ + K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \ + K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ + K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ +) { \ + { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ + { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ + { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \ + { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \ + { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \ + { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \ + { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \ + { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \ + { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_NO } \ +} + +#endif -- cgit v1.2.3 From 300c71a02381947ec5c8414ddad17c98c357d958 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 00:05:18 -0800 Subject: Remove unneeded define --- keyboards/whitefox/mcuconf.h | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/whitefox/mcuconf.h b/keyboards/whitefox/mcuconf.h index ab1f7d724..68c29cf68 100644 --- a/keyboards/whitefox/mcuconf.h +++ b/keyboards/whitefox/mcuconf.h @@ -31,7 +31,6 @@ #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE #define KINETIS_PLLCLK_FREQUENCY 96000000UL #define KINETIS_SYSCLK_FREQUENCY 48000000UL -#define KINETIS_XTAL_FREQUENCY 16000000UL #if 0 /* FEI mode - 48 MHz with internal 32.768 kHz crystal */ -- cgit v1.2.3 From 262d31c389cf60460ff6707be90695df3647141b Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 00:29:58 -0800 Subject: Add whitefox readme --- keyboards/whitefox/readme.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 keyboards/whitefox/readme.md (limited to 'keyboards') diff --git a/keyboards/whitefox/readme.md b/keyboards/whitefox/readme.md new file mode 100644 index 000000000..0714ad563 --- /dev/null +++ b/keyboards/whitefox/readme.md @@ -0,0 +1,7 @@ +WhiteFox keyboard firmware +====================== + +This is an experimental port which came from the original TMK WhiteFox repo. + +The LED controller was not ported, as the original was a dirty hack and it would +be good to have complete support. -- cgit v1.2.3 From ccde1d8b5e8be798a8ab6ee7ace3088d5a474929 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 21:19:32 -0800 Subject: Add white fox to keyboards readme --- keyboards/readme.md | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards') diff --git a/keyboards/readme.md b/keyboards/readme.md index 81a23c7e5..02bce70f0 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -52,4 +52,5 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [Satan](/keyboards/satan) — A GH60 variant. * [SixKeyBoard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. * [TheVan 44](/keyboars/tv44) — A 44-key staggered keybard by Evangs. +* [WhiteFox](/keyboards/whitefox) — A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club * [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. -- cgit v1.2.3 From ca9a3dcb7113ea2a4ecec0b327c78bbf641386ca Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Wed, 4 Jan 2017 21:20:06 -0800 Subject: Fix unrelated spelling error --- keyboards/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/readme.md b/keyboards/readme.md index 02bce70f0..d2f41ad7e 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -51,6 +51,6 @@ These keyboards are part of the QMK repository, but their manufacturers are not * [S60-x](/keyboards/s60-x) — DIY compact keyboard designed by VinnyCordeiro for Sentraq. * [Satan](/keyboards/satan) — A GH60 variant. * [SixKeyBoard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. -* [TheVan 44](/keyboars/tv44) — A 44-key staggered keybard by Evangs. +* [TheVan 44](/keyboards/tv44) — A 44-key staggered keybard by Evangs. * [WhiteFox](/keyboards/whitefox) — A 65% keyboard designed as a partnership by matt3o, Massdrop and Input Club * [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. -- cgit v1.2.3 From ef2ebeb3cace7f2555ccf655f3a7bb7c9bb77b76 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 10:45:23 -0800 Subject: Remove KC_ prefix from KEYMAP macro to match other keyboards --- keyboards/whitefox/keymaps/default/keymap.c | 20 +++++++++---------- keyboards/whitefox/keymaps/matt3o/keymap.c | 30 ++++++++++++++--------------- keyboards/whitefox/whitefox.h | 20 +++++++++---------- 3 files changed, 35 insertions(+), 35 deletions(-) (limited to 'keyboards') diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c index 426b226a0..714f90659 100644 --- a/keyboards/whitefox/keymaps/default/keymap.c +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -31,18 +31,18 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------' */ [0] = KEYMAP( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, INS, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ - LCTL,LGUI,LALT, SPC, RALT,FN0, RCTL, LEFT,DOWN,RGHT \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_INS, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ + KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN0, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = KEYMAP( \ - TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,MUTE,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,PSCR,SLCK,PAUS,TRNS, TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS,KC_TRNS,KC_MUTE,\ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,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_VOLU,\ + 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_VOLD,\ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), }; diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index ecadcd284..9321553bf 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -31,25 +31,25 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `---------------------------------------------------------------' */ [0] = KEYMAP( \ - ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSLS,GRV, MUTE,\ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSPC, DEL, \ - FN0, A, S, D, F, G, H, J, K, L, SCLN,QUOT,NUHS,ENT, PGUP,\ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ - LCTL,LGUI,LALT, SPC, RALT,FN1, RCTL, LEFT,DOWN,RGHT \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, KC_MUTE,\ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ + KC_FN0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ + KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN1, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = KEYMAP( \ - TRNS,F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS,TRNS,TRNS,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,DEL , INS ,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, VOLU,\ - TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, PGUP,VOLD,\ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, HOME,PGDN,END \ + KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_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_DEL , KC_INS ,\ + 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_VOLU,\ + 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_VOLD,\ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), [2] = KEYMAP( \ - SLEP,P1, P2, P3, P4, P5, P6, P7, P8, P9, P0, TRNS,TRNS,TRNS,TRNS,FN2, \ - TRNS,TRNS,FN5 ,FN6 ,TRNS,FN7 ,TRNS,TRNS,TRNS,TRNS,PSCR,TRNS,TRNS,TRNS, FN3, \ - CAPS,TRNS,TRNS,TRNS,FN4 ,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS, TRNS,\ - TRNS,TRNS,TRNS,TRNS,CALC,TRNS,TRNS,TRNS,MAIL,TRNS,TRNS,TRNS,TRNS, TRNS,TRNS,\ - TRNS,TRNS,TRNS, TRNS, TRNS,TRNS,TRNS, TRNS,TRNS,TRNS \ + KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN2, \ + KC_TRNS,KC_TRNS,KC_FN5 ,KC_FN6 ,KC_TRNS,KC_FN7 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_FN3, \ + KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN4 ,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_CALC,KC_TRNS,KC_TRNS,KC_TRNS,KC_MAIL,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 \ ), }; diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h index 0ffcdca01..3b3c6bd21 100644 --- a/keyboards/whitefox/whitefox.h +++ b/keyboards/whitefox/whitefox.h @@ -19,7 +19,7 @@ along with this program. If not, see . #include "quantum.h" -/* WhiteFox +/* WhiteFox * ,---------------------------------------------------------------. * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `|Ins| * |---------------------------------------------------------------| @@ -40,15 +40,15 @@ along with this program. If not, see . K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ ) { \ - { KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07 }, \ - { KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17 }, \ - { KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27 }, \ - { KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37 }, \ - { KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47 }, \ - { KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57 }, \ - { KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67 }, \ - { KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77 }, \ - { KC_##K80, KC_##K81, KC_##K82, KC_##K83, KC_##K84, KC_##K85, KC_##K86, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, K23, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, K41, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ } #endif -- cgit v1.2.3 From a702f4631ebfb8f2ae92c8da0cc9a49d899bd920 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 10:54:36 -0800 Subject: Increase tick frequency for responsiveness Based off of PR #866 which did the same thing for the infinity60 --- keyboards/whitefox/chconf.h | 2 +- keyboards/whitefox/matrix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/whitefox/chconf.h b/keyboards/whitefox/chconf.h index 43c845739..d9114ec85 100644 --- a/keyboards/whitefox/chconf.h +++ b/keyboards/whitefox/chconf.h @@ -48,7 +48,7 @@ * @details Frequency of the system timer that drives the system ticks. This * setting also defines the system tick time unit. */ -#define CH_CFG_ST_FREQUENCY 1000 +#define CH_CFG_ST_FREQUENCY 100000 /** * @brief Time delta constant for the tick-less mode. diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c index ce35bca28..d69b82d61 100644 --- a/keyboards/whitefox/matrix.c +++ b/keyboards/whitefox/matrix.c @@ -69,7 +69,7 @@ uint8_t matrix_scan(void) case 8: palSetPad(GPIOC, 11); break; } - wait_us(1); // need wait to settle pin state + wait_us(10); // need wait to settle pin state // read col data: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } data = ((palReadPort(GPIOC) & 0x06UL) << 5) | -- cgit v1.2.3 From 49a00a535f6106f37e5ebd272238e018832803a0 Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 11:15:10 -0800 Subject: Update clock frequencies to match the infinity ergodox --- keyboards/whitefox/mcuconf.h | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) (limited to 'keyboards') diff --git a/keyboards/whitefox/mcuconf.h b/keyboards/whitefox/mcuconf.h index 68c29cf68..28f3c6cda 100644 --- a/keyboards/whitefox/mcuconf.h +++ b/keyboards/whitefox/mcuconf.h @@ -29,21 +29,10 @@ /* PEE mode - 48MHz system clock driven by external crystal. */ #define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE -#define KINETIS_PLLCLK_FREQUENCY 96000000UL -#define KINETIS_SYSCLK_FREQUENCY 48000000UL - -#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 +#define KINETIS_PLLCLK_FREQUENCY 72000000UL +#define KINETIS_SYSCLK_FREQUENCY 72000000UL +#define KINETIS_BUSCLK_FREQUENCY 36000000UL +#define KINETIS_FLASHCLK_FREQUENCY 24000000UL /* * SERIAL driver system settings. -- cgit v1.2.3 From 0b38204e62446a7ce2eaf60709cbf7e426a200be Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Mon, 9 Jan 2017 11:57:44 -0800 Subject: Fix mismatched indentation --- keyboards/whitefox/keymaps/matt3o/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index 9321553bf..4455886a5 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -72,7 +72,7 @@ const uint16_t fn_actions[] = { /* custom action function */ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - /* + /* (void)opt; switch(id) { case ACTION_LEDS_ALL: -- cgit v1.2.3 From a55c5e3ea353e3d1a73550bcc898bbc4f023c42e Mon Sep 17 00:00:00 2001 From: Kaleb Elwert Date: Tue, 10 Jan 2017 03:00:36 -0800 Subject: Wait for two ticks rather than 1 --- keyboards/whitefox/matrix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/whitefox/matrix.c b/keyboards/whitefox/matrix.c index d69b82d61..9202ab023 100644 --- a/keyboards/whitefox/matrix.c +++ b/keyboards/whitefox/matrix.c @@ -69,7 +69,7 @@ uint8_t matrix_scan(void) case 8: palSetPad(GPIOC, 11); break; } - wait_us(10); // need wait to settle pin state + wait_us(20); // need wait to settle pin state // read col data: { PTD0, PTD1, PTD4, PTD5, PTD6, PTD7, PTC1, PTC2 } data = ((palReadPort(GPIOC) & 0x06UL) << 5) | -- cgit v1.2.3 From db1aec159d37748de7413816a377dc5b63111c71 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 10 Jan 2017 19:20:25 +0100 Subject: Added layer images to deadcyclo layout readme --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 0 -> 79741 bytes .../deadcyclo/images/deadcyclo-layer-1-symbols.png | Bin 0 -> 55349 bytes .../images/deadcyclo-layer-2-media-and-mouse.png | Bin 0 -> 50926 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 0 -> 43551 bytes keyboards/ergodox/keymaps/deadcyclo/readme.md | 26 +++++++++++++++++++++ 5 files changed, 26 insertions(+) create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png create mode 100644 keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png new file mode 100644 index 000000000..4208c5189 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png new file mode 100644 index 000000000..ccda70e39 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png new file mode 100644 index 000000000..481e63e32 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png new file mode 100644 index 000000000..9ebba6734 Binary files /dev/null and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 915507440..07e8e62a3 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -5,6 +5,32 @@ some common keys might be missing, as this layout is intented to be used on *nix with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are unfamiliar with tiling window managers) as much as possibly. +# Layouts + +All layer images created using [keyboard-layout-editor](http://www.keyboard-layout-editor.com/) + +## Base layer + +[![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) + +## Layer 1 - Symbols + +[![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) + +## Layer 2 - Media and Mouse + +[![Layer 2 - Media and Mouse](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) + +## Layer 3 - Navigation + +[![Layer 3 - Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) + # Changelog - 02.01.2017 Added delete key on second layer +- 10.01.2017 Added layer images to readme + +# TODO + +- Add unicode support (direct input and indirect? see algernon layout for examples) +- Add descriptions below each layer image of any special functions/keys -- cgit v1.2.3 From c4fca8b6bc06178ad578dbc4be67d579a3f4d59a Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 10 Jan 2017 19:23:59 +0100 Subject: Fixed incorrect layer image in deadcyclo readme --- keyboards/ergodox/keymaps/deadcyclo/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 07e8e62a3..809dd6eb5 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -23,7 +23,7 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo ## Layer 3 - Navigation -[![Layer 3 - Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) +[![Layer 3 - Navigation](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) # Changelog -- cgit v1.2.3 From 3a453a03ed5f029bb9cf23955e87789245d39a22 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:00:34 +0100 Subject: Atreus62 first semi-final draft --- keyboards/atreus62/keymaps/mneme/Makefile | 6 + keyboards/atreus62/keymaps/mneme/README.md | 2 + keyboards/atreus62/keymaps/mneme/config.h | 7 + keyboards/atreus62/keymaps/mneme/keymap.c | 316 +++++++++++++++++++++++++++++ keyboards/atreus62/keymaps/mneme/unicode | 114 +++++++++++ 5 files changed, 445 insertions(+) create mode 100644 keyboards/atreus62/keymaps/mneme/Makefile create mode 100644 keyboards/atreus62/keymaps/mneme/README.md create mode 100644 keyboards/atreus62/keymaps/mneme/config.h create mode 100644 keyboards/atreus62/keymaps/mneme/keymap.c create mode 100644 keyboards/atreus62/keymaps/mneme/unicode (limited to 'keyboards') diff --git a/keyboards/atreus62/keymaps/mneme/Makefile b/keyboards/atreus62/keymaps/mneme/Makefile new file mode 100644 index 000000000..f20750dbc --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/Makefile @@ -0,0 +1,6 @@ +TAP_DANCE_ENABLE = yes +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = no +SLEEP_LED_ENABLE = no +UNICODE_ENABLE = yes +NKRO_ENABLE = true diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md new file mode 100644 index 000000000..54f5e21ab --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -0,0 +1,2 @@ +Keymap that owes just about everything to Algernon. +Check out his keymap for the Ergodox. It's pretty damned amazing. diff --git a/keyboards/atreus62/keymaps/mneme/config.h b/keyboards/atreus62/keymaps/mneme/config.h new file mode 100644 index 000000000..2c2a08c05 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/config.h @@ -0,0 +1,7 @@ +#define ONESHOT_TIMEOUT 3000 +#define TAPPING_TERM 200 +#define PREVENT_STUCK_MODIFIERS + +#define LEADER_TIMEOUT 1000 + +#include "../../config.h" diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c new file mode 100644 index 000000000..8c3f8aa43 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -0,0 +1,316 @@ +#include +#include "atreus62.h" +#include "led.h" +#include "action_layer.h" +#include "action_util.h" + +//avrdude -p atmega32u4 -P /dev/tty.usbmodem1411 -c avr109 -U flash:w:atreus63_default.hex +/* + *WINDOWS SWEDISH + */ +#define KN_HALF KC_GRV // 1/2 +#define KN_PLUS KC_MINS // + +#define KN_ACUT KC_EQL // ´ +#define KN_AO KC_LBRC // Å +#define KN_UMLA KC_RBRC // ¨ +#define KN_OE KC_SCLN // Ö +#define KN_AE KC_QUOT // Ä +#define KN_QUOT KC_NUHS // ' +#define KN_LABK KC_NUBS // < +#define KN_MINS KC_SLSH // - +#define KN_EXLM LSFT(KC_1) // ! +#define KN_DQT LSFT(KC_2) // " +#define KN_AT RALT(KC_2) // @ +#define KN_HASH LSFT(KC_3) // # +#define KN_DLR RALT(KC_4) // $ +#define KN_PERC LSFT(KC_5) // % +#define KN_AMPR LSFT(KC_6) // & +#define KN_SLSH LSFT(KC_7) // / +#define KN_LPRN LSFT(KC_8) // ( +#define KN_RPRN LSFT(KC_9) // ) +#define KN_EQL LSFT(KC_0) // = +#define KN_UNDS LSFT(KN_MINS) // _ +#define KN_QUES LSFT(KN_PLUS) // ? +#define KN_GRAV LSFT(KN_ACUT) // ` +#define KN_LCBR RALT(KC_7) // { +#define KN_RCBR RALT(KC_0) // } +#define KN_LBRC RALT(KC_8) // [ +#define KN_RBRC RALT(KC_9) // ] +#define KN_RABK LSFT(KN_LABK) // < +#define KN_COLN LSFT(KC_DOT) // : +#define KN_SCLN LSFT(KC_COMM) // : +#define KN_PIPE RALT(KN_LABK) // | +#define KN_QUES LSFT(KN_PLUS) // ? +#define KN_CIRC LSFT(KN_UMLA) // ^ +#define KN_ASTR LSFT(KN_QUOT) // * +#define KN_TILD RALT(KN_UMLA) // ~ +#define KN_BSLS RALT(KN_PLUS) // + +#define OSM_LCTL OSM(MOD_LCTL) +#define OSM_LALT OSM(MOD_LALT) +#define OSM_LSFT OSM(MOD_LSFT) + +#define KC_HYP LSFT(LALT(LCTL(KC_LGUI))) + +#define KC_COPY LCTL(KC_C) +#define KC_PASTE LCTL(KC_V) +#define KC_UNDO LCTL(KC_Z) +#define KC_REDO LCTL(LSFT(KC_Z)) + +// Layers +enum { + BASE = 0, + NAV, + SYM +}; + +//Macros +enum { + KF_1 = 0, // 1, F1 + KF_2, // ... + KF_3, + KF_4, + KF_5, + KF_6, + KF_7, + KF_8, + KF_9, + KF_10, + KF_11, + KF_12 +}; + +// Tapdance +enum { + TD_FUN = 0, + TD_EQ +}; + +//Custom keycodes +enum { + PLACEHOLDER = SAFE_RANGE +}; + +//State and timers +uint16_t kf_timers[12]; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = { + + { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, + { KC_HYP ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, + { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, + { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, + { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_TAB ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } + + }, + [NAV] = { + + { 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_HOME ,KC_UP ,KC_END ,KC_PGUP ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_PGDN ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } + + }, + [SYM] = { + + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,TD(TD_EQ) ,KC_NO ,TD(TD_FUN) ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KN_LABK ,KN_RABK ,KN_LCBR ,KN_RCBR ,KN_PLUS ,KC_NO ,KN_AT ,KN_DQT ,KN_QUOT ,KN_GRAV ,KN_SLSH ,KC_TRNS }, + { KC_TRNS ,KN_EXLM ,KN_EQL ,KN_LPRN ,KN_RPRN ,KN_MINS ,KC_NO ,KN_UNDS ,KN_SCLN ,KN_COLN ,KN_AMPR ,KN_PIPE ,KC_TRNS }, + { KC_TRNS ,KN_DLR ,KN_PERC ,KN_LBRC ,KN_RBRC ,KN_ASTR ,KC_TRNS ,KN_HASH ,KC_COMM ,KC_DOT ,KN_QUES ,KN_BSLS ,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 } + + } +}; + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + +static void m_tapn (uint8_t code, ...) { + uint8_t kc = code; + va_list ap; + + va_start(ap, code); + do { + register_code(kc); + unregister_code(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); +} + +static void m_handle_kf (keyrecord_t *record, uint8_t id) { + uint8_t code = id - KF_1; + + if (record->event.pressed) { + kf_timers[code] = timer_read (); + } else { + uint8_t kc_base; + uint8_t long_press = (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM); + + kf_timers[code] = 0; + + switch(id){ + case KF_1 ... KF_10: + if (long_press) { + // Long press + kc_base = KC_F1; + } else { + kc_base = KC_1; + } + code += kc_base; + break; + case KF_11: + code = long_press ? KC_F11 : KC_ESC; + break; + case KF_12: + code = long_press ? KC_F12 : KC_PLUS; + break; + } + register_code (code); + unregister_code (code); + } +} + +const uint16_t PROGMEM fn_actions[] = { + +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch (id) { + case KF_1 ... KF_12: + m_handle_kf(record, id); + break; + } + return MACRO_NONE; +}; + +// Custom keycodes +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + bool queue = true; + + //Cancle one-shot mods. + switch (keycode) { + case KC_ESC: + if (record->event.pressed && get_oneshot_mods() && !has_oneshot_mods_timed_out()) { + clear_oneshot_mods(); + queue = false; + } + break; + } + return queue; +} + +// TAP DANCE SETTINGS +void dance_eq (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: // === + register_code(KC_LSHIFT); + m_tapn(KC_0, KC_0, KC_0, 0); + unregister_code(KC_LSHIFT); + break; + case 2: + register_code(KC_LSHIFT); + m_tapn(KC_1, KC_0, KC_0, 0); + unregister_code(KC_LSHIFT); + break; + default: + reset_tap_dance(state); + } +} + +void dance_fun (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 1: // => + register_code(KC_LSHIFT); + m_tapn(KC_0, KN_LABK, 0); + unregister_code(KC_LSHIFT); + break; + case 2: // () => {} + register_code(KC_LSHIFT); + m_tapn(KC_8, KC_9, KC_SPC, KC_0, KN_LABK, KC_SPC, 0); + unregister_code(KC_LSHIFT); + register_code(KC_RALT); + m_tapn(KC_7, 0); + unregister_code(KC_RALT); + TAP_ONCE(KC_ENT); + break; + default: + reset_tap_dance(state); + } +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_FUN] = ACTION_TAP_DANCE_FN (dance_fun) + ,[TD_EQ] = ACTION_TAP_DANCE_FN (dance_eq) +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + set_unicode_input_mode(UC_WINC); +}; + +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_L){ + register_code(KC_RGUI); + TAP_ONCE(KC_L); + unregister_code(KC_RGUI); + }; // Todo + + SEQ_TWO_KEYS(KC_F, KC_S){ + register_code(KC_LCTRL); + TAP_ONCE(KC_S); + unregister_code(KC_LCTRL); + }; // Todo + + SEQ_TWO_KEYS(KC_B, KC_D){ + register_code(KC_LCTRL); + TAP_ONCE(KC_W); + unregister_code(KC_LCTRL); + }; // Todo + + SEQ_ONE_KEY(KC_SLSH){ + register_code(KC_LCTRL); + TAP_ONCE(KC_F); + unregister_code(KC_LCTRL); + } + + SEQ_TWO_KEYS (KC_S, KC_S) { + // ¯\_(ツ)_/¯ + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + register_code (KC_RALT); TAP_ONCE (KN_PLUS); 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_TWO_KEYS (KC_S, KC_F) { + // 凸(ツ)凸 + 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(); + } + + SEQ_TWO_KEYS (KC_S, KC_L) { + // λ + unicode_input_start(); + register_hex(0x03bb); + unicode_input_finish(); + } + }; +}; diff --git a/keyboards/atreus62/keymaps/mneme/unicode b/keyboards/atreus62/keymaps/mneme/unicode new file mode 100644 index 000000000..b3f62b6d3 --- /dev/null +++ b/keyboards/atreus62/keymaps/mneme/unicode @@ -0,0 +1,114 @@ +Todo +☐ 2610 Todo +☑ 2611 Done +☒ 2612 Failed + +Operator +× 00D7 Multiplication +÷ 00F7 Division +≤ 2264 LessEqual +≥ 2265 MoreEqual +± 00B1 Plusminus + +Math +∏ 220F Product +∑ 2211 Sum +≈ 2248 Almost +≡ 2261 Equivalent +∞ 221E Infinity +‰ 2030 Mille + +Set +⊂ 2282 Subset +⊃ 2283 sUperset +∩ 2229 Intersextion +∪ 222A Union +∈ 2208 Element +∉ 2209 Notelement +∍ 220D Contains +∌ 220C doesNotcontain + +Logic +¬ 00AC Not +∧ 2227 And +∨ 2228 Or +∃ 2203 Exists +∄ 2204 Notexists + +Greek +µ 00B5 Micro +λ 03BB Lamda +Ω 2126 Omega +α 03B1 Alpha +β 03B2 Beta +γ 03B3 Gamma +π 03C0 Pi +δ 03B4 Delta + +Other +☁ 2601 Cloud +☼ 263C Sun +☂ 2602 Rain +☠ 2620 Skull +♺ 267A Recycle +👍1F44D thumbsUp +👎1F44E thumbsDown +💩 1F4A9 Poo + + +//Todo +SEQ_THREE_KEYS(KC_U, KC_G, KC_T){m_unicode(0x2610);}; // Todo +SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x2611);}; // Done +SEQ_THREE_KEYS(KC_U, KC_G, KC_F){m_unicode(0x2612);}; // Failed + +//Operator +SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x00D7);}; // Multiplication +SEQ_THREE_KEYS(KC_U, KC_O, KC_D){m_unicode(0x00F7);}; // Division +SEQ_THREE_KEYS(KC_U, KC_O, KC_L){m_unicode(0x2264);}; // LessEqual +SEQ_THREE_KEYS(KC_U, KC_O, KC_M){m_unicode(0x2265);}; // MoreEqual +SEQ_THREE_KEYS(KC_U, KC_O, KC_P){m_unicode(0x00B1);}; // Plusminus + +//Math +SEQ_THREE_KEYS(KC_U, KC_M, KC_P){m_unicode(0x220F);}; // Product +SEQ_THREE_KEYS(KC_U, KC_M, KC_S){m_unicode(0x2211);}; // Sum +SEQ_THREE_KEYS(KC_U, KC_M, KC_A){m_unicode(0x2248);}; // Almost +SEQ_THREE_KEYS(KC_U, KC_M, KC_E){m_unicode(0x2261);}; // Equivalent +SEQ_THREE_KEYS(KC_U, KC_M, KC_I){m_unicode(0x221E);}; // Infinity +SEQ_THREE_KEYS(KC_U, KC_M, KC_M){m_unicode(0x2030);}; // Mille + +//Set +SEQ_THREE_KEYS(KC_U, KC_S, KC_S){m_unicode(0x2282);}; Subset +SEQ_THREE_KEYS(KC_U, KC_S, KC_P){m_unicode(0x2283);}; suPerset +SEQ_THREE_KEYS(KC_U, KC_S, KC_I){m_unicode(0x2229);}; Intersection +SEQ_THREE_KEYS(KC_U, KC_S, KC_U){m_unicode(0x222A);}; Union +SEQ_THREE_KEYS(KC_U, KC_S, KC_E){m_unicode(0x2208);}; Element +SEQ_THREE_KEYS(KC_U, KC_S, KC_N){m_unicode(0x2209);}; Notelement +SEQ_THREE_KEYS(KC_U, KC_S, KC_C){m_unicode(0x220D);}; Contains +SEQ_THREE_KEYS(KC_U, KC_S, KC_D){m_unicode(0x220C);}; doesNotcontain + +//Logic +SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x00AC);}; // Not +SEQ_THREE_KEYS(KC_U, KC_L, KC_A){m_unicode(0x2227);}; // And +SEQ_THREE_KEYS(KC_U, KC_L, KC_O){m_unicode(0x2228);}; // Or +SEQ_THREE_KEYS(KC_U, KC_L, KC_E){m_unicode(0x2203);}; // Exists +SEQ_THREE_KEYS(KC_U, KC_L, KC_N){m_unicode(0x2204);}; // Notexists + +//Greek +SEQ_THREE_KEYS(KC_U, KC_G, KC_M){m_unicode(0x00B5);}; // Micro +SEQ_THREE_KEYS(KC_U, KC_G, KC_L){m_unicode(0x03BB);}; // Lamda +SEQ_THREE_KEYS(KC_U, KC_G, KC_O){m_unicode(0x2126);}; // Omega +SEQ_THREE_KEYS(KC_U, KC_G, KC_A){m_unicode(0x03B1);}; // Alpha +SEQ_THREE_KEYS(KC_U, KC_G, KC_B){m_unicode(0x03B2);}; // Beta +SEQ_THREE_KEYS(KC_U, KC_G, KC_G){m_unicode(0x03B3);}; // Gamma +SEQ_THREE_KEYS(KC_U, KC_G, KC_P){m_unicode(0x03C0);}; // Pi +SEQ_THREE_KEYS(KC_U, KC_G, KC_D){m_unicode(0x03B4);}; // Delta + +//Zother +SEQ_THREE_KEYS(KC_U, KC_Z, KC_C){m_unicode(0x2601);}; // Cloud +SEQ_THREE_KEYS(KC_U, KC_Z, KC_S){m_unicode(0x263C);}; // Sun +SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x2602);}; // Rain +SEQ_THREE_KEYS(KC_U, KC_Z, KC_K){m_unicode(0x2620);}; // sKull +SEQ_THREE_KEYS(KC_U, KC_Z, KC_R){m_unicode(0x267A);}; // rEcycle +SEQ_THREE_KEYS(KC_U, KC_Z, KC_U){m_unicode(0x1F44D);}; // thumbsUp +SEQ_THREE_KEYS(KC_U, KC_Z, KC_D){m_unicode(0x1F44E);}; // thumbsDown +SEQ_THREE_KEYS(KC_U, KC_Z, KC_P){m_unicode(0x1F4A9);}; // Poo -- cgit v1.2.3 From e491f5a4d0465c1499e14183358730cf73d0ceaf Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:41:07 +0100 Subject: Readme + minor change to make it match reality. --- keyboards/atreus62/keymaps/mneme/README.md | 56 +++++++++++++++++++++++++- keyboards/atreus62/keymaps/mneme/img/base.png | Bin 0 -> 458762 bytes keyboards/atreus62/keymaps/mneme/img/fun.png | Bin 0 -> 268634 bytes keyboards/atreus62/keymaps/mneme/img/sym.png | Bin 0 -> 433342 bytes keyboards/atreus62/keymaps/mneme/keymap.c | 18 +++------ 5 files changed, 60 insertions(+), 14 deletions(-) create mode 100644 keyboards/atreus62/keymaps/mneme/img/base.png create mode 100644 keyboards/atreus62/keymaps/mneme/img/fun.png create mode 100644 keyboards/atreus62/keymaps/mneme/img/sym.png (limited to 'keyboards') diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 54f5e21ab..b4dc89625 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -1,2 +1,54 @@ -Keymap that owes just about everything to Algernon. -Check out his keymap for the Ergodox. It's pretty damned amazing. + + +Mnemes Swedish Bonaza +======================= + +My Layout in process, most of the code is shamelessly stolen from [algernons][algernon] excellent layout + + [algernon]: https://github.com/algernon/ergodox-layout + +It's for Windows (current work forces me to) and Swedish (matter of birth) so ymmw. + +## Table of Contents + +* [Layouts](#layouts) + - [Base layer](#base-layer) + - [Fun layer](#fun-layer) + - [Nav layer](#nav-layer) + - [LED states](#led-states) + +# Layouts + +## Base layer + +![Base layer](img/base.png) + + +* The number row doubles as a function row. Short presses produces numbers, long presses produces Fxx +* The `Shift`, `Alt`, and `Control` modifiers are one-shot. +* `Backspace` and `Enter` doubles as switches to the `sym` layer when held +* The `ESC` key also doubles as a one-shot cancel key. +* The **Lead** key is followed by a sequence of keys. + - `LEAD l` : `lgui+l`. + - `LEAD s l` : `λ`. + - `LEAD s s` : `¯\_(ツ)_/¯` + - `LEAD s f` : `凸(ツ)凸` + - `LEAD f s` : `ctrl+s` + - `LEAD b d` : `ctrl+w` + + +## Nav layer + +![Fun layer](img/fun.png) + +Basic navigation on the right hand and modifiers close +by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. + +## Sym layer + +![Sym layer](img/sym.png) + +Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. + +# License + GPL-3+ diff --git a/keyboards/atreus62/keymaps/mneme/img/base.png b/keyboards/atreus62/keymaps/mneme/img/base.png new file mode 100644 index 000000000..86907d544 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/base.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png new file mode 100644 index 000000000..a58933d96 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/fun.png differ diff --git a/keyboards/atreus62/keymaps/mneme/img/sym.png b/keyboards/atreus62/keymaps/mneme/img/sym.png new file mode 100644 index 000000000..11b5bd4b0 Binary files /dev/null and b/keyboards/atreus62/keymaps/mneme/img/sym.png differ diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 8c3f8aa43..56d637120 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -44,7 +44,7 @@ #define KN_CIRC LSFT(KN_UMLA) // ^ #define KN_ASTR LSFT(KN_QUOT) // * #define KN_TILD RALT(KN_UMLA) // ~ -#define KN_BSLS RALT(KN_PLUS) // +#define KN_BSLS RALT(KN_PLUS) // #define OSM_LCTL OSM(MOD_LCTL) #define OSM_LALT OSM(MOD_LALT) @@ -110,8 +110,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [NAV] = { { 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_HOME ,KC_UP ,KC_END ,KC_PGUP ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_PGDN ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, + { KC_TRNS ,KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } @@ -281,19 +281,13 @@ void matrix_scan_user(void) { unregister_code(KC_LCTRL); }; // Todo - SEQ_ONE_KEY(KC_SLSH){ - register_code(KC_LCTRL); - TAP_ONCE(KC_F); - unregister_code(KC_LCTRL); - } - SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_RALT); TAP_ONCE (KN_PLUS); 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); + 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(); } @@ -302,7 +296,7 @@ void matrix_scan_user(void) { 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); + register_code (KC_RSFT); TAP_ONCE (KC_9); unregister_code (KC_RSFT); unicode_input_start (); register_hex(0x51F8); unicode_input_finish(); } -- cgit v1.2.3 From 1bef7bf45a2b05e755b17267aa08a66d1588134f Mon Sep 17 00:00:00 2001 From: David Olsson Date: Wed, 11 Jan 2017 23:43:13 +0100 Subject: Link fix in readme. --- keyboards/atreus62/keymaps/mneme/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index b4dc89625..1461f6c52 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -13,8 +13,8 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym * [Layouts](#layouts) - [Base layer](#base-layer) - - [Fun layer](#fun-layer) - [Nav layer](#nav-layer) + - [Sym layer](#sym-layer) - [LED states](#led-states) # Layouts @@ -39,7 +39,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym ## Nav layer -![Fun layer](img/fun.png) +![Nav layer](img/fun.png) Basic navigation on the right hand and modifiers close by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. -- cgit v1.2.3 From ed975f2454692fec28539a7014116beeb21b4c9e Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 00:14:42 +0100 Subject: Remove comments and change to correct KN_PLUS instead of KC_PLUS. --- keyboards/atreus62/keymaps/mneme/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index 56d637120..eca452b77 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -170,7 +170,7 @@ static void m_handle_kf (keyrecord_t *record, uint8_t id) { code = long_press ? KC_F11 : KC_ESC; break; case KF_12: - code = long_press ? KC_F12 : KC_PLUS; + code = long_press ? KC_F12 : KN_PLUS; break; } register_code (code); @@ -267,19 +267,19 @@ void matrix_scan_user(void) { register_code(KC_RGUI); TAP_ONCE(KC_L); unregister_code(KC_RGUI); - }; // Todo + }; SEQ_TWO_KEYS(KC_F, KC_S){ register_code(KC_LCTRL); TAP_ONCE(KC_S); unregister_code(KC_LCTRL); - }; // Todo + }; SEQ_TWO_KEYS(KC_B, KC_D){ register_code(KC_LCTRL); TAP_ONCE(KC_W); unregister_code(KC_LCTRL); - }; // Todo + }; SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ -- cgit v1.2.3 From b2419b31d3d4198192a1b5fb78b1c2e8ade0ce87 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 15:36:14 +0100 Subject: - Change docs to match keymap. - Switched around modifiers on the function layer to match muscle memory. - Added support for application switching. --- keyboards/atreus62/keymaps/mneme/README.md | 8 ++-- keyboards/atreus62/keymaps/mneme/img/fun.png | Bin 268634 -> 430634 bytes keyboards/atreus62/keymaps/mneme/keymap.c | 63 +++++++++++++++++++-------- 3 files changed, 50 insertions(+), 21 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 1461f6c52..5bac545fc 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -33,8 +33,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym - `LEAD s l` : `λ`. - `LEAD s s` : `¯\_(ツ)_/¯` - `LEAD s f` : `凸(ツ)凸` - - `LEAD f s` : `ctrl+s` - - `LEAD b d` : `ctrl+w` + - `LEAD a *` : Application switching based on position in start menu. Very specific to my computer. ## Nav layer @@ -48,7 +47,10 @@ by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. ![Sym layer](img/sym.png) -Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. +* Easy access to most symbols I use on a daily basis. Most common are on the home row, the rest are grouped as best as I could. + +- `eq` : Tapdance, produces `===` and `!==` +- `fun`: Tapdance, produces `=>` and `() => {\n` # License GPL-3+ diff --git a/keyboards/atreus62/keymaps/mneme/img/fun.png b/keyboards/atreus62/keymaps/mneme/img/fun.png index a58933d96..ec5a478c6 100644 Binary files a/keyboards/atreus62/keymaps/mneme/img/fun.png and b/keyboards/atreus62/keymaps/mneme/img/fun.png differ diff --git a/keyboards/atreus62/keymaps/mneme/keymap.c b/keyboards/atreus62/keymaps/mneme/keymap.c index eca452b77..7c1879982 100644 --- a/keyboards/atreus62/keymaps/mneme/keymap.c +++ b/keyboards/atreus62/keymaps/mneme/keymap.c @@ -4,7 +4,6 @@ #include "action_layer.h" #include "action_util.h" -//avrdude -p atmega32u4 -P /dev/tty.usbmodem1411 -c avr109 -U flash:w:atreus63_default.hex /* *WINDOWS SWEDISH */ @@ -101,19 +100,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = { { M(KF_11) ,M(KF_1) ,M(KF_2) ,M(KF_3) ,M(KF_4) ,M(KF_5) ,KC_NO ,M(KF_6) ,M(KF_7) ,M(KF_8) ,M(KF_9) ,M(KF_10) ,M(KF_12) }, - { KC_HYP ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, + { KC_TAB ,KC_Q ,KC_W ,KC_E ,KC_R ,KC_T ,KC_NO ,KC_Y ,KC_U ,KC_I ,KC_O ,KC_P ,KN_AO }, { OSM_LCTL ,KC_A ,KC_S ,KC_D ,KC_F ,KC_G ,KC_NO ,KC_H ,KC_J ,KC_K ,KC_L ,KN_OE ,KN_AE }, { OSM_LSFT ,KC_Z ,KC_X ,KC_C ,KC_V ,KC_B ,KC_DELT ,KC_N ,KC_M ,KC_COMM ,KC_DOT ,KN_MINS ,OSM_LSFT }, - { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_TAB ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } + { MO(NAV) ,OSM_LCTL ,OSM_LALT ,KC_LGUI ,KC_SPC ,LT(SYM,KC_BSPC) ,KC_HYP ,LT(SYM,KC_ENT) ,KC_SPC ,KC_LEAD ,KC_LALT ,KC_LCTRL ,MO(NAV) } }, [NAV] = { { 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_NO ,KC_PGUP ,KC_HOME ,KC_UP ,KC_END ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,KC_TRNS ,KC_TRNS }, - { KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,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_F12 ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_TRNS ,KC_VOLD ,KC_VOLU } + { KC_TRNS ,KC_LSFT ,KC_LCTL ,KC_LALT ,KC_L ,KC_TRNS ,KC_NO ,KC_PGDN ,KC_LEFT ,KC_DOWN ,KC_RIGHT ,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_VOLD ,KC_VOLU } }, [SYM] = { @@ -179,7 +178,6 @@ static void m_handle_kf (keyrecord_t *record, uint8_t id) { } const uint16_t PROGMEM fn_actions[] = { - }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) @@ -269,22 +267,51 @@ void matrix_scan_user(void) { unregister_code(KC_RGUI); }; - SEQ_TWO_KEYS(KC_F, KC_S){ - register_code(KC_LCTRL); - TAP_ONCE(KC_S); - unregister_code(KC_LCTRL); - }; - SEQ_TWO_KEYS(KC_B, KC_D){ - register_code(KC_LCTRL); - TAP_ONCE(KC_W); - unregister_code(KC_LCTRL); - }; + SEQ_TWO_KEYS (KC_A, KC_W) { + //Web - chrome + register_code (KC_LGUI); TAP_ONCE (KC_1); unregister_code (KC_LGUI); + } + SEQ_TWO_KEYS (KC_A, KC_P) { + //sPotify + register_code (KC_LGUI); TAP_ONCE (KC_2); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_T) { + //Total Commander + register_code (KC_LGUI); TAP_ONCE (KC_3); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_A) { + //Atom + register_code (KC_LGUI); TAP_ONCE (KC_4); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_E) { + //Emacs + register_code (KC_LGUI); TAP_ONCE (KC_5); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_C) { + //Cmdr + register_code (KC_LGUI); TAP_ONCE (KC_6); unregister_code (KC_LGUI); + + } + SEQ_TWO_KEYS (KC_A, KC_S) { + //Slack + register_code (KC_LGUI); TAP_ONCE (KC_7); unregister_code (KC_LGUI); + } + SEQ_TWO_KEYS (KC_S, KC_S) { // ¯\_(ツ)_/¯ unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - register_code (KC_RALT); TAP_ONCE (KN_PLUS); unregister_code (KC_RALT); + register_code (KC_LALT); + register_code (KC_LCTL); + TAP_ONCE (KN_PLUS); + unregister_code (KC_LCTL); + unregister_code (KC_LALT); + 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); -- cgit v1.2.3 From 236a0b0b6012d311a3ec048498dacdb1851327a0 Mon Sep 17 00:00:00 2001 From: David Olsson Date: Thu, 12 Jan 2017 16:00:09 +0100 Subject: Update makefile. Readme. --- keyboards/atreus62/keymaps/mneme/Makefile | 7 +++---- keyboards/atreus62/keymaps/mneme/README.md | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus62/keymaps/mneme/Makefile b/keyboards/atreus62/keymaps/mneme/Makefile index f20750dbc..046aec273 100644 --- a/keyboards/atreus62/keymaps/mneme/Makefile +++ b/keyboards/atreus62/keymaps/mneme/Makefile @@ -1,6 +1,5 @@ TAP_DANCE_ENABLE = yes -BOOTMAGIC_ENABLE = no -COMMAND_ENABLE = no -SLEEP_LED_ENABLE = no -UNICODE_ENABLE = yes NKRO_ENABLE = true +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no diff --git a/keyboards/atreus62/keymaps/mneme/README.md b/keyboards/atreus62/keymaps/mneme/README.md index 5bac545fc..04ab070be 100644 --- a/keyboards/atreus62/keymaps/mneme/README.md +++ b/keyboards/atreus62/keymaps/mneme/README.md @@ -42,7 +42,7 @@ It's for Windows (current work forces me to) and Swedish (matter of birth) so ym Basic navigation on the right hand and modifiers close by for the left. The latter because I tend to use `ctrl+arrows` quite a lot. - + ## Sym layer ![Sym layer](img/sym.png) -- cgit v1.2.3 From c660d5f8140f7ebc9a4c8302992438026a85b61d Mon Sep 17 00:00:00 2001 From: kd0kkv Date: Fri, 13 Jan 2017 08:30:46 -0600 Subject: Update keymap.c Fixed the default querty layout to have a B button and just one F --- keyboards/tv44/keymaps/default/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/tv44/keymaps/default/keymap.c b/keyboards/tv44/keymaps/default/keymap.c index f3f989f2d..b9fe33a7c 100644 --- a/keyboards/tv44/keymaps/default/keymap.c +++ b/keyboards/tv44/keymaps/default/keymap.c @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1) }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_F, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } }, [_DV] = { /* Dvorak */ -- cgit v1.2.3 From c6299a785916d021dbfc2f533d059d7b0a51f121 Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Sun, 18 Dec 2016 01:39:41 +0100 Subject: Update the vifon keymap --- keyboards/planck/keymaps/vifon/Makefile | 5 +---- keyboards/planck/keymaps/vifon/config.h | 5 +++++ keyboards/planck/keymaps/vifon/keymap.c | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/vifon/Makefile b/keyboards/planck/keymaps/vifon/Makefile index 53660a2e7..15a7b736f 100644 --- a/keyboards/planck/keymaps/vifon/Makefile +++ b/keyboards/planck/keymaps/vifon/Makefile @@ -1,6 +1,3 @@ -# Please remove if no longer applicable -$(warning THIS FILE MAY BE TOO LARGE FOR YOUR KEYBOARD) -$(warning Please disable some options in the Makefile to resolve) # Build Options @@ -10,7 +7,7 @@ $(warning Please disable some options in the Makefile to resolve) BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) +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 diff --git a/keyboards/planck/keymaps/vifon/config.h b/keyboards/planck/keymaps/vifon/config.h index 9cb0634fb..a08b37cbe 100644 --- a/keyboards/planck/keymaps/vifon/config.h +++ b/keyboards/planck/keymaps/vifon/config.h @@ -81,6 +81,11 @@ along with this program. If not, see . /* prevent the modifiers from being stuck, sacrificing some memory */ #define PREVENT_STUCK_MODIFIERS +/* A larger buffer for the dynamic macros as this keymap is not taking + * up that much memory. + */ +#define DYNAMIC_MACRO_SIZE 256 + #ifdef SUBPROJECT_rev3 #include "rev3/config.h" #endif diff --git a/keyboards/planck/keymaps/vifon/keymap.c b/keyboards/planck/keymaps/vifon/keymap.c index 80c4a516c..ee0c0ac36 100644 --- a/keyboards/planck/keymaps/vifon/keymap.c +++ b/keyboards/planck/keymaps/vifon/keymap.c @@ -62,7 +62,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_PPG] = { /* Pure Pro: Gaming */ {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, DF(_RS), _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, XXXXXXX, _______, KM_RS , _______, _______, KM_LW , _______, _______, _______, _______}, }, [_NM] = { /* Numeric */ @@ -90,7 +90,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, KC_LGUI, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______} }, [_DYN]= { /* special */ - {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, _______, KC_INS, _______, KC_PSCR, KC_PAUS}, + {_______, DYN_REC_START1, DYN_MACRO_PLAY1, _______, _______, _______, _______, KC_APP, KC_INS, _______, KC_PSCR, KC_PAUS}, {_______, DYN_REC_START2, DYN_MACRO_PLAY2, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_SLCK, KC_NLCK}, {KM_SHLK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -- cgit v1.2.3 From aa0939b5ef410e3003cc52383046a5d2dd0744f5 Mon Sep 17 00:00:00 2001 From: Bryan Hernandez Date: Fri, 13 Jan 2017 21:35:09 -0600 Subject: Added Bryan's keymap --- keyboards/ergodox/keymaps/bryan/keymap.c | 226 +++++++++++++++++++++++++++++++ 1 file changed, 226 insertions(+) create mode 100644 keyboards/ergodox/keymaps/bryan/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/bryan/keymap.c b/keyboards/ergodox/keymaps/bryan/keymap.c new file mode 100644 index 000000000..572cea8cd --- /dev/null +++ b/keyboards/ergodox/keymaps/bryan/keymap.c @@ -0,0 +1,226 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 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 | Cmd,Shft,[ | | Cmd,Shft,] | 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------------| |------------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * |BkSp/Cmd| 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 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * |Ctrl/Esc|PgUp| | App | LGui | + * ,------|------|------| |------+--------+------. + * | | | PgDn | | Home | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | Esc | | Alt | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, M(2), + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + GUI_T(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, + CTL_T(KC_ESC),KC_PGUP, + KC_PGDN, + KC_SPC,KC_BSPC, KC_ESC, + // right hand + M(3), 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, KC_FN1, + + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_LALT,KC_TAB, KC_ENT + ), +/* Keymap 1: 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 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // 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_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, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,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, M(1), KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +// KC_COMM, KC_MINS + +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + 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 +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + } + return MACRO_NONE; +}; + +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; + } + +}; -- cgit v1.2.3 From 1ac15e6b3a6c43669d5b107e4ca550d2aa7c284c Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Tue, 17 Jan 2017 20:34:05 +0800 Subject: put shell nav under tab, introduce an OSL for the brackets layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 3d7e1893c..2a64331db 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -58,18 +58,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(MOUSE,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), - MO(SHELL_NAV), KC_A, KC_O, KC_E, KC_U, KC_I, + LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), // thumb cluster - MO(BRACKETS), RCTL(KC_S), + MO(MOUSE), RCTL(KC_S), RCTL(KC_DEL), KC_BSPC,RCTL(KC_BSPC),KC_DEL, // right hand KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_BSLS, KC_PGUP, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_D, KC_H, KC_T, KC_N, KC_S, LT(BRACKETS,KC_MINS), + KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, TD(TD_SHIFT_CAPSLOCK), // lower keys - browser tab control RSFT(RCTL(KC_TAB)), RCTL(KC_TAB), RCTL(KC_T), LALT(KC_LEFT), RCTL(KC_W), @@ -406,6 +406,7 @@ void matrix_scan_user(void) { switch (layer) { case NUMBER: case SYMBOL: + case BRACKETS: ergodox_right_led_2_on(); break; case KEY_NAV: -- cgit v1.2.3 From 0815c7ae17cc19007c2074d178cb27476c5c6b83 Mon Sep 17 00:00:00 2001 From: Mitch Lloyd Date: Tue, 17 Jan 2017 12:48:58 -0800 Subject: Update mitch layout for new keymaps --- keyboards/planck/keymaps/mitch/Makefile | 5 ++ keyboards/planck/keymaps/mitch/config.h | 2 + keyboards/planck/keymaps/mitch/keymap.c | 70 ++++++++++++++++++++++ keyboards/planck/keymaps/mitch/readme.md | 26 ++++++++ .../old_keymap_files/common_keymaps/keymap_mitch.c | 49 --------------- 5 files changed, 103 insertions(+), 49 deletions(-) create mode 100644 keyboards/planck/keymaps/mitch/Makefile create mode 100644 keyboards/planck/keymaps/mitch/config.h create mode 100644 keyboards/planck/keymaps/mitch/keymap.c create mode 100644 keyboards/planck/keymaps/mitch/readme.md delete mode 100644 keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/mitch/Makefile b/keyboards/planck/keymaps/mitch/Makefile new file mode 100644 index 000000000..7955003d4 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT = rev3 + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/mitch/config.h b/keyboards/planck/keymaps/mitch/config.h new file mode 100644 index 000000000..73bc50bc2 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/config.h @@ -0,0 +1,2 @@ +#include "../../config.h" +#define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/planck/keymaps/mitch/keymap.c b/keyboards/planck/keymaps/mitch/keymap.c new file mode 100644 index 000000000..79b5204f0 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/keymap.c @@ -0,0 +1,70 @@ +#include "keymap.h" +#include "quantum.h" + +#define QWERTY 0 +#define LOWER 1 +#define RAISE 2 + +// Alias to make layering more clear +#define _______ KC_TRNS + +// In MacOS, switch between windows within an application +#define GUI_GRV LGUI(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctl | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Esc | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) }, + {KC_ESC, KC_DEL, KC_LALT, KC_LGUI, MO(1), KC_SPC, KC_SPC, MO(2), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | GUIGR| | | | | | | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | Mute | Vol- | Vol+ | | Bksp | $ | % | ^ | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | ! | @ | # | \ |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Enter | | | PgUp | PgUn | | + * `-----------------------------------------------------------------------------------' + */ +[LOWER] = { + {GUI_GRV, _______, _______, _______, _______, _______, _______, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_BSPC, KC_DLR, KC_PERC, KC_CIRC, KC_PIPE, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, KC_EXLM, KC_AT, KC_HASH, KC_BSLS, KC_ENT}, + {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | ` | ~ | ( | ) | | | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | [ | ] | { | } | | | 4 | 5 | 6 | | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | - | _ | = | + | | | 1 | 2 | 3 | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Enter | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[RAISE] = { + {KC_GRV, KC_GRV, KC_TILD, KC_LPRN, KC_RPRN, _______, _______, KC_7, KC_8, KC_9, KC_0, _______}, + {_______, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, KC_4, KC_5, KC_6, _______, KC_BSLS}, + {_______, KC_MINS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, KC_1, KC_2, KC_3, _______, KC_ENT}, + {_______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, _______, KC_PGDN, KC_PGUP, _______} +} +}; diff --git a/keyboards/planck/keymaps/mitch/readme.md b/keyboards/planck/keymaps/mitch/readme.md new file mode 100644 index 000000000..3869304f4 --- /dev/null +++ b/keyboards/planck/keymaps/mitch/readme.md @@ -0,0 +1,26 @@ +## Flashing Keyboard + +1. Install `dfu` tools: + + brew tap osx-cross/avr + brew install avr-libc + brew install dfu-programmer + +2. Move to this directory. +3. Hit the reset button on the keyboard. +4. run `make dfu`. + +## The Keymap + +This keymap is designed for a rev3 Planck Keyboard. + +The default layer is QWERTY. The raise layer has a ten key on the right +and common programming punctuation on the left. The lower layer provides the +rest of the symbols, mostly mapped with the ten key numbers. + +The normal right shift key uses the `MT` macro to trigger Enter on tap and right +shift when held. + +This keymap sets the `PREVENT_STUCK_MODIFIERS` flag to avoid the occasional WTF +moments when using a modifier keys and accidentally releasing them after moving +to a new layer. diff --git a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c b/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c deleted file mode 100644 index e5a86b402..000000000 --- a/keyboards/planck/old_keymap_files/common_keymaps/keymap_mitch.c +++ /dev/null @@ -1,49 +0,0 @@ -#include "keymap.h" - -const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = KEYMAP( - TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, - LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, FN3, - ESC, DEL, LALT, LGUI, FN2, SPC, FN1, LEFT, DOWN, UP, RGHT), -[1] = KEYMAP( - GRV, GRV, FN22, FN19, FN10, TRNS, TRNS, 7, 8, 9, 0, BSPC, - TRNS, LBRC, RBRC, FN23, FN24, TRNS, TRNS, 4, 5, 6, TRNS, BSLS, - TRNS, MINS, FN20, EQL, FN21, TRNS, TRNS, 1, 2, 3, TRNS, ENT, - TRNS, TRNS, TRNS, TRNS, TRNS, SPC, FN1, TRNS, PGDN, PGUP, TRNS), -[2] = KEYMAP( - FN26, FN10, FN11, FN12, FN13, FN14, FN15, FN17, FN18, FN19, FN10, DEL, - TRNS, TRNS, MUTE, VOLD, VOLU, TRNS, BSPC, FN14, FN15, FN16, TRNS, FN25, - TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN11, FN12, FN13, TRNS, ENT, - TRNS, TRNS, TRNS, TRNS, FN2, ENT, TRNS, TRNS, PGDN, PGUP, TRNS), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_MOMENTARY(1), // Switch layer raise - [2] = ACTION_LAYER_MOMENTARY(2), // Switch layer lower - - [3] = ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT), // Right shift serves as Enter on tap - - // Numeric shift modifiers - [10] = ACTION_MODS_KEY(MOD_LSFT, KC_0), - [11] = ACTION_MODS_KEY(MOD_LSFT, KC_1), - [12] = ACTION_MODS_KEY(MOD_LSFT, KC_2), - [13] = ACTION_MODS_KEY(MOD_LSFT, KC_3), - [14] = ACTION_MODS_KEY(MOD_LSFT, KC_4), - [15] = ACTION_MODS_KEY(MOD_LSFT, KC_5), - [16] = ACTION_MODS_KEY(MOD_LSFT, KC_6), - [17] = ACTION_MODS_KEY(MOD_LSFT, KC_7), - [18] = ACTION_MODS_KEY(MOD_LSFT, KC_8), - [19] = ACTION_MODS_KEY(MOD_LSFT, KC_9), - - // Other shift modifiers - [20] = ACTION_MODS_KEY(MOD_LSFT, KC_MINS), // _ - [21] = ACTION_MODS_KEY(MOD_LSFT, KC_EQL), // + - [22] = ACTION_MODS_KEY(MOD_LSFT, KC_GRV), // ~ - [23] = ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // { - [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // } - [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // | - - // Switch windows in app - [26] = ACTION_MODS_KEY(MOD_LGUI, KC_GRV), -}; -- cgit v1.2.3 From 489d0ab5818555b8f8ff6e9e7d9a9ea717902ab0 Mon Sep 17 00:00:00 2001 From: Arthur Nogueira Neves Date: Wed, 18 Jan 2017 21:12:02 -0500 Subject: this is the atreus doc --- keyboards/atreus/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index a4077668e..8baa581f0 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -169,7 +169,7 @@ This requires [some hardware changes](https://www.reddit.com/r/MechanicalKeyboar ## Building -Download or clone the whole firmware and navigate to the keyboards/planck folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. +Download or clone the whole firmware and navigate to the keyboards/atreus folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use `make dfu` to program your PCB once you hit the reset button. Depending on which keymap you would like to use, you will have to compile slightly differently. -- cgit v1.2.3 From 072237bce814fd49765be7f5a6fcb57821c1e31d Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Thu, 19 Jan 2017 22:45:30 +0800 Subject: introduce shell_layer --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 34 ++++++++++++++++++++-- 1 file changed, 31 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2a64331db..c4b99d55a 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -6,7 +6,8 @@ #include "action_code.h" #define BASE 0 // default layer -#define SHELL_NAV 1 +#define SHELL_LAYER 1 +#define SHELL_NAV 2 #define KEY_NAV 3 // key navigation layer #define KEY_SEL 4 // key selection layer #define NUMBER 5 // number layer @@ -58,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // layer 0 : default // left hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, - LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), + LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), @@ -80,6 +81,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), +// permanent shell layer - meant to be used while in a terminal +[SHELL_LAYER] = KEYMAP( + // left hand + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), + KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT), + // bottom row + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + // thumb cluster + LALT(KC_B),LALT(KC_F), + LALT(KC_D), + KC_TRNS,RCTL(KC_W),KC_TRNS, + // right hand + RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, + KC_UP, 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_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + // bottom row + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + // thumb cluster + KC_TRNS, KC_TRNS, + KC_TRNS, + MEH(KC_V), KC_TRNS, KC_TRNS +), + // shell navigation layer [SHELL_NAV] = KEYMAP( // left hand @@ -246,7 +273,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { MEH(KC_S), MEH(KC_T), MEH(KC_U), MEH(KC_V), MEH(KC_X), MEH(KC_6), MEH(KC_7), MEH(KC_8), - MEH(KC_9), MEH(KC_Y), MEH(KC_Z) + MEH(KC_9), TO(BASE), TO(SHELL_LAYER) ), @@ -407,6 +434,7 @@ void matrix_scan_user(void) { case NUMBER: case SYMBOL: case BRACKETS: + //case SHELL_LAYER: ergodox_right_led_2_on(); break; case KEY_NAV: -- cgit v1.2.3 From dc3937d485bf2325d1ed26c3456475b1b09617f1 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 20 Jan 2017 21:22:18 +0000 Subject: simplify --- keyboards/planck/keymaps/callum/keymap.c | 51 ++++++++----------------------- keyboards/planck/keymaps/callum/readme.md | 12 ++++---- 2 files changed, 19 insertions(+), 44 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 4d0151710..a1254d975 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -7,22 +7,21 @@ extern keymap_config_t keymap_config; -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. #define _BASE 0 #define _MOVE 1 #define _SYMB 2 #define _MOUSE 3 #define _FUNC 4 +#define CMDLEFT LGUI(KC_LEFT) +#define CMDRGHT LGUI(KC_RGHT) +#define ENDASH LALT(KC_MINS) +#define POUND LALT(KC_3) + enum planck_keycodes { MOVE = SAFE_RANGE, SYMB, - FUNC, - BELOW, - ABOVE + FUNC }; // Fillers to make layering more clear @@ -55,16 +54,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Below| | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, XXXXXXX, LGUI(KC_LEFT), KC_UP, LGUI(KC_RGHT), XXXXXXX, KC_ESC }, + {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, - {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} + {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* SYMB @@ -79,8 +78,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYMB] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LALT(KC_MINS)}, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, LALT(KC_3)}, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, ENDASH }, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, POUND }, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -153,30 +152,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case BELOW: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_RGHT); - unregister_code(KC_RGHT); - unregister_code(KC_LGUI); - register_code(KC_ENT); - unregister_code(KC_ENT); - } - return false; - break; - case ABOVE: - if (record->event.pressed) { - register_code(KC_LGUI); - register_code(KC_LEFT); - unregister_code(KC_LEFT); - unregister_code(KC_LGUI); - register_code(KC_ENT); - unregister_code(KC_ENT); - register_code(KC_UP); - unregister_code(KC_UP); - } - return false; - break; } return true; } diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 0baeba46d..f970cd974 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,11 +2,11 @@ This is a layout for the grid planck, built with a few ideals in mind: -- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. +- Consistent and minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. The `MOUSE` layer is activated by holding the Move and Symb keys simultaniously. ``` /* BASE @@ -27,9 +27,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | Caps | Left | Down | Right| | | Left | Down | Right| Caps | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | Below| | | | | | | + * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ @@ -63,9 +63,9 @@ We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c * |------+------+------+------+------+------+------+------+------+------+------+------| * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | F21 | F22 | F23 | F24 | | | Lock | | | | | + * | | F21 | F22 | F23 | F24 | | | Power| | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ -``` + ``` -- cgit v1.2.3 From 01e750a37230fd7df9ef57a9d1564bde4bee6da6 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:15:37 +0800 Subject: couple of changes to the shell layer --- keyboards/ergodox/keymaps/dvorak_programmer/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index c4b99d55a..2bb5bcd12 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -100,11 +100,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // bottom row - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, KC_TRNS, + M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), // thumb cluster - KC_TRNS, KC_TRNS, - KC_TRNS, - MEH(KC_V), KC_TRNS, KC_TRNS + KC_LEFT, KC_RIGHT, + KC_HOME, + KC_END, KC_TRNS, KC_TRNS ), // shell navigation layer -- cgit v1.2.3 From cbb1927d6f7511d7778239e02d834f392b83dd25 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 16:22:40 +0100 Subject: Add Swiss German layout for Ergodox EZ - Add Swiss German layout for Ergodox EZ based on default layout for Ergodox EZ. - Minor changes in the event loop to prevent flashing of leds. --- .../keymaps/swissgerman_ez/keyboard-layout.json | 417 ++++++++++++++++++++ .../keymaps/swissgerman_ez/keyboard-layout.png | Bin 0 -> 75633 bytes .../keymaps/swissgerman_ez/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../swissgerman_ez/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ keyboards/ergodox/keymaps/swissgerman_ez/keymap.c | 260 +++++++++++++ keyboards/ergodox/keymaps/swissgerman_ez/readme.md | 15 + 6 files changed, 1121 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "a": 4 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "w": 1.5 + }, + "°\n§", + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "w": 1.5 + }, + "?\n'\n\n'" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "c": "#b56b6b", + "a": 6, + "h": 1.5 + }, + "Toggle Code Layer", + { + "x": 4.5, + "h": 1.5 + }, + "Toggle Code Layer", + { + "c": "#cccccc", + "a": 4 + }, + "Y" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Delete", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "w": 1.5 + }, + "è\nü\n\n[" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1 + }, + "F", + { + "x": 8.5 + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Backspace", + { + "c": "#79c777", + "a": 4 + }, + "A\n\nLyr3", + { + "x": 14.5 + }, + "é\nö\nLyr3", + { + "c": "#748adb", + "w": 1.5 + }, + "à\nä\nCmd\n{" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#cccccc", + "a": 6, + "h": 1.5 + }, + "Hyper", + { + "x": 4.5, + "h": 1.5 + }, + "Meh" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + ";\n," + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#748adb" + }, + "X\n\nAlt", + { + "x": 1, + "c": "#cccccc" + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#748adb" + }, + ":\n.\nAlt" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#cccccc" + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Shift", + { + "c": "#748adb", + "a": 4 + }, + "Z\n\nCtrl", + { + "x": 14.5 + }, + "_\n-\nCtrl", + { + "c": "#cccccc", + "a": 6, + "w": 1.5 + }, + "Shift" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 7 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "y": -0.7549999999999999, + "x": 0.5, + "c": "#b56b6b", + "a": 4 + }, + ">\n<\nCode Layer\n\\", + { + "c": "#cccccc" + }, + "`\n^\n\n~", + { + "x": 14.5 + }, + "!\n¨\n\n]", + { + "c": "#b56b6b" + }, + "\n\nCode Layer" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#748adb" + }, + "Apps\nAlt", + { + "c": "#cccccc", + "a": 6 + }, + "Win / Cmd" + ], + [ + { + "h": 2 + }, + "Space", + { + "h": 2 + }, + "Back Space", + "Home" + ], + [ + { + "x": 2 + }, + "End" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "Alt", + { + "c": "#748adb", + "a": 4 + }, + "Esc\nCtrl" + ], + [ + { + "x": -3, + "c": "#cccccc", + "a": 6 + }, + "Pg Up", + { + "h": 2 + }, + "Tab", + { + "h": 2 + }, + "Enter" + ], + [ + { + "x": -3 + }, + "Pg Dn" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c new file mode 100644 index 000000000..c6717abff --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c @@ -0,0 +1,260 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define EPRM M(1) // Macro 1: Reset EEPROM +#define HTML_LI M(10) +#define HTML_UL M(11) +#define HTML_OL M(12) +#define HTML_CODE M(13) + +#define SEND_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING("&"); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + go_back_based_on_tag(TAG); \ + } while (0) + +void send_key(uint16_t keycode); +void go_back_based_on_tag(char* tag); +void send_larger_than(void); + + +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 | Z | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~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] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, 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_LBRC, + 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,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + 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 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | EPRM | | | | | ? | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, + KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,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, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, + KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, + ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | RESET | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | |H_UL | |H_OL | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |H_CODE| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + RESET, 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, HTML_CODE, 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, RESET, + KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, 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 +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + case 10: + if (record->event.pressed) { + SEND_TAG("li"); + } + break; + case 11: + if (record->event.pressed) { + SEND_TAG( "ul" ); + } + break; + case 12: + if (record->event.pressed) { + SEND_TAG("ol"); + } + break; + case 13: + if (record->event.pressed) { + SEND_TAG("code"); + } + break; + } + return MACRO_NONE; +}; + +// 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); + + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 0: + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case 1: + ergodox_right_led_1_on(); + + ergodox_board_led_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + break; + case 2: + ergodox_right_led_2_on(); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_3_off(); + break; + default: + // none + break; + } + +}; + +void send_key(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); +} + +void go_back_based_on_tag(char* tag) { + const int BRACKETS_AND_SLASH_LENGTH = 3; + + for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { + send_key(KC_LEFT); + } +} + +void send_larger_than() { + register_code(KC_LSFT); + send_key(KC_NONUS_BSLASH); + unregister_code(KC_LSFT); + +} diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md new file mode 100644 index 000000000..039a08588 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md @@ -0,0 +1,15 @@ +# ErgoDox EZ Swiss German Configuration + +Swiss German keyboard layout based on the Ergodox EZ default layout. + +Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). + +Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) + +![Layout Layer 0](keyboard-layout.png) +![Layout Layer 1&2](keyboard-layout_1_2.png) + +## Changelog +* Jan 21, 2017: + * Initial version based on default layout. + -- cgit v1.2.3 From bf0b355bc820a017544860a5b90e405f45e66592 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 16:24:41 +0100 Subject: Add Swiss German layout for Ergodox Infinity - Add Swiss German layout for Ergodox Infinity based on default layout for Ergodox EZ. - Minor changes in the event loop to prevent flashing display background lights. --- .../swissgerman_infinity/keyboard-layout.json | 417 ++++++++++++++++++++ .../swissgerman_infinity/keyboard-layout.png | Bin 0 -> 75633 bytes .../swissgerman_infinity/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../swissgerman_infinity/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ .../ergodox/keymaps/swissgerman_infinity/keymap.c | 252 ++++++++++++ .../ergodox/keymaps/swissgerman_infinity/readme.md | 14 + 6 files changed, 1112 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "a": 4 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "w": 1.5 + }, + "°\n§", + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "w": 1.5 + }, + "?\n'\n\n'" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "c": "#b56b6b", + "a": 6, + "h": 1.5 + }, + "Toggle Code Layer", + { + "x": 4.5, + "h": 1.5 + }, + "Toggle Code Layer", + { + "c": "#cccccc", + "a": 4 + }, + "Y" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Delete", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "w": 1.5 + }, + "è\nü\n\n[" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1 + }, + "F", + { + "x": 8.5 + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Backspace", + { + "c": "#79c777", + "a": 4 + }, + "A\n\nLyr3", + { + "x": 14.5 + }, + "é\nö\nLyr3", + { + "c": "#748adb", + "w": 1.5 + }, + "à\nä\nCmd\n{" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#cccccc", + "a": 6, + "h": 1.5 + }, + "Hyper", + { + "x": 4.5, + "h": 1.5 + }, + "Meh" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + ";\n," + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#748adb" + }, + "X\n\nAlt", + { + "x": 1, + "c": "#cccccc" + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#748adb" + }, + ":\n.\nAlt" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#cccccc" + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Shift", + { + "c": "#748adb", + "a": 4 + }, + "Z\n\nCtrl", + { + "x": 14.5 + }, + "_\n-\nCtrl", + { + "c": "#cccccc", + "a": 6, + "w": 1.5 + }, + "Shift" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 7 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "y": -0.7549999999999999, + "x": 0.5, + "c": "#b56b6b", + "a": 4 + }, + ">\n<\nCode Layer\n\\", + { + "c": "#cccccc" + }, + "`\n^\n\n~", + { + "x": 14.5 + }, + "!\n¨\n\n]", + { + "c": "#b56b6b" + }, + "\n\nCode Layer" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#748adb" + }, + "Apps\nAlt", + { + "c": "#cccccc", + "a": 6 + }, + "Win / Cmd" + ], + [ + { + "h": 2 + }, + "Space", + { + "h": 2 + }, + "Back Space", + "Home" + ], + [ + { + "x": 2 + }, + "End" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "Alt", + { + "c": "#748adb", + "a": 4 + }, + "Esc\nCtrl" + ], + [ + { + "x": -3, + "c": "#cccccc", + "a": 6 + }, + "Pg Up", + { + "h": 2 + }, + "Tab", + { + "h": 2 + }, + "Enter" + ], + [ + { + "x": -3 + }, + "Pg Dn" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c new file mode 100644 index 000000000..0ccb7f47e --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c @@ -0,0 +1,252 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "visualizer/lcd_backlight.h" +#include "string.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define EPRM M(1) // Macro 1: Reset EEPROM +#define HTML_LI M(10) +#define HTML_UL M(11) +#define HTML_OL M(12) +#define HTML_CODE M(13) + +#define SEND_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING("&"); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + go_back_based_on_tag(TAG); \ + } while (0) + +void send_key(uint16_t keycode); +void go_back_based_on_tag(char* tag); +void send_larger_than(void); + +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 | Z | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~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] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, 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_LBRC, + 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,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + 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 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | EPRM | | | | | ? | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, + KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,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, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, + KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, + ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | RESET | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | |H_UL | |H_OL | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |H_CODE| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + RESET, 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, HTML_CODE, 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, RESET, + KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, 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 +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + case 10: + if (record->event.pressed) { + SEND_TAG("li"); + } + break; + case 11: + if (record->event.pressed) { + SEND_TAG("ul"); + } + break; + case 12: + if (record->event.pressed) { + SEND_TAG("ol"); + } + break; + case 13: + if (record->event.pressed) { + SEND_TAG("code"); + } + break; + } + return MACRO_NONE; +}; + +// 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); + + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 0: + ergodox_board_led_off(); + lcd_backlight_hal_color(0, 0, 0); + break; + case 1: + lcd_backlight_hal_color(5000, 0, 0); + break; + case 2: + lcd_backlight_hal_color(0, 5000, 0); + break; + default: + // none + break; + } + +}; + +void send_key(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); +} + +void go_back_based_on_tag(char* tag) { + const int BRACKETS_AND_SLASH_LENGTH = 3; + + for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { + send_key(KC_LEFT); + } +} + +void send_larger_than() { + register_code(KC_LSFT); + send_key(KC_NONUS_BSLASH); + unregister_code(KC_LSFT); + +} diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md new file mode 100644 index 000000000..1c35f7473 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md @@ -0,0 +1,14 @@ +# ErgoDox Infinity Swiss German Configuration + +Swiss German keyboard layout based on the Ergodox EZ default layout. + +Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). + +Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) + +![Layout Layer 0](keyboard-layout.png) +![Layout Layer 1&2](keyboard-layout_1_2.png) + +## Changelog +* Jan 21, 2017: + * Initial version. -- cgit v1.2.3 From 4cf0f7dd16d60aef363e91977597334017e60924 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sat, 21 Jan 2017 23:42:23 +0800 Subject: make shell layer more compatible with default layer --- .../ergodox/keymaps/dvorak_programmer/keymap.c | 31 +++++++++++----------- 1 file changed, 16 insertions(+), 15 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c index 2bb5bcd12..7ed0c7f12 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c +++ b/keyboards/ergodox/keymaps/dvorak_programmer/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, LT(SHELL_NAV,KC_TAB), KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, MO(KEY_SEL), OSL(BRACKETS), KC_A, KC_O, KC_E, KC_U, KC_I, - KC_FN3, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), + OSM(MOD_LSFT), KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(KEY_NAV), OSL(SHORTCUTS),KC_FN4, KC_FN5,OSL(SYMBOL),MO(NUMBER), // thumb cluster MO(MOUSE), RCTL(KC_S), @@ -81,30 +81,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), -// permanent shell layer - meant to be used while in a terminal + +// permanent shell layer - meant to be used while in a terminal. only the top keys are overriden [SHELL_LAYER] = KEYMAP( // left hand - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,M(SCREEN_COPY_MODE), M(SCREEN_PASTE),M(SHELL_RECALL_LAST_ARG_REMOVE_FIRST_COMMAND), - KC_TAB, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,RCTL(KC_R), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,LALT(KC_DOT),RCTL(KC_R),RCTL(KC_C), + 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,LALT(KC_DOT), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // bottom row KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster - LALT(KC_B),LALT(KC_F), - LALT(KC_D), - KC_TRNS,RCTL(KC_W),KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, // right hand - RCTL(KC_C), KC_LEFT, KC_RIGHT, RCTL(KC_U), RCTL(KC_K), KC_TRNS, KC_TRNS, - KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + RCTL(KC_W), LALT(KC_B),LALT(KC_F), KC_LEFT, KC_RIGHT, LALT(KC_D), 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_DOWN, 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, // bottom row - M(SCREEN_TAB_LEFT), M(SCREEN_TAB_RIGHT), M(SCREEN_NEW_TAB), KC_TRNS, MEH(KC_V), + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, // thumb cluster - KC_LEFT, KC_RIGHT, - KC_HOME, - KC_END, KC_TRNS, KC_TRNS + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), // shell navigation layer -- cgit v1.2.3 From f7462aaa613a08ba4b86dbb912ce26722cfccaff Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 12:30:06 -0500 Subject: Got ps2avrGB to work with the V-USB protocol --- keyboards/ps2avrGB/Makefile | 3 + keyboards/ps2avrGB/README.md | 61 +++++ keyboards/ps2avrGB/config.h | 44 ++++ keyboards/ps2avrGB/keymaps/default/keymap.c | 34 +++ keyboards/ps2avrGB/matrix.c | 105 ++++++++ keyboards/ps2avrGB/program | 74 ++++++ keyboards/ps2avrGB/ps2avrGB.c | 0 keyboards/ps2avrGB/ps2avrGB.h | 54 ++++ keyboards/ps2avrGB/rules.mk | 38 +++ keyboards/ps2avrGB/usbconfig.h | 396 ++++++++++++++++++++++++++++ 10 files changed, 809 insertions(+) create mode 100644 keyboards/ps2avrGB/Makefile create mode 100644 keyboards/ps2avrGB/README.md create mode 100644 keyboards/ps2avrGB/config.h create mode 100644 keyboards/ps2avrGB/keymaps/default/keymap.c create mode 100644 keyboards/ps2avrGB/matrix.c create mode 100755 keyboards/ps2avrGB/program create mode 100644 keyboards/ps2avrGB/ps2avrGB.c create mode 100644 keyboards/ps2avrGB/ps2avrGB.h create mode 100644 keyboards/ps2avrGB/rules.mk create mode 100644 keyboards/ps2avrGB/usbconfig.h (limited to 'keyboards') diff --git a/keyboards/ps2avrGB/Makefile b/keyboards/ps2avrGB/Makefile new file mode 100644 index 000000000..57b2ef62e --- /dev/null +++ b/keyboards/ps2avrGB/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/ps2avrGB/README.md b/keyboards/ps2avrGB/README.md new file mode 100644 index 000000000..f8360aec0 --- /dev/null +++ b/keyboards/ps2avrGB/README.md @@ -0,0 +1,61 @@ +ps2avrGB keyboard firmware +========================== + +This is a port of the QMK firmware for boards that are based on the +ps2avrGB firmware, like the [ps2avrGB +keyboard](https://www.keyclack.com/product/gb-ps2avrgb/) or the ones sold +by [Winkeyless](http://winkeyless.kr/product/ps2avrgb-parts/). + +Note that this is a complete replacement for the firmware, so you won't be +using Bootmapper Client to change any keyboard settings, since not all the +USB report options are supported. + +## Supported Boards + +Only the [B.mini X2](http://winkeyless.kr/product/b-mini-x2-pcb/) has been +tested so far (since it's the only one I own). But other boards that use +the ps2avrGB firmware should work as well. + +## Installing + +First, install the requirements. These commands are for OSX, but all you +need is the AVR toolchain and `bootloadHID` for flashing: + +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +``` + +In order to use the `./program` script, which can reboot the board into +the bootloader, you'll need Python 2 with PyUSB installed: + +``` +$ pip install pyusb +``` + +Then, with the keyboard plugged in, simply run this command from the +`qmk_firmware` directory: + +``` +$ make ps2avrGB-program +``` + +If you prefer, you can just build it and flash the firmware directly with +`bootloadHID` if you boot the board while holding down `L_Ctrl` to keep it +in the bootloader: + +``` +$ make ps2avrGB +$ bootloadHID -r ps2avrGB_default.hex +``` + +## Troubleshooting + +From my experience, it's really hard to brick these boards. But these +tricks have been useful when it got stuck in a weird scenario. + +1. Try plugging the board in while pressing `L_Ctrl`. This will force it + to boot only the bootloader without loading the firmware. Once this is + done, just reflash the board with the original firmware. +2. Sometimes USB hubs can act weird, so try connecting the board directly + to your computer or plugging/unplugging the USB hub. diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h new file mode 100644 index 000000000..cd5d1ab5a --- /dev/null +++ b/keyboards/ps2avrGB/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +// TODO: share these strings with usbconfig.h +// Edit usbconfig.h to change these. +#define MANUFACTURER winkeyless.kr +#define PRODUCT ps2avrGB + +/* matrix size */ +#define MATRIX_ROWS 8 +#define MATRIX_COLS 15 + +/* only support one hard-coded backlight color for now */ +#define BACKLIGHT_LEVELS 0 +#define BACKLIGHT_COLOR 0x110000 + +#define NO_UART 1 +#define EEPROM_BOOTLOADER_START 1 + +/* key combination for command */ +#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +#endif diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c new file mode 100644 index 000000000..43cc6bce3 --- /dev/null +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +#include "ps2avrGB.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + KEYMAP( \ + ESC, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,PSCR,HOME,END, \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, FN1, \ + FN2, A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ + LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ + FN0, LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ + ), + KEYMAP( \ + NO, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, NO, \ + NO, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,DEL, NO, \ + NO, NO, NO, NO, NO, NO, NO, PGUP,NO, NO, NO, NO, NO, NO, TRNS,\ + FN2, NO, NO, PGDN,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ + TRNS,NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ + TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + ), + KEYMAP( \ + NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \ + NO, NO, NO, NO, END, NO, NO, NO, NO, NO, HOME,NO, NO, NO, NO, \ + NO, BTN1,MS_U,BTN2,NO, NO, NO, PGUP,FN1, NO, NO, NO, NO, NO, TRNS,\ + FN2, MS_L,MS_D,MS_R,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ + TRNS,NO, DEL, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ + TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + ), +}; + +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_LAYER_MOMENTARY(1), + [1] = ACTION_LAYER_TOGGLE(2), + [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), +}; diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c new file mode 100644 index 000000000..e487ca182 --- /dev/null +++ b/keyboards/ps2avrGB/matrix.c @@ -0,0 +1,105 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) +{ +} diff --git a/keyboards/ps2avrGB/program b/keyboards/ps2avrGB/program new file mode 100755 index 000000000..a88d9cd9b --- /dev/null +++ b/keyboards/ps2avrGB/program @@ -0,0 +1,74 @@ +#!/usr/bin/env python +# Copyright 2017 Luiz Ribeiro +# +# 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 . + +from __future__ import print_function + +import os +import sys +import time +import usb + +if len(sys.argv) < 2: + print('Usage: %s ' % sys.argv[0]) + sys.exit(1) + +print('Searching for ps2avrGB... ', end='') + +dev = usb.core.find(idVendor=0x20A0, idProduct=0x422D) +if dev is None: + raise ValueError('Device not found') + +print('Found', end='\n\n') + +print('Device Information:') +print(' idVendor: %d (0x%04x)' % (dev.idVendor, dev.idVendor)) +print(' idProduct: %d (0x%04x)' % (dev.idProduct, dev.idProduct)) +print('Manufacturer: %s' % (dev.iManufacturer)) +print('Serial: %s' % (dev.iSerialNumber)) +print('Product: %s' % (dev.iProduct), end='\n\n') + +print('Transferring control to bootloader... ', end='') + +dev.set_configuration() + +request_type = usb.util.build_request_type( + usb.util.CTRL_OUT, + usb.util.CTRL_TYPE_CLASS, + usb.util.CTRL_RECIPIENT_DEVICE) + +USBRQ_HID_SET_REPORT = 0x09 +HID_REPORT_OPTION = 0x0301 + + +try: + dev.ctrl_transfer( + request_type, + USBRQ_HID_SET_REPORT, + HID_REPORT_OPTION, + 0, + [0, 0, 0xFF] + [0] * 5 + ) +except usb.core.USBError: + # for some reason I keep getting USBError, but it works! + pass + +# wait a bit until bootloader starts up +time.sleep(2) + +print('OK') +print('Programming...') +if os.system('bootloadHID -r "%s"' % sys.argv[1]) == 0: + print('\nDone!') diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h new file mode 100644 index 000000000..1da26adb2 --- /dev/null +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -0,0 +1,54 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ +#ifndef KEYMAP_COMMON_H +#define KEYMAP_COMMON_H + +#include +#include +#include "keycode.h" +#include "action.h" +#include "action_code.h" +#include "action_layer.h" +#include "action_macro.h" +#include "action_util.h" +#include "report.h" +#include "host.h" +#include "print.h" +#include "debug.h" +#include "keymap.h" + + +#define KEYMAP( \ + K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ + K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ + K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ + K02, K12, K22, K32, K42, K52, K36, KD6, KD7, K37, KA2, KB2, KD2, KE0, \ + K01, K11, K21, K31, K41, K51, K46, KE6, KE7, K47, KA1, KB1, K86, K77, \ + K00, K10, K20, K56, K57, KB0, KC0, K66, K76, K96 \ +) \ +{ \ + { KC_##K00, KC_##K10, KC_##K20, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB0, KC_##KC0, KC_##KD0, KC_##KE0 }, \ + { KC_##K01, KC_##K11, KC_##K21, KC_##K31, KC_##K41, KC_##K51, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA1, KC_##KB1, KC_NO, KC_##KD1, KC_##KE1 }, \ + { KC_##K02, KC_##K12, KC_##K22, KC_##K32, KC_##K42, KC_##K52, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA2, KC_##KB2, KC_NO, KC_##KD2, KC_##KE2 }, \ + { KC_##K03, KC_##K13, KC_##K23, KC_##K33, KC_##K43, KC_##K53, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA3, KC_##KB3, KC_##KC3, KC_##KD3, KC_NO }, \ + { KC_##K04, KC_##K14, KC_##K24, KC_##K34, KC_##K44, KC_##K54, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KA4, KC_##KB4, KC_##KC4, KC_NO, KC_##KE4 }, \ + { KC_##K05, KC_NO, KC_##K25, KC_##K35, KC_##K45, KC_##K55, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##KB5, KC_##KC5, KC_##KD5, KC_##KE5 }, \ + { KC_##K06, KC_##K16, KC_##K26, KC_##K36, KC_##K46, KC_##K56, KC_##K66, KC_##K76, KC_##K86, KC_##K96, KC_##KA6, KC_##KB6, KC_##KC6, KC_##KD6, KC_##KE6 }, \ + { KC_##K07, KC_##K17, KC_##K27, KC_##K37, KC_##K47, KC_##K57, KC_##K67, KC_##K77, KC_NO, KC_NO, KC_##KA7, KC_##KB7, KC_##KC7, KC_##KD7, KC_##KE7 } \ +} + +#endif diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk new file mode 100644 index 000000000..d747e8929 --- /dev/null +++ b/keyboards/ps2avrGB/rules.mk @@ -0,0 +1,38 @@ +# MCU name +MCU = atmega32a + +PROTOCOL = VUSB + +# disable UART since atmega32a apparently doesn't have it +NO_UART = yes +# this simplifies things for now +NO_SUSPEND_POWER_DOWN = yes + +# Processor frequency. +# Normally the first thing your program should do is set the clock prescaler, +# so your program will run at the correct speed. You should also set this +# variable to same clock speed. The _delay_ms() macro uses this, and many +# examples use this variable to calculate timings. Do not add a "UL" here. +F_CPU = 12000000 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = yes # Console for debug +COMMAND_ENABLE = yes # Commands for debug and configuration +#BACKLIGHT_ENABLE = yes + +# V-USB debug level: To use ps2_usart.c level must be 0 +# ps2_usart.c requires USART to receive PS/2 signal. +OPT_DEFS = -DDEBUG_LEVEL=0 +OPS_DEFS += -DPROTOCOL_VUSB +OPT_DEFS += -DBOOTLOADER_SIZE=2048 + +CUSTOM_MATRIX = yes +SRC = matrix.c + +#---------------- Programming Options -------------------------- +PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex diff --git a/keyboards/ps2avrGB/usbconfig.h b/keyboards/ps2avrGB/usbconfig.h new file mode 100644 index 000000000..d2d848fcd --- /dev/null +++ b/keyboards/ps2avrGB/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ -- cgit v1.2.3 From 461dfd44621ef31cabc08136d4714ca24ed651fa Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 13:44:36 -0500 Subject: Simplification and code polish on ps2avrGB directory --- keyboards/ps2avrGB/config.h | 2 -- keyboards/ps2avrGB/matrix.c | 3 +-- keyboards/ps2avrGB/ps2avrGB.h | 12 ----------- keyboards/ps2avrGB/rules.mk | 47 ++++++++++++++++++++++++------------------- 4 files changed, 27 insertions(+), 37 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index cd5d1ab5a..dfaea5979 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -18,8 +18,6 @@ along with this program. If not, see . #ifndef CONFIG_H #define CONFIG_H -#include "config_common.h" - #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D // TODO: share these strings with usbconfig.h diff --git a/keyboards/ps2avrGB/matrix.c b/keyboards/ps2avrGB/matrix.c index e487ca182..beaa54c40 100644 --- a/keyboards/ps2avrGB/matrix.c +++ b/keyboards/ps2avrGB/matrix.c @@ -100,6 +100,5 @@ inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } -void matrix_print(void) -{ +void matrix_print(void) { } diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index 1da26adb2..1527c604e 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -17,20 +17,8 @@ along with this program. If not, see . #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H -#include -#include #include "keycode.h" #include "action.h" -#include "action_code.h" -#include "action_layer.h" -#include "action_macro.h" -#include "action_util.h" -#include "report.h" -#include "host.h" -#include "print.h" -#include "debug.h" -#include "keymap.h" - #define KEYMAP( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ diff --git a/keyboards/ps2avrGB/rules.mk b/keyboards/ps2avrGB/rules.mk index d747e8929..e2b5922ea 100644 --- a/keyboards/ps2avrGB/rules.mk +++ b/keyboards/ps2avrGB/rules.mk @@ -1,38 +1,43 @@ +# Copyright 2017 Luiz Ribeiro +# +# 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 . + # MCU name MCU = atmega32a - PROTOCOL = VUSB -# disable UART since atmega32a apparently doesn't have it +# unsupported features for now NO_UART = yes -# this simplifies things for now NO_SUSPEND_POWER_DOWN = yes +BACKLIGHT_ENABLE = no -# Processor frequency. -# Normally the first thing your program should do is set the clock prescaler, -# so your program will run at the correct speed. You should also set this -# variable to same clock speed. The _delay_ms() macro uses this, and many -# examples use this variable to calculate timings. Do not add a "UL" here. +# processor frequency F_CPU = 12000000 -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE = yes # Mouse keys -EXTRAKEY_ENABLE = yes # Audio control and System control -CONSOLE_ENABLE = yes # Console for debug -COMMAND_ENABLE = yes # Commands for debug and configuration -#BACKLIGHT_ENABLE = yes +# build options +BOOTMAGIC_ENABLE = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes -# V-USB debug level: To use ps2_usart.c level must be 0 -# ps2_usart.c requires USART to receive PS/2 signal. OPT_DEFS = -DDEBUG_LEVEL=0 -OPS_DEFS += -DPROTOCOL_VUSB OPT_DEFS += -DBOOTLOADER_SIZE=2048 +# custom matrix setup CUSTOM_MATRIX = yes SRC = matrix.c -#---------------- Programming Options -------------------------- +# programming options PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex -- cgit v1.2.3 From c26c81c7f3973b2b4e085b53d37ef6fbddd66c9e Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:20:47 +0100 Subject: Merged keymap for Ergodox EZ & Infinity - Merged keymap for Ergodox EZ & Infinity into one single keymap using pre-processor macros. --- .../keymaps/swissgerman/keyboard-layout.json | 417 ++++++++++++++++++++ .../keymaps/swissgerman/keyboard-layout.png | Bin 0 -> 75633 bytes .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 0 -> 54604 bytes .../keymaps/swissgerman/keyboard-layout_2_3.json | 429 +++++++++++++++++++++ keyboards/ergodox/keymaps/swissgerman/keymap.c | 275 +++++++++++++ keyboards/ergodox/keymaps/swissgerman/readme.md | 15 + 6 files changed, 1136 insertions(+) create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json create mode 100644 keyboards/ergodox/keymaps/swissgerman/keymap.c create mode 100644 keyboards/ergodox/keymaps/swissgerman/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json new file mode 100644 index 000000000..7a0397f72 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json @@ -0,0 +1,417 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5 + }, + "#\n3", + { + "x": 10.5 + }, + "*\n8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@\n2", + { + "x": 1 + }, + "$\n4", + { + "x": 8.5 + }, + "&\n7", + { + "x": 1 + }, + "(\n9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "%\n5", + { + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "a": 4 + }, + "^\n6" + ], + [ + { + "y": -0.875, + "w": 1.5 + }, + "°\n§", + "!\n1", + { + "x": 14.5 + }, + ")\n0", + { + "w": 1.5 + }, + "?\n'\n\n'" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "E", + { + "x": 10.5 + }, + "I" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "W", + { + "x": 1 + }, + "R", + { + "x": 8.5 + }, + "U", + { + "x": 1 + }, + "O" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "T", + { + "c": "#b56b6b", + "a": 6, + "h": 1.5 + }, + "Toggle Code Layer", + { + "x": 4.5, + "h": 1.5 + }, + "Toggle Code Layer", + { + "c": "#cccccc", + "a": 4 + }, + "Y" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Delete", + { + "a": 4 + }, + "Q", + { + "x": 14.5 + }, + "P", + { + "w": 1.5 + }, + "è\nü\n\n[" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "D", + { + "x": 10.5 + }, + "K" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "S", + { + "x": 1 + }, + "F", + { + "x": 8.5 + }, + "J", + { + "x": 1 + }, + "L" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "G", + { + "x": 6.5 + }, + "H" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Backspace", + { + "c": "#79c777", + "a": 4 + }, + "A\n\nLyr3", + { + "x": 14.5 + }, + "é\nö\nLyr3", + { + "c": "#748adb", + "w": 1.5 + }, + "à\nä\nCmd\n{" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#cccccc", + "a": 6, + "h": 1.5 + }, + "Hyper", + { + "x": 4.5, + "h": 1.5 + }, + "Meh" + ], + [ + { + "y": -0.75, + "x": 3.5, + "a": 4 + }, + "C", + { + "x": 10.5 + }, + ";\n," + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#748adb" + }, + "X\n\nAlt", + { + "x": 1, + "c": "#cccccc" + }, + "V", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#748adb" + }, + ":\n.\nAlt" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#cccccc" + }, + "B", + { + "x": 6.5 + }, + "N" + ], + [ + { + "y": -0.875, + "a": 6, + "w": 1.5 + }, + "Shift", + { + "c": "#748adb", + "a": 4 + }, + "Z\n\nCtrl", + { + "x": 14.5 + }, + "_\n-\nCtrl", + { + "c": "#cccccc", + "a": 6, + "w": 1.5 + }, + "Shift" + ], + [ + { + "y": -0.375, + "x": 3.5, + "a": 7 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5, + "a": 4 + }, + "£\n$\n\n}", + { + "x": 1, + "a": 7 + }, + "", + { + "x": 10.5, + "a": 6 + }, + "AltGr" + ], + [ + { + "y": -0.9950000000000001, + "x": 14, + "a": 7 + }, + "" + ], + [ + { + "y": -0.7549999999999999, + "x": 0.5, + "c": "#b56b6b", + "a": 4 + }, + ">\n<\nCode Layer\n\\", + { + "c": "#cccccc" + }, + "`\n^\n\n~", + { + "x": 14.5 + }, + "!\n¨\n\n]", + { + "c": "#b56b6b" + }, + "\n\nCode Layer" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#748adb" + }, + "Apps\nAlt", + { + "c": "#cccccc", + "a": 6 + }, + "Win / Cmd" + ], + [ + { + "h": 2 + }, + "Space", + { + "h": 2 + }, + "Back Space", + "Home" + ], + [ + { + "x": 2 + }, + "End" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "Alt", + { + "c": "#748adb", + "a": 4 + }, + "Esc\nCtrl" + ], + [ + { + "x": -3, + "c": "#cccccc", + "a": 6 + }, + "Pg Up", + { + "h": 2 + }, + "Tab", + { + "h": 2 + }, + "Enter" + ], + [ + { + "x": -3 + }, + "Pg Dn" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png new file mode 100644 index 000000000..aff6af851 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png new file mode 100644 index 000000000..835816b53 Binary files /dev/null and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json new file mode 100644 index 000000000..e3d366057 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json @@ -0,0 +1,429 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5 + }, + "7", + { + "x": 1 + }, + "9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "5" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c\n\n\n#529151" + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c", + "a": 4 + }, + "[", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1 + }, + "]", + { + "x": 8.5 + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c new file mode 100644 index 000000000..a969393bb --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -0,0 +1,275 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" +#include "string.h" + +#ifdef SUBPROJECT_infinity +#include "visualizer/lcd_backlight.h" +#endif + + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +#define EPRM M(1) // Macro 1: Reset EEPROM +#define HTML_LI M(10) +#define HTML_UL M(11) +#define HTML_OL M(12) +#define HTML_CODE M(13) + +#define SEND_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING("&"); \ + SEND_STRING(TAG); \ + send_larger_than(); \ + go_back_based_on_tag(TAG); \ + } while (0) + +void send_key(uint16_t keycode); +void go_back_based_on_tag(char* tag); +void send_larger_than(void); + + +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 | Z | U | I | O | P | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~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] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, 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_LBRC, + 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,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, + 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 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | EPRM | | | | | ? | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, + KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), + KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, + KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,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, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, + KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, + ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | RESET | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | |H_UL | |H_OL | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |H_CODE| | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + RESET, 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, HTML_CODE, 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, RESET, + KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, 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 +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: + if (record->event.pressed) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; + case 10: + if (record->event.pressed) { + SEND_TAG("li"); + } + break; + case 11: + if (record->event.pressed) { + SEND_TAG( "ul" ); + } + break; + case 12: + if (record->event.pressed) { + SEND_TAG("ol"); + } + break; + case 13: + if (record->event.pressed) { + SEND_TAG("code"); + } + break; + } + return MACRO_NONE; +}; + +// 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); + + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 0: + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + + #ifdef SUBPROJECT_infinity + lcd_backlight_hal_color(0, 0, 0); + #endif + break; + case 1: + ergodox_right_led_1_on(); + + ergodox_board_led_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + #ifdef SUBPROJECT_infinity + lcd_backlight_hal_color(5000, 0, 0); + #endif + break; + case 2: + ergodox_right_led_2_on(); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_3_off(); + #ifdef SUBPROJECT_infinity + lcd_backlight_hal_color(0, 5000, 0); + #endif + break; + default: + // none + break; + } + +}; + +void send_key(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); +} + +void go_back_based_on_tag(char* tag) { + const int BRACKETS_AND_SLASH_LENGTH = 3; + + for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { + send_key(KC_LEFT); + } +} + +void send_larger_than() { + register_code(KC_LSFT); + send_key(KC_NONUS_BSLASH); + unregister_code(KC_LSFT); +} diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md new file mode 100644 index 000000000..49889cd65 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/readme.md @@ -0,0 +1,15 @@ +# ErgoDox Swiss German Configuration + +Swiss German keyboard layout based on the Ergodox EZ default layout. + +Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). + +Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) + +![Layout Layer 0](keyboard-layout.png) +![Layout Layer 1&2](keyboard-layout_1_2.png) + +## Changelog +* Jan 21, 2017: + * Initial version based on default layout. + -- cgit v1.2.3 From 250628de04aabd65d6465c5a6afe48332e8d7f53 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:22:24 +0100 Subject: Removed Ergodox EZ & Infinity specific keymaps - Removed the keymaps for Swiss German spefic for Ergodox EZ and Infinity after previously merging them. --- .../keymaps/swissgerman_ez/keyboard-layout.json | 417 -------------------- .../keymaps/swissgerman_ez/keyboard-layout.png | Bin 75633 -> 0 bytes .../keymaps/swissgerman_ez/keyboard-layout_1_2.png | Bin 54604 -> 0 bytes .../swissgerman_ez/keyboard-layout_2_3.json | 429 --------------------- keyboards/ergodox/keymaps/swissgerman_ez/keymap.c | 260 ------------- keyboards/ergodox/keymaps/swissgerman_ez/readme.md | 15 - .../swissgerman_infinity/keyboard-layout.json | 417 -------------------- .../swissgerman_infinity/keyboard-layout.png | Bin 75633 -> 0 bytes .../swissgerman_infinity/keyboard-layout_1_2.png | Bin 54604 -> 0 bytes .../swissgerman_infinity/keyboard-layout_2_3.json | 429 --------------------- .../ergodox/keymaps/swissgerman_infinity/keymap.c | 252 ------------ .../ergodox/keymaps/swissgerman_infinity/readme.md | 14 - 12 files changed, 2233 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/keymap.c delete mode 100644 keyboards/ergodox/keymaps/swissgerman_ez/readme.md delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c delete mode 100644 keyboards/ergodox/keymaps/swissgerman_infinity/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json deleted file mode 100644 index 7a0397f72..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.json +++ /dev/null @@ -1,417 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5 - }, - "#\n3", - { - "x": 10.5 - }, - "*\n8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@\n2", - { - "x": 1 - }, - "$\n4", - { - "x": 8.5 - }, - "&\n7", - { - "x": 1 - }, - "(\n9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "%\n5", - { - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "a": 4 - }, - "^\n6" - ], - [ - { - "y": -0.875, - "w": 1.5 - }, - "°\n§", - "!\n1", - { - "x": 14.5 - }, - ")\n0", - { - "w": 1.5 - }, - "?\n'\n\n'" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "E", - { - "x": 10.5 - }, - "I" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "W", - { - "x": 1 - }, - "R", - { - "x": 8.5 - }, - "U", - { - "x": 1 - }, - "O" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "T", - { - "c": "#b56b6b", - "a": 6, - "h": 1.5 - }, - "Toggle Code Layer", - { - "x": 4.5, - "h": 1.5 - }, - "Toggle Code Layer", - { - "c": "#cccccc", - "a": 4 - }, - "Y" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Delete", - { - "a": 4 - }, - "Q", - { - "x": 14.5 - }, - "P", - { - "w": 1.5 - }, - "è\nü\n\n[" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "D", - { - "x": 10.5 - }, - "K" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "S", - { - "x": 1 - }, - "F", - { - "x": 8.5 - }, - "J", - { - "x": 1 - }, - "L" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "G", - { - "x": 6.5 - }, - "H" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Backspace", - { - "c": "#79c777", - "a": 4 - }, - "A\n\nLyr3", - { - "x": 14.5 - }, - "é\nö\nLyr3", - { - "c": "#748adb", - "w": 1.5 - }, - "à\nä\nCmd\n{" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#cccccc", - "a": 6, - "h": 1.5 - }, - "Hyper", - { - "x": 4.5, - "h": 1.5 - }, - "Meh" - ], - [ - { - "y": -0.75, - "x": 3.5, - "a": 4 - }, - "C", - { - "x": 10.5 - }, - ";\n," - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#748adb" - }, - "X\n\nAlt", - { - "x": 1, - "c": "#cccccc" - }, - "V", - { - "x": 8.5 - }, - "M", - { - "x": 1, - "c": "#748adb" - }, - ":\n.\nAlt" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#cccccc" - }, - "B", - { - "x": 6.5 - }, - "N" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Shift", - { - "c": "#748adb", - "a": 4 - }, - "Z\n\nCtrl", - { - "x": 14.5 - }, - "_\n-\nCtrl", - { - "c": "#cccccc", - "a": 6, - "w": 1.5 - }, - "Shift" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 7 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 4 - }, - "£\n$\n\n}", - { - "x": 1, - "a": 7 - }, - "", - { - "x": 10.5, - "a": 6 - }, - "AltGr" - ], - [ - { - "y": -0.9950000000000001, - "x": 14, - "a": 7 - }, - "" - ], - [ - { - "y": -0.7549999999999999, - "x": 0.5, - "c": "#b56b6b", - "a": 4 - }, - ">\n<\nCode Layer\n\\", - { - "c": "#cccccc" - }, - "`\n^\n\n~", - { - "x": 14.5 - }, - "!\n¨\n\n]", - { - "c": "#b56b6b" - }, - "\n\nCode Layer" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#748adb" - }, - "Apps\nAlt", - { - "c": "#cccccc", - "a": 6 - }, - "Win / Cmd" - ], - [ - { - "h": 2 - }, - "Space", - { - "h": 2 - }, - "Back Space", - "Home" - ], - [ - { - "x": 2 - }, - "End" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "Alt", - { - "c": "#748adb", - "a": 4 - }, - "Esc\nCtrl" - ], - [ - { - "x": -3, - "c": "#cccccc", - "a": 6 - }, - "Pg Up", - { - "h": 2 - }, - "Tab", - { - "h": 2 - }, - "Enter" - ], - [ - { - "x": -3 - }, - "Pg Dn" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png deleted file mode 100644 index aff6af851..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png deleted file mode 100644 index 835816b53..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_1_2.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json deleted file mode 100644 index e3d366057..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keyboard-layout_2_3.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5, - "t": "#b81c1c" - }, - "F3", - { - "x": 10.5 - }, - "F8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "F2", - { - "x": 1 - }, - "F4", - { - "x": 8.5 - }, - "F7", - { - "x": 1 - }, - "F9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "F5", - { - "t": "#000000", - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "F6" - ], - [ - { - "y": -0.875, - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\nFlash", - { - "t": "#b81c1c" - }, - "F1", - { - "x": 14.5 - }, - "F10", - { - "t": "#b81c1c\n\n\n#529151", - "w": 1.5 - }, - "F11\n\n\nFlash" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "{\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5 - }, - "7", - { - "x": 1 - }, - "9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "!", - { - "x": 14.5 - }, - "*", - { - "w": 1.5 - }, - "F12" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151" - }, - "(\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "5" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "#", - { - "x": 14.5 - }, - "+", - { - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\n" - ], - [ - { - "y": -0.625, - "x": 6.5, - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "t": "#b81c1c", - "a": 4 - }, - "[", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1 - }, - "]", - { - "x": 8.5 - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "~", - { - "x": 6.5 - }, - "&" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "%", - { - "x": 14.5 - }, - "\\", - { - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nleft click", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - ".\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#000000", - "a": 7 - }, - "", - { - "x": 1, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nright click", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "?\n\n\n", - { - "x": 1, - "t": "#b81c1c" - }, - "0" - ], - [ - { - "y": -0.75, - "x": 0.5, - "t": "#000000", - "a": 7 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "EPRM RST", - { - "x": 14.5, - "t": "#000000", - "a": 7 - }, - "", - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "h": 2 - }, - "", - "" - ], - [ - { - "x": 2 - }, - "" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "", - "" - ], - [ - { - "x": -3 - }, - "", - { - "h": 2 - }, - "", - { - "t": "#000000\n\n\n#529151", - "a": 4, - "h": 2 - }, - "\n\n\nWeb back" - ], - [ - { - "x": -3, - "t": "#000000", - "a": 7 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c b/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c deleted file mode 100644 index c6717abff..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/keymap.c +++ /dev/null @@ -1,260 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -#define EPRM M(1) // Macro 1: Reset EEPROM -#define HTML_LI M(10) -#define HTML_UL M(11) -#define HTML_OL M(12) -#define HTML_CODE M(13) - -#define SEND_TAG(TAG) do {\ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING("&"); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - go_back_based_on_tag(TAG); \ - } while (0) - -void send_key(uint16_t keycode); -void go_back_based_on_tag(char* tag); -void send_larger_than(void); - - -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 | Z | U | I | O | P | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~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] = KEYMAP( // layer 0 : default - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, 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_LBRC, - 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,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, - 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 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | EPRM | | | | | ? | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, - KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,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, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, - KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, - ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | RESET | | | | | | | | | | | | | | RESET | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | |H_UL | |H_OL | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |H_CODE| | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP( - RESET, 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, HTML_CODE, 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, RESET, - KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, 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 -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - case 10: - if (record->event.pressed) { - SEND_TAG("li"); - } - break; - case 11: - if (record->event.pressed) { - SEND_TAG( "ul" ); - } - break; - case 12: - if (record->event.pressed) { - SEND_TAG("ol"); - } - break; - case 13: - if (record->event.pressed) { - SEND_TAG("code"); - } - break; - } - return MACRO_NONE; -}; - -// 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); - - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 0: - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - break; - case 1: - ergodox_right_led_1_on(); - - ergodox_board_led_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - break; - case 2: - ergodox_right_led_2_on(); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_3_off(); - break; - default: - // none - break; - } - -}; - -void send_key(uint16_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - -void go_back_based_on_tag(char* tag) { - const int BRACKETS_AND_SLASH_LENGTH = 3; - - for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { - send_key(KC_LEFT); - } -} - -void send_larger_than() { - register_code(KC_LSFT); - send_key(KC_NONUS_BSLASH); - unregister_code(KC_LSFT); - -} diff --git a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md b/keyboards/ergodox/keymaps/swissgerman_ez/readme.md deleted file mode 100644 index 039a08588..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_ez/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -# ErgoDox EZ Swiss German Configuration - -Swiss German keyboard layout based on the Ergodox EZ default layout. - -Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). - -Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) - -![Layout Layer 0](keyboard-layout.png) -![Layout Layer 1&2](keyboard-layout_1_2.png) - -## Changelog -* Jan 21, 2017: - * Initial version based on default layout. - diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json deleted file mode 100644 index 7a0397f72..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.json +++ /dev/null @@ -1,417 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5 - }, - "#\n3", - { - "x": 10.5 - }, - "*\n8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@\n2", - { - "x": 1 - }, - "$\n4", - { - "x": 8.5 - }, - "&\n7", - { - "x": 1 - }, - "(\n9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "%\n5", - { - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "a": 4 - }, - "^\n6" - ], - [ - { - "y": -0.875, - "w": 1.5 - }, - "°\n§", - "!\n1", - { - "x": 14.5 - }, - ")\n0", - { - "w": 1.5 - }, - "?\n'\n\n'" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "E", - { - "x": 10.5 - }, - "I" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "W", - { - "x": 1 - }, - "R", - { - "x": 8.5 - }, - "U", - { - "x": 1 - }, - "O" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "T", - { - "c": "#b56b6b", - "a": 6, - "h": 1.5 - }, - "Toggle Code Layer", - { - "x": 4.5, - "h": 1.5 - }, - "Toggle Code Layer", - { - "c": "#cccccc", - "a": 4 - }, - "Y" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Delete", - { - "a": 4 - }, - "Q", - { - "x": 14.5 - }, - "P", - { - "w": 1.5 - }, - "è\nü\n\n[" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "D", - { - "x": 10.5 - }, - "K" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "S", - { - "x": 1 - }, - "F", - { - "x": 8.5 - }, - "J", - { - "x": 1 - }, - "L" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "G", - { - "x": 6.5 - }, - "H" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Backspace", - { - "c": "#79c777", - "a": 4 - }, - "A\n\nLyr3", - { - "x": 14.5 - }, - "é\nö\nLyr3", - { - "c": "#748adb", - "w": 1.5 - }, - "à\nä\nCmd\n{" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#cccccc", - "a": 6, - "h": 1.5 - }, - "Hyper", - { - "x": 4.5, - "h": 1.5 - }, - "Meh" - ], - [ - { - "y": -0.75, - "x": 3.5, - "a": 4 - }, - "C", - { - "x": 10.5 - }, - ";\n," - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#748adb" - }, - "X\n\nAlt", - { - "x": 1, - "c": "#cccccc" - }, - "V", - { - "x": 8.5 - }, - "M", - { - "x": 1, - "c": "#748adb" - }, - ":\n.\nAlt" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#cccccc" - }, - "B", - { - "x": 6.5 - }, - "N" - ], - [ - { - "y": -0.875, - "a": 6, - "w": 1.5 - }, - "Shift", - { - "c": "#748adb", - "a": 4 - }, - "Z\n\nCtrl", - { - "x": 14.5 - }, - "_\n-\nCtrl", - { - "c": "#cccccc", - "a": 6, - "w": 1.5 - }, - "Shift" - ], - [ - { - "y": -0.375, - "x": 3.5, - "a": 7 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5, - "a": 4 - }, - "£\n$\n\n}", - { - "x": 1, - "a": 7 - }, - "", - { - "x": 10.5, - "a": 6 - }, - "AltGr" - ], - [ - { - "y": -0.9950000000000001, - "x": 14, - "a": 7 - }, - "" - ], - [ - { - "y": -0.7549999999999999, - "x": 0.5, - "c": "#b56b6b", - "a": 4 - }, - ">\n<\nCode Layer\n\\", - { - "c": "#cccccc" - }, - "`\n^\n\n~", - { - "x": 14.5 - }, - "!\n¨\n\n]", - { - "c": "#b56b6b" - }, - "\n\nCode Layer" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#748adb" - }, - "Apps\nAlt", - { - "c": "#cccccc", - "a": 6 - }, - "Win / Cmd" - ], - [ - { - "h": 2 - }, - "Space", - { - "h": 2 - }, - "Back Space", - "Home" - ], - [ - { - "x": 2 - }, - "End" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "Alt", - { - "c": "#748adb", - "a": 4 - }, - "Esc\nCtrl" - ], - [ - { - "x": -3, - "c": "#cccccc", - "a": 6 - }, - "Pg Up", - { - "h": 2 - }, - "Tab", - { - "h": 2 - }, - "Enter" - ], - [ - { - "x": -3 - }, - "Pg Dn" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png deleted file mode 100644 index aff6af851..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png deleted file mode 100644 index 835816b53..000000000 Binary files a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_1_2.png and /dev/null differ diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json deleted file mode 100644 index e3d366057..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keyboard-layout_2_3.json +++ /dev/null @@ -1,429 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5, - "t": "#b81c1c" - }, - "F3", - { - "x": 10.5 - }, - "F8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "F2", - { - "x": 1 - }, - "F4", - { - "x": 8.5 - }, - "F7", - { - "x": 1 - }, - "F9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "F5", - { - "t": "#000000", - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "F6" - ], - [ - { - "y": -0.875, - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\nFlash", - { - "t": "#b81c1c" - }, - "F1", - { - "x": 14.5 - }, - "F10", - { - "t": "#b81c1c\n\n\n#529151", - "w": 1.5 - }, - "F11\n\n\nFlash" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "{\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5 - }, - "7", - { - "x": 1 - }, - "9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "!", - { - "x": 14.5 - }, - "*", - { - "w": 1.5 - }, - "F12" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151" - }, - "(\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "5" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "#", - { - "x": 14.5 - }, - "+", - { - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\n" - ], - [ - { - "y": -0.625, - "x": 6.5, - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "t": "#b81c1c", - "a": 4 - }, - "[", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1 - }, - "]", - { - "x": 8.5 - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "~", - { - "x": 6.5 - }, - "&" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "%", - { - "x": 14.5 - }, - "\\", - { - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nleft click", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - ".\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#000000", - "a": 7 - }, - "", - { - "x": 1, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nright click", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "?\n\n\n", - { - "x": 1, - "t": "#b81c1c" - }, - "0" - ], - [ - { - "y": -0.75, - "x": 0.5, - "t": "#000000", - "a": 7 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "EPRM RST", - { - "x": 14.5, - "t": "#000000", - "a": 7 - }, - "", - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "h": 2 - }, - "", - "" - ], - [ - { - "x": 2 - }, - "" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "", - "" - ], - [ - { - "x": -3 - }, - "", - { - "h": 2 - }, - "", - { - "t": "#000000\n\n\n#529151", - "a": 4, - "h": 2 - }, - "\n\n\nWeb back" - ], - [ - { - "x": -3, - "t": "#000000", - "a": 7 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c b/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c deleted file mode 100644 index 0ccb7f47e..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/keymap.c +++ /dev/null @@ -1,252 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" -#include "visualizer/lcd_backlight.h" -#include "string.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -#define EPRM M(1) // Macro 1: Reset EEPROM -#define HTML_LI M(10) -#define HTML_UL M(11) -#define HTML_OL M(12) -#define HTML_CODE M(13) - -#define SEND_TAG(TAG) do {\ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - send_key(KC_NONUS_BSLASH); \ - SEND_STRING("&"); \ - SEND_STRING(TAG); \ - send_larger_than(); \ - go_back_based_on_tag(TAG); \ - } while (0) - -void send_key(uint16_t keycode); -void go_back_based_on_tag(char* tag); -void send_larger_than(void); - -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 | Z | U | I | O | P | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A /L2| S | D | F | G |------| |------| H | J | K | L | / L2| / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Y/Ctrl|X/Alt | C | V | B | | | | N | M | , |./Alt |-/Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |< / L1| ^ | $ | Left | Right| | Up | Down |AltGr | | ~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] = KEYMAP( // layer 0 : default - // left hand - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, LT(MDIA, KC_A),KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), ALT_T(KC_X), KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_NONUS_BSLASH), KC_EQL, KC_BSLS, 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_LBRC, - 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,ALT_T(KC_DOT), CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_RALT,KC_RBRC, KC_FN1, - 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 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | EPRM | | | | | ? | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| | | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), ACTION_MODS_KEY(MOD_RALT, KC_2), ACTION_MODS_KEY(MOD_RALT, KC_QUOT), ACTION_MODS_KEY(MOD_RALT, KC_BSLS),ACTION_MODS_KEY(MOD_RALT,KC_7),KC_TRNS, - KC_TRNS,ACTION_MODS_KEY(MOD_RALT,KC_3),KC_BSLS, ACTION_MODS_KEY(MOD_LSFT, KC_8), ACTION_MODS_KEY(MOD_RSFT, KC_9),ACTION_MODS_KEY(MOD_LSFT,KC_EQL), - KC_TRNS,ACTION_MODS_KEY(MOD_LSFT,KC_5),KC_EQL, ACTION_MODS_KEY(MOD_RALT, KC_LBRC), ACTION_MODS_KEY(MOD_RALT, KC_RBRC),ACTION_MODS_KEY(MOD_RALT,KC_EQL),KC_TRNS, - KC_TRNS,EPRM,KC_TRNS,KC_NONUS_BSLASH, ACTION_MODS_KEY(MOD_LSFT, KC_NONUS_BSLASH)/*KC_TRNS,KC_TRNS*/, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,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, ACTION_MODS_KEY(MOD_RSFT,KC_3), KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, - KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, - ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | RESET | | | | | | | | | | | | | | RESET | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | |H_UL | |H_OL | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |H_CODE| | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| - * | | |------| |------| |Back | - * | | | | | | | | - * `--------------------' `--------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP( - RESET, 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, HTML_CODE, 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, RESET, - KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, HTML_LI, 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 -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - case 10: - if (record->event.pressed) { - SEND_TAG("li"); - } - break; - case 11: - if (record->event.pressed) { - SEND_TAG("ul"); - } - break; - case 12: - if (record->event.pressed) { - SEND_TAG("ol"); - } - break; - case 13: - if (record->event.pressed) { - SEND_TAG("code"); - } - break; - } - return MACRO_NONE; -}; - -// 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); - - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 0: - ergodox_board_led_off(); - lcd_backlight_hal_color(0, 0, 0); - break; - case 1: - lcd_backlight_hal_color(5000, 0, 0); - break; - case 2: - lcd_backlight_hal_color(0, 5000, 0); - break; - default: - // none - break; - } - -}; - -void send_key(uint16_t keycode) { - register_code(keycode); - unregister_code(keycode); -} - -void go_back_based_on_tag(char* tag) { - const int BRACKETS_AND_SLASH_LENGTH = 3; - - for (int i=0; i < strlen(tag) + BRACKETS_AND_SLASH_LENGTH; i++) { - send_key(KC_LEFT); - } -} - -void send_larger_than() { - register_code(KC_LSFT); - send_key(KC_NONUS_BSLASH); - unregister_code(KC_LSFT); - -} diff --git a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md b/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md deleted file mode 100644 index 1c35f7473..000000000 --- a/keyboards/ergodox/keymaps/swissgerman_infinity/readme.md +++ /dev/null @@ -1,14 +0,0 @@ -# ErgoDox Infinity Swiss German Configuration - -Swiss German keyboard layout based on the Ergodox EZ default layout. - -Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). - -Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) - -![Layout Layer 0](keyboard-layout.png) -![Layout Layer 1&2](keyboard-layout_1_2.png) - -## Changelog -* Jan 21, 2017: - * Initial version. -- cgit v1.2.3 From 6b5cd656fd32033d1b5d117381208cd6708721ed Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:55:18 +0100 Subject: Correct layout description of ergodox swissgerman - Added missing HTML macros to media layer. --- .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 54604 -> 56347 bytes .../keymaps/swissgerman/keyboard-layout_2_3.json | 31 +++++++++++---------- 2 files changed, 16 insertions(+), 15 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png index 835816b53..e0a455369 100644 Binary files a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json index e3d366057..332f8f3b5 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json @@ -97,18 +97,20 @@ }, "}", { - "x": 8.5 + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" }, - "7", + "7\n\n\nHTML ul", { "x": 1 }, - "9" + "9\n\n\nHTML ol" ], [ { "y": -0.875, - "x": 5.5 + "x": 5.5, + "t": "#b81c1c" }, "|", { @@ -158,16 +160,14 @@ }, "(\n\n\n", { - "x": 10.5, - "t": "#b81c1c" + "x": 10.5 }, - "5" + "5\n\n\nHTML li" ], [ { "y": -0.875, - "x": 2.5, - "t": "#b81c1c\n\n\n#529151" + "x": 2.5 }, "$\n\n\n", { @@ -237,13 +237,12 @@ { "y": -0.75, "x": 3.5, - "t": "#b81c1c", + "t": "#b81c1c\n\n\n#529151", "a": 4 }, - "[", + "[\n\n\nHTML code", { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" + "x": 10.5 }, "2\n\n\n" ], @@ -255,11 +254,13 @@ }, "^", { - "x": 1 + "x": 1, + "t": "#b81c1c\n\n\n#529151" }, "]", { - "x": 8.5 + "x": 8.5, + "t": "#b81c1c" }, "1", { -- cgit v1.2.3 From eb6abb6305d66033b67a9860b57b21765b5b46bb Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sat, 21 Jan 2017 20:58:28 +0100 Subject: Renamed JSON source of Ergodox Swiss German - Renamed the JSON source files for the layout description of the Ergodox Swiss German keymap --- .../keymaps/swissgerman/keyboard-layout_1_2.json | 430 +++++++++++++++++++++ .../keymaps/swissgerman/keyboard-layout_2_3.json | 430 --------------------- keyboards/ergodox/keymaps/swissgerman/readme.md | 2 +- 3 files changed, 431 insertions(+), 431 deletions(-) create mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json delete mode 100644 keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json new file mode 100644 index 000000000..332f8f3b5 --- /dev/null +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json @@ -0,0 +1,430 @@ +[ + { + "backcolor": "#ffffff" + }, + [ + { + "x": 3.5, + "t": "#b81c1c" + }, + "F3", + { + "x": 10.5 + }, + "F8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "F2", + { + "x": 1 + }, + "F4", + { + "x": 8.5 + }, + "F7", + { + "x": 1 + }, + "F9" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "F5", + { + "t": "#000000", + "a": 7 + }, + "", + { + "x": 4.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "F6" + ], + [ + { + "y": -0.875, + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\nFlash", + { + "t": "#b81c1c" + }, + "F1", + { + "x": 14.5 + }, + "F10", + { + "t": "#b81c1c\n\n\n#529151", + "w": 1.5 + }, + "F11\n\n\nFlash" + ], + [ + { + "y": -0.375, + "x": 3.5 + }, + "{\n\n\n", + { + "x": 10.5, + "t": "#b81c1c" + }, + "8" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "@", + { + "x": 1 + }, + "}", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "7\n\n\nHTML ul", + { + "x": 1 + }, + "9\n\n\nHTML ol" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "|", + { + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "!", + { + "x": 14.5 + }, + "*", + { + "w": 1.5 + }, + "F12" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151" + }, + "(\n\n\n", + { + "x": 10.5 + }, + "5\n\n\nHTML li" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "$\n\n\n", + { + "x": 1 + }, + ")\n\n\n", + { + "x": 8.5, + "t": "#b81c1c" + }, + "4", + { + "x": 1 + }, + "6" + ], + [ + { + "y": -0.875, + "x": 5.5 + }, + "`", + { + "x": 6.5 + }, + "" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "#", + { + "x": 14.5 + }, + "+", + { + "t": "#000000\n\n\n#529151", + "w": 1.5 + }, + "\n\n\n" + ], + [ + { + "y": -0.625, + "x": 6.5, + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "", + { + "x": 4.5, + "h": 1.5 + }, + "" + ], + [ + { + "y": -0.75, + "x": 3.5, + "t": "#b81c1c\n\n\n#529151", + "a": 4 + }, + "[\n\n\nHTML code", + { + "x": 10.5 + }, + "2\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#b81c1c" + }, + "^", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "]", + { + "x": 8.5, + "t": "#b81c1c" + }, + "1", + { + "x": 1, + "t": "#b81c1c\n\n\n#529151" + }, + "3\n\n\n" + ], + [ + { + "y": -0.875, + "x": 5.5, + "t": "#b81c1c" + }, + "~", + { + "x": 6.5 + }, + "&" + ], + [ + { + "y": -0.875, + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "%", + { + "x": 14.5 + }, + "\\", + { + "t": "#000000", + "a": 7, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nleft click", + { + "x": 10.5, + "t": "#b81c1c\n\n\n#529151" + }, + ".\n\n\n" + ], + [ + { + "y": -0.875, + "x": 2.5, + "t": "#000000", + "a": 7 + }, + "", + { + "x": 1, + "t": "#000000\n\n\n#529151", + "a": 4 + }, + "\n\n\nright click", + { + "x": 8.5, + "t": "#b81c1c\n\n\n#529151" + }, + "?\n\n\n", + { + "x": 1, + "t": "#b81c1c" + }, + "0" + ], + [ + { + "y": -0.75, + "x": 0.5, + "t": "#000000", + "a": 7 + }, + "", + { + "t": "#b81c1c", + "a": 4 + }, + "EPRM RST", + { + "x": 14.5, + "t": "#000000", + "a": 7 + }, + "", + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1 + }, + "", + "" + ], + [ + { + "h": 2 + }, + "", + { + "h": 2 + }, + "", + "" + ], + [ + { + "x": 2 + }, + "" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3 + }, + "", + "" + ], + [ + { + "x": -3 + }, + "", + { + "h": 2 + }, + "", + { + "t": "#000000\n\n\n#529151", + "a": 4, + "h": 2 + }, + "\n\n\nWeb back" + ], + [ + { + "x": -3, + "t": "#000000", + "a": 7 + }, + "" + ] +] diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json deleted file mode 100644 index 332f8f3b5..000000000 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_2_3.json +++ /dev/null @@ -1,430 +0,0 @@ -[ - { - "backcolor": "#ffffff" - }, - [ - { - "x": 3.5, - "t": "#b81c1c" - }, - "F3", - { - "x": 10.5 - }, - "F8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "F2", - { - "x": 1 - }, - "F4", - { - "x": 8.5 - }, - "F7", - { - "x": 1 - }, - "F9" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "F5", - { - "t": "#000000", - "a": 7 - }, - "", - { - "x": 4.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "F6" - ], - [ - { - "y": -0.875, - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\nFlash", - { - "t": "#b81c1c" - }, - "F1", - { - "x": 14.5 - }, - "F10", - { - "t": "#b81c1c\n\n\n#529151", - "w": 1.5 - }, - "F11\n\n\nFlash" - ], - [ - { - "y": -0.375, - "x": 3.5 - }, - "{\n\n\n", - { - "x": 10.5, - "t": "#b81c1c" - }, - "8" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "@", - { - "x": 1 - }, - "}", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "7\n\n\nHTML ul", - { - "x": 1 - }, - "9\n\n\nHTML ol" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "|", - { - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "!", - { - "x": 14.5 - }, - "*", - { - "w": 1.5 - }, - "F12" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151" - }, - "(\n\n\n", - { - "x": 10.5 - }, - "5\n\n\nHTML li" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "$\n\n\n", - { - "x": 1 - }, - ")\n\n\n", - { - "x": 8.5, - "t": "#b81c1c" - }, - "4", - { - "x": 1 - }, - "6" - ], - [ - { - "y": -0.875, - "x": 5.5 - }, - "`", - { - "x": 6.5 - }, - "" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "#", - { - "x": 14.5 - }, - "+", - { - "t": "#000000\n\n\n#529151", - "w": 1.5 - }, - "\n\n\n" - ], - [ - { - "y": -0.625, - "x": 6.5, - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "", - { - "x": 4.5, - "h": 1.5 - }, - "" - ], - [ - { - "y": -0.75, - "x": 3.5, - "t": "#b81c1c\n\n\n#529151", - "a": 4 - }, - "[\n\n\nHTML code", - { - "x": 10.5 - }, - "2\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#b81c1c" - }, - "^", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "]", - { - "x": 8.5, - "t": "#b81c1c" - }, - "1", - { - "x": 1, - "t": "#b81c1c\n\n\n#529151" - }, - "3\n\n\n" - ], - [ - { - "y": -0.875, - "x": 5.5, - "t": "#b81c1c" - }, - "~", - { - "x": 6.5 - }, - "&" - ], - [ - { - "y": -0.875, - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "%", - { - "x": 14.5 - }, - "\\", - { - "t": "#000000", - "a": 7, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nleft click", - { - "x": 10.5, - "t": "#b81c1c\n\n\n#529151" - }, - ".\n\n\n" - ], - [ - { - "y": -0.875, - "x": 2.5, - "t": "#000000", - "a": 7 - }, - "", - { - "x": 1, - "t": "#000000\n\n\n#529151", - "a": 4 - }, - "\n\n\nright click", - { - "x": 8.5, - "t": "#b81c1c\n\n\n#529151" - }, - "?\n\n\n", - { - "x": 1, - "t": "#b81c1c" - }, - "0" - ], - [ - { - "y": -0.75, - "x": 0.5, - "t": "#000000", - "a": 7 - }, - "", - { - "t": "#b81c1c", - "a": 4 - }, - "EPRM RST", - { - "x": 14.5, - "t": "#000000", - "a": 7 - }, - "", - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1 - }, - "", - "" - ], - [ - { - "h": 2 - }, - "", - { - "h": 2 - }, - "", - "" - ], - [ - { - "x": 2 - }, - "" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3 - }, - "", - "" - ], - [ - { - "x": -3 - }, - "", - { - "h": 2 - }, - "", - { - "t": "#000000\n\n\n#529151", - "a": 4, - "h": 2 - }, - "\n\n\nWeb back" - ], - [ - { - "x": -3, - "t": "#000000", - "a": 7 - }, - "" - ] -] diff --git a/keyboards/ergodox/keymaps/swissgerman/readme.md b/keyboards/ergodox/keymaps/swissgerman/readme.md index 49889cd65..b1061c1dd 100644 --- a/keyboards/ergodox/keymaps/swissgerman/readme.md +++ b/keyboards/ergodox/keymaps/swissgerman/readme.md @@ -4,7 +4,7 @@ Swiss German keyboard layout based on the Ergodox EZ default layout. Keyboard diagrams created with the [keyboard layout editor](http://www.keyboard-layout-editor.com). -Diagram sources: [default layer](keyboard-layout.json), [layer 2 & 3](keyboard-layout_2_3.json) +Diagram sources: [default layer](keyboard-layout.json), [layer 1 & 2](keyboard-layout_1_2.json) ![Layout Layer 0](keyboard-layout.png) ![Layout Layer 1&2](keyboard-layout_1_2.png) -- cgit v1.2.3 From 9ce38cbccf073fccea6f7ee6492bf472a48852b8 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 17:09:17 -0500 Subject: Simplified and polished a bit the code changes on tmk_core --- keyboards/ps2avrGB/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index dfaea5979..f0bef2464 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -34,7 +34,7 @@ along with this program. If not, see . #define BACKLIGHT_COLOR 0x110000 #define NO_UART 1 -#define EEPROM_BOOTLOADER_START 1 +#define BOOTLOADHID_BOOTLOADER 1 /* key combination for command */ #define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) -- cgit v1.2.3 From bfbab75292a3e1fa9fea501fc3c37698c16dedd5 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 18:15:39 -0500 Subject: Slightly saner default keymap for ps2avrGB and removed some unused code --- keyboards/ps2avrGB/config.h | 4 ---- keyboards/ps2avrGB/keymaps/default/keymap.c | 27 ++++----------------------- 2 files changed, 4 insertions(+), 27 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index f0bef2464..b5c696f3f 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -29,10 +29,6 @@ along with this program. If not, see . #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -/* only support one hard-coded backlight color for now */ -#define BACKLIGHT_LEVELS 0 -#define BACKLIGHT_COLOR 0x110000 - #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c index 43cc6bce3..bd1ce775c 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -2,33 +2,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KEYMAP( \ - ESC, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,PSCR,HOME,END, \ + ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, PSCR,HOME,END, \ GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, BSPC, DEL, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, FN1, \ - FN2, A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, INS, \ + CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, PGUP,\ LSFT,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT, UP, PGDN,\ - FN0, LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ - ), - KEYMAP( \ - NO, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, NO, NO, NO, \ - NO, NO, NO, NO, NO, NO, NO, MPRV,MPLY,MNXT,MUTE,VOLD,VOLU,DEL, NO, \ - NO, NO, NO, NO, NO, NO, NO, PGUP,NO, NO, NO, NO, NO, NO, TRNS,\ - FN2, NO, NO, PGDN,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ - TRNS,NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ - TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ - ), - KEYMAP( \ - NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, NO, \ - NO, NO, NO, NO, END, NO, NO, NO, NO, NO, HOME,NO, NO, NO, NO, \ - NO, BTN1,MS_U,BTN2,NO, NO, NO, PGUP,FN1, NO, NO, NO, NO, NO, TRNS,\ - FN2, MS_L,MS_D,MS_R,NO, NO, LEFT,DOWN,UP, RGHT,NO, NO, NO, NO, \ - TRNS,NO, DEL, NO, NO, NO, NO, NO, NO, NO, NO, TRNS, NO, NO, \ - TRNS,TRNS,TRNS, NO, TRNS,TRNS,TRNS,NO, NO, NO \ + LCTL,LALT,LGUI, SPC, RGUI,RALT,RCTL,LEFT,DOWN,RGHT \ ), }; const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), - [1] = ACTION_LAYER_TOGGLE(2), - [2] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ESC), }; -- cgit v1.2.3 From 642d0acef547c8276ed82a319d2e16c5a977d1a4 Mon Sep 17 00:00:00 2001 From: Luiz Ribeiro Date: Sat, 21 Jan 2017 18:23:44 -0500 Subject: =?UTF-8?q?Added=20a=20copyright=20header=20to=20the=20default=20k?= =?UTF-8?q?eymap...=20=C2=AF\=5F(=E3=83=84)=5F/=C2=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/ps2avrGB/keymaps/default/keymap.c | 17 +++++++++++++++++ keyboards/ps2avrGB/ps2avrGB.h | 1 + 2 files changed, 18 insertions(+) (limited to 'keyboards') diff --git a/keyboards/ps2avrGB/keymaps/default/keymap.c b/keyboards/ps2avrGB/keymaps/default/keymap.c index bd1ce775c..5c66cde59 100644 --- a/keyboards/ps2avrGB/keymaps/default/keymap.c +++ b/keyboards/ps2avrGB/keymaps/default/keymap.c @@ -1,3 +1,20 @@ +/* +Copyright 2017 Luiz Ribeiro + +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 . +*/ + #include "ps2avrGB.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/ps2avrGB/ps2avrGB.h b/keyboards/ps2avrGB/ps2avrGB.h index 1527c604e..6432e3be9 100644 --- a/keyboards/ps2avrGB/ps2avrGB.h +++ b/keyboards/ps2avrGB/ps2avrGB.h @@ -14,6 +14,7 @@ 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 . */ + #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H -- cgit v1.2.3 From 803a861b4e5cce8da2f1260273ee5d918b0f58a7 Mon Sep 17 00:00:00 2001 From: lucwastiaux Date: Sun, 22 Jan 2017 10:32:17 +0800 Subject: document BRACKETS and SHELL_LAYER --- keyboards/ergodox/keymaps/dvorak_programmer/README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/dvorak_programmer/README.md b/keyboards/ergodox/keymaps/dvorak_programmer/README.md index 3e4a2545b..54da74f7f 100644 --- a/keyboards/ergodox/keymaps/dvorak_programmer/README.md +++ b/keyboards/ergodox/keymaps/dvorak_programmer/README.md @@ -7,18 +7,23 @@ Layers ------ * BASE: this is where you type. +* SHELL_LAYER: this is a permanent layer which I use when I don't need the F keys and gives me bash shortcuts on the top row. * SHELL_NAV: hold down the Tab key to access shell/terminal navigation shorcuts such as forward/backward word, history, Ctrl+C, screen tab movement. * KEY_NAV: arrow key movement with backward/forward word support, and copy/paste. * KEY_SEL: same as above, but every movement shift-selects. * NUMBER: keypad layer. * SYMBOL: all the symbols. -* BRACKET: special brackets-only layer for programming +* BRACKET: special brackets-only layer for programming. Activated by pressing left capslock (OSL) * SHORTCUTS: sends Hyper keys for Autohotkey to interpret. I use this to switch between specific apps. * MOUSE: use mouse keys Updates ------- +2017/01/22: +* Made brackets toggle an OSL on the left capslock +* Added SHELL_LAYER + 2016/12/10: * toggle for brackets layer is now on left thumb cluster. -- cgit v1.2.3 From 3fd9aa3660331b05144f9cf7cebb60bef32a352f Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:30:18 +0100 Subject: SG Ergodox layout: Add
macro to media layer - Added
macro to media layer of Swiss German layout for Ergodox --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index a969393bb..54a8299cb 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -18,6 +18,7 @@ #define HTML_UL M(11) #define HTML_OL M(12) #define HTML_CODE M(13) +#define HTML_BR M(14) #define SEND_TAG(TAG) do {\ send_key(KC_NONUS_BSLASH); \ @@ -30,6 +31,13 @@ go_back_based_on_tag(TAG); \ } while (0) +#define SEND_SHORT_TAG(TAG) do {\ + send_key(KC_NONUS_BSLASH); \ + SEND_STRING(TAG); \ + SEND_STRING("&"); \ + send_larger_than(); \ + } while (0) + void send_key(uint16_t keycode); void go_back_based_on_tag(char* tag); void send_larger_than(void); @@ -130,7 +138,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | | |H_LI | | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |H_CODE| | | | | | | | | Prev | Next | | | + * | | |H_CODE| |H_BR | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' @@ -147,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { RESET, 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, HTML_CODE, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, HTML_CODE, KC_TRNS, HTML_BR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, @@ -202,6 +210,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) SEND_TAG("code"); } break; + case 14: + if (record->event.pressed) { + SEND_SHORT_TAG("br"); + } } return MACRO_NONE; }; -- cgit v1.2.3 From 5c4a73d788470a3fc53b8dd06b808cc662d37795 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:32:40 +0100 Subject: SG Ergodox layout: Add ENTER to left keyboard - Swiss German Ergodox layout: Added ENTER key to left keyboard half on media layer such that the enter key is available on both halves to be able to flash both halves without an additional keyboard. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 54a8299cb..93e36d032 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, + KC_ENT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -145,7 +145,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | | | | | * ,------|------|------| |------+------+------. - * | | | | | | |Brwser| + * |Enter | | | | | |Brwser| * | | |------| |------| |Back | * | | | | | | | | * `--------------------' `--------------------' -- cgit v1.2.3 From c2c8a120228fe8b8bfc15f05f4a39f35f6372b08 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:35:24 +0100 Subject: SG Ergodox layout: Minor code formatting changes - Swiss German Ergodox layout: Removed unnecessary spaces. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 93e36d032..3f90c4e63 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -197,7 +197,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case 11: if (record->event.pressed) { - SEND_TAG( "ul" ); + SEND_TAG("ul"); } break; case 12: -- cgit v1.2.3 From afd2c2ee9eac95869b8f9366f8861baf64444509 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:43:46 +0100 Subject: SG Ergodox layout: Fixed ENTER key mapping - Swiss German Ergodox layout: Additional ENTER key was mapped to wrong layer and keyboard half. --- keyboards/ergodox/keymaps/swissgerman/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keymap.c b/keyboards/ergodox/keymaps/swissgerman/keymap.c index 3f90c4e63..2291fb651 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keymap.c +++ b/keyboards/ergodox/keymaps/swissgerman/keymap.c @@ -125,7 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, KC_4, KC_5, KC_6, ACTION_MODS_KEY(MOD_RSFT,KC_1), KC_TRNS, KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_6), KC_1, KC_2, KC_3, ACTION_MODS_KEY(MOD_RALT,KC_NONUS_BSLASH), KC_TRNS, ACTION_MODS_KEY(MOD_RSFT,KC_MINS),KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_ENT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -159,7 +159,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, + KC_ENT, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, HTML_UL, KC_TRNS, HTML_OL, KC_TRNS, KC_TRNS, -- cgit v1.2.3 From 08c192caea1d0c1815b86461705f23d96f010e76 Mon Sep 17 00:00:00 2001 From: Andreas Schmidt Date: Sun, 22 Jan 2017 12:57:58 +0100 Subject: SG Ergodox layout: Updated layout documentation - Swiss German Ergodox layout: Updated layout documentation based on previous layout changes. --- .../keymaps/swissgerman/keyboard-layout.json | 4 +++- .../keymaps/swissgerman/keyboard-layout_1_2.json | 12 +++++++++--- .../keymaps/swissgerman/keyboard-layout_1_2.png | Bin 56347 -> 58099 bytes 3 files changed, 12 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json index 7a0397f72..6958952b4 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout.json @@ -1,6 +1,8 @@ [ { - "backcolor": "#ffffff" + "backcolor": "#ffffff", + "name": "Ergodox Swiss German Layout - Base Layer", + "author": "Andreas Schmidt (https://github.com/remigius42)" }, [ { diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json index 332f8f3b5..38a728514 100644 --- a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json +++ b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.json @@ -1,6 +1,8 @@ [ { - "backcolor": "#ffffff" + "backcolor": "#ffffff", + "name": "Ergodox Swiss German Layout - Symbol & Media Layer", + "author": "Andreas Schmidt (https://github.com/remigius42)" }, [ { @@ -257,7 +259,7 @@ "x": 1, "t": "#b81c1c\n\n\n#529151" }, - "]", + "]\n\n\nHTML br", { "x": 8.5, "t": "#b81c1c" @@ -378,10 +380,14 @@ ], [ { + "t": "#000000\n\n\n#529151", + "a": 4, "h": 2 }, - "", + "\n\n\nEnter", { + "t": "#000000", + "a": 7, "h": 2 }, "", diff --git a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png index e0a455369..54c4a7587 100644 Binary files a/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png and b/keyboards/ergodox/keymaps/swissgerman/keyboard-layout_1_2.png differ -- cgit v1.2.3 From 9d24943ec1285c2d5d5853390abd5eb4e0cd7a2c Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:37:48 -0500 Subject: Refactor code to eliminate duplicate defines * Moved duplicated defines out of inappropriate source files (matrix pins in keymap subdirectory) * Eliminated default keymap directory * Hardcoded serial keymap to use serial defines and EE_CONFIG * Hardcoded i2c keymap to use i2c defines --- keyboards/lets_split/config.h | 43 ------ keyboards/lets_split/keymaps/default/keymap.c | 188 -------------------------- keyboards/lets_split/keymaps/i2c/config.h | 85 +----------- keyboards/lets_split/keymaps/serial/config.h | 87 +----------- keyboards/lets_split/rev1/config.h | 5 +- keyboards/lets_split/rev2/config.h | 4 +- 6 files changed, 16 insertions(+), 396 deletions(-) delete mode 100644 keyboards/lets_split/keymaps/default/keymap.c (limited to 'keyboards') diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index 4db45ab0b..7df0c5752 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -20,49 +20,6 @@ along with this program. If not, see . #include "config_common.h" -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split -#define DESCRIPTION A split keyboard for the cheap makers - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* 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() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* 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 - #ifdef SUBPROJECT_rev1 #include "rev1/config.h" #endif diff --git a/keyboards/lets_split/keymaps/default/keymap.c b/keyboards/lets_split/keymaps/default/keymap.c deleted file mode 100644 index 6f1f71f5f..000000000 --- a/keyboards/lets_split/keymaps/default/keymap.c +++ /dev/null @@ -1,188 +0,0 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST, -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( \ - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - KC_LCTL, ADJUST, KC_LALT, KC_LGUI, LOWER, KC_SPC, MT(MOD_LSFT, KC_SPC), RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ - KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = KEYMAP( \ - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), -[3] = KEYMAP( \ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ - _______, _______, _______, _______, _______, KC_BSPC, MT(MOD_LSFT, KC_BSPC), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), -[4] = KEYMAP( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ - _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ - _______, _______, _______, _______, _______, KC_ENT, MT(MOD_LSFT, KC_ENT), _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = KEYMAP( \ - _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) -}; - -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -#endif - -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); - #endif - persistant_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistant_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistant_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - 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; - break; - 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; - break; - case ADJUST: - if (record->event.pressed) { - layer_on(_ADJUST); - } else { - layer_off(_ADJUST); - } - return false; - break; - } - return true; -} \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h index 72e5ae66b..efe8bb0f2 100644 --- a/keyboards/lets_split/keymaps/i2c/config.h +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -14,89 +14,14 @@ 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 . */ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split -#define DESCRIPTION A split keyboard for the cheap makers - -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } - -#define CATERINA_BOOTLOADER - #define USE_I2C -// Use serial if not using I2C -#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - #define I2C_MASTER_LEFT // #define I2C_MASTER_RIGHT -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* 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() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * 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 - +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h index b0ad522fc..cd766cc4f 100644 --- a/keyboards/lets_split/keymaps/serial/config.h +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -15,88 +15,15 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef CONFIG_H -#define CONFIG_H -#include "config_common.h" +#define USE_SERIAL -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x3060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split -#define DESCRIPTION A split keyboard for the cheap makers +#define EE_HANDS -/* key matrix size */ -// Rows are doubled-up -#define MATRIX_ROWS 8 -#define MATRIX_COLS 6 - -// wiring of each half -#define MATRIX_ROW_PINS { B5, B4, E6, D7 } -#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } - -#define CATERINA_BOOTLOADER - -// #define USE_I2C - -// Use serial if not using I2C -#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT -// #define I2C_MASTER_RIGHT - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -// #define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* 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() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* ws2812 RGB LED */ -#define RGB_DI_PIN D4 -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - -/* - * 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 +#ifdef SUBPROJECT_rev1 + #include "../../rev1/config.h" #endif +#ifdef SUBPROJECT_rev2 + #include "../../rev2/config.h" +#endif \ No newline at end of file diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 825e5ec24..4d3d382a4 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -25,7 +25,6 @@ along with this program. If not, see . #define PRODUCT_ID 0x3060 #define DEVICE_VER 0x0001 #define MANUFACTURER Wootpatoot -#define PRODUCT Lets Split #define PRODUCT Lets Split v1 #define DESCRIPTION A split keyboard for the cheap makers @@ -42,13 +41,13 @@ along with this program. If not, see . // #define USE_I2C // Use serial if not using I2C -#ifndef USE_I2C +/*#ifndef USE_I2C # define USE_SERIAL #endif // #define EE_HANDS -#define I2C_MASTER_LEFT +#define I2C_MASTER_LEFT*/ // #define I2C_MASTER_RIGHT /* COL2ROW or ROW2COL */ diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index e9689d773..ed9e106db 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -42,13 +42,13 @@ along with this program. If not, see . // #define USE_I2C // Use serial if not using I2C -#ifndef USE_I2C +/*#ifndef USE_I2C # define USE_SERIAL #endif // #define EE_HANDS -#define I2C_MASTER_LEFT +#define I2C_MASTER_LEFT*/ // #define I2C_MASTER_RIGHT /* COL2ROW or ROW2COL */ -- cgit v1.2.3 From efa526f57016f691fbdd75b1088f7e47240615ea Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:46:43 -0500 Subject: Created lines to uncomment keyboards built upside down * Reverses column order to fix left-to-right key order that occurs if PCB assembled upside down. --- keyboards/lets_split/rev1/config.h | 2 ++ keyboards/lets_split/rev2/config.h | 1 + 2 files changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 4d3d382a4..b73a7fb34 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,6 +36,8 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } +// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } uncomment this line and comment line above if you need to reverse left-to-right key order + #define CATERINA_BOOTLOADER diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index ed9e106db..86f6ad1be 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,6 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER -- cgit v1.2.3 From a00957abca4a7c67d25450246fbe73fda09b0e72 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:50:08 -0500 Subject: Fixed keymap matrix on rev2 * Fixed keymap matrix in rev2 so that left half and right half match when in same orientation. --- keyboards/lets_split/rev2/rev2.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/rev2/rev2.h b/keyboards/lets_split/rev2/rev2.h index 990976de2..7c397912f 100644 --- a/keyboards/lets_split/rev2/rev2.h +++ b/keyboards/lets_split/rev2/rev2.h @@ -9,10 +9,10 @@ //void promicro_bootloader_jmp(bool program); #define KEYMAP( \ - k00, k01, k02, k03, k04, k05, k45, k44, k43, k42, k41, k40, \ - k10, k11, k12, k13, k14, k15, k55, k54, k53, k52, k51, k50, \ - k20, k21, k22, k23, k24, k25, k65, k64, k63, k62, k61, k60, \ - k30, k31, k32, k33, k34, k35, k75, k74, k73, k72, k71, k70 \ + k00, k01, k02, k03, k04, k05, k40, k41, k42, k43, k44, k45, \ + k10, k11, k12, k13, k14, k15, k50, k51, k52, k53, k54, k55, \ + k20, k21, k22, k23, k24, k25, k60, k61, k62, k63, k64, k65, \ + k30, k31, k32, k33, k34, k35, k70, k71, k72, k73, k74, k75 \ ) \ { \ { k00, k01, k02, k03, k04, k05 }, \ -- cgit v1.2.3 From 99d548c4fbf207a0d38077d655bcf86a92db562f Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 15:57:30 -0500 Subject: Missed commenting out notes at end of line --- keyboards/lets_split/rev1/config.h | 2 +- keyboards/lets_split/rev2/config.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index b73a7fb34..e5e9a1c82 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { B5, B4, E6, D7 } #define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } -// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } uncomment this line and comment line above if you need to reverse left-to-right key order +// #define MATRIX_COL_PINS { B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 86f6ad1be..07d3aa506 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -36,7 +36,7 @@ along with this program. If not, see . // wiring of each half #define MATRIX_ROW_PINS { D7, E6, B4, B5 } #define MATRIX_COL_PINS { F6, F7, B1, B3, B2, B6 } -// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } uncomment this line and comment line above if you need to reverse left-to-right key order +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order #define CATERINA_BOOTLOADER -- cgit v1.2.3 From 89461e743efbe49092c30cbd71c51ccecbfdd8a9 Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Sun, 22 Jan 2017 19:01:07 -0500 Subject: More keyboard map tweaking (#1019) * Add HOME/END keys as upper/lower on arrow-up/down * Reduce .hex file size by turning off unneeded options * Put digit keypad onto left hand upon RAISE; this will sometimes be preferable to double-hits of right hand --- keyboards/planck/keymaps/cbbrowne/Makefile | 4 ++-- keyboards/planck/keymaps/cbbrowne/keymap.c | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/Makefile b/keyboards/planck/keymaps/cbbrowne/Makefile index b1c70ace7..19e5c2a84 100644 --- a/keyboards/planck/keymaps/cbbrowne/Makefile +++ b/keyboards/planck/keymaps/cbbrowne/Makefile @@ -12,11 +12,11 @@ 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 = yes # Audio output on port C6 +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 this with audio at the same time. -API_SYSEX_ENABLE = yes # Enable SYSEX API (+5390) +API_SYSEX_ENABLE = no # Enable SYSEX API (+5390) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 2be4dab4b..0448a8d11 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -110,15 +110,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, [_RAISE] = { /* RAISE */ {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} + {_______, KC_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, KC_7, KC_8, KC_9, _______, _______, _______, QWERTY, KEYPAD, KEYPAD, ALTSLASH,_______}, + {_______, KC_0, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} }, [_LOWER] = { /* LOWER */ {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, ALTSLASH, _______}, - {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_VOLD, KC_VOLU, KC_PGUP} + {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_HOME, KC_END, KC_PGUP} }, [_KEYPAD] = { /* Key Pad */ {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, -- cgit v1.2.3 From 372af5e3f6dc2bc362dee1ea8615769d6df7f9a9 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Sun, 22 Jan 2017 22:06:53 -0500 Subject: More code cleanup Missed a few commented out vestigal defines in revx/config.h that had been moved to keymap/serial and i2c. --- keyboards/lets_split/rev1/config.h | 11 ----------- keyboards/lets_split/rev2/config.h | 12 ------------ 2 files changed, 23 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index e5e9a1c82..2f5bde953 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -41,17 +41,6 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER -// #define USE_I2C -// Use serial if not using I2C -/*#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT*/ -// #define I2C_MASTER_RIGHT - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 07d3aa506..b34d7c004 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -40,18 +40,6 @@ along with this program. If not, see . #define CATERINA_BOOTLOADER -// #define USE_I2C - -// Use serial if not using I2C -/*#ifndef USE_I2C -# define USE_SERIAL -#endif - -// #define EE_HANDS - -#define I2C_MASTER_LEFT*/ -// #define I2C_MASTER_RIGHT - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -- cgit v1.2.3 From 841d7e6a1d74b1fc45575ed551132ec27353ebf3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Mon, 23 Jan 2017 13:55:24 -0500 Subject: turn off rgb_midi in ez --- keyboards/ergodox/ez/config.h | 2 +- keyboards/ergodox/ez/ez.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/ez/config.h b/keyboards/ergodox/ez/config.h index 6a8c66d7d..e4f95c302 100644 --- a/keyboards/ergodox/ez/config.h +++ b/keyboards/ergodox/ez/config.h @@ -49,7 +49,7 @@ along with this program. If not, see . #define RGBLIGHT_SAT_STEP 255 #define RGBLIGHT_VAL_STEP 12 -#define RGB_MIDI +// #define RGB_MIDI #define RGBW_BB_TWI #define RGBW 1 diff --git a/keyboards/ergodox/ez/ez.c b/keyboards/ergodox/ez/ez.c index 039e4c6bb..3e19f2302 100644 --- a/keyboards/ergodox/ez/ez.c +++ b/keyboards/ergodox/ez/ez.c @@ -52,9 +52,9 @@ uint8_t init_mcp23018(void) { // I2C subsystem - uint8_t sreg_prev; - sreg_prev=SREG; - cli(); + // uint8_t sreg_prev; + // sreg_prev=SREG; + // cli(); if (i2c_initialized == 0) { i2c_init(); // on pins D(1,0) i2c_initialized++; @@ -83,7 +83,7 @@ uint8_t init_mcp23018(void) { out: i2c_stop(); - SREG=sreg_prev; + // SREG=sreg_prev; return mcp23018_status; } -- cgit v1.2.3 From a777495683128fc56aa2d0081f27ff4c5c86d219 Mon Sep 17 00:00:00 2001 From: SjB Date: Mon, 23 Jan 2017 22:01:33 -0500 Subject: fix: infinity60 keyboard was not using quantum features. the quantum matrix codes where not being initialized or/and called so no feature of the quantum firmware could be used. These codes have been added and now we can enjoy the quantum firmware goodness. --- keyboards/infinity60/infinity60.c | 15 +++++++++++++++ keyboards/infinity60/matrix.c | 3 +++ 2 files changed, 18 insertions(+) (limited to 'keyboards') diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c index e471250fe..fdeed5124 100644 --- a/keyboards/infinity60/infinity60.c +++ b/keyboards/infinity60/infinity60.c @@ -15,3 +15,18 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "infinity60.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c index d2f185288..b6ccf86c3 100644 --- a/keyboards/infinity60/matrix.c +++ b/keyboards/infinity60/matrix.c @@ -62,6 +62,8 @@ void matrix_init(void) #endif memset(matrix, 0, MATRIX_ROWS); memset(matrix_debouncing, 0, MATRIX_ROWS); + + matrix_init_quantum(); } uint8_t matrix_scan(void) @@ -146,6 +148,7 @@ uint8_t matrix_scan(void) } debouncing = false; } + matrix_scan_quantum(); return 1; } -- cgit v1.2.3 From 9111cc00f587188c68d3ed0379aae6675ad8d377 Mon Sep 17 00:00:00 2001 From: SjB Date: Tue, 24 Jan 2017 00:24:01 -0500 Subject: updated all the other keymaps to support the new changes. qmk firmware requires the matrix_init_user and matrix_scan_user function to be implementated. Added these function to all the existing keymaps. --- keyboards/infinity60/keymaps/default/keymap.c | 9 +++++++++ keyboards/infinity60/keymaps/depariel/keymap.c | 9 +++++++++ keyboards/infinity60/keymaps/hasu/keymap.c | 10 ++++++++++ 3 files changed, 28 insertions(+) (limited to 'keyboards') diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c index 443412857..8347c94b4 100644 --- a/keyboards/infinity60/keymaps/default/keymap.c +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -46,3 +46,12 @@ const uint16_t fn_actions[] = { }; +// 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) { + +}; diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c index 7412b9b9d..57f9487f2 100755 --- a/keyboards/infinity60/keymaps/depariel/keymap.c +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -80,3 +80,12 @@ const uint16_t PROGMEM fn_actions[] = { }; +// 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) { + +}; diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c index d3728869a..9982078c1 100644 --- a/keyboards/infinity60/keymaps/hasu/keymap.c +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -111,3 +111,13 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t fn_actions[] = { }; + +// 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) { + +}; -- cgit v1.2.3 From 3c32e38036fda17be4ff86235565fe4ac88cba33 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 24 Jan 2017 19:10:35 +0100 Subject: [deadcyclo layout] Added support for ergodox ez shine --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 79741 -> 96046 bytes .../deadcyclo/images/deadcyclo-layer-1-symbols.png | Bin 55349 -> 79904 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 29 ++++++++++++++------- keyboards/ergodox/keymaps/deadcyclo/readme.md | 25 +++++++++++++++--- 4 files changed, 40 insertions(+), 14 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index 4208c5189..a70e37559 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png index ccda70e39..5adb7ac77 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-1-symbols.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index d75c805bf..208f67162 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // left hand LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LCTL, LT(MDIA, 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_RALT,KC_LALT, ALT_T(KC_APP), KC_HOME, @@ -75,11 +75,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | . | 0 | = | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * |Toggle|Animat| | Hue+ | Hue- | * ,------|------|------| |------+------+------. - * | | | | | | | | - * | | |------| |------| DEL | | - * | | | | | | | | + * |Bright|Bright|Solid | | | | | + * |ness- |ness+ |------| |------| DEL | | + * | | | | | EPRM | | | * `--------------------' `--------------------' */ // SYMBOLS @@ -90,18 +90,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, - KC_TRNS,KC_TRNS, - KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS, + RGB_TOG,RGB_MOD, + RGB_SLD, + RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, 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, - KC_TRNS, KC_TRNS, + RGB_HUD, RGB_HUI, KC_TRNS, - KC_TRNS, KC_DEL, KC_TRNS + EPRM, KC_DEL, KC_TRNS ), /* Keymap 2: Media and mouse keys * @@ -254,12 +254,21 @@ void matrix_scan_user(void) { switch (layer) { case 1: ergodox_right_led_1_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0xff,0x00,0x00); + #endif break; case 2: ergodox_right_led_2_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0x00,0xff,0x00); + #endif break; case 3: ergodox_right_led_3_on(); + #ifdef RGBLIGHT_ENABLE + rgblight_setrgb(0x00,0x00,0xff); + #endif break; case 4: ergodox_right_led_1_on(); // TODO: Make a fourth layer diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 809dd6eb5..a937cfceb 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -1,9 +1,11 @@ # ErgoDox EZ 1337 configuration -Custom layout based on the default layout. Intended for interational users of us intl-altgr layout. Note that -some common keys might be missing, as this layout is intented to be used on *nix systems by users familiar -with their system. The layout is geared towards avoiding using the rat (mouse for those of you who are -unfamiliar with tiling window managers) as much as possibly. +Custom layout based on the default layout. Intended for interational +users of us intl-altgr layout. Note that some common keys might be +missing, as this layout is intented to be used on *nix systems by +users familiar with their system. The layout is geared towards +avoiding using the rat (mouse for those of you who are unfamiliar with +tiling window managers) as much as possibly. # Layouts @@ -13,6 +15,19 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo [![Base layer](images/deadcyclo-base-layout.png)](http://www.keyboard-layout-editor.com/#/gists/0321b18620180a3e46c498206eb65366) +The base layer here is marked with the us international alt-gr layout, +including characters bound to what on an iso keyboard would be alt-gr +and on an ansi keyboard right alt. + +Regular (and irregular) modifier keys are marked with a yellowish +gray. Layer moderators are marked with blue, red and green, which are +the same colors each layer displays on the LEDs when active. + +All of the layer switch keys, except for the two center keys marked L1 +TOG, are dual purpose. Hence for example the top left key produces ESC +if tapped, and temporarilly toggles L3 when hold down. The two center +L1 TOG keys toggle L1 on and off for more permanent layer toggling. + ## Layer 1 - Symbols [![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) @@ -29,8 +44,10 @@ All layer images created using [keyboard-layout-editor](http://www.keyboard-layo - 02.01.2017 Added delete key on second layer - 10.01.2017 Added layer images to readme +- 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand # TODO - Add unicode support (direct input and indirect? see algernon layout for examples) - Add descriptions below each layer image of any special functions/keys +- Move Navigation keys to Layer 2 on right side, add a layer switch to L2 on left side as well, and use L3 for unicode stuff -- cgit v1.2.3 From 37ed3d13a4d99c9880f713de497f84efbe937bdf Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Tue, 24 Jan 2017 21:54:34 +0100 Subject: [deadcyclo layout] Added unicode layer --- keyboards/ergodox/keymaps/deadcyclo/Makefile | 1 + .../images/deadcyclo-layer-2-media-and-mouse.png | Bin 50926 -> 62258 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 43551 -> 58407 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 91 +++++++++++++++++---- keyboards/ergodox/keymaps/deadcyclo/readme.md | 33 ++++++-- 5 files changed, 98 insertions(+), 27 deletions(-) create mode 100644 keyboards/ergodox/keymaps/deadcyclo/Makefile (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/Makefile b/keyboards/ergodox/keymaps/deadcyclo/Makefile new file mode 100644 index 000000000..039f07c8e --- /dev/null +++ b/keyboards/ergodox/keymaps/deadcyclo/Makefile @@ -0,0 +1 @@ +UNICODE_ENABLE = yes diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png index 481e63e32..a267ff23d 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-2-media-and-mouse.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index 9ebba6734..6d73495c1 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 208f67162..c14ca6959 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -12,7 +12,10 @@ enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, VRSN, - RGB_SLD + RGB_SLD, + SHRUG, + YAY, + HUG }; // TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) @@ -103,14 +106,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, EPRM, KC_DEL, KC_TRNS ), -/* Keymap 2: Media and mouse keys +/* Keymap 2: Media, mouse and navigation * * ,--------------------------------------------------. ,--------------------------------------------------. * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | + * | | | | MsUp | | | | | | | | Up | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -124,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// MEDIA AND MOUSE +// MEDIA , MOUSE and NAVIGATION [MDIA] = KEYMAP( 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, @@ -135,24 +138,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, 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 ), -/* Keymap 3: Navigation TODO: Printscreen, pg up down, home, end, others? Insert for example +/* Keymap 3: Unicode * * ,--------------------------------------------------. ,--------------------------------------------------. * | | VER | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | up | | | | | | | | | | | | + * | | Shrug| yay | hug | | | | | | ■ | λ | → | ➙ | ▻ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | left | down | right| |------| |------| | | | | | | + * | | | | | | |------| |------| | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -166,11 +169,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | * `--------------------' `--------------------' */ -// NAVIGATION +// Unicode [NAVG] = KEYMAP( KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, + KC_TRNS, SHRUG, YAY, HUG, 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, @@ -178,7 +181,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -192,6 +195,25 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; +static void ang_tap (uint16_t code, ...) { + uint16_t kc = code; + va_list ap; + + va_start(ap, code); + + do { + register_code16(kc); + unregister_code16(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); +} + +#define TAP_ONCE(code) \ + register_code (code); \ + unregister_code (code) + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -233,13 +255,46 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case SHRUG: + if (record->event.pressed) { + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + TAP_ONCE (KC_BSLS); + register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); + TAP_ONCE (KC_SLSH); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + } + return false; + break; + case YAY: + if (record->event.pressed) { + ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); + } + return false; + break; + case HUG: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + } + return false; + break; } return true; } // Runs just one time when the keyboard initializes. void matrix_init_user(void) { - + set_unicode_input_mode(UC_LNX); }; // Runs constantly in the background, in a loop. diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index a937cfceb..5426057e9 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -28,26 +28,41 @@ TOG, are dual purpose. Hence for example the top left key produces ESC if tapped, and temporarilly toggles L3 when hold down. The two center L1 TOG keys toggle L1 on and off for more permanent layer toggling. -## Layer 1 - Symbols +## Layer 1 - Symbols and RGB -[![Layer 1 - Symbols](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) +[![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) -## Layer 2 - Media and Mouse +The Symbols and RGB layer contains function keys, commonly used +symbols, a numpad and if you have the new Ergodox Ez shine keys for +controlling various RGB-led functions. In addition, it provides an up +and a down key for easy scrolling. RGB controller keys are yellow. -[![Layer 2 - Media and Mouse](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) +## Layer 2 - Media, Mouse and Navigation -## Layer 3 - Navigation +[![Layer 2 - Media, Mouse and Navigation](images/deadcyclo-layer-2-media-and-mouse.png)](http://www.keyboard-layout-editor.com/#/gists/824759486e378bcec30784309a7e5731) -[![Layer 3 - Navigation](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) +The Media, Mouse and unicode layer contains special keys for moving +the mouse and clicking on it with the keyboard. In addition it +provides standard media control keys, and default arrow keys. + +## Layer 3 - Unicode + +[![Layer 3 - Unicode](images/deadcyclo-layer-3-navigation.png)](http://www.keyboard-layout-editor.com/#/gists/67d9613dcd873c68693d11863d0fd289) + +The unicode layer provides keys for directly typing unicode (utf-8) # Changelog - 02.01.2017 Added delete key on second layer - 10.01.2017 Added layer images to readme - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand +- 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 # TODO -- Add unicode support (direct input and indirect? see algernon layout for examples) -- Add descriptions below each layer image of any special functions/keys -- Move Navigation keys to Layer 2 on right side, add a layer switch to L2 on left side as well, and use L3 for unicode stuff +- Add support for unicode by name? (See algernon layout for example) +- Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) +- Make macros for gnu screen and i3wm +- Look into the app launch macros in algernon keymap +- Make other smileys like shrug and yay ¯\_(ツ)_/¯ and \o/ and others (see amon others [http://dongerlist.com](http://dongerlist.com) + -- cgit v1.2.3 From b3cf96ec2e0fee322ac6314730fa6e3e43d76cb2 Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:25:17 -0500 Subject: Add smt keymap for Preonic --- keyboards/preonic/keymaps/smt/Makefile | 3 + keyboards/preonic/keymaps/smt/keymap.c | 248 ++++++++++++++++++++++++++++++++ keyboards/preonic/keymaps/smt/readme.md | 1 + 3 files changed, 252 insertions(+) create mode 100644 keyboards/preonic/keymaps/smt/Makefile create mode 100644 keyboards/preonic/keymaps/smt/keymap.c create mode 100644 keyboards/preonic/keymaps/smt/readme.md (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/smt/Makefile b/keyboards/preonic/keymaps/smt/Makefile new file mode 100644 index 000000000..3d4659ceb --- /dev/null +++ b/keyboards/preonic/keymaps/smt/Makefile @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c new file mode 100644 index 000000000..4ef22bb97 --- /dev/null +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -0,0 +1,248 @@ +#include "preonic.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DVORAK 0 +#define _QWERTY 1 +#define _LOWER 2 +#define _RAISE 3 +#define _ADJUST 16 + +enum preonic_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_T(KC_ENT)}, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL}, + {_______, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL}, + {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_4, KC_5, KC_6, KC_HOME, KC_PGUP}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_1, KC_2, KC_3, KC_END, KC_PGDN}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, + {_______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE}, + {_______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Dvorak|Qwerty| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12}, + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, DVORAK, QWERTY, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE +float tone_startup[][2] = { + {NOTE_B5, 20}, + {NOTE_B6, 8}, + {NOTE_DS6, 20}, + {NOTE_B6, 8} +}; + +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); + +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + 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; + break; + 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; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +}; + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md new file mode 100644 index 000000000..e911968dd --- /dev/null +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -0,0 +1 @@ +# The default Preonic layout - largely based on the Planck's \ No newline at end of file -- cgit v1.2.3 From 51fe4f0d3429387ee512c22c5c1daffe63e2db9a Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 00:55:40 -0500 Subject: Update readme for smt Preonic keymap --- keyboards/preonic/keymaps/smt/readme.md | 86 ++++++++++++++++++++++++++++++++- 1 file changed, 85 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index e911968dd..b2052b37c 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -1 +1,85 @@ -# The default Preonic layout - largely based on the Planck's \ No newline at end of file +# smt's Preonic keymap + +This keymap is primarily based on the default Preonic keymap, which in turn is derived from Planck's default. + +Notable differences from the default are: + +1. **Dvorak by default** + + I happen to type in Dvorak, and prefer that layer to be the default on my keyboard. This is easy enough to switch around with Qwerty, Colemak, or whatever. + +2. **Right Shift** + + I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. + + Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + +## Dvorak (default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | " | , | . | P | Y | F | G | C | R | L | / | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | O | E | U | I | D | H | T | N | S | - | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Qwerty (same as default) + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Tab | Q | W | E | R | T | Y | U | I | O | P | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Esc | A | S | D | F | G | H | J | K | L | ; | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | N | M | , | . | / |Enter | +|------+------+------+------+------+------+------+------+------+------+------+------| +| Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | +`-----------------------------------------------------------------------------------' +``` + +## Lower + +This is where I put the number row, a numpad cluster, function keys, and some light navigation via Home/End/PageUp/PageDn. Like the "Raise" layer, the top row is redundant to help with Planck compatibility. + +``` +,-----------------------------------------------------------------------------------. +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+------+------+------+------+------+------+------| +| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | F1 | F2 | F3 | F4 | F5 | F6 | 4 | 5 | 6 | Home |PageUp| +|------+------+------+------+------+------|------+------+------+------+------+------| +| | F7 | F8 | F9 | F10 | F11 | F12 | 1 | 2 | 3 | End |PageDn| +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` + +## Raise + +As a developer, it makes the most sense for me to group all the commonly-used symbols that don't fit on the main layer. In particular, having the dual-column of parens-braces-brackets really helps a lot. + +I haven't completely filled this layer, which leaves room for future mappings and macros. + +``` +,-----------------------------------------------------------------------------------. +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | | _ | + | { | } | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | - | = | [ | ] | \ | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | Next | Vol- | Vol+ | Play | +`-----------------------------------------------------------------------------------' +``` -- cgit v1.2.3 From 8af48194f211ed30910e5fc4f7abc3195a5fb16f Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Wed, 25 Jan 2017 15:16:38 +0100 Subject: [deadcyclo layout] Added lotsof new emojis and some new unicode keys --- .../images/deadcyclo-layer-3-navigation.png | Bin 58407 -> 55517 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 188 +++++++++++++++++++-- keyboards/ergodox/keymaps/deadcyclo/readme.md | 1 + 3 files changed, 178 insertions(+), 11 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index 6d73495c1..e60c3e59e 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index c14ca6959..7578c723d 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -15,7 +15,22 @@ enum custom_keycodes { RGB_SLD, SHRUG, YAY, - HUG + HUG, + SMILE, + SMILE2, + HMM1, + HMM2, + BEAR1, + BEAR2, + FUU, + EGGY1, + EGGY2, + FACE1, + FACE2, + UHU, + SMRK1, + SMRK2, + LOVE }; // TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) @@ -153,13 +168,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,--------------------------------------------------. ,--------------------------------------------------. * | | VER | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | Shrug| yay | hug | | | | | | ■ | λ | → | ➙ | ▻ | | + * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | |------| |------| | | | | | | + * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | | | | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | | | | | + * | | smrk1| smrk2| love | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -172,18 +187,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Unicode [NAVG] = KEYMAP( KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, SHRUG, YAY, HUG, 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, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, + KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, + KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, + KC_TRNS, SMRK1, SMRK2, LOVE, KC_TRNS, 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, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, + UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), KC_TRNS, + KC_TRNS, UC(0x2764), KC_TRNS, KC_MPRV, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -288,6 +303,157 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case SMILE: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + } + return false; + break; + case SMILE2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case HMM1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + } + return false; + break; + case HMM2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case BEAR1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0295); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0294); unicode_input_finish(); + } + return false; + break; + case BEAR2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FUU: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + } + return false; + break; + case EGGY1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0xff09); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + } + return false; + break; + case EGGY2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0020); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FACE1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case FACE2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case UHU: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + } + return false; + break; + case SMRK1: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + } + return false; + break; + case SMRK2: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + } + return false; + break; + case LOVE: + if (record->event.pressed) { + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + } + return false; + break; } return true; } diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 5426057e9..2ca5e822c 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -57,6 +57,7 @@ The unicode layer provides keys for directly typing unicode (utf-8) - 10.01.2017 Added layer images to readme - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 +- 25.01.2017 Added lots of new emojis and some unicode keys # TODO -- cgit v1.2.3 From 938422ce9901b7e15c738d6abaa78e0076ebdc84 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Wed, 25 Jan 2017 10:02:01 -0500 Subject: layer defines to enum --- keyboards/planck/keymaps/default/keymap.c | 17 ++++++++++------- keyboards/preonic/keymaps/default/keymap.c | 15 +++++++++------ 2 files changed, 19 insertions(+), 13 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/default/keymap.c b/keyboards/planck/keymaps/default/keymap.c index ddbe4d7b2..1b1b998b2 100644 --- a/keyboards/planck/keymaps/default/keymap.c +++ b/keyboards/planck/keymaps/default/keymap.c @@ -14,13 +14,16 @@ extern keymap_config_t keymap_config; // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _PLOVER 5 -#define _ADJUST 16 + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST +}; enum planck_keycodes { QWERTY = SAFE_RANGE, diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 78b4997a8..3313af945 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -9,12 +9,15 @@ // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 + +enum preonic_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; enum preonic_keycodes { QWERTY = SAFE_RANGE, -- cgit v1.2.3 From 6546dddddb883b76243fd4088a5c7b38bd050c0d Mon Sep 17 00:00:00 2001 From: Stephen Tudor Date: Wed, 25 Jan 2017 10:57:42 -0500 Subject: Remove COLEMAK from preonic_keycodes enum --- keyboards/preonic/keymaps/smt/keymap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/smt/keymap.c b/keyboards/preonic/keymaps/smt/keymap.c index 4ef22bb97..5465d543a 100644 --- a/keyboards/preonic/keymaps/smt/keymap.c +++ b/keyboards/preonic/keymaps/smt/keymap.c @@ -18,7 +18,6 @@ enum preonic_keycodes { DVORAK = SAFE_RANGE, QWERTY, - COLEMAK, LOWER, RAISE, BACKLIT -- cgit v1.2.3 From c9ca36800884f63cf67d55565824bad0cb6d9be3 Mon Sep 17 00:00:00 2001 From: Jack Humbert Date: Thu, 26 Jan 2017 01:52:43 -0500 Subject: replace jackhumbert with qmk --- keyboards/atreus/readme.md | 2 +- keyboards/ergodox/keymaps/ab/readme.md | 2 +- keyboards/ergodox/keymaps/algernon/readme.md | 4 ++-- keyboards/ergodox/keymaps/german-kinergo/readme.md | 2 +- keyboards/ergodox/keymaps/mclennon_osx/README.md | 2 +- keyboards/ergodox/keymaps/pvinis/Readme.md | 2 +- keyboards/ergodox/keymaps/supercoder/readme.md | 2 +- keyboards/ergodox/keymaps/win10_writers-block/readme.md | 2 +- keyboards/ergodox/readme.md | 2 +- keyboards/hhkb/readme.md | 2 +- keyboards/preonic/keymaps/smt/readme.md | 2 +- keyboards/s60-x/readme.md | 2 +- 12 files changed, 13 insertions(+), 13 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 8baa581f0..476d1bce3 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -88,7 +88,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/ergodox/keymaps/ab/readme.md b/keyboards/ergodox/keymaps/ab/readme.md index 6b1ac2be3..62e08e162 100644 --- a/keyboards/ergodox/keymaps/ab/readme.md +++ b/keyboards/ergodox/keymaps/ab/readme.md @@ -8,7 +8,7 @@ Beginner's keymap emulates standard QWERTY keyboard for beginners. Once you get * Easy on beginners. It has everything you need for your day to day usage. #### Cons -* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/jackhumbert/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) +* Keys are not ergonomically placed to take full advantage of Ergodox-EZ. Take a look at this [Default Keymap](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ergodox_ez/keymaps/default/readme.md) * While multiple layers are possible, beginner's keymap only uses one additional layer for mouse, function and volume keys. #### Notes diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 015bd7cd3..3783eadf1 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -121,10 +121,10 @@ There is a very small tool in `tools/layer-notify`, that listens to the HID cons To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: [algernon:ez-layout]: https://github.com/algernon/ergodox-layout - [qmk]: https://github.com/jackhumbert/qmk_firmware + [qmk]: https://github.com/qmk/qmk_firmware ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware $ git clone https://github.com/algernon/ergodox-layout.git \ keyboards/ergodox/keymaps/algernon-master diff --git a/keyboards/ergodox/keymaps/german-kinergo/readme.md b/keyboards/ergodox/keymaps/german-kinergo/readme.md index 557d85a8a..beb74cf75 100644 --- a/keyboards/ergodox/keymaps/german-kinergo/readme.md +++ b/keyboards/ergodox/keymaps/german-kinergo/readme.md @@ -2,7 +2,7 @@ This layout is inspired by the "kinesis-qwerty-mod" from benblazak's [ergodox-firmware](https://github.com/benblazak/ergodox-firmware), as well as by the "german" layout from the -[qmk_firmware](https://github.com/jackhumbert/qmk_firmware). +[qmk_firmware](https://github.com/qmk/qmk_firmware). The goal was to have a layout that is pretty close to an ordinary German keyboard, so I don't have to make adjustments on the operating system level and I keep some of the muscle memory to use a regular keyboard. diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/keyboards/ergodox/keymaps/mclennon_osx/README.md index 60980d043..28cdb7c10 100644 --- a/keyboards/ergodox/keymaps/mclennon_osx/README.md +++ b/keyboards/ergodox/keymaps/mclennon_osx/README.md @@ -2,4 +2,4 @@ This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock. -If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/). +If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/qmk/qmk_firmware/). diff --git a/keyboards/ergodox/keymaps/pvinis/Readme.md b/keyboards/ergodox/keymaps/pvinis/Readme.md index 2a4a0c8f3..af2721054 100644 --- a/keyboards/ergodox/keymaps/pvinis/Readme.md +++ b/keyboards/ergodox/keymaps/pvinis/Readme.md @@ -59,7 +59,7 @@ I have two commented out layers that are just templates, so I can easily create # Building ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox/keymaps/pvinis $ make ``` diff --git a/keyboards/ergodox/keymaps/supercoder/readme.md b/keyboards/ergodox/keymaps/supercoder/readme.md index 8ef96eddf..df39ac7a9 100644 --- a/keyboards/ergodox/keymaps/supercoder/readme.md +++ b/keyboards/ergodox/keymaps/supercoder/readme.md @@ -22,7 +22,7 @@ your own: [hex]: https://raw.githubusercontent.com/algernon/ergodox-supercoder/master/supercoder.hex ``` -$ git clone https://github.com/jackhumbert/qmk_firmware.git +$ git clone https://github.com/qmk/qmk_firmware.git $ cd qmk_firmware/keyboards/ergodox $ git clone https://github.com/algernon/ergodox-supercoder.git keymaps/supercoder $ make KEYMAP=supercoder diff --git a/keyboards/ergodox/keymaps/win10_writers-block/readme.md b/keyboards/ergodox/keymaps/win10_writers-block/readme.md index e51e3c48f..83f91bce2 100644 --- a/keyboards/ergodox/keymaps/win10_writers-block/readme.md +++ b/keyboards/ergodox/keymaps/win10_writers-block/readme.md @@ -90,7 +90,7 @@ Your LEDs will change to indicate your layer. You'll know you are in the base la To build, you will need the [QMK][qmk] firmware checked out. from there, dive into `keyboards/ergodox/keymaps/win10_writers-block/` -[qmk]: https://github.com/jackhumbert/qmk_firmware +[qmk]: https://github.com/qmk/qmk_firmware ``` $ make keyboard=ergodox keymap=win10_writers-block diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index ca3eeba59..45b3354c1 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -25,7 +25,7 @@ If none of the existing keymaps suit you, you can create your own custom keymap. This will require some experience with coding. Follow these steps to customize a keymap: - - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) + - Read the [qmk firmware README](https://github.com/qmk/qmk_firmware) from top to bottom. Then come back here. :) - Clone the qmk_firmware repository diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index 367c0a08f..ee7d11121 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -82,7 +82,7 @@ We've added shortcuts to make common modifier/tap (mod-tap) mappings more compac ### Remember: These are just aliases -These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/jackhumbert/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). +These functions work the same way that their `ACTION_*` functions do - they're just quick aliases. To dig into all of the tmk ACTION_* functions, please see the [TMK documentation](https://github.com/qmk/qmk_firmware/blob/master/tmk_core/doc/keymap.md#2-action). Instead of using `FNx` when defining `ACTION_*` functions, you can use `F(x)` - the benefit here is being able to use more than 32 function actions (up to 4096), if you happen to need them. diff --git a/keyboards/preonic/keymaps/smt/readme.md b/keyboards/preonic/keymaps/smt/readme.md index b2052b37c..2dcc1927f 100644 --- a/keyboards/preonic/keymaps/smt/readme.md +++ b/keyboards/preonic/keymaps/smt/readme.md @@ -12,7 +12,7 @@ Notable differences from the default are: I use both the left and right shift keys when I type. When I want to modify a key with shift, I hold shift with the hand opposite the one typing the key. In the default keymap, Enter is where shift would be on a standard keyboard layout. Oh, muscle memory. - Thankfully, QMK supports [mod-tap](https://github.com/jackhumbert/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! + Thankfully, QMK supports [mod-tap](https://github.com/qmk/qmk_firmware/wiki#fun-with-modifier-keys) keys, and this allows me to set the Enter key to send a modifier (MOD_LSFT) when held, and KC_ENT when tapped. Awesome! ## Dvorak (default) diff --git a/keyboards/s60-x/readme.md b/keyboards/s60-x/readme.md index 94ce82922..408ad13ac 100644 --- a/keyboards/s60-x/readme.md +++ b/keyboards/s60-x/readme.md @@ -13,7 +13,7 @@ You only need to flash them onto your keyboard, which is explained below, there' ## Flashing your keyboard The recommended programs for flashing your keyboard are [Atmel FLIP](http://www.atmel.com/tools/FLIP.aspx) (Windows) and [dfu-programmer](http://dfu-programmer.sourceforge.net/) (Linux/Windows). -[QMK Firmware Flasher](https://github.com/jackhumbert/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. +[QMK Firmware Flasher](https://github.com/qmk/qmk_firmware_flasher/releases) may work, as the S60-X keyboard uses the ATMega32U4 microcontroller, but it is untested. Use at your own risk. [Easy AVR USB Keyboard Firmware](https://deskthority.net/wiki/Easy_AVR_USB_Keyboard_Firmware) also supports S60-X, but it is completely unrelated to TMK firmware. Use at your own risk. -- cgit v1.2.3 From fffe76a7b7e3a1da58fb8e948b33df1fd9cdbf63 Mon Sep 17 00:00:00 2001 From: Albert Pretorius Date: Thu, 26 Jan 2017 20:07:47 +0000 Subject: albert ergodox keymap --- keyboards/ergodox/keymaps/albert/Makefile | 5 + keyboards/ergodox/keymaps/albert/config.h | 12 + keyboards/ergodox/keymaps/albert/keymap.c | 661 +++++++++++++++++++++++++++++ keyboards/ergodox/keymaps/albert/readme.md | 188 ++++++++ 4 files changed, 866 insertions(+) create mode 100644 keyboards/ergodox/keymaps/albert/Makefile create mode 100644 keyboards/ergodox/keymaps/albert/config.h create mode 100644 keyboards/ergodox/keymaps/albert/keymap.c create mode 100644 keyboards/ergodox/keymaps/albert/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/albert/Makefile b/keyboards/ergodox/keymaps/albert/Makefile new file mode 100644 index 000000000..eb8544afe --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/Makefile @@ -0,0 +1,5 @@ +COMMAND_ENABLE = no # Commands for debug and configuration + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergodox/keymaps/albert/config.h b/keyboards/ergodox/keymaps/albert/config.h new file mode 100644 index 000000000..e6d363117 --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/config.h @@ -0,0 +1,12 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* using UK layout for space-cadet-shift */ +#define LSPO_KEY KC_9 +#define RSPC_KEY KC_0 + +#define LEADER_TIMEOUT 800 // leader key sequence timeout in millis + +#endif diff --git a/keyboards/ergodox/keymaps/albert/keymap.c b/keyboards/ergodox/keymaps/albert/keymap.c new file mode 100644 index 000000000..dfbb311bd --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/keymap.c @@ -0,0 +1,661 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#include + +/* use UK keymap */ + +#define UK_HASH KC_NONUS_HASH +#define UK_BSLS KC_NONUS_BSLASH +#define UK_PIPE LSFT(UK_BSLS) + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define NUMB 2 // numbers and hex +#define CRSR 3 // cursor keys +#define MOUS 4 // mouse keys +#define KEYW 5 // keyword macros +#define EMAC 6 // emacs + +// my macros +#define UM_ECET M(0) // { } +#define UM_0x M(1) +#define UM_PUB M(2) +#define UM_PRO M(3) +#define UM_PRV M(4) +#define UM_CLS M(5) +#define UM_STR M(6) +#define UM_RET M(7) +#define UM_INC M(8) +#define UM_OBJ M(9) +#define UM_GITLOG M(10) +#define UM_GOODM M(11) +#define UM_NAMESP M(12) +#define UM_EMTR M(14) // emacs toggle read-only +#define UM_EMWR M(15) // emacs write buffer (save) +#define UM_EMUN M(16) // emacs undo +#define UM_EMRE M(17) // emacs redo +#define UM_EMPB M(18) // emacs previous buffer +#define UM_EMNB M(19) // emacs next buffer +#define UM_GOODN M(20) +#define UM_ECETS M(22) // { }; +#define UM_TMPL M(23) +#define UM_TYPN M(24) +#define UM_CONT M(25) +#define UM_BREAK M(26) +#define UM_CONST M(27) +#define UM_SMILY M(28) +#define UM_SADF M(29) +#define UM_SCARF M(30) +#define UM_DECAF M(31) +#define UM_OPER M(32) +#define UM_NULP M(33) +#define UM_EXTR M(34) +#define UM_VIRT M(35) +#define UM_EMFB M(36) // emacs font bigger +#define UM_EMFS M(37) // emacs font smaller +#define UM_VOLAT M(38) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Base layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2| + * |--------+------+------+------+------+------| L6 | | L6 |------+------+------+------+------+--------| + * | LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | L2 | lead | | lead | Ins | + * ,------|------|------| |------+------+------. + * | Space| BkSp | Home | | PgUp | Enter|Space | + * | / | / |------| |------| / | / | + * | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl | + * `--------------------' `--------------------' + */ +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, LSFT(KC_LEFT), + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(SYMB), + LT(NUMB, KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSPO, KC_Z, KC_X, KC_C, LT(CRSR, KC_V), LT(MOUS, KC_B), MO(EMAC), + CTL_T(KC_LBRC), ALT_T(KC_RBRC), UK_HASH, KC_LEFT, KC_RGHT, + TG(NUMB), KC_LEAD, + KC_HOME, + CTL_T(KC_SPC), ALT_T(KC_BSPC), LT(KEYW, KC_END), + // right hand + LSFT(KC_RGHT), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DELT, + KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(NUMB, KC_ENT), + MO(EMAC), LT(MOUS, KC_N), LT(CRSR, KC_M), KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_UP, KC_DOWN, KC_MINS, ALT_T(KC_LBRC), CTL_T(KC_RBRC), + KC_LEAD, KC_INS, + KC_PGUP, + LT(KEYW, KC_PGDN), ALT_T(KC_ENT), CTL_T(KC_SPC) + ), +/* Keymap 1: Symbol Layer with F keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## | + * |--------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ## | ## | | ## | ## | + * ,------|------|------| |------+------+------. + * | | | ## | | ## | | | + * | ## | ## |------| |------| ## | ## | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[SYMB] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_EXLM, LSFT(KC_2), LSFT(KC_3), LSFT(KC_4), LSFT(KC_5), KC_TRNS, + KC_TRNS, LSFT(KC_6), LSFT(KC_7), LSFT(KC_8), LSFT(KC_MINS), UK_HASH, + KC_TRNS, UK_BSLS, UK_PIPE, KC_GRV, KC_MINS, KC_SLSH, 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 + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_MINS, KC_PLUS, KC_EQL, LSFT(KC_QUOT), LSFT(UK_HASH), KC_F12, + KC_LCBR, KC_RCBR, KC_SCLN, KC_QUOT, UK_HASH, KC_TRNS, + KC_TRNS, KC_LBRC, KC_RBRC, LSFT(KC_COMM), LSFT(KC_DOT), LSFT(KC_SLSH), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 2: Numerics and hex + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## | + * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | = | + | 0 | , | . | | 0 | , | . | + | = | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | ## | ## | | ## | ## | + * ,------|------|------| |------+------+------. + * | | | ## | | ## | | | + * | ## | ## |------| |------| ## | ## | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[NUMB] = KEYMAP( + // left hand + KC_TRNS, KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, + KC_TRNS, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, UM_0x, + KC_TRNS, KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, + KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS, + KC_EQL, KC_PLUS, KC_0, KC_COMM, KC_DOT, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + KC_A, KC_B, KC_C, KC_D, KC_E, KC_F, KC_TRNS, + UM_0x, KC_ASTR, KC_7, KC_8, KC_9, KC_ASTR, KC_TRNS, + KC_SLSH, KC_4, KC_5, KC_6, KC_SLSH, KC_TRNS, + KC_TRNS, KC_MINS, KC_1, KC_2, KC_3, KC_MINS, KC_TRNS, + KC_0, KC_COMM, KC_DOT, KC_PLUS, KC_EQL, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Keymap 3: Cursor movement + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | Left | Down | Right| | | | | | Left | Down | Right| + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | ## | ## |------| |------| ## | ## | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[CRSR] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_HOME, KC_NO, KC_UP, KC_NO, KC_PGUP, KC_NO, + KC_NO, KC_END, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, + KC_TRNS, KC_UP, KC_NO, KC_DOWN, KC_TRNS, KC_NO, KC_NO, + KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_TRNS, KC_TRNS, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_PGUP, KC_NO, KC_UP, KC_NO, KC_HOME, KC_NO, + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_NO, + KC_NO, KC_NO, KC_TRNS, KC_DOWN, KC_NO, KC_UP, KC_TRNS, + KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_TRNS, KC_TRNS + ), +/* Keymap 4: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[MOUS] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO, + KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, + KC_BTN1, KC_MS_U, KC_BTN2, KC_MS_D, KC_NO, KC_TRNS, KC_NO, + KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO, + // right hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_BTN1, KC_MS_U, KC_BTN2, KC_NO, KC_NO, + KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_NO, + KC_NO, KC_TRNS, KC_NO, KC_MS_D, KC_BTN1, KC_MS_U, KC_BTN2, + KC_NO, KC_NO, KC_MS_L, KC_MS_D, KC_MS_R, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO + ), +/* Keymap 5: Keywords + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | scarf| sadf | smily| | | | decaf| | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | str | obj | | gitl |------| |------| | | | nulp | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | inc | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | ecet | ecets| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | ## | | ## | | | + * `--------------------' `--------------------' + */ +[KEYW] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, UM_SCARF, UM_SADF, UM_SMILY, KC_NO, + KC_NO, UM_CONST, UM_VOLAT, UM_OPER, UM_RET, UM_TMPL, KC_NO, + KC_NO, KC_NO, UM_STR, UM_OBJ, KC_NO, UM_GITLOG, + KC_NO, KC_NO, UM_EXTR, UM_CLS, UM_VIRT, UM_BREAK, KC_NO, + KC_NO, KC_NO, UM_INC, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_TRNS, + // right hand + KC_NO, UM_DECAF, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, UM_TYPN, UM_CONT, UM_PRV, UM_PRO, UM_PUB, KC_NO, + KC_NO, KC_NO, KC_NO, UM_NULP, KC_NO, KC_NO, + KC_NO, UM_NAMESP, UM_GOODM, UM_GOODN, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + UM_ECET, UM_ECETS, + KC_NO, + KC_TRNS, KC_NO, KC_NO + ), +/* Keymap 6: emacs + * + * ,---------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | empb | | emnb | emfs | emfb | | | | | + * |---------+------+------+------+------+------+------| |------+------+------+------+------+------+--------| + * | | emtr | | | | | | | | emun | emre | w-up | | | | + * |---------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | emwr | | | |------| |------| |w-left|w-down|w-rght| | | + * |---------+------+------+------+------+------| ## | | ## |------+------+------+------+------+--------| + * | | | | | | | | | | | |w-down| | | | + * `---------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `-----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[EMAC] = KEYMAP( + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UM_EMPB, + KC_NO, UM_EMTR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, UM_EMWR, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, + KC_NO, + KC_NO, KC_NO, KC_NO, + // right hand + UM_EMNB, UM_EMFS, UM_EMFB, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, UM_EMUN, UM_EMRE, LSFT(KC_UP), KC_NO, KC_NO, KC_NO, + KC_NO, LSFT(KC_LEFT), LSFT(KC_DOWN), LSFT(KC_RGHT), KC_NO, KC_NO, + KC_TRNS, KC_NO, KC_NO, LSFT(KC_DOWN), 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 + ), +}; + +enum next_key_down_up { + NK_DOWN_UP, + NK_DOWN, + NK_UP // a bit of a hack, this works as long as NK_UP < KC_A +}; + +void send_keystrokes(uint8_t key, ...) +{ + va_list vl; + va_start(vl, key); + enum next_key_down_up nkdu = NK_DOWN_UP; + while (key != KC_NO) { + if (key < KC_A) { + nkdu = key; + } else { + switch (nkdu) { + case NK_DOWN_UP: + register_code(key); + case NK_UP: + unregister_code(key); + break; + case NK_DOWN: + register_code(key); + } + nkdu = NK_DOWN_UP; + } + key = va_arg(vl, int); + } + va_end(vl); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + switch(id) { + case 0: // { } + if (record->event.pressed) { + return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(UP), + T(TAB), END); + } + break; + case 1: + if (record->event.pressed) { + return MACRO(T(0), T(X), END); + } + break; + case 2: + if (record->event.pressed) { + SEND_STRING("public"); + } + break; + case 3: + if (record->event.pressed) { + SEND_STRING("protected"); + } + break; + case 4: + if (record->event.pressed) { + SEND_STRING("private"); + } + break; + case 5: // class + if (record->event.pressed) { + return MACRO(T(C), T(L), T(A), T(S), T(S), T(ENT), + D(LSFT), T(LBRC), U(LSFT), T(ENT), + T(P), T(U), T(B), T(L), T(I), T(C), + D(LSFT), T(SCLN), U(LSFT), T(ENT), T(ENT), + T(P), T(R), T(I), T(V), T(A), T(T), T(E), + D(LSFT), T(SCLN), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT), + T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), T(UP), + T(END), T(SPC), END); + } + break; + case 6: // struct + if (record->event.pressed) { + return MACRO(T(S), T(T), T(R), T(U), T(C), T(T), T(ENT), + D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(ENT), + T(UP), T(UP), T(UP), T(UP), + T(END), T(SPC), END); + } + break; + case 7: + if (record->event.pressed) { + SEND_STRING("return"); + } + break; + case 8: // #include + if (record->event.pressed) { + return MACRO(T(NONUS_HASH), T(I), T(N), T(C), T(L), T(U), T(D), T(E), END); + } + break; + case 9: + if (record->event.pressed) { + SEND_STRING("objdump -CT -x -d"); + } + break; + case 10: + if (record->event.pressed) { + SEND_STRING("git log --oneline --graph --decorate=short"); + } + break; + case 11: + if (record->event.pressed) { + SEND_STRING("good morning"); + } + break; + case 12: + if (record->event.pressed) { + SEND_STRING("namespace"); + } + break; + case 14: // emacs toggle read-only + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(Q), U(LCTL), END); + } + break; + case 15: // emacs write buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(S), U(LCTL), END); + } + break; + case 16: // emacs undo + if (record->event.pressed) { + return MACRO(D(LCTL), D(LSFT), T(MINS), U(LSFT), U(LCTL), END); + } + break; + case 17: // emacs redo + if (record->event.pressed) { + return MACRO(D(LALT), D(LSFT), T(MINS), U(LSFT), U(LALT), END); + } + break; + case 18: // emacs previous buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), U(LCTL), T(LEFT), END); + } + break; + case 19: // emacs next buffer + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), U(LCTL), T(RGHT), END); + } + break; + case 20: + if (record->event.pressed) { + SEND_STRING("good night"); + } + break; + case 22: // { }; + if (record->event.pressed) { + return MACRO(T(ENT), D(LSFT), T(LBRC), U(LSFT), T(ENT), + D(LSFT), T(RBRC), U(LSFT), T(SCLN), T(UP), + T(TAB), END); + } + break; + case 23: + if (record->event.pressed) { + SEND_STRING("template"); + } + break; + case 24: + if (record->event.pressed) { + SEND_STRING("typename"); + } + break; + case 25: + if (record->event.pressed) { + SEND_STRING("continue"); + return MACRO(T(SCLN), END); + } + break; + case 26: + if (record->event.pressed) { + SEND_STRING("break"); + return MACRO(T(SCLN), END); + } + break; + case 27: + if (record->event.pressed) { + SEND_STRING("const"); + } + break; + case 28: + if (record->event.pressed) { + SEND_STRING(":-)"); + } + break; + case 29: + if (record->event.pressed) { + SEND_STRING(":-("); + } + break; + case 30: // dazed + if (record->event.pressed) { + send_keystrokes(NK_DOWN, KC_LSFT, KC_8, KC_MINS, KC_8, NK_UP, KC_LSFT, KC_NO); + } + break; + case 31: // decaf + if (record->event.pressed) { + send_keystrokes(NK_DOWN, KC_LSFT, KC_C, KC_9, KC_MINS, KC_0, NK_UP, KC_LSFT, KC_NO); + } + break; + case 32: + if (record->event.pressed) { + SEND_STRING("operator"); + } + break; + case 33: + if (record->event.pressed) { + SEND_STRING("nullptr"); + } + break; + case 34: + if (record->event.pressed) { + SEND_STRING("extern"); + } + break; + case 35: + if (record->event.pressed) { + SEND_STRING("virtual"); + } + break; + case 36: // emacs font smaller + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(EQL), U(LCTL), END); + } + break; + case 37: // emacs font bigger + if (record->event.pressed) { + return MACRO(D(LCTL), T(X), T(MINS), U(LCTL), END); + } + break; + case 38: + if (record->event.pressed) { + SEND_STRING("volatile"); + } + break; + } + return MACRO_NONE; +} + +LEADER_EXTERNS(); + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + LEADER_DICTIONARY() { + leading = false; + leader_end(); + + SEQ_TWO_KEYS(KC_G, KC_A) { + SEND_STRING("git add ."); + } + SEQ_TWO_KEYS(KC_G, KC_D) { + SEND_STRING("git diff"); + } + SEQ_THREE_KEYS(KC_G, KC_D, KC_S) { + SEND_STRING("git diff --staged"); + } + SEQ_TWO_KEYS(KC_G, KC_L) { + SEND_STRING("git log"); + } + SEQ_THREE_KEYS(KC_G, KC_L, KC_O) { + SEND_STRING("git log --oneline"); + } + SEQ_TWO_KEYS(KC_G, KC_F) { + SEND_STRING("git fetch"); + } + SEQ_TWO_KEYS(KC_G, KC_O) { + SEND_STRING("git checkout"); + } + SEQ_TWO_KEYS(KC_G, KC_P) { + SEND_STRING("git pull"); + } + SEQ_TWO_KEYS(KC_G, KC_S) { + SEND_STRING("git status"); + } + SEQ_TWO_KEYS(KC_G, KC_C) { + SEND_STRING("git commit -m ''"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_THREE_KEYS(KC_G, KC_C, KC_A) { + SEND_STRING("git commit --amend"); + } + + SEQ_TWO_KEYS(KC_C, KC_C) { + SEND_STRING("const_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_D) { + SEND_STRING("dynamic_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_R) { + SEND_STRING("reinterpret_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + SEQ_TWO_KEYS(KC_C, KC_S) { + SEND_STRING("static_cast<>"); + send_keystrokes(KC_LEFT, KC_NO); + } + + SEQ_ONE_KEY(KC_SLSH) { + send_keystrokes(KC_SLSH, NK_DOWN, KC_LSFT, KC_8, KC_8, NK_UP, KC_LSFT, KC_ENT, + NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_ENT, + NK_DOWN, KC_LSFT, KC_8, NK_UP, KC_LSFT, KC_SLSH, KC_UP, KC_END, KC_SPC, + KC_NO); + } + } +} diff --git a/keyboards/ergodox/keymaps/albert/readme.md b/keyboards/ergodox/keymaps/albert/readme.md new file mode 100644 index 000000000..e20e047ac --- /dev/null +++ b/keyboards/ergodox/keymaps/albert/readme.md @@ -0,0 +1,188 @@ +# ErgoDox EZ Configuration for typing like a boss. + +This layout has 7 layers: +0. Base layers +1. Symbols and F-keys +2. Number pad (with hexadecimal) +3. Cursor keys +4. Mouse movement and clicks +5. Keyword macros +6. Emacs + +There are also some leader keys defined for frequently used commands (git etc). + +## The layers + +Double hashes (`##`) indicate transparent keys (`KC_TRNS`) and blanks indicate no key (`KC_NO`). + +### 0. Base layer + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ESC | 1 | 2 | 3 | 4 | 5 | SfLt | | SfRt | 6 | 7 | 8 | 9 | 0 | BkSp | +|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------| +| Tab | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | Del | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| Caps/L2| A | S | D | F | G |------| |------| H | J | K | L | ; |Enter/L2| +|--------|------|------|------|------|------| L6 | | L6 |------|------|------|------|------|--------| +| LSft/( | Z | X | C | V/L3 | B/L4 | | | | N/L4 | M/L3 | , | . | / | RSft/) | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + |Ctrl/[| Alt/]| # | Left |Right | | Up | Down | - | Alt/[|Ctrl/]| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | L2 | lead | | lead | Ins | + ,------|------|------| |------|------|------. + | Space| BkSp | Home | | PgUp | Enter|Space | + | / | / |------| |------| / | / | + | Ctrl | Alt |End/L5| |PDn/L5| Alt | Ctrl | + `--------------------' `--------------------' +``` + +Space Cadet shift is enabled. Ctrl and Alt doubles up as normal keys when tapped. +SfLt and SfRt sends Shift + left and Shift + Right respectively - for use with emacs with `windmove-default-keybindings`. +Caps and Enter may be held down to activate layer 2 (hexadecimal number pad). +Please see `matrix_scan_user` function in `keymap.c` for list of commands available via `lead` key. + +### 1. Symbols and F-keys + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ## | F1 | F2 | F3 | F4 | F5 | ## | | ## | F6 | F7 | F8 | F9 | F10 | F11 | +|--------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| ## | ! | " | £ | $ | % | ## | | ## | - | + | = | @ | ~ | F12 | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | ^ | & | * | _ | # |------| |------| { | } | ; | ' | # | ## | +|--------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| ## | \ | | | ` | - | / | | | | [ | ] | < | > | ? | ## | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | ## | ## | ## | ## | ## | | ## | ## | ## | ## | ## | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | ## | ## | | ## | ## | + ,------|------|------| |------|------|------. + | | | ## | | ## | | | + | ## | ## |------| |------| ## | ## | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` + +### 2. Number pad (with hexadecimal) + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| ## | A | B | C | D | E | F | | A | B | C | D | E | F | ## | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| ## | * | 7 | 8 | 9 | * | 0x | | 0x | * | 7 | 8 | 9 | * | ## | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | / | 4 | 5 | 6 | / |------| |------| / | 4 | 5 | 6 | / | ## | +|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| ## | - | 1 | 2 | 3 | - | | | | - | 1 | 2 | 3 | - | ## | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | = | + | 0 | , | . | | 0 | , | . | + | = | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | ## | ## | | ## | ## | + ,------|------|------| |------|------|------. + | | | ## | | ## | | | + | ## | ## |------| |------| ## | ## | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` + +### 3. Cursor keys + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | Home | | Up | | PgUp | | | | PgUp | | Up | | Home | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | End | Left | Down | Right| PgDn |------| |------| PgDn | Left | Down | Right| End | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| ## | Up | | Down | ## | | | | | | ## | Down | | Up | ## | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | Left | Down | Right| | | | | | Left | Down | Right| + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | ## | ## |------| |------| ## | ## | + | | | | | | | | + `--------------------' `--------------------' +``` + +### 4. Mouse movement and clicks + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | | | | | | | | | | | | | | | +|--------|------|------|------|------|-------------| |------|------|------|------|------|------|--------| +| | | Lclk | MsUp | Rclk | | | | | | Lclk | MsUp | Rclk | | | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | | +|--------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| Lclk | MsUp | Rclk |MsDown| | ## | | | | ## | |MsDown| Lclk | MsUp | Rclk | +`--------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + |MsLeft|MsDown|MsRight | | | | |MsLeft|MsDown|MsRght| + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +### 5. Keyword macros + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | scarf| sadf | smily| | | | decaf| | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | const| volat| oper | ret | tmpl | | | | typen| cont | prv | pro | pub | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | str | obj | | gitl |------| |------| | | | nulp | | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | extr | cls | virt | break| | | |namesp| goodm| goodn| | | | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | | | inc | | | | | | | | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | ecet | ecets| + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | ## | | ## | | | + `--------------------' `--------------------' +``` +Please see `keymap.c` for the keywords/commands. +Some are const, volatile, operator, return, template, typename, continue, private, +protected, public, struct, class, extern, virtual, break, namespace. +Also a git log command I use a lot (`git log --oneline --graph --decorate=short` (I know git can be configured but that is boring)). + +### 6. Emacs + +``` +,---------------------------------------------------. ,--------------------------------------------------. +| | | | | | | empb | | emnb | emfs | emfb | | | | | +|---------|------|------|------|------|------|------| |------|------|------|------|------|------|--------| +| | emtr | | | | | | | | emun | emre | w-up | | | | +|---------|------|------|------|------|------| | | |------|------|------|------|------|--------| +| | | emwr | | | |------| |------| |w-left|w-down|w-rght| | | +|---------|------|------|------|------|------| ## | | ## |------|------|------|------|------|--------| +| | | | | | | | | | | |w-down| | | | +`---------|------|------|------|------|-------------' `-------------|------|------|------|------|--------' + | | | | | | | | | | | | + `-----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------|------|------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` +Some emacs shortcuts like toggle read/write mode (emtr), write file (emwr), previous-buffer (empb), +next-buffer (emnb), smaller font(emfs), larger font (emfb), undo (emun), redo (emre) and switching between windows in a frame. -- cgit v1.2.3 From 13fa63b19223fea024fc6a395041ecc2419caa1d Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Fri, 27 Jan 2017 13:53:02 +0100 Subject: [deadcyclo layout] Added more unicode keys and ibus unicode compose trigger keys --- .../deadcyclo/images/deadcyclo-base-layout.png | Bin 96046 -> 79488 bytes .../images/deadcyclo-layer-3-navigation.png | Bin 55517 -> 58886 bytes keyboards/ergodox/keymaps/deadcyclo/keymap.c | 42 ++++++++++----------- keyboards/ergodox/keymaps/deadcyclo/readme.md | 7 +++- 4 files changed, 26 insertions(+), 23 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png index a70e37559..2c03af581 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-base-layout.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png index e60c3e59e..c8c90cf5c 100644 Binary files a/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png and b/keyboards/ergodox/keymaps/deadcyclo/images/deadcyclo-layer-3-navigation.png differ diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 7578c723d..bfbf17be1 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | ] | ~/L1 | + * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | UNI | ~/L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | Home | | PgUp | Ins | @@ -65,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_LCTL, LT(MDIA, 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_RALT,KC_LALT, + LT(SYMB,KC_GRV),LCTL(LSFT(KC_U)), LALT(KC_LSFT), KC_RALT,KC_LALT, ALT_T(KC_APP), KC_HOME, KC_END, KC_SPC,KC_TAB,KC_LBRC, @@ -74,12 +74,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_LALT, KC_RALT,KC_LBRC,KC_RBRC, LT(SYMB,KC_TILD), + KC_LALT, KC_RALT,KC_LBRC,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), KC_PGUP, KC_INS, KC_PGDN, KC_RBRC,KC_BSPC, KC_ENT ), -/* Keymap 1: Symbol Layer +/* Keymap 1: Symbol Layer LCTL(LSFT(KC_U)) * * ,--------------------------------------------------. ,--------------------------------------------------. * | | F1 | F2 | F3 | F4 | F5 | F6 | | F6 | F7 | F8 | F9 | F10 | F11 | F12 | @@ -166,18 +166,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 3: Unicode * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | VER | | | | | | | | | | | | | | + * | | ┌ | ┐ | └ | ┘ | │ | ─ | | ╔ | ╗ | ╚ | ╝ | ║ | ═ | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | | + * | | shrug| yay | hug | smile|smile2| | | | ■ | λ | → | ➙ | ▻ | █ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | | + * | | hmm1 | hmm2 | bear1| bear2| fuu |------| |------| ☺ | ☻ | ☹ | ♡ | ♥ | ░ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | | | | | | + * | | eggy1| eggy2| face1| face2| uhu | | | | ❤ | ☐ | ☑ | ☒ | ✓ | ▄ | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | smrk1| smrk2| love | | | | | | | | + * | | smrk1| smrk2| love | VER | | ✔ | ✗ | ✘ | ● | ▀ | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | | | | | | + * | | | | ▒ | ▓ | * ,------|------|------| |------+------+------. * | | | | | | | | * | | |------| |------| | | @@ -186,23 +186,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // Unicode [NAVG] = KEYMAP( - KC_TRNS, VRSN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, - KC_TRNS, SMRK1, SMRK2, LOVE, KC_TRNS, - KC_TRNS, KC_TRNS, + KC_TRNS, SMRK1, SMRK2, LOVE, VRSN, + 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, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), KC_TRNS, - UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), KC_TRNS, - KC_TRNS, UC(0x2764), KC_TRNS, KC_MPRV, 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 + UC(0x2554), UC(0x2557), UC(0x255a), UC(0x255d), UC(0x2551), UC(0x2550), KC_TRNS, + KC_TRNS, UC(0x25a0), UC(0x03bb), UC(0x2192), UC(0x2799), UC(0x25bb), UC(0x2588), + UC(0x263a), UC(0x263b), UC(0x2639), UC(0x2661), UC(0x2665), UC(0x2591), + KC_TRNS, UC(0x2764), UC(0x2610), UC(0x2611), UC(0x2612), UC(0x2713), UC(0x2584), + UC(0x2714), UC(0x2717), UC(0x2718), UC(0x25cf), UC(0x2580), + UC(0x2592), UC(0x2593), + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/ergodox/keymaps/deadcyclo/readme.md b/keyboards/ergodox/keymaps/deadcyclo/readme.md index 2ca5e822c..fa41f0ec1 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/readme.md +++ b/keyboards/ergodox/keymaps/deadcyclo/readme.md @@ -28,6 +28,10 @@ TOG, are dual purpose. Hence for example the top left key produces ESC if tapped, and temporarilly toggles L3 when hold down. The two center L1 TOG keys toggle L1 on and off for more permanent layer toggling. +The UNI keys enter the linux ibus unicode composer mode +(ie. Ctrl+Shift+u). Use this to enter unicode characters. Hit the key, +type in the unicode hex value, and hit enter. + ## Layer 1 - Symbols and RGB [![Layer 1 - Symbols and RGB](images/deadcyclo-layer-1-symbols.png)](http://www.keyboard-layout-editor.com/#/gists/96714e198054c9115bafb5267cc6bc73) @@ -58,12 +62,11 @@ The unicode layer provides keys for directly typing unicode (utf-8) - 24.01.2017 Added support for Ergodox Shine. Added secondary L2 switch key on left hand - 24.01.2017 Added unicode keys. Added shrug hug and yay. Moved Navigation to layer 2 - 25.01.2017 Added lots of new emojis and some unicode keys +- 27.01.2017 Added new unicode keys and shortcut for ibus unicode composer key (CTRL+SHIFT+U) # TODO -- Add support for unicode by name? (See algernon layout for example) - Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) - Make macros for gnu screen and i3wm - Look into the app launch macros in algernon keymap -- Make other smileys like shrug and yay ¯\_(ツ)_/¯ and \o/ and others (see amon others [http://dongerlist.com](http://dongerlist.com) -- cgit v1.2.3 From f400ac1d7d8ee968016fc1a3e84a053612fe07cc Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Mon, 30 Jan 2017 15:45:16 +0100 Subject: [deadcyclo layout] fixed failing tests --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index bfbf17be1..610dd7ffb 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -210,21 +210,6 @@ const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) }; -static void ang_tap (uint16_t code, ...) { - uint16_t kc = code; - va_list ap; - - va_start(ap, code); - - do { - register_code16(kc); - unregister_code16(kc); - wait_ms(50); - kc = va_arg(ap, int); - } while (kc != 0); - va_end(ap); -} - #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) @@ -284,7 +269,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; case YAY: if (record->event.pressed) { - ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); + SEND_STRING ("\\o/"); } return false; break; -- cgit v1.2.3 From f70758622bc8be92987deac7163303cfe9b4f8b3 Mon Sep 17 00:00:00 2001 From: Brendan Johan Lee Date: Mon, 30 Jan 2017 19:42:27 +0100 Subject: [deadcyclo layout] Refactoring. Use custom functions and macros --- keyboards/ergodox/keymaps/deadcyclo/keymap.c | 503 ++++++++++++++------------- 1 file changed, 266 insertions(+), 237 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/deadcyclo/keymap.c b/keyboards/ergodox/keymaps/deadcyclo/keymap.c index 610dd7ffb..5774511cc 100644 --- a/keyboards/ergodox/keymaps/deadcyclo/keymap.c +++ b/keyboards/ergodox/keymaps/deadcyclo/keymap.c @@ -8,11 +8,21 @@ #define MDIA 2 // media keys #define NAVG 3 // navigation -enum custom_keycodes { - PLACEHOLDER = SAFE_RANGE, // can always be here +enum macros { + RUN +}; + +enum function_ids { + EMOJI, + EMOJI2, EPRM, VRSN, RGB_SLD, + GO_GROUP +}; + +/* opt can only be 0-15 */ +enum emojis { SHRUG, YAY, HUG, @@ -28,13 +38,56 @@ enum custom_keycodes { FACE1, FACE2, UHU, - SMRK1, + SMRK1 +}; + +enum emojis2 { SMRK2, LOVE }; -// TODO: Get rid of of keys I don't want. Make others that I do. Set up lots of makros (Using hyper (and meh)) keys (where to put them?) +enum progmem_ids { + EMOJI_SHRUG, + EMOJI_YAY, + EMOJI_HUG, + EMOJI_SMILE, + EMOJI_SMILE2, + EMOJI_HMM1, + EMOJI_HMM2, + EMOJI_BEAR1, + EMOJI_BEAR2, + EMOJI_FUU, + EMOJI_EGGY1, + EMOJI_EGGY2, + EMOJI_FACE1, + EMOJI_FACE2, + EMOJI_UHU, + EMOJI_SMRK1, + EMOJI_SMRK2, + EMOJI_LOVE, + F_EPRM, + F_VRSN, + F_RGB_SLD, + I3_GO_GROUP_10, + I3_GO_GROUP_1, + I3_GO_GROUP_2, + I3_GO_GROUP_3, + I3_GO_GROUP_4, + I3_GO_GROUP_5, + I3_GO_GROUP_6, + I3_GO_GROUP_7, + I3_GO_GROUP_8, + I3_GO_GROUP_9, +}; + +// TODO: Finish the macros for i3 (Macros should potentially be own function instead to make things easier? some of them at least, f. ex. the ones that use 1-0 keys so we can have a single switch) + +// TODO: Do stuff with hyper and meh keys +// TODO: Add macros for lots of stuff. (Lastpass cli, pushbullet cli, other push service cli, linode cli, more?) +// TODO: Make macros for gnu screen and i3wm // TODO: Need to change hotkeys for lastpass, and potentially make my own keys for them on one of my layers +// TODO: Look into using tap dance +// TODO: Use leader key for stuff. See https://github.com/qmk/qmk_firmware/wiki const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -47,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | [ | UNI | ~/L1 | + * |Grv/L1| UNI |AltShf| Lalt | Ralt | | Lalt | Ralt | LEAD | UNI | ~/L1 | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | App | Home | | PgUp | Ins | @@ -61,7 +114,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + LT(NAVG,KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, LT(SYMB,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_LCTL, LT(MDIA, 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), @@ -74,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, LT(SYMB, KC_BSLS), KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),CTL_T(KC_QUOT), MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_LALT, KC_RALT,KC_LBRC,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), + KC_LALT, KC_RALT,KC_LEAD,LCTL(LSFT(KC_U)), LT(SYMB,KC_TILD), KC_PGUP, KC_INS, KC_PGDN, KC_RBRC,KC_BSPC, KC_ENT @@ -109,7 +162,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, RGB_TOG,RGB_MOD, - RGB_SLD, + F(F_RGB_SLD), RGB_VAD,RGB_VAI,KC_TRNS, // right hand KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, @@ -119,14 +172,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, - EPRM, KC_DEL, KC_TRNS + F(F_EPRM), KC_DEL, KC_TRNS ), /* Keymap 2: Media, mouse and navigation * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | | gg(1)| | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | Up | | | | + * | | | | MsUp | RUN | | | | | | | Up | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |MsLeft|MsDown|MsRght| |------| |------| | Left | Down | Right| | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -144,8 +197,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA , MOUSE and NAVIGATION [MDIA] = KEYMAP( - 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, F(I3_GO_GROUP_1), F(I3_GO_GROUP_2), F(I3_GO_GROUP_3), F(I3_GO_GROUP_4), F(I3_GO_GROUP_5), F(I3_GO_GROUP_6), +KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, M(RUN), 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, @@ -153,7 +206,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + F(I3_GO_GROUP_6), F(I3_GO_GROUP_7), F(I3_GO_GROUP_8), F(I3_GO_GROUP_9), F(I3_GO_GROUP_10), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, @@ -179,7 +232,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-------------. ,-------------. * | | | | ▒ | ▓ | * ,------|------|------| |------+------+------. - * | | | | | | | | + * | | | | | | | | * | | |------| |------| | | * | | | | | | | | * `--------------------' `--------------------' @@ -187,10 +240,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Unicode [NAVG] = KEYMAP( KC_TRNS, UC(0x250c), UC(0x2510), UC(0x2514), UC(0x2518), UC(0x2502), UC(0x2500), - KC_TRNS, SHRUG, YAY, HUG, SMILE, SMILE2, KC_TRNS, - KC_TRNS, HMM1, HMM2, BEAR1, BEAR2, FUU, - KC_TRNS, EGGY1, EGGY2, FACE1, FACE2, UHU, KC_TRNS, - KC_TRNS, SMRK1, SMRK2, LOVE, VRSN, + KC_TRNS, F(EMOJI_SHRUG), F(EMOJI_YAY), F(EMOJI_HUG), F(EMOJI_SMILE), F(EMOJI_SMILE2), KC_TRNS, + KC_TRNS, F(EMOJI_HMM1), F(EMOJI_HMM2), F(EMOJI_BEAR1), F(EMOJI_BEAR2), F(EMOJI_FUU), + KC_TRNS, F(EMOJI_EGGY1), F(EMOJI_EGGY2), F(EMOJI_FACE1), F(EMOJI_FACE2), F(EMOJI_UHU), KC_TRNS, + KC_TRNS, F(EMOJI_SMRK1), F(EMOJI_SMRK2), F(EMOJI_LOVE), F(F_VRSN), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, @@ -207,242 +260,219 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) + [EMOJI_SHRUG] = ACTION_FUNCTION_OPT(EMOJI, SHRUG), + [EMOJI_YAY] = ACTION_FUNCTION_OPT(EMOJI, YAY), + [EMOJI_HUG] = ACTION_FUNCTION_OPT(EMOJI,HUG), + [EMOJI_SMILE] = ACTION_FUNCTION_OPT(EMOJI,SMILE), + [EMOJI_SMILE2] = ACTION_FUNCTION_OPT(EMOJI,SMILE2), + [EMOJI_HMM1] = ACTION_FUNCTION_OPT(EMOJI,HMM1), + [EMOJI_HMM2] = ACTION_FUNCTION_OPT(EMOJI,HMM2), + [EMOJI_BEAR1] = ACTION_FUNCTION_OPT(EMOJI,BEAR1), + [EMOJI_BEAR2] = ACTION_FUNCTION_OPT(EMOJI,BEAR2), + [EMOJI_FUU] = ACTION_FUNCTION_OPT(EMOJI,FUU), + [EMOJI_EGGY1] = ACTION_FUNCTION_OPT(EMOJI,EGGY1), + [EMOJI_EGGY2] = ACTION_FUNCTION_OPT(EMOJI,EGGY2), + [EMOJI_FACE1] = ACTION_FUNCTION_OPT(EMOJI,FACE1), + [EMOJI_FACE2] = ACTION_FUNCTION_OPT(EMOJI,FACE2), + [EMOJI_UHU] = ACTION_FUNCTION_OPT(EMOJI,UHU), + [EMOJI_SMRK1] = ACTION_FUNCTION_OPT(EMOJI,SMRK1), + [EMOJI_SMRK2] = ACTION_FUNCTION_OPT(EMOJI2,SMRK2), + [EMOJI_LOVE] = ACTION_FUNCTION_OPT(EMOJI2,LOVE), + [F_EPRM] = ACTION_FUNCTION(EPRM), + [F_VRSN] = ACTION_FUNCTION(VRSN), + [F_RGB_SLD] = ACTION_FUNCTION(RGB_SLD), + [I3_GO_GROUP_10]= ACTION_FUNCTION_OPT(GO_GROUP,0), + [I3_GO_GROUP_1] = ACTION_FUNCTION_OPT(GO_GROUP,1), + [I3_GO_GROUP_2] = ACTION_FUNCTION_OPT(GO_GROUP,2), + [I3_GO_GROUP_3] = ACTION_FUNCTION_OPT(GO_GROUP,3), + [I3_GO_GROUP_4] = ACTION_FUNCTION_OPT(GO_GROUP,4), + [I3_GO_GROUP_5] = ACTION_FUNCTION_OPT(GO_GROUP,5), + [I3_GO_GROUP_6] = ACTION_FUNCTION_OPT(GO_GROUP,6), + [I3_GO_GROUP_7] = ACTION_FUNCTION_OPT(GO_GROUP,7), + [I3_GO_GROUP_8] = ACTION_FUNCTION_OPT(GO_GROUP,8), + [I3_GO_GROUP_9] = ACTION_FUNCTION_OPT(GO_GROUP,9), }; #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - switch(id) { - case 0: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - case 1: - if (record->event.pressed) { // For resetting EEPROM - eeconfig_init(); - } - break; - } - return MACRO_NONE; -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - // dynamically generate these. +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { case EPRM: - if (record->event.pressed) { - eeconfig_init(); - } - return false; + eeconfig_init(); break; case VRSN: - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - return false; + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); break; case RGB_SLD: - if (record->event.pressed) { - #ifdef RGBLIGHT_ENABLE - rgblight_mode(1); - #endif - } - return false; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(1); +#endif break; - case SHRUG: - if (record->event.pressed) { - unicode_input_start(); register_hex(0xaf); unicode_input_finish(); - TAP_ONCE (KC_BSLS); - register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); - register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); - TAP_ONCE (KC_SLSH); - unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + case GO_GROUP: + register_code(KC_LCTL); TAP_ONCE(KC_I); unregister_code(KC_LCTL); + TAP_ONCE(KC_G); + if (opt == 0) { + TAP_ONCE(39); + } else { + TAP_ONCE(29+opt); } - return false; break; - case YAY: - if (record->event.pressed) { - SEND_STRING ("\\o/"); + case EMOJI: + switch(opt) { + case SHRUG: + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); + TAP_ONCE (KC_BSLS); + register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); + register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); + TAP_ONCE (KC_SLSH); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); + break; + case YAY: + SEND_STRING ("\\o/"); + break; + case HUG: + unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); + TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); + unicode_input_start(); register_hex(0x3064); unicode_input_finish(); + break; + case SMILE: + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + break; + case SMILE2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0298); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case HMM1: + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + break; + case HMM2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case BEAR1: + unicode_input_start(); register_hex(0x0295); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0294); unicode_input_finish(); + break; + case BEAR2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); + unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FUU: + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + unicode_input_start(); register_hex(0x256d); unicode_input_finish(); + unicode_input_start(); register_hex(0x2229); unicode_input_finish(); + unicode_input_start(); register_hex(0x256e); unicode_input_finish(); + break; + case EGGY1: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); + unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); + unicode_input_start(); register_hex(0xff09); unicode_input_finish(); + unicode_input_start(); register_hex(0x256f); unicode_input_finish(); + break; + case EGGY2: + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x0020); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x309c); unicode_input_finish(); + unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FACE1: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x002d); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case FACE2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x005f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2022); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case UHU: + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2299); unicode_input_finish(); + break; + case SMRK1: + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + break; } - return false; - break; - case HUG: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0f3c); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x25d5); unicode_input_finish(); - TAP_ONCE (KC_SPC); - unicode_input_start(); register_hex(0x0f3d); unicode_input_finish(); - unicode_input_start(); register_hex(0x3064); unicode_input_finish(); - } - return false; - break; - case SMILE: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - } - return false; - break; - case SMILE2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0298); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case HMM1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - } - return false; - break; - case HMM2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x0ca0); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case BEAR1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0295); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0294); unicode_input_finish(); - } - return false; - break; - case BEAR2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d25); unicode_input_finish(); - unicode_input_start(); register_hex(0x1d54); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FUU: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - unicode_input_start(); register_hex(0x256d); unicode_input_finish(); - unicode_input_start(); register_hex(0x2229); unicode_input_finish(); - unicode_input_start(); register_hex(0x256e); unicode_input_finish(); - } - return false; - break; - case EGGY1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0x25a1); unicode_input_finish(); - unicode_input_start(); register_hex(0x00b0); unicode_input_finish(); - unicode_input_start(); register_hex(0xff09); unicode_input_finish(); - unicode_input_start(); register_hex(0x256f); unicode_input_finish(); - } - return false; - break; - case EGGY2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x0020); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x309c); unicode_input_finish(); - unicode_input_start(); register_hex(0x30ce); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FACE1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x002d); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case FACE2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x005f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2022); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case UHU: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - unicode_input_start(); register_hex(0xfe4f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2299); unicode_input_finish(); - } - return false; - break; - case SMRK1: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - } - return false; - break; - case SMRK2: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x0028); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x032e); unicode_input_finish(); - unicode_input_start(); register_hex(0x005e); unicode_input_finish(); - unicode_input_start(); register_hex(0x0029); unicode_input_finish(); - } - return false; - break; - case LOVE: - if (record->event.pressed) { - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - unicode_input_start(); register_hex(0x203f); unicode_input_finish(); - unicode_input_start(); register_hex(0x2665); unicode_input_finish(); - } - return false; break; + case EMOJI2: + switch(opt) { + case SMRK2: + unicode_input_start(); register_hex(0x0028); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x032e); unicode_input_finish(); + unicode_input_start(); register_hex(0x005e); unicode_input_finish(); + unicode_input_start(); register_hex(0x0029); unicode_input_finish(); + break; + case LOVE: + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + unicode_input_start(); register_hex(0x203f); unicode_input_finish(); + unicode_input_start(); register_hex(0x2665); unicode_input_finish(); + break; + } + break; + } } - return true; } +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case RUN: + return MACRO( D(LCTL), T(I), U(LCTL), T(R), END ); + break; + } + } + return MACRO_NONE; +}; + // Runs just one time when the keyboard initializes. void matrix_init_user(void) { set_unicode_input_mode(UC_LNX); @@ -450,7 +480,6 @@ 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(); -- cgit v1.2.3 From 4c3630dc1778129438440986f14731dcb7244262 Mon Sep 17 00:00:00 2001 From: Matthias Schmitt Date: Mon, 30 Jan 2017 23:10:28 +0100 Subject: update my neo2 keymap --- keyboards/ergodox/keymaps/software_neo2/keymap.c | 64 +++++++++++++----------- 1 file changed, 34 insertions(+), 30 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/software_neo2/keymap.c b/keyboards/ergodox/keymaps/software_neo2/keymap.c index 41ace403d..571ca062c 100644 --- a/keyboards/ergodox/keymaps/software_neo2/keymap.c +++ b/keyboards/ergodox/keymaps/software_neo2/keymap.c @@ -1,7 +1,8 @@ #include "ergodox.h" #include "debug.h" +#include "led.h" #include "action_layer.h" -#include "keymap_neo2.h" +#include "keymap_extras/keymap_neo2.h" // Layer names #define BASE 0 // default layer @@ -11,45 +12,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ^ | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 |BackSpce| + * | Del | 1 | 2 | 3 | 4 | 5 | Play | | Next | 6 | 7 | 8 | 9 | 0 | ß | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | X | V | L | C | W | L1 | | L1 | K | H | G | F | Q | ß | + * | Tab | X | V | L | C | W | Esc | | Esc | K | H | G | F | Q | Y | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | Caps | U | I | A | E | O |------| |------| S | N | R | T | D | Y | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Ü/Ctrl| Ö/C-S| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift | + * | NeoL1 | U | I | A | E | O |------| |------| S | N | R | T | D | NeoR1 | + * |--------+------+------+------+------+------| L1 | | L1 |------+------+------+------+------+--------| + * | LShift |Ü/Ctrl| Ö/Win| Ä/Alt| P | Z | | | | B | M | , | . | J | RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | L1 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | Esc | + * |NeoL2 | Home | PgDn | PgUp | End | | Right| Down | Up | Left | NeoR2| * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. + * ,-------------. ,---------------. * | App | LGui | | Alt |Ctrl/Esc| * ,------+------+------| |------+--------+------. - * | | |NeoL2 | |NeoL2 | | | - * | Tab |Backsp|------| |------| Space |Enter | - * | |ace |NeoL1 | |NeoL1 | | | + * | | | Enter| |Delete| | | + * | Space|Backsp|------| |------| Enter |Space | + * | |ace | Tab | | Esc | | | * `--------------------' `----------------------' */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default // left hand - KC_CIRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MPLY, - KC_DELT, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, TG(1), - KC_CAPS, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, - KC_LSFT, CTL_T(NEO_UE), C_S_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, ALL_T(KC_NO), - DE_LESS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, - ALT_T(KC_APP),KC_LGUI, - NEO_L2_L, - KC_TAB,KC_BSPC,NEO_L1_L, + KC_DELT, NEO_1, NEO_2, NEO_3, NEO_4, NEO_5, KC_MPLY, + KC_TAB, NEO_X, NEO_V, NEO_L, NEO_C, NEO_W, KC_ESC, + NEO_L1_L, NEO_U, NEO_I, NEO_A, NEO_E, NEO_O, + KC_LSFT, CTL_T(NEO_UE), GUI_T(NEO_OE), ALT_T(NEO_AE), NEO_P, NEO_Z, TG(1), + NEO_L2_L, KC_HOME, KC_PGDN, KC_PGUP, KC_END, + C_S_T(KC_ESC),KC_LGUI, + KC_ENT, + KC_SPC,KC_BSPC,KC_TAB, // right hand - KC_MNXT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_SS, - NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_Y, - MEH_T(KC_NO),NEO_B, NEO_M, KC_COMM, KC_DOT, NEO_J, KC_RSFT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_ESC, - KC_LALT,CTL_T(KC_ESC), - NEO_L2_R, - NEO_L1_R,KC_SPC, KC_ENT + KC_MNXT, NEO_6, NEO_7, NEO_8, NEO_9, NEO_0, NEO_SS, + KC_ESC, NEO_K, NEO_H, NEO_G, NEO_F, NEO_Q, NEO_Y, + NEO_S, NEO_N, NEO_R, NEO_T, NEO_D, NEO_L1_R, + TG(1), NEO_B, NEO_M, NEO_COMM, NEO_DOT, NEO_J, KC_RSFT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, NEO_L2_R, + KC_LALT,KC_RGUI, + KC_DELT, + KC_ESC,KC_ENT, KC_SPC ), /* Keymap 1: Media and mouse keys * @@ -127,13 +128,16 @@ void matrix_scan_user(void) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); + ergodox_board_led_off(); + + if (host_keyboard_leds() & (1<