diff options
Diffstat (limited to 'keyboards')
1520 files changed, 25722 insertions, 6627 deletions
diff --git a/keyboards/1upkeyboards/1up60hse/config.h b/keyboards/1upkeyboards/1up60hse/config.h index c3682de43..420d0a025 100644 --- a/keyboards/1upkeyboards/1up60hse/config.h +++ b/keyboards/1upkeyboards/1up60hse/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -221,4 +216,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.c b/keyboards/1upkeyboards/1up60hte/1up60hte.c new file mode 100644 index 000000000..460e42a0e --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.c @@ -0,0 +1,18 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "1up60hte.h" diff --git a/keyboards/1upkeyboards/1up60hte/1up60hte.h b/keyboards/1upkeyboards/1up60hte/1up60hte.h new file mode 100644 index 000000000..eb4082f1a --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/1up60hte.h @@ -0,0 +1,50 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K400, K401, K402, K406, K410, K411, K412, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \ + { K400, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413 } \ +} + +/* HHKB Variant */ +#define LAYOUT_60_hhkb( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, \ + K401, K402, K406, K410, K411, K413 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, KC_NO }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO }, \ + { KC_NO, K401, K402, KC_NO, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413 } \ +} + diff --git a/keyboards/1upkeyboards/1up60hte/config.h b/keyboards/1upkeyboards/1up60hte/config.h new file mode 100644 index 000000000..c7e023a5e --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 1upkeyboards +#define PRODUCT 1up60hte +#define DESCRIPTION A custom 60% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B2, B1, B0, D4 } +#define MATRIX_COL_PINS { F6, F5, F4, F1, E6, D0, D1, D2, D3, D5, D6, D7, B4, B5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 3 +#endif + +/* 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 + +#define RGB_DI_PIN F0 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 14 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c new file mode 100644 index 000000000..396b66080 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/default/keymap.c @@ -0,0 +1,80 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + 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_GRV, + 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_BSLS, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_NO, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +void matrix_init_user(void) { + setPinOutput(B6); +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + writePinLow(B6); + } else { + writePinHigh(B6); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c new file mode 100644 index 000000000..1b06739b6 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/keymaps/hhkb/keymap.c @@ -0,0 +1,79 @@ +/* +Copyright 2019 Bubnick + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + 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_GRV, + 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_BSLS, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LCTL, KC_BSPC), + + [1] = LAYOUT_all( + RESET, 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_INS, + KC_CAPS, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_MPLY, KC_MPRV, KC_MNXT, RGB_VAD, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL) +}; + +void matrix_init_user(void) { + setPinOutput(B6); +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + writePinLow(B6); + } else { + writePinHigh(B6); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/1upkeyboards/1up60hte/readme.md b/keyboards/1upkeyboards/1up60hte/readme.md new file mode 100644 index 000000000..93767c541 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/readme.md @@ -0,0 +1,18 @@ + +# 1up60hte (Hot Swap Tsangan Edition) + +![1up60hte](https://www.1upkeyboards.com/wp-content/uploads/2019/01/PCB-60-HS-TSA-both.jpg) + + +A 60% PCB with USB C, RGB underglow, backlighting, hotswappable switches, and a Tsangan layout. + +Keyboard Maintainer: [Bubnick](https://github.com/bubnick) +Hardware Supported: 1up60hte 60% PCB + +Hardware Availability: [1upkeyboards.com](https://www.1upkeyboards.com/shop/controllers/1up-rgb-60-pcb-hte/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/1up60hte:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/1upkeyboards/1up60hte/rules.mk b/keyboards/1upkeyboards/1up60hte/rules.mk new file mode 100644 index 000000000..b8b558299 --- /dev/null +++ b/keyboards/1upkeyboards/1up60hte/rules.mk @@ -0,0 +1,58 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes + +LAYOUTS = 60_hhkb diff --git a/keyboards/1upkeyboards/1up60rgb/config.h b/keyboards/1upkeyboards/1up60rgb/config.h index ee49211b4..86696dab8 100644 --- a/keyboards/1upkeyboards/1up60rgb/config.h +++ b/keyboards/1upkeyboards/1up60rgb/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/1upkeyboards/super16/config.h b/keyboards/1upkeyboards/super16/config.h new file mode 100644 index 000000000..1f97c6fea --- /dev/null +++ b/keyboards/1upkeyboards/super16/config.h @@ -0,0 +1,244 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 1upkeyboards +#define PRODUCT super16 +#define DESCRIPTION A 4x4 custom macropad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D1, D0, F4, F5 } +#define MATRIX_COL_PINS { D4, C6, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN D3 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 16 // Add 12 if attaching the RGB LED ring + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/1upkeyboards/super16/info.json b/keyboards/1upkeyboards/super16/info.json new file mode 100644 index 000000000..e8f4faa23 --- /dev/null +++ b/keyboards/1upkeyboards/super16/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "super16", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}] + } + } +}
\ No newline at end of file diff --git a/keyboards/1upkeyboards/super16/keymaps/default/config.h b/keyboards/1upkeyboards/super16/keymaps/default/config.h new file mode 100644 index 000000000..16fc8b974 --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 'mechmerlin' + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here diff --git a/keyboards/1upkeyboards/super16/keymaps/default/keymap.c b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c new file mode 100644 index 000000000..36ad3f283 --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ortho_4x4( /* Base */ + KC_A, KC_1, KC_2, KC_4, \ + KC_A, KC_1, KC_2, KC_4, \ + KC_A, KC_1, KC_2, KC_4, \ + KC_A, KC_1, KC_2, KC_4 \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/1upkeyboards/super16/keymaps/default/readme.md b/keyboards/1upkeyboards/super16/keymaps/default/readme.md new file mode 100644 index 000000000..814f15c00 --- /dev/null +++ b/keyboards/1upkeyboards/super16/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for super16 diff --git a/keyboards/1upkeyboards/super16/readme.md b/keyboards/1upkeyboards/super16/readme.md new file mode 100644 index 000000000..61b92ff85 --- /dev/null +++ b/keyboards/1upkeyboards/super16/readme.md @@ -0,0 +1,13 @@ +# Super 16 Macro Pad + +A 4x4 macropad with RGB underglow. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Super 16 Macropad +Hardware Availability: [1upkeyboards](https://www.1upkeyboards.com/shop/keyboard-kits/super-16-macro-pad/) + +Make example for this keyboard (after setting up your build environment): + + make 1upkeyboards/super16:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/1upkeyboards/super16/rules.mk b/keyboards/1upkeyboards/super16/rules.mk new file mode 100644 index 000000000..efcde8834 --- /dev/null +++ b/keyboards/1upkeyboards/super16/rules.mk @@ -0,0 +1,83 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +LAYOUTS = ortho_4x4
\ No newline at end of file diff --git a/keyboards/1upkeyboards/super16/super16.c b/keyboards/1upkeyboards/super16/super16.c new file mode 100644 index 000000000..cf33cab92 --- /dev/null +++ b/keyboards/1upkeyboards/super16/super16.c @@ -0,0 +1,43 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "super16.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(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/1upkeyboards/super16/super16.h b/keyboards/1upkeyboards/super16/super16.h new file mode 100644 index 000000000..a95f687b1 --- /dev/null +++ b/keyboards/1upkeyboards/super16/super16.h @@ -0,0 +1,39 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_ortho_4x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33 \ +) \ +{ \ + { k00, k01, k02, k03 }, \ + { k10, k11, k12, k13 }, \ + { k20, k21, k22, k23 }, \ + { k30, k31, k32, k33 }, \ +} diff --git a/keyboards/1upkeyboards/sweet16/config.h b/keyboards/1upkeyboards/sweet16/config.h index 20d99651d..eedd3708f 100644 --- a/keyboards/1upkeyboards/sweet16/config.h +++ b/keyboards/1upkeyboards/sweet16/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/1upkeyboards/sweet16/keymaps/sebas/keymap.c b/keyboards/1upkeyboards/sweet16/keymaps/sebas/keymap.c new file mode 100644 index 000000000..a7e587426 --- /dev/null +++ b/keyboards/1upkeyboards/sweet16/keymaps/sebas/keymap.c @@ -0,0 +1,23 @@ +#include QMK_KEYBOARD_H +#define ALT TG(_FUNC) + +enum layers { + _KEYP, + _FUNC +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_KEYP]=LAYOUT_ortho_4x4( + KC_P7, KC_P8, KC_P9, ALT, + KC_P4, KC_P5, KC_P6, KC_PAST, + KC_P1, KC_P2, KC_P3, KC_PMNS, + KC_P0, KC_PDOT, KC_PENT, KC_PPLS +), +[_FUNC]=LAYOUT_ortho_4x4( + KC_MPRV, KC_MPLY, KC_MNXT, _______, + XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, + KC_INS, KC_HOME, KC_PGUP, XXXXXXX, + KC_DEL, KC_END, KC_PGDN, XXXXXXX +) +}; diff --git a/keyboards/30wer/config.h b/keyboards/30wer/config.h index d49758524..cf1bd72e5 100644 --- a/keyboards/30wer/config.h +++ b/keyboards/30wer/config.h @@ -22,10 +22,5 @@ /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* prevent stuck modifiers */ #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/40percentclub/25/config.h b/keyboards/40percentclub/25/config.h index 7fe59fcca..338683ee7 100644 --- a/keyboards/40percentclub/25/config.h +++ b/keyboards/40percentclub/25/config.h @@ -121,11 +121,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/4x4/config.h b/keyboards/40percentclub/4x4/config.h index e66e9433a..5dc780f0e 100644 --- a/keyboards/40percentclub/4x4/config.h +++ b/keyboards/40percentclub/4x4/config.h @@ -30,7 +30,6 @@ #define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B7, D6, F7, F6, F5, F4, F1, F0, B3, B1 } #define UNUSED_PINS - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW @@ -38,7 +37,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -90,11 +88,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -199,4 +192,3 @@ #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/40percentclub/5x5/config.h b/keyboards/40percentclub/5x5/config.h index bc609934e..bf521e71e 100644 --- a/keyboards/40percentclub/5x5/config.h +++ b/keyboards/40percentclub/5x5/config.h @@ -97,11 +97,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/6lit/config.h b/keyboards/40percentclub/6lit/config.h index 940518f36..6a96c4757 100644 --- a/keyboards/40percentclub/6lit/config.h +++ b/keyboards/40percentclub/6lit/config.h @@ -122,11 +122,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/foobar/config.h b/keyboards/40percentclub/foobar/config.h index 88075c456..aba9f09ae 100644 --- a/keyboards/40percentclub/foobar/config.h +++ b/keyboards/40percentclub/foobar/config.h @@ -122,11 +122,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/gherkin/config.h b/keyboards/40percentclub/gherkin/config.h index 3ed638b66..d0c2be35b 100644 --- a/keyboards/40percentclub/gherkin/config.h +++ b/keyboards/40percentclub/gherkin/config.h @@ -37,11 +37,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/40percentclub/half_n_half/config.h b/keyboards/40percentclub/half_n_half/config.h new file mode 100644 index 000000000..1c4298bc3 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/config.h @@ -0,0 +1,244 @@ +/* +Copyright 2019 Boy_314 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0A0C +#define DEVICE_VER 0x4A1F +#define MANUFACTURER di0ib +#define PRODUCT half_n_half +#define DESCRIPTION A small split ortholinear custom keyboard with 2 thumb buttons + +/* key matrix size */ +#define MATRIX_ROWS 4*2 +#define MATRIX_COLS 7 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/40percentclub/half_n_half/half_n_half.c b/keyboards/40percentclub/half_n_half/half_n_half.c new file mode 100644 index 000000000..c4e6a4ce0 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/half_n_half.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Boy_314 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "half_n_half.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(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/40percentclub/half_n_half/half_n_half.h b/keyboards/40percentclub/half_n_half/half_n_half.h new file mode 100644 index 000000000..6cec59929 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/half_n_half.h @@ -0,0 +1,43 @@ +/* Copyright 2019 Boy_314 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K50, K51, K52, K53, K54, K55, K56, \ + K10, K11, K12, K13, K14, K15, K16, K60, K61, K62, K63, K64, K65, K66, \ + K20, K21, K22, K23, K24, K25, K26, K70, K71, K72, K73, K74, K75, K76, \ + K34, K82 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K34, KC_NO, KC_NO }, \ +\ + { K56, K55, K54, K53, K52, K51, K50 }, \ + { K66, K65, K64, K63, K62, K61, K60 }, \ + { K76, K75, K74, K73, K72, K71, K70 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, K82, KC_NO, KC_NO } \ +} diff --git a/keyboards/bdn9/info.json b/keyboards/40percentclub/half_n_half/info.json index e69de29bb..e69de29bb 100644 --- a/keyboards/bdn9/info.json +++ b/keyboards/40percentclub/half_n_half/info.json diff --git a/keyboards/40percentclub/half_n_half/keymaps/default/config.h b/keyboards/40percentclub/half_n_half/keymaps/default/config.h new file mode 100644 index 000000000..c8e433412 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 REPLACE_WITH_YOUR_NAME + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here diff --git a/keyboards/40percentclub/half_n_half/keymaps/default/keymap.c b/keyboards/40percentclub/half_n_half/keymaps/default/keymap.c new file mode 100644 index 000000000..2ab9a8c98 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/default/keymap.c @@ -0,0 +1,65 @@ +/* Copyright 2019 Boy_314 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Base */ + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, KC_RCTL, 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_LALT, KC_RALT, 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_LGUI, KC_APP, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ + KC_SPC, KC_SPC + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/40percentclub/half_n_half/keymaps/default/readme.md b/keyboards/40percentclub/half_n_half/keymaps/default/readme.md new file mode 100644 index 000000000..58a457f1b --- /dev/null +++ b/keyboards/40percentclub/half_n_half/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for half_n_half
\ No newline at end of file diff --git a/keyboards/40percentclub/half_n_half/readme.md b/keyboards/40percentclub/half_n_half/readme.md new file mode 100644 index 000000000..689b6fe81 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/readme.md @@ -0,0 +1,14 @@ +# half_n_half + +![half_n_half](https://2.bp.blogspot.com/-akouSRzGKQw/WutIH4qV0nI/AAAAAAACRqA/D1Gx3i1UWlccMCd0VS8td0ckWjCixrSuQCLcBGAs/s1600/b.jpg) + +A small split ortho board with two thumb keys + +Keyboard Maintainer: [Boy_314](https://github.com/boy-314) +Hardware Availability: http://www.40percent.club/2018/07/half-n-half.html + +Make example for this keyboard (after setting up your build environment): + + make 40percentclub/half_n_half:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/40percentclub/half_n_half/rules.mk b/keyboards/40percentclub/half_n_half/rules.mk new file mode 100644 index 000000000..bd0d8f808 --- /dev/null +++ b/keyboards/40percentclub/half_n_half/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = caterina + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/40percentclub/i75/config.h b/keyboards/40percentclub/i75/config.h index bc032ba45..611ae62b3 100644 --- a/keyboards/40percentclub/i75/config.h +++ b/keyboards/40percentclub/i75/config.h @@ -77,11 +77,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/luddite/config.h b/keyboards/40percentclub/luddite/config.h index 62ff72bb0..5a6f2c799 100644 --- a/keyboards/40percentclub/luddite/config.h +++ b/keyboards/40percentclub/luddite/config.h @@ -34,11 +34,6 @@ /* 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 B4 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/40percentclub/mf68/config.h b/keyboards/40percentclub/mf68/config.h index 22d987e52..857205c37 100644 --- a/keyboards/40percentclub/mf68/config.h +++ b/keyboards/40percentclub/mf68/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -99,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/mf68_ble/config.h b/keyboards/40percentclub/mf68_ble/config.h index e7edd77fe..3d9bb360b 100644 --- a/keyboards/40percentclub/mf68_ble/config.h +++ b/keyboards/40percentclub/mf68_ble/config.h @@ -99,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/nori/config.h b/keyboards/40percentclub/nori/config.h index 9232344bf..f46ca4264 100644 --- a/keyboards/40percentclub/nori/config.h +++ b/keyboards/40percentclub/nori/config.h @@ -110,11 +110,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/40percentclub/tomato/config.h b/keyboards/40percentclub/tomato/config.h index 05c83c30c..db90d8042 100644 --- a/keyboards/40percentclub/tomato/config.h +++ b/keyboards/40percentclub/tomato/config.h @@ -28,11 +28,6 @@ /* 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)) \ -) - /* eliminate lag on space cadet mods */ #define PERMISSIVE_HOLD diff --git a/keyboards/40percentclub/ut47/config.h b/keyboards/40percentclub/ut47/config.h index cd55e4d73..4a221ca52 100644 --- a/keyboards/40percentclub/ut47/config.h +++ b/keyboards/40percentclub/ut47/config.h @@ -53,11 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* Enable GNAP matrix serial output */ #define GNAP_ENABLE diff --git a/keyboards/412_64/config.h b/keyboards/412_64/config.h index 28d9763c3..948ae743a 100644 --- a/keyboards/412_64/config.h +++ b/keyboards/412_64/config.h @@ -30,7 +30,6 @@ #define MATRIX_COL_PINS { B0, D2, D0, D1, D4, C6, D7, E6 } #define UNUSED_PINS { B4, B5, B6, B7, C7, F0, F1 } - /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW @@ -38,7 +37,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -90,11 +88,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -199,4 +192,3 @@ #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/acr60/config.h b/keyboards/acr60/config.h index 3066f349d..ab5a1932b 100644 --- a/keyboards/acr60/config.h +++ b/keyboards/acr60/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 20 diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c index a07e0ddc5..aafc1dfe6 100644 --- a/keyboards/acr60/keymaps/default/keymap.c +++ b/keyboards/acr60/keymaps/default/keymap.c @@ -1,6 +1,10 @@ #include QMK_KEYBOARD_H -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -13,7 +17,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * via the function actions code at the bottom. */ LAYOUT( - F(0), 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_NO, KC_BSPC, + SFT_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_NO, KC_BSPC, 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_BSLS, 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_ENT, KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO, @@ -34,21 +38,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -56,7 +50,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -64,6 +58,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/aeboards/aegis/aegis.c b/keyboards/aeboards/aegis/aegis.c new file mode 100644 index 000000000..ccff6d62c --- /dev/null +++ b/keyboards/aeboards/aegis/aegis.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/aeboards/aegis/aegis.h b/keyboards/aeboards/aegis/aegis.h new file mode 100644 index 000000000..95ffb73dd --- /dev/null +++ b/keyboards/aeboards/aegis/aegis.h @@ -0,0 +1,43 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define _____ KC_NO + +#define LAYOUT_aegis( \ + K0000, K0100, K0001, K0101, K0002, K0102, K0003, K0103, K0004, K0104, K0005, K0105, K0006, K0106, K0007, K0107, K0008, \ + K0200, K0300, K0201, K0301, K0202, K0302, K0203, K0303, K0204, K0304, K0205, K0305, K0206, K0306, K0207, K0307, K0208, K0308, K0108, \ + K0400, K0500, K0401, K0501, K0402, K0502, K0403, K0503, K0404, K0504, K0405, K0505, K0406, K0506, K0407, K0507, K0408, K0508, \ + K0600, K0700, K0601, K0701, K0602, K0702, K0603, K0703, K0604, K0704, K0605, K0705, K0606, K0706, K0607, K0707, K0608, \ + K0800, K0900, K0801, K0901, K0802, K0902, K0803, K0903, K0804, K0904, K0805, K0905, K0806, K0906, K0807, K0907, K0808, K0908, \ + K1000, K1100, K1001, K1101, K1002, K1102, K1003, K1103, K1105, K1107, K1008, K1108 \ +) { \ + { K0000, K0001, K0002, K0003, K0004, K0005, K0006, K0007, K0008 }, \ + { K0100, K0101, K0102, K0103, K0104, K0105, K0106, K0107, K0108 }, \ + { K0200, K0201, K0202, K0203, K0204, K0205, K0206, K0207, K0208 }, \ + { K0300, K0301, K0302, K0303, K0304, K0305, K0306, K0307, K0308 }, \ + { K0400, K0401, K0402, K0403, K0404, K0405, K0406, K0407, K0408 }, \ + { K0500, K0501, K0502, K0503, K0504, K0505, K0506, K0507, K0508 }, \ + { K0600, K0601, K0602, K0603, K0604, K0605, K0606, K0607, K0608 }, \ + { K0700, K0701, K0702, K0703, K0704, K0705, K0706, K0707, _____ }, \ + { K0800, K0801, K0802, K0803, K0804, K0805, K0806, K0807, K0808 }, \ + { K0900, K0901, K0902, K0903, K0904, K0905, K0906, K0907, K0908 }, \ + { K1000, K1001, K1002, K1003, _____, _____, _____, _____, K1008 }, \ + { K1100, K1101, K1102, K1103, _____, K1105, _____, K1107, K1108 } \ +} diff --git a/keyboards/aeboards/aegis/config.h b/keyboards/aeboards/aegis/config.h new file mode 100644 index 000000000..787c0f485 --- /dev/null +++ b/keyboards/aeboards/aegis/config.h @@ -0,0 +1,71 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x4145 // "AE" +#define PRODUCT_ID 0x0807 // 1800 -> 0x0708 -> 0x0807 ;-) +#define DEVICE_VER 0x0001 +#define MANUFACTURER AEboards +#define PRODUCT Aegis +#define DESCRIPTION 1800 Left Handed Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { F5, F6, E6, F7, D1, D0, D6, D4, B4, D7, B6, B5 } +#define MATRIX_COL_PINS { C7, C6, B7, D2, D3, B3, B2, B1, B0 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 + +//#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*12*9*2)) = (35+864) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 899 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 125 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + diff --git a/keyboards/aeboards/aegis/keymaps/default/keymap.c b/keyboards/aeboards/aegis/keymaps/default/keymap.c new file mode 100644 index 000000000..8437ffeb4 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/default/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------. + * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| + * `-------------------' `-------------------------------------------------------------' + * + * |-------------------| ,-------------------------------------------------------------. + * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del| + * |-------------------| |-------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | + * | + |--------------| |-------------------------------------------------------------| + * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-------------------| |-------------------------------------------------------------| + * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN | + * | ENT|-------------------------------------------------------------------------------| + * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| | + * `------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_aegis( + KC_END , KC_HOME, KC_PGDN, KC_PGUP, KC_ESC , 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_PMNS, KC_PAST, KC_PSLS, KC_BSPC, KC_GRV , 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_DEL, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_ENT , + KC_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1), + KC_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP , KC_PGDN, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/aeboards/aegis/keymaps/default/readme.md b/keyboards/aeboards/aegis/keymaps/default/readme.md new file mode 100644 index 000000000..e6b242456 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The Default Aegis Layout + diff --git a/keyboards/aeboards/aegis/keymaps/via/keymap.c b/keyboards/aeboards/aegis/keymaps/via/keymap.c new file mode 100644 index 000000000..8437ffeb4 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/keymap.c @@ -0,0 +1,72 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * ,-------------------. ,-------------------------------------------------------------. + * |End |Home|PgDn|PgUp| |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| + * `-------------------' `-------------------------------------------------------------' + * + * |-------------------| ,-------------------------------------------------------------. + * |- | * | / |BSPC| | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|pipe| del| + * |-------------------| |-------------------------------------------------------------| + * | | 9 | 8 | 7 | |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| BSPC | + * | + |--------------| |-------------------------------------------------------------| + * | | 6 | 5 | 4 | |Ctrl | A| S| D| F| G| H| J| K| L| ;| '|Return | + * |-------------------| |-------------------------------------------------------------| + * | | 3 | 2 | 1 | |Up| |Shift| Z| X| C| V| B| N| M| ,| .| /|Shift | FN | + * | ENT|-------------------------------------------------------------------------------| + * | | 0 | left |Dn| rhgt | FN | Alt | Space |Alt |Gui| ctrl| | + * `------------------------------------------------------------------------------------' + */ + [0] = LAYOUT_aegis( + KC_END , KC_HOME, KC_PGDN, KC_PGUP, KC_ESC , 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_PMNS, KC_PAST, KC_PSLS, KC_BSPC, KC_GRV , 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_DEL, + KC_PPLS, KC_P9 , KC_P8 , KC_P7 , 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_PPLS, KC_P6 , KC_P5 , KC_P4 , 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_ENT , + KC_PENT, KC_P3 , KC_P2 , KC_P1 , KC_UP , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_RSFT, MO(1), + KC_PENT, KC_PDOT, KC_P0 , KC_LEFT, KC_DOWN, KC_RGHT, MO(1), KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL + ), + + [1] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_UP , KC_PGDN, KC_BSPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_ENT , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_VOLD, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [2] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), + + [3] = LAYOUT_aegis( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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/aeboards/aegis/keymaps/via/readme.md b/keyboards/aeboards/aegis/keymaps/via/readme.md new file mode 100644 index 000000000..a80671bd9 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA Aegis Layout + diff --git a/keyboards/aeboards/aegis/keymaps/via/rules.mk b/keyboards/aeboards/aegis/keymaps/via/rules.mk new file mode 100644 index 000000000..f072c6719 --- /dev/null +++ b/keyboards/aeboards/aegis/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/aeboards/aegis/readme.md b/keyboards/aeboards/aegis/readme.md new file mode 100644 index 000000000..1b8fc124e --- /dev/null +++ b/keyboards/aeboards/aegis/readme.md @@ -0,0 +1,14 @@ +AEGIS +=== + +A left handed g80-1800-esque keyboard by [aeboards](https://aeboards.com/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: AEGIS +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make aeboards/aegis:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
\ No newline at end of file diff --git a/keyboards/aeboards/aegis/rules.mk b/keyboards/aeboards/aegis/rules.mk new file mode 100644 index 000000000..f1c632289 --- /dev/null +++ b/keyboards/aeboards/aegis/rules.mk @@ -0,0 +1,65 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/ai03/README.md b/keyboards/ai03/README.md new file mode 100644 index 000000000..90bd21928 --- /dev/null +++ b/keyboards/ai03/README.md @@ -0,0 +1,4 @@ +# ai03 +QMK folders for PCB commissions. + +Website: [ai03 Keyboard Designs](https://kb.ai03.me/)
\ No newline at end of file diff --git a/keyboards/ai03/lunar/config.h b/keyboards/ai03/lunar/config.h new file mode 100644 index 000000000..4b30ca309 --- /dev/null +++ b/keyboards/ai03/lunar/config.h @@ -0,0 +1,266 @@ +/* +Copyright 2019 Ryota Goto + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xA103 +#define PRODUCT_ID 0x0001 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Switchplate Peripherals +#define PRODUCT Lunar +#define DESCRIPTION 65% AEK keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B3, D0, D1, D2, D3 } +#define MATRIX_COL_PINS { D5, D4, D6, D7, B4, B5, B6, C6, C7, F7, F6, F5, F4, F1, F0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +// #define RGB_DI_PIN E2 +// #ifdef RGB_DI_PIN +// #define RGBLED_NUM 16 +// #define RGBLIGHT_HUE_STEP 8 +// #define RGBLIGHT_SAT_STEP 8 +// #define RGBLIGHT_VAL_STEP 8 +// #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ +// #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ +// #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +// #endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 + +/* VIA Configurator Compatibility */ + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR = DYNAMIC_KEYMAP_EEPROM_ADDR + (DYNAMIC_KEYMAP_LAYER_COUNT * MATRIX_ROWS * MATRIX_COLS * 2) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +// DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE = 1024 - DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/ai03/lunar/info.json b/keyboards/ai03/lunar/info.json new file mode 100644 index 000000000..c7f6454f0 --- /dev/null +++ b/keyboards/ai03/lunar/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Lunar", + "url": "https://geekhack.org/index.php?topic=96112.0", + "maintainer": "ai03", + "bootloader": "", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Insert", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Delete", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Home", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"End", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4, "w":1.25}, {"label":"Alt", "x":2.75, "y":4, "w":1.5}, {"x":4.25, "y":4, "w":2.25}, {"x":6.5, "y":4, "w":1.5}, {"x":8, "y":4, "w":2.75}, {"label":"Alt", "x":10.75, "y":4, "w":1.25}, {"label":"Win", "x":12, "y":4}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + } + } +}
\ No newline at end of file diff --git a/keyboards/ai03/lunar/keymaps/default/keymap.c b/keyboards/ai03/lunar/keymaps/default/keymap.c new file mode 100644 index 000000000..4705d00ec --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/default/keymap.c @@ -0,0 +1,90 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + MANUAL = SAFE_RANGE, + SWPLURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + + Layout + + K000 K001 K002 K003 K004 K005 K006 K007 K008 K009 K010 K011 K012 K013 K212 K014 + K100 K101 K102 K103 K104 K105 K106 K107 K108 K109 K110 K111 K112 K113 K114 + K200 K201 K202 K203 K204 K205 K206 K207 K208 K209 K210 K211 K213 K214 + K300 K301 K302 K303 K304 K305 K306 K307 K308 K309 K310 K311 K313 K314 + K400 K401 K402 K403 K405 K407 K409 K410 K411 K413 K414 + + K212 = Split backspace (bound to Del by default) + K403, K407 = Split space (bound to space by default) + K405 = Main space + + */ + + [0] = LAYOUT( /* Base */ + 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_BSPC, KC_BSPC, KC_HOME, + 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_BSLS, KC_END, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* FN */ + RESET, 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_DEL, KC_DEL, MANUAL, + KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, SWPLURL, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, + _______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MANUAL: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("https://kb.ai03.me/redir/lunar/index.html"); + } else { + // when keycode QMKBEST is released + } + break; + case SWPLURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://switchplate.co/collections/lunar-group-buy"); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/ai03/lunar/keymaps/default/readme.md b/keyboards/ai03/lunar/keymaps/default/readme.md new file mode 100644 index 000000000..8ff536ffc --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/default/readme.md @@ -0,0 +1,2 @@ +# The default keymap for Lunar +For use without VIA configurator.
\ No newline at end of file diff --git a/keyboards/ai03/lunar/keymaps/via/keymap.c b/keyboards/ai03/lunar/keymaps/via/keymap.c new file mode 100644 index 000000000..b98e6cf0a --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/via/keymap.c @@ -0,0 +1,64 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* + + Layout + + K000 K001 K002 K003 K004 K005 K006 K007 K008 K009 K010 K011 K012 K013 K212 K014 + K100 K101 K102 K103 K104 K105 K106 K107 K108 K109 K110 K111 K112 K113 K114 + K200 K201 K202 K203 K204 K205 K206 K207 K208 K209 K210 K211 K213 K214 + K300 K301 K302 K303 K304 K305 K306 K307 K308 K309 K310 K311 K313 K314 + K400 K401 K402 K403 K405 K407 K409 K410 K411 K413 K414 + + K212 = Split backspace (bound to Del by default) + K403, K407 = Split space (bound to space by default) + K405 = Main space + + */ + + [0] = LAYOUT( /* Base */ + 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_BSPC, KC_BSPC, KC_HOME, + 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_BSLS, KC_END, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT( /* FN */ + RESET, 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_DEL, KC_DEL, _______, + KC_CAPS, _______, KC_UP, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_VOLD, KC_VOLU, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, + _______, KC_RCTL, KC_RGUI, KC_RALT, _______, _______, KC_P0, KC_P1, KC_P2, KC_P3, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END + ), + [2] = LAYOUT( /* Blank. For VIA compatibility */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + [3] = LAYOUT( /* Blank. For VIA compatibility */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/ai03/lunar/keymaps/via/readme.md b/keyboards/ai03/lunar/keymaps/via/readme.md new file mode 100644 index 000000000..ff0b73bfc --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/via/readme.md @@ -0,0 +1,2 @@ +# The VIA keymap for Lunar +This keymap is for compatibility with the VIA configurator.
\ No newline at end of file diff --git a/keyboards/ai03/lunar/keymaps/via/rules.mk b/keyboards/ai03/lunar/keymaps/via/rules.mk new file mode 100644 index 000000000..7c10c3fbb --- /dev/null +++ b/keyboards/ai03/lunar/keymaps/via/rules.mk @@ -0,0 +1,86 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +SRC += keyboards/wilba_tech/wt_main.c + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/ai03/lunar/lunar.c b/keyboards/ai03/lunar/lunar.c new file mode 100644 index 000000000..37438c71e --- /dev/null +++ b/keyboards/ai03/lunar/lunar.c @@ -0,0 +1,22 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "lunar.h" + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/ai03/lunar/lunar.h b/keyboards/ai03/lunar/lunar.h new file mode 100644 index 000000000..2e66ecb5c --- /dev/null +++ b/keyboards/ai03/lunar/lunar.h @@ -0,0 +1,41 @@ +/* Copyright 2019 Ryota Goto + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K212, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K313, K314, \ + K400, K401, K402, K403, K405, K407, K409, K410, K411, K413, K414 \ +) \ +{ \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, KC_NO, K313, K314 }, \ + { K400, K401, K402, K403, KC_NO, K405, KC_NO, K407, KC_NO, K409, K410, K411, KC_NO, K413, K414 } \ +} diff --git a/keyboards/ai03/lunar/readme.md b/keyboards/ai03/lunar/readme.md new file mode 100644 index 000000000..585d6454b --- /dev/null +++ b/keyboards/ai03/lunar/readme.md @@ -0,0 +1,15 @@ +# Lunar + +![Photo](https://i.imgur.com/hYoW8IJ.jpg) + +A 65% keyboard made specifically for Alps SKCM/L switches and AEK/M0116 keycaps. + +Keyboard Maintainer: [ai03](https://github.com/ai03-2725) +Hardware Supported: Official Lunar PCB +Hardware Availability: [Switchplate Peripherals](https://switchplate.co/) + +Make example for this keyboard (after setting up your build environment): + + make ai03/lunar:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/ai03/lunar/rules.mk b/keyboards/ai03/lunar/rules.mk new file mode 100644 index 000000000..8c2532574 --- /dev/null +++ b/keyboards/ai03/lunar/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/al1/config.h b/keyboards/al1/config.h index f92ed44d3..3a3daf867 100644 --- a/keyboards/al1/config.h +++ b/keyboards/al1/config.h @@ -50,7 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -102,11 +101,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/alf/dc60/config.h b/keyboards/alf/dc60/config.h index f6e527119..c3e2ecb2e 100644 --- a/keyboards/alf/dc60/config.h +++ b/keyboards/alf/dc60/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -221,4 +216,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/alf/x2/config.h b/keyboards/alf/x2/config.h index f2106fa88..21d919983 100644 --- a/keyboards/alf/x2/config.h +++ b/keyboards/alf/x2/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/alice/alice.h b/keyboards/alice/alice.h index a92618593..16460ed70 100644 --- a/keyboards/alice/alice.h +++ b/keyboards/alice/alice.h @@ -19,13 +19,25 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "quantum.h" +/* LAYOUT + * ┌───┐ ┌───┬───┬───┬───┬───┬───┬───┐ ┌───┬───┬───┬───┬───┬───┬───┬───┐ + * │63 │ │00 │01 │02 │03 │04 │05 │06 │ │07 │08 │09 │10 │11 │12 │13 │14 │ + * ├───┤ ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┘ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │64 │ │15 │16 │17 │18 │19 │20 │ │21 │22 │23 │24 │25 │26 │27 │28 │ + * ├───┤ ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┐ └┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │65 │ │29 │30 │31 │32 │33 │34 │ │35 │36 │37 │38 │39 │40 │41 │ + * └───┘ ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┐ ┌─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ + * │42 │43 │44 │45 │46 │47 │ │48 │49 │50 │51 │52 │53 │54 │55 │ + * ├─────┬──┴──┬┴───┴┬──┴───┴┬──┴─┐ ├───┴───┴──┬┴───┴┬──┴───┴────┬─┴───┤ + * │56 │ │57 │58 │59 │ │60 │61 │ │62 │ + * └─────┘ └─────┴───────┴────┘ └──────────┴─────┘ └─────┘ + */ #define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ - K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ - K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \ - K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ - K56, K57, K58, K59, K60, K61, K62, \ - K63, K64, K65 \ + K63, K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, K13, K14, \ + K64, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, K25, K26, K27, K28, \ + K65, K29, K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K40, K41, \ + K42, K43, K44, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, \ + K56, K57, K58, K59, K60, K61, K62 \ ) \ { \ { K00 , K01 , K02 , K03 , K04 , K05 , K06 , K07 , K08 , K09 , K10 , K11 , K12 , K13 , K14 }, \ diff --git a/keyboards/alice/config.h b/keyboards/alice/config.h index 7a8cbb52f..07b9599f5 100644 --- a/keyboards/alice/config.h +++ b/keyboards/alice/config.h @@ -29,14 +29,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 15 #define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } -#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } #define DIODE_DIRECTION COL2ROW -#define RGBLED_NUM 20 +#define RGBLED_NUM 18 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/alice/info.json b/keyboards/alice/info.json index 5ea1f6756..b26209332 100644 --- a/keyboards/alice/info.json +++ b/keyboards/alice/info.json @@ -6,7 +6,75 @@ "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"~", "x":1.25, "y":0}, {"label":"!", "x":2.25, "y":0}, {"label":"@", "x":3.25, "y":0}, {"label":"#", "x":4.25, "y":0}, {"label":"$", "x":5.25, "y":0}, {"label":"%", "x":6.25, "y":0}, {"label":"^", "x":7.25, "y":0}, {"label":"&", "x":9.75, "y":0}, {"label":"*", "x":10.75, "y":0}, {"label":"(", "x":11.75, "y":0}, {"label":")", "x":12.75, "y":0}, {"label":"_", "x":13.75, "y":0}, {"label":"+", "x":14.75, "y":0}, {"label":"|", "x":15.75, "y":0}, {"label":"~", "x":16.75, "y":0}, {"label":"Insert", "x":0, "y":1}, {"label":"Tab", "x":1.25, "y":1, "w":1.5}, {"label":"Q", "x":2.75, "y":1}, {"label":"W", "x":3.75, "y":1}, {"label":"E", "x":4.75, "y":1}, {"label":"R", "x":5.75, "y":1}, {"label":"T", "x":6.75, "y":1}, {"label":"Y", "x":9.25, "y":1}, {"label":"U", "x":10.25, "y":1}, {"label":"I", "x":11.25, "y":1}, {"label":"O", "x":12.25, "y":1}, {"label":"P", "x":13.25, "y":1}, {"label":"{", "x":14.25, "y":1}, {"label":"}", "x":15.25, "y":1}, {"label":"Backspace", "x":16.25, "y":1, "w":1.5}, {"label":"Delete", "x":0, "y":2}, {"label":"Caps Lock", "x":1.25, "y":2, "w":1.75}, {"label":"A", "x":3, "y":2}, {"label":"S", "x":4, "y":2}, {"label":"D", "x":5, "y":2}, {"label":"F", "x":6, "y":2}, {"label":"G", "x":7, "y":2}, {"label":"H", "x":9.5, "y":2}, {"label":"J", "x":10.5, "y":2}, {"label":"K", "x":11.5, "y":2}, {"label":"L", "x":12.5, "y":2}, {"label":":", "x":13.5, "y":2}, {"label":"\"", "x":14.5, "y":2}, {"label":"Enter", "x":15.5, "y":2, "w":2.25}, {"label":"Shift", "x":1.25, "y":3, "w":2.25}, {"label":"Z", "x":3.5, "y":3}, {"label":"X", "x":4.5, "y":3}, {"label":"C", "x":5.5, "y":3}, {"label":"V", "x":6.5, "y":3}, {"label":"B", "x":9, "y":3}, {"label":"N", "x":10, "y":3}, {"label":"M", "x":11, "y":3}, {"label":"<", "x":12, "y":3}, {"label":">", "x":13, "y":3}, {"label":"?", "x":14, "y":3}, {"label":"Shift", "x":15, "y":3, "w":1.75}, {"label":"Fn", "x":16.75, "y":3}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.5}, {"label":"Alt", "x":3.5, "y":4, "w":1.5}, {"x":5, "y":4, "w":2.25}, {"label":"Win", "x":7.25, "y":4, "w":1.25}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.5}, {"label":"Ctrl", "x":16.25, "y":4, "w":1.5}] + "key_count": 66, + "layout": [ + {"label":"K63", "x":0, "y":0}, + {"label":"K00", "x":1.25, "y":0}, + {"label":"K01", "x":2.25, "y":0}, + {"label":"K02", "x":3.25, "y":0}, + {"label":"K03", "x":4.25, "y":0}, + {"label":"K04", "x":5.25, "y":0}, + {"label":"K05", "x":6.25, "y":0}, + {"label":"K06", "x":7.25, "y":0}, + {"label":"K07", "x":10.25, "y":0}, + {"label":"K08", "x":11.25, "y":0}, + {"label":"K09", "x":12.25, "y":0}, + {"label":"K10", "x":13.25, "y":0}, + {"label":"K11", "x":14.25, "y":0}, + {"label":"K12", "x":15.25, "y":0}, + {"label":"K13", "x":16.25, "y":0}, + {"label":"K14", "x":17.25, "y":0}, + {"label":"K64", "x":0, "y":1}, + {"label":"K15", "x":1.25, "y":1, "w":1.5}, + {"label":"K16", "x":2.75, "y":1}, + {"label":"K17", "x":3.75, "y":1}, + {"label":"K18", "x":4.75, "y":1}, + {"label":"K19", "x":5.75, "y":1}, + {"label":"K20", "x":6.75, "y":1}, + {"label":"K21", "x":9.75, "y":1}, + {"label":"K22", "x":10.75, "y":1}, + {"label":"K23", "x":11.75, "y":1}, + {"label":"K24", "x":12.75, "y":1}, + {"label":"K25", "x":13.75, "y":1}, + {"label":"K26", "x":14.75, "y":1}, + {"label":"K27", "x":15.75, "y":1}, + {"label":"K28", "x":16.75, "y":1, "w":1.5}, + {"label":"K65", "x":0, "y":2}, + {"label":"K29", "x":1.25, "y":2, "w":1.75}, + {"label":"K30", "x":3, "y":2}, + {"label":"K31", "x":4, "y":2}, + {"label":"K32", "x":5, "y":2}, + {"label":"K33", "x":6, "y":2}, + {"label":"K34", "x":7, "y":2}, + {"label":"K35", "x":10, "y":2}, + {"label":"K36", "x":11, "y":2}, + {"label":"K37", "x":12, "y":2}, + {"label":"K38", "x":13, "y":2}, + {"label":"K39", "x":14, "y":2}, + {"label":"K40", "x":15, "y":2}, + {"label":"K41", "x":16, "y":2, "w":2.25}, + {"label":"K42", "x":1.25, "y":3, "w":2.25}, + {"label":"K43", "x":3.5, "y":3}, + {"label":"K44", "x":4.5, "y":3}, + {"label":"K45", "x":5.5, "y":3}, + {"label":"K46", "x":6.5, "y":3}, + {"label":"K47", "x":7.5, "y":3}, + {"label":"K48", "x":9.5, "y":3}, + {"label":"K49", "x":10.5, "y":3}, + {"label":"K50", "x":11.5, "y":3}, + {"label":"K51", "x":12.5, "y":3}, + {"label":"K52", "x":13.5, "y":3}, + {"label":"K53", "x":14.5, "y":3}, + {"label":"K54", "x":15.5, "y":3, "w":1.75}, + {"label":"K55", "x":17.25, "y":3}, + {"label":"K56", "x":1.25, "y":4, "w":1.5}, + {"label":"K57", "x":4.25, "y":4, "w":1.5}, + {"label":"K58", "x":5.75, "y":4, "w":2}, + {"label":"K59", "x":7.75, "y":4, "w":1.25}, + {"label":"K60", "x":9.5, "y":4, "w":2.75}, + {"label":"K61", "x":12.25, "y":4, "w":1.5}, + {"label":"K62", "x":16.75, "y":4, "w":1.5} + ] } } } diff --git a/keyboards/alice/keymaps/default/keymap.c b/keyboards/alice/keymaps/default/keymap.c index a0b6d467d..29fff6618 100644 --- a/keyboards/alice/keymaps/default/keymap.c +++ b/keyboards/alice/keymaps/default/keymap.c @@ -19,19 +19,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_GESC, 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_GRV, KC_BSLS, \ - 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, \ - KC_ESC, KC_PGUP, KC_PGDN \ + KC_ESC, KC_GESC, 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_GRV, KC_BSLS, \ + KC_PGUP, 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_PGDN, 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_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL \ ), [1] = LAYOUT( - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______ \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP , _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ ), }; diff --git a/keyboards/alice/keymaps/mrkeebs/keymap.c b/keyboards/alice/keymaps/mrkeebs/keymap.c index 6b0133870..3d8099c41 100644 --- a/keyboards/alice/keymaps/mrkeebs/keymap.c +++ b/keyboards/alice/keymaps/mrkeebs/keymap.c @@ -19,19 +19,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_GESC, 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_GRV, KC_BSLS, \ - 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ - KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL, \ - KC_ESC, KC_PGUP, KC_PGDN \ + KC_ESC, KC_GESC, 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_GRV, KC_BSLS, \ + KC_PGUP, 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_PGDN, 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_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), \ + KC_LGUI, KC_LALT, KC_SPC, KC_LGUI, KC_SPC, KC_RALT, KC_RCTL \ ), [1] = LAYOUT( - KC_GRV , 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_DEL, KC_INS, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_UP , _______, _______, \ - _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, \ - RESET, _______, _______ \ + RESET, KC_GRV , 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_DEL, KC_INS, \ + _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_UP , _______, _______, \ + _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RGHT, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______ \ ), }; diff --git a/keyboards/alpha/config.h b/keyboards/alpha/config.h index 1e16f5ca3..b177c8a4b 100755 --- a/keyboards/alpha/config.h +++ b/keyboards/alpha/config.h @@ -38,12 +38,6 @@ /* 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)) \ -) - - #define RGB_DI_PIN F4 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/alps64/config.h b/keyboards/alps64/config.h index 858a82ecd..74f8017ad 100644 --- a/keyboards/alps64/config.h +++ b/keyboards/alps64/config.h @@ -47,13 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/alu84/config.h b/keyboards/alu84/config.h index 9d2dca409..257c22e53 100755 --- a/keyboards/alu84/config.h +++ b/keyboards/alu84/config.h @@ -54,11 +54,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 16 diff --git a/keyboards/amj40/config.h b/keyboards/amj40/config.h index 411011122..4d5e4889c 100755 --- a/keyboards/amj40/config.h +++ b/keyboards/amj40/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index c81317b84..406ea8d25 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_ENT,\ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,\ - KC_LCTL, KC_LGUI, KC_LALT, F(0), F(1), F(2), KC_RALT, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, LT(_LOWER, KC_SPC),LT(_RAISE, KC_SPC),LT(_ADJUST, KC_LGUI), KC_RALT, KC_RCTL \ ), /* Function Layer 1 HHKB style @@ -106,24 +106,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; - - - -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_SPC), - [2] = ACTION_LAYER_TAP_KEY(_ADJUST, KC_LGUI), - -}; - - - - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/amj60/config.h b/keyboards/amj60/config.h index 7c06f9a6c..165f20cd4 100644 --- a/keyboards/amj60/config.h +++ b/keyboards/amj60/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index b5fd731dd..ca5fa92be 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -111,21 +111,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_iso_splitrshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, KC_BSLS, \ - _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ - _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; -enum function_id { - LAUNCH, - RGBLED_TOGGLE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(LAUNCH), - [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/amj96/config.h b/keyboards/amj96/config.h index 6c51a2443..2e49380ae 100644 --- a/keyboards/amj96/config.h +++ b/keyboards/amj96/config.h @@ -114,11 +114,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/amjpad/config.h b/keyboards/amjpad/config.h index 1a26d2ab6..f568d82f0 100644 --- a/keyboards/amjpad/config.h +++ b/keyboards/amjpad/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/at101_blackheart/config.h b/keyboards/at101_blackheart/config.h index 237cb095e..af4be3d71 100644 --- a/keyboards/at101_blackheart/config.h +++ b/keyboards/at101_blackheart/config.h @@ -33,8 +33,3 @@ /* force n-key rollover*/ #define FORCE_NKRO - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/atom47/rev2/config.h b/keyboards/atom47/rev2/config.h index df21130d3..7a044620b 100644 --- a/keyboards/atom47/rev2/config.h +++ b/keyboards/atom47/rev2/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/atom47/rev3/config.h b/keyboards/atom47/rev3/config.h index b94dc9773..e14800b0f 100644 --- a/keyboards/atom47/rev3/config.h +++ b/keyboards/atom47/rev3/config.h @@ -49,12 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/atomic/config.h b/keyboards/atomic/config.h index 9c40f54e7..8af23ffeb 100644 --- a/keyboards/atomic/config.h +++ b/keyboards/atomic/config.h @@ -98,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/atomic/keymaps/pvc/config.h b/keyboards/atomic/keymaps/pvc/config.h index e63a7340c..50afa7688 100644 --- a/keyboards/atomic/keymaps/pvc/config.h +++ b/keyboards/atomic/keymaps/pvc/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Enable Keyboard Locking via magic key #define KEYBOARD_LOCK_ENABLE - /* * Force NKRO * @@ -87,11 +86,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -153,7 +147,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - //#define VIBRATO_ENABLE //#define VIBRATO_STRENGTH_ENABLE diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index f8808892c..18c66c4e2 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -66,11 +66,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/atreus/keymaps/alphadox/config.h b/keyboards/atreus/keymaps/alphadox/config.h index df56849b0..e81029a03 100644 --- a/keyboards/atreus/keymaps/alphadox/config.h +++ b/keyboards/atreus/keymaps/alphadox/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/atreus/keymaps/dvorak_42_key/config.h b/keyboards/atreus/keymaps/dvorak_42_key/config.h index 43c51fb2f..953178ee4 100644 --- a/keyboards/atreus/keymaps/dvorak_42_key/config.h +++ b/keyboards/atreus/keymaps/dvorak_42_key/config.h @@ -18,10 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef CONFIG_H #define CONFIG_H - #include "config_common.h" - // mouse speed #define MOUSEKEY_INTERVAL 15 @@ -80,11 +78,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index d9eb1903e..5af7e6e6c 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" - /* Make Overloaded Keys switch faster */ #define TAPPING_TERM 150 @@ -70,11 +69,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/atreus62/config.h b/keyboards/atreus62/config.h index 8d9248947..67b5f9cb2 100644 --- a/keyboards/atreus62/config.h +++ b/keyboards/atreus62/config.h @@ -55,11 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/baguette/config.h b/keyboards/baguette/config.h index 806f9fb4f..0b53c653f 100644 --- a/keyboards/baguette/config.h +++ b/keyboards/baguette/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -221,4 +216,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/bantam44/config.h b/keyboards/bantam44/config.h index a55f62999..323852850 100644 --- a/keyboards/bantam44/config.h +++ b/keyboards/bantam44/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/bface/config.h b/keyboards/bface/config.h index 3d74af4f1..11ac373c0 100644 --- a/keyboards/bface/config.h +++ b/keyboards/bface/config.h @@ -21,7 +21,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D -// You can edit those at usbconfig.h about line 250. These values will +// You can edit those at usbconfig.h about line 250. These values will // unforunatly be ignored so far #define MANUFACTURER winkeyless.kr #define PRODUCT b.face @@ -36,9 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #ifdef BACKLIGHT_ENABLE // the backlight PWM does not work (yet). Therefore, we only have two backlight levels (on/off) #define BACKLIGHT_LEVELS 1 diff --git a/keyboards/bfake/config.h b/keyboards/bfake/config.h index de8c4b5df..01fd4dff3 100644 --- a/keyboards/bfake/config.h +++ b/keyboards/bfake/config.h @@ -43,7 +43,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/blockey/config.h b/keyboards/blockey/config.h index 53860bfbc..f47849744 100644 --- a/keyboards/blockey/config.h +++ b/keyboards/blockey/config.h @@ -58,8 +58,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_ANIMATIONS - - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -111,11 +109,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/bmini/config.h b/keyboards/bmini/config.h index b7a25e050..96acd9bf1 100644 --- a/keyboards/bmini/config.h +++ b/keyboards/bmini/config.h @@ -35,7 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/bminiex/config.h b/keyboards/bminiex/config.h index 3f160109e..ebd33ad61 100644 --- a/keyboards/bminiex/config.h +++ b/keyboards/bminiex/config.h @@ -35,7 +35,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_LEVELS 5 #define NO_UART 1 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - diff --git a/keyboards/bpiphany/frosty_flake/config.h b/keyboards/bpiphany/frosty_flake/config.h index 2c73f1074..a797fef42 100644 --- a/keyboards/bpiphany/frosty_flake/config.h +++ b/keyboards/bpiphany/frosty_flake/config.h @@ -85,11 +85,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/bpiphany/kitten_paw/config.h b/keyboards/bpiphany/kitten_paw/config.h index d7089734a..5ecf6d8dd 100644 --- a/keyboards/bpiphany/kitten_paw/config.h +++ b/keyboards/bpiphany/kitten_paw/config.h @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6050 @@ -53,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/bpiphany/pegasushoof/config.h b/keyboards/bpiphany/pegasushoof/config.h index 0dbec26e4..885afaa90 100644 --- a/keyboards/bpiphany/pegasushoof/config.h +++ b/keyboards/bpiphany/pegasushoof/config.h @@ -38,9 +38,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/bpiphany/tiger_lily/config.h b/keyboards/bpiphany/tiger_lily/config.h index 490819290..de1d90127 100644 --- a/keyboards/bpiphany/tiger_lily/config.h +++ b/keyboards/bpiphany/tiger_lily/config.h @@ -85,11 +85,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/bpiphany/unloved_bastard/config.h b/keyboards/bpiphany/unloved_bastard/config.h index d89e85862..fc5090e64 100644 --- a/keyboards/bpiphany/unloved_bastard/config.h +++ b/keyboards/bpiphany/unloved_bastard/config.h @@ -83,11 +83,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/bthlabs/geekpad/config.h b/keyboards/bthlabs/geekpad/config.h index 2c33f359f..6b03ae30a 100644 --- a/keyboards/bthlabs/geekpad/config.h +++ b/keyboards/bthlabs/geekpad/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/candybar/config.h b/keyboards/candybar/config.h index 113e91717..c15396713 100644 --- a/keyboards/candybar/config.h +++ b/keyboards/candybar/config.h @@ -63,11 +63,6 @@ */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -118,4 +113,3 @@ // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP - diff --git a/keyboards/handwired/ortho60/ortho60.c b/keyboards/cannonkeys/bluepill/keyboard.c index 32db007b6..865628ecc 100644 --- a/keyboards/handwired/ortho60/ortho60.c +++ b/keyboards/cannonkeys/bluepill/keyboard.c @@ -1,15 +1,9 @@ - -#include "ortho60.h" - #include "ch.h" #include "hal.h" - -#include "underglow.h" -#include "print.h" -#include "debug.h" +#include "led_custom.h" #include "util.h" +#include "quantum.h" -/* generic STM32F103C8T6 board */ #ifdef BOARD_GENERIC_STM32_F103 #define LED_ON() do { palClearPad(GPIOC, 13) ;} while (0) #define LED_OFF() do { palSetPad(GPIOC, 13); } while (0) @@ -19,14 +13,18 @@ void matrix_init_kb(void){ /* MOSI pin*/ palSetPadMode(GPIOB, 15, PAL_MODE_STM32_ALTERNATE_PUSHPULL); - LED_ON(); - palSetPad(GPIOA, 8); wait_ms(500); - palClearPad(GPIOA, 8); LED_OFF(); +#ifdef RGBLIGHT_ENABLE leds_init(); +#endif +} - +void matrix_scan_kb(void) +{ + #ifdef RGBLIGHT_ENABLE + rgblight_task(); + #endif } diff --git a/keyboards/cannonkeys/bluepill/led.c b/keyboards/cannonkeys/bluepill/led.c new file mode 100644 index 000000000..a9ede5bba --- /dev/null +++ b/keyboards/cannonkeys/bluepill/led.c @@ -0,0 +1,257 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "hal.h" +#include "backlight.h" +#include "led.h" +#include "led_custom.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + + +void backlight_init_ports(void) { + printf("backlight_init_ports()\n"); + #ifdef BACKLIGHT_ENABLE + + palSetPadMode(GPIOA, 8, PAL_MODE_STM32_ALTERNATE_PUSHPULL); + pwmStart(&PWMD1, &pwmCFG); + pwmEnableChannel(&PWMD1, 0, PWM_FRACTION_TO_WIDTH(&PWMD1, 0xFFFF,cie_lightness(0xFFFF))); + #endif +} + +void backlight_set(uint8_t level) { + printf("backlight_set(%d)\n", level); + #ifdef BACKLIGHT_ENABLE + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + printf("duty: (%d)\n", duty); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD1, 0); + } else { + // Turn backlight on + if(!is_breathing()){ + pwmEnableChannel(&PWMD1, 0, PWM_FRACTION_TO_WIDTH(&PWMD1,0xFFFF,duty)); + } + } + #endif +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { + return PWMD1.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD1); + printf("starting with callback\n"); + pwmStart(&PWMD1, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD1); + pwmEnableChannelI( + &PWMD1, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD1, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD1); + printf("starting without callback\n"); + pwmStart(&PWMD1, &pwmCFG); +} + +void breathing_enable(void) +{ + printf("breathing_enable()\n"); + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + printf("breathing_disable()\n"); + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(get_backlight_level()); +} + +void breathing_self_disable(void) +{ + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()){ + printf("disable breathing\n"); + breathing_disable(); + } else { + printf("enable breathing\n"); + breathing_enable(); + } +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * get_backlight_level(); +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD1, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD1, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} + + +void led_set(uint8_t usb_led) +{ + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + palSetPad(GPIOC, 13); + } else { + palClearPad(GPIOC, 13); + } +} diff --git a/keyboards/cannonkeys/bluepill/led_custom.h b/keyboards/cannonkeys/bluepill/led_custom.h new file mode 100644 index 000000000..8451c06d6 --- /dev/null +++ b/keyboards/cannonkeys/bluepill/led_custom.h @@ -0,0 +1,6 @@ +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); +bool is_breathing(void); diff --git a/keyboards/handwired/practice60/underglow.c b/keyboards/cannonkeys/bluepill/ws2812.c index 1383af189..7d0f909c0 100644 --- a/keyboards/handwired/practice60/underglow.c +++ b/keyboards/cannonkeys/bluepill/ws2812.c @@ -1,8 +1,12 @@ -#include "ch.h" -#include "hal.h" +/* + * LEDDriver.c + * + * Created on: Aug 26, 2013 + * Author: Omri Iluz + */ -#include "hsv2rgb.h" -#include "underglow.h" +#include "ws2812.h" +#include "stdlib.h" #define BYTES_FOR_LED_BYTE 4 #define NB_COLORS 3 @@ -10,18 +14,17 @@ #define DATA_SIZE BYTES_FOR_LED*NB_LEDS #define RESET_SIZE 200 #define PREAMBLE_SIZE 4 - // Define the spi your LEDs are plugged to here -#define LEDS_SPI SPID2 +#define WS2812_SPI SPID2 // Define the number of LEDs you wish to control in your LED strip -#define NB_LEDS 8 +#define NB_LEDS RGBLED_NUM -#define LED_SPIRAL 1 + #define LED_SPIRAL 1 -static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE]; + static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE]; static uint8_t get_protocol_eq(uint8_t data, int pos); -/* + /* * This lib is meant to be used asynchronously, thus the colors contained in * the txbuf will be sent in loop, so that the colors are always the ones you * put in the table (the user thus have less to worry about) @@ -37,38 +40,18 @@ static THD_WORKING_AREA(LEDS_THREAD_WA, 128); static THD_FUNCTION(ledsThread, arg) { (void) arg; while(1){ - spiSend(&LEDS_SPI, PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE, txbuf); - } -} - -#if LED_SPIRAL -/* - * 'Led spiral' is a simple demo in which we put all the leds to the same - * color, where this color does all the hsv circle in loop. - * If you want to launch the thread that will chage the led colors to the - * appropriate value, simply set LED_SPIRAL to 1. - */ -static THD_WORKING_AREA(HSVTRANS_WA, 128); -static THD_FUNCTION(hsv_transThread, arg){ - (void) arg; - hsv_color color = {0, 255, 127}; - while(1){ - color.h += 1; - color.h %= 256; - set_leds_color_hsv(color); - chThdSleepMilliseconds(50); + spiSend(&WS2812_SPI, PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE, txbuf); } } -#endif -static const SPIConfig spicfg = { + static const SPIConfig spicfg = { NULL, - GPIOB, - 15, - SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us + PORT_WS2812, + PIN_WS2812, + SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us (2.25 MHz) }; -/* + /* * Function used to initialize the driver. * * Starts by shutting off all the LEDs. @@ -77,21 +60,19 @@ static const SPIConfig spicfg = { * txbuff values) */ void leds_init(void){ + /* MOSI pin*/ + palSetPadMode(PORT_WS2812, PIN_WS2812, PAL_MODE_STM32_ALTERNATE_PUSHPULL); for(int i = 0; i < RESET_SIZE; i++) txbuf[DATA_SIZE+i] = 0x00; for (int i=0; i<PREAMBLE_SIZE; i++) txbuf[i] = 0x00; - spiAcquireBus(&LEDS_SPI); /* Acquire ownership of the bus. */ - spiStart(&LEDS_SPI, &spicfg); /* Setup transfer parameters. */ - spiSelect(&LEDS_SPI); /* Slave Select assertion. */ + spiAcquireBus(&WS2812_SPI); /* Acquire ownership of the bus. */ + spiStart(&WS2812_SPI, &spicfg); /* Setup transfer parameters. */ + spiSelect(&WS2812_SPI); /* Slave Select assertion. */ chThdCreateStatic(LEDS_THREAD_WA, sizeof(LEDS_THREAD_WA),NORMALPRIO, ledsThread, NULL); -#if LED_SPIRAL - chThdCreateStatic(HSVTRANS_WA, sizeof(HSVTRANS_WA), - NORMALPRIO, hsv_transThread, NULL); -#endif } -/* + /* * As the trick here is to use the SPI to send a huge pattern of 0 and 1 to * the ws2812b protocol, we use this helper function to translate bytes into * 0s and 1s for the LED (with the appropriate timing). @@ -109,20 +90,20 @@ static uint8_t get_protocol_eq(uint8_t data, int pos){ return eq; } -/* - * If you want to set a LED's color in the HSV color space, simply call this - * function with a hsv_color containing the desired color and the index of the - * led on the LED strip (starting from 0, the first one being the closest the - * first plugged to the board) - * - * Only set the color of the LEDs through the functions given by this API - * (unless you really know what you are doing) - */ -void set_led_color_hsv(hsv_color color, int pos){ - set_led_color_rgb(hsv2rgb(color), pos); + + void WS2812_init(void) { + leds_init(); } -/* + void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds) { + uint8_t i = 0; + while (i < number_of_leds) { + set_led_color_rgb(ledarray[i], i); + i++; + } +} + + /* * If you want to set a LED's color in the RGB color space, simply call this * function with a hsv_color containing the desired color and the index of the * led on the LED strip (starting from 0, the first one being the closest the @@ -131,7 +112,7 @@ void set_led_color_hsv(hsv_color color, int pos){ * Only set the color of the LEDs through the functions given by this API * (unless you really know what you are doing) */ -void set_led_color_rgb(rgb_color color, int pos){ +void set_led_color_rgb(LED_TYPE color, int pos){ for(int j = 0; j < 4; j++) txbuf[PREAMBLE_SIZE + BYTES_FOR_LED*pos + j] = get_protocol_eq(color.g, j); for(int j = 0; j < 4; j++) @@ -140,18 +121,12 @@ void set_led_color_rgb(rgb_color color, int pos){ txbuf[PREAMBLE_SIZE + BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE*2+j] = get_protocol_eq(color.b, j); } -/* - * Same as the two above, but sets all the LEDs in the LED strip (HSV) - */ -void set_leds_color_hsv(hsv_color color){ + void set_leds_color_rgb(LED_TYPE color){ for(int i = 0; i < NB_LEDS; i++) - set_led_color_hsv(color, i); + set_led_color_rgb(color, i); } -/* - * Same as the two above, but sets all the LEDs in the LED strip (RGB) - */ -void set_leds_color_rgb(rgb_color color){ - for(int i = 0; i < NB_LEDS; i++) - set_led_color_rgb(color, i); -}
\ No newline at end of file + + void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds) { + + } diff --git a/keyboards/cannonkeys/bluepill/ws2812.h b/keyboards/cannonkeys/bluepill/ws2812.h new file mode 100644 index 000000000..3b61ddcfa --- /dev/null +++ b/keyboards/cannonkeys/bluepill/ws2812.h @@ -0,0 +1,20 @@ +#pragma once + +#include "hal.h" +#include "rgblight_types.h" + + +void set_leds_color_rgb(LED_TYPE color); +void set_led_color_rgb(LED_TYPE color, int pos); +void leds_init(void); + + + // This is what users will use to interface with this +void ws2812_setleds(LED_TYPE *ledarray, uint16_t number_of_leds); +void ws2812_setleds_rgbw(LED_TYPE *ledarray, uint16_t number_of_leds); + + +void WS2812_init(void); +void WS2812_set_color( uint8_t index, uint8_t red, uint8_t green, uint8_t blue ); +void WS2812_set_color_all( uint8_t red, uint8_t green, uint8_t blue ); +void WS2812_send_colors(void); diff --git a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c index 8c5a87f35..8c5a87f35 100644 --- a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.c +++ b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.c diff --git a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h index 9427adabf..9427adabf 100644 --- a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.h +++ b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.h diff --git a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk index 6b8b312fd..6b8b312fd 100644 --- a/keyboards/handwired/ortho60/boards/GENERIC_STM32_F103/board.mk +++ b/keyboards/cannonkeys/ortho48/boards/GENERIC_STM32_F103/board.mk diff --git a/keyboards/handwired/practice60/bootloader_defs.h b/keyboards/cannonkeys/ortho48/bootloader_defs.h index 0f45203cb..6b8fa9f72 100644 --- a/keyboards/handwired/practice60/bootloader_defs.h +++ b/keyboards/cannonkeys/ortho48/bootloader_defs.h @@ -7,4 +7,4 @@ // STM32F103* does NOT have an USB bootloader in ROM (only serial), // so setting anything here does not make much sense -// #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/handwired/ortho60/chconf.h b/keyboards/cannonkeys/ortho48/chconf.h index bbd9b2da6..bbd9b2da6 100644 --- a/keyboards/handwired/ortho60/chconf.h +++ b/keyboards/cannonkeys/ortho48/chconf.h diff --git a/keyboards/cannonkeys/ortho48/config.h b/keyboards/cannonkeys/ortho48/config.h new file mode 100644 index 000000000..497e08bcf --- /dev/null +++ b/keyboards/cannonkeys/ortho48/config.h @@ -0,0 +1,80 @@ +/* +Copyright 2015 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x0248 +#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 QMK +#define PRODUCT Ortho48 +#define DESCRIPTION Ortho48 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +#define MATRIX_COL_PINS { B11, B10, B1, B0, A7, A6, A5, B14, A15, A0, C15, C14} +#define MATRIX_ROW_PINS { B12, C13, A2, A1 } +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +#define RGBLIGHT_ANIMATIONS + +#define WS2812_LED_N 9 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 + + + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/handwired/ortho60/halconf.h b/keyboards/cannonkeys/ortho48/halconf.h index 5fba285a3..72879a575 100644 --- a/keyboards/handwired/ortho60/halconf.h +++ b/keyboards/cannonkeys/ortho48/halconf.h @@ -111,7 +111,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM TRUE #endif /** diff --git a/keyboards/cannonkeys/ortho48/info.json b/keyboards/cannonkeys/ortho48/info.json new file mode 100644 index 000000000..0e834245a --- /dev/null +++ b/keyboards/cannonkeys/ortho48/info.json @@ -0,0 +1,112 @@ +{ + "keyboard_name": "Ortho48", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x12": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Delete", "x":11, "y":0}, + {"label":"Esc", "x":0, "y":1}, + {"label":"A", "x":1, "y":1}, + {"label":"S", "x":2, "y":1}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1}, + {"label":"G", "x":5, "y":1}, + {"label":"H", "x":6, "y":1}, + {"label":"J", "x":7, "y":1}, + {"label":"K", "x":8, "y":1}, + {"label":"L", "x":9, "y":1}, + {"label":";", "x":10, "y":1}, + {"label":"'", "x":11, "y":1}, + {"label":"Shift", "x":0, "y":2}, + {"label":"Z", "x":1, "y":2}, + {"label":"X", "x":2, "y":2}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2}, + {"label":"B", "x":5, "y":2}, + {"label":"N", "x":6, "y":2}, + {"label":"M", "x":7, "y":2}, + {"label":",", "x":8, "y":2}, + {"label":".", "x":9, "y":2}, + {"label":"/", "x":10, "y":2}, + {"label":"Enter", "x":11, "y":2}, + {"label":"Fn", "x":0, "y":3}, + {"label":"Ctrl", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Meta", "x":3, "y":3}, + {"label":"Lower", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3}, + {"label":"Space", "x":6, "y":3}, + {"label":"Raise", "x":7, "y":3}, + {"label":"Left", "x":8, "y":3}, + {"label":"Down", "x":9, "y":3}, + {"label":"Up", "x":10, "y":3}, + {"label":"Right", "x":11, "y":3} + ] + }, + "LAYOUT_1x2uC": { + "layout": [ + {"label":"Tab", "x":0, "y":0}, + {"label":"Q", "x":1, "y":0}, + {"label":"W", "x":2, "y":0}, + {"label":"E", "x":3, "y":0}, + {"label":"R", "x":4, "y":0}, + {"label":"T", "x":5, "y":0}, + {"label":"Y", "x":6, "y":0}, + {"label":"U", "x":7, "y":0}, + {"label":"I", "x":8, "y":0}, + {"label":"O", "x":9, "y":0}, + {"label":"P", "x":10, "y":0}, + {"label":"Delete", "x":11, "y":0}, + {"label":"Esc", "x":0, "y":1}, + {"label":"A", "x":1, "y":1}, + {"label":"S", "x":2, "y":1}, + {"label":"D", "x":3, "y":1}, + {"label":"F", "x":4, "y":1}, + {"label":"G", "x":5, "y":1}, + {"label":"H", "x":6, "y":1}, + {"label":"J", "x":7, "y":1}, + {"label":"K", "x":8, "y":1}, + {"label":"L", "x":9, "y":1}, + {"label":";", "x":10, "y":1}, + {"label":"'", "x":11, "y":1}, + {"label":"Shift", "x":0, "y":2}, + {"label":"Z", "x":1, "y":2}, + {"label":"X", "x":2, "y":2}, + {"label":"C", "x":3, "y":2}, + {"label":"V", "x":4, "y":2}, + {"label":"B", "x":5, "y":2}, + {"label":"N", "x":6, "y":2}, + {"label":"M", "x":7, "y":2}, + {"label":",", "x":8, "y":2}, + {"label":".", "x":9, "y":2}, + {"label":"/", "x":10, "y":2}, + {"label":"Enter", "x":11, "y":2}, + {"label":"Fn", "x":0, "y":3}, + {"label":"Ctrl", "x":1, "y":3}, + {"label":"Alt", "x":2, "y":3}, + {"label":"Meta", "x":3, "y":3}, + {"label":"Lower", "x":4, "y":3}, + {"label":"Space", "x":5, "y":3, "w":2}, + {"label":"Raise", "x":7, "y":3}, + {"label":"Left", "x":8, "y":3}, + {"label":"Down", "x":9, "y":3}, + {"label":"Up", "x":10, "y":3}, + {"label":"Right", "x":11, "y":3} + ] + } + } +} diff --git a/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c new file mode 100644 index 000000000..2c3bc80c5 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/keymaps/default/keymap.c @@ -0,0 +1,89 @@ +/* +Copyright 2012,2013 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_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 _BASE 0 +#define _RAISE 1 +#define _LOWER 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = LAYOUT_ortho_4x12( + 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_ESC, 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 , + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_ortho_4x12( + 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_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_HOME, KC_END, _______, + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_ortho_4x12( + 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_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_PGUP, KC_PGDN, _______, + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY +), +}; diff --git a/keyboards/handwired/ortho60/ld/MKL26Z64.ld b/keyboards/cannonkeys/ortho48/ld/MKL26Z64.ld index c4ca8b874..c4ca8b874 100644 --- a/keyboards/handwired/ortho60/ld/MKL26Z64.ld +++ b/keyboards/cannonkeys/ortho48/ld/MKL26Z64.ld diff --git a/keyboards/handwired/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/ortho48/ld/STM32F103x8_stm32duino_bootloader.ld index d0688ef60..d0688ef60 100644 --- a/keyboards/handwired/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/keyboards/cannonkeys/ortho48/ld/STM32F103x8_stm32duino_bootloader.ld diff --git a/keyboards/handwired/practice60/mcuconf.h b/keyboards/cannonkeys/ortho48/mcuconf.h index 9945e7408..fced27289 100644 --- a/keyboards/handwired/practice60/mcuconf.h +++ b/keyboards/cannonkeys/ortho48/mcuconf.h @@ -132,7 +132,7 @@ * PWM driver system settings. */ #define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM1 TRUE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE diff --git a/keyboards/cannonkeys/ortho48/ortho48.c b/keyboards/cannonkeys/ortho48/ortho48.c new file mode 100644 index 000000000..fe38f0200 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/ortho48.c @@ -0,0 +1,3 @@ + +#include "ortho48.h" + diff --git a/keyboards/cannonkeys/ortho48/ortho48.h b/keyboards/cannonkeys/ortho48/ortho48.h new file mode 100644 index 000000000..1e51c37af --- /dev/null +++ b/keyboards/cannonkeys/ortho48/ortho48.h @@ -0,0 +1,29 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT_1x2uC( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35 , k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, KC_NO, k37, k38, k39, k3a, k3b } \ +} + +#define LAYOUT_ortho_4x12( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b } \ +} diff --git a/keyboards/cannonkeys/ortho48/readme.md b/keyboards/cannonkeys/ortho48/readme.md new file mode 100644 index 000000000..ba5516a34 --- /dev/null +++ b/keyboards/cannonkeys/ortho48/readme.md @@ -0,0 +1,12 @@ +# Ortho 48 + +A Blue Pill STM32F103C8T6-based 12x4 ortholinear keyboard. + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: Blue Pill STM32F103C8T6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/ortho48:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/practice60/rules.mk b/keyboards/cannonkeys/ortho48/rules.mk index 915b07320..2e483a8c2 100644 --- a/keyboards/handwired/practice60/rules.mk +++ b/keyboards/cannonkeys/ortho48/rules.mk @@ -1,7 +1,7 @@ # project specific files +VPATH += keyboards/cannonkeys/bluepill SRC = led.c \ - underglow.c \ - hsv2rgb.c + keyboard.c # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 @@ -50,7 +50,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes -LAYOUTS = 60_ansi - -DEFAULT_FOLDER = handwired/practice60 +LAYOUTS = ortho_4x12 diff --git a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c index 8c5a87f35..8c5a87f35 100644 --- a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.c +++ b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.c diff --git a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h index 9427adabf..9427adabf 100644 --- a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.h +++ b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.h diff --git a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk index 6b8b312fd..6b8b312fd 100644 --- a/keyboards/handwired/practice60/boards/GENERIC_STM32_F103/board.mk +++ b/keyboards/cannonkeys/ortho60/boards/GENERIC_STM32_F103/board.mk diff --git a/keyboards/handwired/ortho60/bootloader_defs.h b/keyboards/cannonkeys/ortho60/bootloader_defs.h index 0f45203cb..6b8fa9f72 100644 --- a/keyboards/handwired/ortho60/bootloader_defs.h +++ b/keyboards/cannonkeys/ortho60/bootloader_defs.h @@ -7,4 +7,4 @@ // STM32F103* does NOT have an USB bootloader in ROM (only serial), // so setting anything here does not make much sense -// #define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/handwired/practice60/chconf.h b/keyboards/cannonkeys/ortho60/chconf.h index bbd9b2da6..bbd9b2da6 100644 --- a/keyboards/handwired/practice60/chconf.h +++ b/keyboards/cannonkeys/ortho60/chconf.h diff --git a/keyboards/handwired/ortho60/config.h b/keyboards/cannonkeys/ortho60/config.h index dd06f3f95..9b85952d7 100644 --- a/keyboards/handwired/ortho60/config.h +++ b/keyboards/cannonkeys/ortho60/config.h @@ -35,7 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -48,11 +50,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) +#define RGBLIGHT_ANIMATIONS +#define WS2812_LED_N 16 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 /* diff --git a/keyboards/handwired/practice60/halconf.h b/keyboards/cannonkeys/ortho60/halconf.h index 5fba285a3..72879a575 100644 --- a/keyboards/handwired/practice60/halconf.h +++ b/keyboards/cannonkeys/ortho60/halconf.h @@ -111,7 +111,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE +#define HAL_USE_PWM TRUE #endif /** diff --git a/keyboards/handwired/ortho60/info.json b/keyboards/cannonkeys/ortho60/info.json index b94bfc7b5..b94bfc7b5 100644 --- a/keyboards/handwired/ortho60/info.json +++ b/keyboards/cannonkeys/ortho60/info.json diff --git a/keyboards/handwired/ortho60/keymaps/default/keymap.c b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c index 8617b6341..56caa4dc8 100644 --- a/keyboards/handwired/ortho60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/ortho60/keymaps/default/keymap.c @@ -52,7 +52,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ KC_ESC, 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, \ - BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + BL_TOGG, KC_LCTL, KC_LALT, KC_LGUI, MO(_LOWER), KC_SPC, KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower * ,-----------------------------------------------------------------------------------. @@ -72,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_HOME, KC_END, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + RESET, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ), /* Raise @@ -93,6 +93,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_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_PGUP, KC_PGDN, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + RGB_TOG, RGB_MOD, BL_INC, BL_DEC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ ) }; diff --git a/keyboards/handwired/practice60/ld/MKL26Z64.ld b/keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld index c4ca8b874..c4ca8b874 100644 --- a/keyboards/handwired/practice60/ld/MKL26Z64.ld +++ b/keyboards/cannonkeys/ortho60/ld/MKL26Z64.ld diff --git a/keyboards/handwired/practice60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld index d0688ef60..d0688ef60 100644 --- a/keyboards/handwired/practice60/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/keyboards/cannonkeys/ortho60/ld/STM32F103x8_stm32duino_bootloader.ld diff --git a/keyboards/handwired/ortho60/mcuconf.h b/keyboards/cannonkeys/ortho60/mcuconf.h index 9945e7408..fced27289 100644 --- a/keyboards/handwired/ortho60/mcuconf.h +++ b/keyboards/cannonkeys/ortho60/mcuconf.h @@ -132,7 +132,7 @@ * PWM driver system settings. */ #define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM1 TRUE #define STM32_PWM_USE_TIM2 FALSE #define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE diff --git a/keyboards/cannonkeys/ortho60/ortho60.c b/keyboards/cannonkeys/ortho60/ortho60.c new file mode 100644 index 000000000..f917ef96f --- /dev/null +++ b/keyboards/cannonkeys/ortho60/ortho60.c @@ -0,0 +1,3 @@ + +#include "ortho60.h" + diff --git a/keyboards/handwired/ortho60/ortho60.h b/keyboards/cannonkeys/ortho60/ortho60.h index 0f3ae127a..0f3ae127a 100644 --- a/keyboards/handwired/ortho60/ortho60.h +++ b/keyboards/cannonkeys/ortho60/ortho60.h diff --git a/keyboards/handwired/ortho60/readme.md b/keyboards/cannonkeys/ortho60/readme.md index be2a027c4..c3fdbccc5 100644 --- a/keyboards/handwired/ortho60/readme.md +++ b/keyboards/cannonkeys/ortho60/readme.md @@ -7,6 +7,6 @@ Hardware Supported: Blue Pill STM32F103C8T6 Make example for this keyboard (after setting up your build environment): - make handwired/ortho60:default + make cannonkeys/ortho60:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/ortho60/rules.mk b/keyboards/cannonkeys/ortho60/rules.mk index 91acb3c5c..359f447a9 100644 --- a/keyboards/handwired/ortho60/rules.mk +++ b/keyboards/cannonkeys/ortho60/rules.mk @@ -1,7 +1,7 @@ # project specific files +VPATH += keyboards/cannonkeys/bluepill SRC = led.c \ - underglow.c \ - hsv2rgb.c + keyboard.c # GENERIC STM32F103C8T6 board - stm32duino bootloader OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 @@ -50,5 +50,6 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend NKRO_ENABLE = yes # USB Nkey Rollover BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes LAYOUTS = ortho_5x12 diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c new file mode 100644 index 000000000..8c5a87f35 --- /dev/null +++ b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.c @@ -0,0 +1,56 @@ +/* + 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. +*/ + +#include "hal.h" + +// Value to place in RTC backup register 10 for persistent bootloader mode +#define RTC_BOOTLOADER_FLAG 0x424C + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { + //JTAG-DP Disabled and SW-DP Enabled + AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_JTAGDISABLE; + //Set backup register DR10 to enter bootloader on reset + BKP->DR10 = RTC_BOOTLOADER_FLAG; +} diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h new file mode 100644 index 000000000..9427adabf --- /dev/null +++ b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.h @@ -0,0 +1,166 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F103 +#define BOARD_NAME "Generic STM32F103x board" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOA_LED 8 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk new file mode 100644 index 000000000..6b8b312fd --- /dev/null +++ b/keyboards/cannonkeys/practice60/boards/GENERIC_STM32_F103/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/GENERIC_STM32_F103/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/cannonkeys/practice60/bootloader_defs.h b/keyboards/cannonkeys/practice60/bootloader_defs.h new file mode 100644 index 000000000..6b8fa9f72 --- /dev/null +++ b/keyboards/cannonkeys/practice60/bootloader_defs.h @@ -0,0 +1,10 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch + */ + +// STM32F103* does NOT have an USB bootloader in ROM (only serial), +// so setting anything here does not make much sense +#define STM32_BOOTLOADER_ADDRESS 0x80000000 diff --git a/keyboards/cannonkeys/practice60/chconf.h b/keyboards/cannonkeys/practice60/chconf.h new file mode 100644 index 000000000..bbd9b2da6 --- /dev/null +++ b/keyboards/cannonkeys/practice60/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 100000 + +/** + * @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 0 + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @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/handwired/practice60/config.h b/keyboards/cannonkeys/practice60/config.h index 31ddd77d1..c015bb746 100644 --- a/keyboards/handwired/practice60/config.h +++ b/keyboards/cannonkeys/practice60/config.h @@ -35,7 +35,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { B3, B4, B5, B6, B7 } #define DIODE_DIRECTION COL2ROW -#define BACKLIGHT_LEVELS 1 +#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -48,11 +50,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) +#define RGBLIGHT_ANIMATIONS +#define WS2812_LED_N 9 +#define RGBLED_NUM WS2812_LED_N +#define PORT_WS2812 GPIOB +#define PIN_WS2812 15 +#define WS2812_SPI SPID2 /* diff --git a/keyboards/cannonkeys/practice60/halconf.h b/keyboards/cannonkeys/practice60/halconf.h new file mode 100644 index 000000000..72879a575 --- /dev/null +++ b/keyboards/cannonkeys/practice60/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 TRUE +#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 FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#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 1 +#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/handwired/practice60/info.json b/keyboards/cannonkeys/practice60/info.json index cffbcf492..cffbcf492 100644 --- a/keyboards/handwired/practice60/info.json +++ b/keyboards/cannonkeys/practice60/info.json diff --git a/keyboards/handwired/practice60/keymaps/default/keymap.c b/keyboards/cannonkeys/practice60/keymaps/default/keymap.c index ac6e75509..66ebe0646 100644 --- a/keyboards/handwired/practice60/keymaps/default/keymap.c +++ b/keyboards/cannonkeys/practice60/keymaps/default/keymap.c @@ -32,16 +32,16 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_60_ansi( KC_GESC, 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_BSPC, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MT(MOD_LSFT, KC_Y), KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ + 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_BSLS, \ 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_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FN1), KC_RCTL ), [_FN1] = LAYOUT_60_ansi( - KC_GESC, 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_BSPC, \ + KC_GESC, 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_DEL, \ RGB_TOG, RGB_MOD, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + BL_BRTG, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ BL_INC, BL_DEC, BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ KC_GRV, _______, _______, _______, _______, _______, _______, _______ ) diff --git a/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld b/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld new file mode 100644 index 000000000..c4ca8b874 --- /dev/null +++ b/keyboards/cannonkeys/practice60/ld/MKL26Z64.ld @@ -0,0 +1,105 @@ +/* + * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com + * (C) 2016 flabbergast <s3+flabbergast@sdfeu.org> + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * KL26Z64 memory setup. + */ +MEMORY +{ + flash0 : org = 0x00000000, len = 0x100 + flash1 : org = 0x00000400, len = 0x10 + flash2 : org = 0x00000410, len = 62k - 0x410 + flash3 : org = 0x0000F800, len = 2k + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x1FFFF800, len = 8k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* Flash region for the configuration bytes.*/ +SECTIONS +{ + .cfmprotect : ALIGN(4) SUBALIGN(4) + { + KEEP(*(.cfmconfig)) + } > flash1 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +__eeprom_workarea_start__ = ORIGIN(flash3); +__eeprom_workarea_size__ = LENGTH(flash3); +__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld new file mode 100644 index 000000000..d0688ef60 --- /dev/null +++ b/keyboards/cannonkeys/practice60/ld/STM32F103x8_stm32duino_bootloader.ld @@ -0,0 +1,88 @@ +/* + ChibiOS - Copyright (C) 2006..2016 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. +*/ + +/* + * ST32F103xB memory setup for use with the maplemini bootloader. + * You will have to + * #define CORTEX_VTOR_INIT 0x5000 + * in your projects chconf.h + */ +MEMORY +{ + flash0 : org = 0x08002000, len = 64k - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/cannonkeys/practice60/mcuconf.h b/keyboards/cannonkeys/practice60/mcuconf.h new file mode 100644 index 000000000..fced27289 --- /dev/null +++ b/keyboards/cannonkeys/practice60/mcuconf.h @@ -0,0 +1,209 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/practice60/practice60.c b/keyboards/cannonkeys/practice60/practice60.c new file mode 100644 index 000000000..d2cf47deb --- /dev/null +++ b/keyboards/cannonkeys/practice60/practice60.c @@ -0,0 +1,2 @@ + +#include "practice60.h" diff --git a/keyboards/handwired/practice60/practice60.h b/keyboards/cannonkeys/practice60/practice60.h index 5ebba8fb8..5ebba8fb8 100644 --- a/keyboards/handwired/practice60/practice60.h +++ b/keyboards/cannonkeys/practice60/practice60.h diff --git a/keyboards/cannonkeys/practice60/readme.md b/keyboards/cannonkeys/practice60/readme.md new file mode 100644 index 000000000..044aadf6e --- /dev/null +++ b/keyboards/cannonkeys/practice60/readme.md @@ -0,0 +1,12 @@ +# Practice 60 + +A Blue Pill STM32F103C8T6-based 60% ANSI board. + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: Blue Pill STM32F103C8T6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/practice60:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/practice60/rules.mk b/keyboards/cannonkeys/practice60/rules.mk new file mode 100644 index 000000000..cf8554c0c --- /dev/null +++ b/keyboards/cannonkeys/practice60/rules.mk @@ -0,0 +1,57 @@ +# project specific files +VPATH += keyboards/cannonkeys/bluepill +SRC = led.c \ + keyboard.c + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 + +# OPT_DEFS = +# MCU_LDSCRIPT = STM32F103x8 +# BOARD = GENERIC_STM32_F103 + +## chip/board settings +# the next two should match the directories in +# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx +# linker script to use +# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ +# or <this_dir>/ld/ +# startup code to use +# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f1xx +# it should exist either in <chibios>/os/hal/boards/ +# or <this_dir>/boards +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m3 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + + +#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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes +RGBLIGHT_ENABLE = yes + +LAYOUTS = 60_ansi + +DEFAULT_FOLDER = cannonkeys/practice60 diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c new file mode 100644 index 000000000..d9f7bc329 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.c @@ -0,0 +1,111 @@ +/* + ChibiOS - Copyright (C) 2006..2016 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. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#include "hal.h" + +#if HAL_USE_PAL || defined(__DOXYGEN__) +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +const PALConfig pal_default_config = { +#if STM32_HAS_GPIOA + {VAL_GPIOA_MODER, VAL_GPIOA_OTYPER, VAL_GPIOA_OSPEEDR, VAL_GPIOA_PUPDR, + VAL_GPIOA_ODR, VAL_GPIOA_AFRL, VAL_GPIOA_AFRH}, +#endif +#if STM32_HAS_GPIOB + {VAL_GPIOB_MODER, VAL_GPIOB_OTYPER, VAL_GPIOB_OSPEEDR, VAL_GPIOB_PUPDR, + VAL_GPIOB_ODR, VAL_GPIOB_AFRL, VAL_GPIOB_AFRH}, +#endif +#if STM32_HAS_GPIOC + {VAL_GPIOC_MODER, VAL_GPIOC_OTYPER, VAL_GPIOC_OSPEEDR, VAL_GPIOC_PUPDR, + VAL_GPIOC_ODR, VAL_GPIOC_AFRL, VAL_GPIOC_AFRH}, +#endif +#if STM32_HAS_GPIOD + {VAL_GPIOD_MODER, VAL_GPIOD_OTYPER, VAL_GPIOD_OSPEEDR, VAL_GPIOD_PUPDR, + VAL_GPIOD_ODR, VAL_GPIOD_AFRL, VAL_GPIOD_AFRH}, +#endif +#if STM32_HAS_GPIOE + {VAL_GPIOE_MODER, VAL_GPIOE_OTYPER, VAL_GPIOE_OSPEEDR, VAL_GPIOE_PUPDR, + VAL_GPIOE_ODR, VAL_GPIOE_AFRL, VAL_GPIOE_AFRH}, +#endif +#if STM32_HAS_GPIOF + {VAL_GPIOF_MODER, VAL_GPIOF_OTYPER, VAL_GPIOF_OSPEEDR, VAL_GPIOF_PUPDR, + VAL_GPIOF_ODR, VAL_GPIOF_AFRL, VAL_GPIOF_AFRH}, +#endif +#if STM32_HAS_GPIOG + {VAL_GPIOG_MODER, VAL_GPIOG_OTYPER, VAL_GPIOG_OSPEEDR, VAL_GPIOG_PUPDR, + VAL_GPIOG_ODR, VAL_GPIOG_AFRL, VAL_GPIOG_AFRH}, +#endif +#if STM32_HAS_GPIOH + {VAL_GPIOH_MODER, VAL_GPIOH_OTYPER, VAL_GPIOH_OSPEEDR, VAL_GPIOH_PUPDR, + VAL_GPIOH_ODR, VAL_GPIOH_AFRL, VAL_GPIOH_AFRH}, +#endif +#if STM32_HAS_GPIOI + {VAL_GPIOI_MODER, VAL_GPIOI_OTYPER, VAL_GPIOI_OSPEEDR, VAL_GPIOI_PUPDR, + VAL_GPIOI_ODR, VAL_GPIOI_AFRL, VAL_GPIOI_AFRH} +#endif +}; +#endif + +void enter_bootloader_mode_if_requested(void); + +/** + * @brief Early initialization code. + * @details This initialization must be performed just after stack setup + * and before any other initialization. + */ +void __early_init(void) { + enter_bootloader_mode_if_requested(); + stm32_clock_init(); +} + +#if HAL_USE_MMC_SPI || defined(__DOXYGEN__) +/** + * @brief MMC_SPI card detection. + */ +bool mmc_lld_is_card_inserted(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return true; +} + +/** + * @brief MMC_SPI card write protection detection. + */ +bool mmc_lld_is_write_protected(MMCDriver *mmcp) { + + (void)mmcp; + /* TODO: Fill the implementation.*/ + return false; +} +#endif + +/** + * @brief Board-specific initialization code. + * @todo Add your board-specific code, if any. + */ +void boardInit(void) { + SYSCFG->CFGR1 |= SYSCFG_CFGR1_I2C1_DMA_RMP; + SYSCFG->CFGR1 &= ~(SYSCFG_CFGR1_SPI2_DMA_RMP); +} diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h new file mode 100644 index 000000000..de3a93d1c --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.h @@ -0,0 +1,922 @@ +/* + ChibiOS - Copyright (C) 2006..2016 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. +*/ + +/* + * This file has been automatically generated using ChibiStudio board + * generator plugin. Do not edit manually. + */ + +#ifndef BOARD_H +#define BOARD_H + +/* + * Setup for ST STM32F072B-Discovery board. + */ + +/* + * Board identifier. + */ +#define BOARD_ST_STM32F072B_DISCOVERY +#define BOARD_NAME "ST STM32F072B-Discovery" + +/* + * Board oscillators-related settings. + * NOTE: HSE not fitted. + */ +#if !defined(STM32_LSECLK) +#define STM32_LSECLK 32768 +#endif + +#define STM32_LSEDRV (3U << 3U) + +#if !defined(STM32_HSECLK) +#define STM32_HSECLK 0U +#endif + +#define STM32_HSE_BYPASS + +/* + * MCU type as defined in the ST header. + */ +#define STM32F072xB + +/* + * IO pins assignments. + */ +#define GPIOA_BUTTON 0U +#define GPIOA_PIN1 1U +#define GPIOA_PIN2 2U +#define GPIOA_PIN3 3U +#define GPIOA_PIN4 4U +#define GPIOA_PIN5 5U +#define GPIOA_PIN6 6U +#define GPIOA_PIN7 7U +#define GPIOA_PIN8 8U +#define GPIOA_PIN9 9U +#define GPIOA_PIN10 10U +#define GPIOA_USB_DM 11U +#define GPIOA_USB_DP 12U +#define GPIOA_SWDIO 13U +#define GPIOA_SWCLK 14U +#define GPIOA_PIN15 15U + +#define GPIOB_PIN0 0U +#define GPIOB_PIN1 1U +#define GPIOB_PIN2 2U +#define GPIOB_PIN3 3U +#define GPIOB_PIN4 4U +#define GPIOB_PIN5 5U +#define GPIOB_PIN6 6U +#define GPIOB_PIN7 7U +#define GPIOB_PIN8 8U +#define GPIOB_PIN9 9U +#define GPIOB_PIN10 10U +#define GPIOB_PIN11 11U +#define GPIOB_PIN12 12U +#define GPIOB_SPI2_SCK 13U +#define GPIOB_SPI2_MISO 14U +#define GPIOB_SPI2_MOSI 15U + +#define GPIOC_MEMS_CS 0U +#define GPIOC_PIN1 1U +#define GPIOC_PIN2 2U +#define GPIOC_PIN3 3U +#define GPIOC_PIN4 4U +#define GPIOC_PIN5 5U +#define GPIOC_LED_RED 6U +#define GPIOC_LED_BLUE 7U +#define GPIOC_LED_ORANGE 8U +#define GPIOC_LED_GREEN 9U +#define GPIOC_PIN10 10U +#define GPIOC_PIN11 11U +#define GPIOC_PIN12 12U +#define GPIOC_PIN13 13U +#define GPIOC_OSC32_IN 14U +#define GPIOC_OSC32_OUT 15U + +#define GPIOD_PIN0 0U +#define GPIOD_PIN1 1U +#define GPIOD_PIN2 2U +#define GPIOD_PIN3 3U +#define GPIOD_PIN4 4U +#define GPIOD_PIN5 5U +#define GPIOD_PIN6 6U +#define GPIOD_PIN7 7U +#define GPIOD_PIN8 8U +#define GPIOD_PIN9 9U +#define GPIOD_PIN10 10U +#define GPIOD_PIN11 11U +#define GPIOD_PIN12 12U +#define GPIOD_PIN13 13U +#define GPIOD_PIN14 14U +#define GPIOD_PIN15 15U + +#define GPIOE_PIN0 0U +#define GPIOE_PIN1 1U +#define GPIOE_PIN2 2U +#define GPIOE_PIN3 3U +#define GPIOE_PIN4 4U +#define GPIOE_PIN5 5U +#define GPIOE_PIN6 6U +#define GPIOE_PIN7 7U +#define GPIOE_PIN8 8U +#define GPIOE_PIN9 9U +#define GPIOE_PIN10 10U +#define GPIOE_PIN11 11U +#define GPIOE_PIN12 12U +#define GPIOE_PIN13 13U +#define GPIOE_PIN14 14U +#define GPIOE_PIN15 15U + +#define GPIOF_OSC_IN 0U +#define GPIOF_OSC_OUT 1U +#define GPIOF_PIN2 2U +#define GPIOF_PIN3 3U +#define GPIOF_PIN4 4U +#define GPIOF_PIN5 5U +#define GPIOF_PIN6 6U +#define GPIOF_PIN7 7U +#define GPIOF_PIN8 8U +#define GPIOF_PIN9 9U +#define GPIOF_PIN10 10U +#define GPIOF_PIN11 11U +#define GPIOF_PIN12 12U +#define GPIOF_PIN13 13U +#define GPIOF_PIN14 14U +#define GPIOF_PIN15 15U + +/* + * IO lines assignments. + */ +#define LINE_BUTTON PAL_LINE(GPIOA, 0U) +#define LINE_USB_DM PAL_LINE(GPIOA, 11U) +#define LINE_USB_DP PAL_LINE(GPIOA, 12U) +#define LINE_SWDIO PAL_LINE(GPIOA, 13U) +#define LINE_SWCLK PAL_LINE(GPIOA, 14U) + +#define LINE_SPI2_SCK PAL_LINE(GPIOB, 13U) +#define LINE_SPI2_MISO PAL_LINE(GPIOB, 14U) +#define LINE_SPI2_MOSI PAL_LINE(GPIOB, 15U) + +#define LINE_MEMS_CS PAL_LINE(GPIOC, 0U) +#define LINE_LED_RED PAL_LINE(GPIOC, 6U) +#define LINE_LED_BLUE PAL_LINE(GPIOC, 7U) +#define LINE_LED_ORANGE PAL_LINE(GPIOC, 8U) +#define LINE_LED_GREEN PAL_LINE(GPIOC, 9U) +#define LINE_OSC32_IN PAL_LINE(GPIOC, 14U) +#define LINE_OSC32_OUT PAL_LINE(GPIOC, 15U) + + + +#define LINE_OSC_IN PAL_LINE(GPIOF, 0U) +#define LINE_OSC_OUT PAL_LINE(GPIOF, 1U) + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * Please refer to the STM32 Reference Manual for details. + */ +#define PIN_MODE_INPUT(n) (0U << ((n) * 2U)) +#define PIN_MODE_OUTPUT(n) (1U << ((n) * 2U)) +#define PIN_MODE_ALTERNATE(n) (2U << ((n) * 2U)) +#define PIN_MODE_ANALOG(n) (3U << ((n) * 2U)) +#define PIN_ODR_LOW(n) (0U << (n)) +#define PIN_ODR_HIGH(n) (1U << (n)) +#define PIN_OTYPE_PUSHPULL(n) (0U << (n)) +#define PIN_OTYPE_OPENDRAIN(n) (1U << (n)) +#define PIN_OSPEED_VERYLOW(n) (0U << ((n) * 2U)) +#define PIN_OSPEED_LOW(n) (1U << ((n) * 2U)) +#define PIN_OSPEED_MEDIUM(n) (2U << ((n) * 2U)) +#define PIN_OSPEED_HIGH(n) (3U << ((n) * 2U)) +#define PIN_PUPDR_FLOATING(n) (0U << ((n) * 2U)) +#define PIN_PUPDR_PULLUP(n) (1U << ((n) * 2U)) +#define PIN_PUPDR_PULLDOWN(n) (2U << ((n) * 2U)) +#define PIN_AFIO_AF(n, v) ((v) << (((n) % 8U) * 4U)) + +/* + * GPIOA setup: + * + * PA0 - BUTTON (input floating). + * PA1 - PIN1 (input pullup). + * PA2 - PIN2 (input pullup). + * PA3 - PIN3 (input pullup). + * PA4 - PIN4 (input pullup). + * PA5 - PIN5 (input pullup). + * PA6 - PIN6 (input pullup). + * PA7 - PIN7 (input pullup). + * PA8 - PIN8 (input pullup). + * PA9 - PIN9 (input pullup). + * PA10 - PIN10 (input pullup). + * PA11 - USB_DM (input floating). + * PA12 - USB_DP (input floating). + * PA13 - SWDIO (alternate 0). + * PA14 - SWCLK (alternate 0). + * PA15 - PIN15 (input pullup). + */ +#define VAL_GPIOA_MODER (PIN_MODE_INPUT(GPIOA_BUTTON) | \ + PIN_MODE_INPUT(GPIOA_PIN1) | \ + PIN_MODE_INPUT(GPIOA_PIN2) | \ + PIN_MODE_INPUT(GPIOA_PIN3) | \ + PIN_MODE_INPUT(GPIOA_PIN4) | \ + PIN_MODE_INPUT(GPIOA_PIN5) | \ + PIN_MODE_INPUT(GPIOA_PIN6) | \ + PIN_MODE_INPUT(GPIOA_PIN7) | \ + PIN_MODE_INPUT(GPIOA_PIN8) | \ + PIN_MODE_INPUT(GPIOA_PIN9) | \ + PIN_MODE_INPUT(GPIOA_PIN10) | \ + PIN_MODE_INPUT(GPIOA_USB_DM) | \ + PIN_MODE_INPUT(GPIOA_USB_DP) | \ + PIN_MODE_ALTERNATE(GPIOA_SWDIO) | \ + PIN_MODE_ALTERNATE(GPIOA_SWCLK) | \ + PIN_MODE_INPUT(GPIOA_PIN15)) +#define VAL_GPIOA_OTYPER (PIN_OTYPE_PUSHPULL(GPIOA_BUTTON) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DM) | \ + PIN_OTYPE_PUSHPULL(GPIOA_USB_DP) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWDIO) | \ + PIN_OTYPE_PUSHPULL(GPIOA_SWCLK) | \ + PIN_OTYPE_PUSHPULL(GPIOA_PIN15)) +#define VAL_GPIOA_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOA_BUTTON) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOA_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DM) | \ + PIN_OSPEED_VERYLOW(GPIOA_USB_DP) | \ + PIN_OSPEED_HIGH(GPIOA_SWDIO) | \ + PIN_OSPEED_HIGH(GPIOA_SWCLK) | \ + PIN_OSPEED_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_PUPDR (PIN_PUPDR_FLOATING(GPIOA_BUTTON) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN10) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DM) | \ + PIN_PUPDR_FLOATING(GPIOA_USB_DP) | \ + PIN_PUPDR_PULLUP(GPIOA_SWDIO) | \ + PIN_PUPDR_PULLDOWN(GPIOA_SWCLK) | \ + PIN_PUPDR_PULLUP(GPIOA_PIN15)) +#define VAL_GPIOA_ODR (PIN_ODR_HIGH(GPIOA_BUTTON) | \ + PIN_ODR_HIGH(GPIOA_PIN1) | \ + PIN_ODR_HIGH(GPIOA_PIN2) | \ + PIN_ODR_HIGH(GPIOA_PIN3) | \ + PIN_ODR_HIGH(GPIOA_PIN4) | \ + PIN_ODR_HIGH(GPIOA_PIN5) | \ + PIN_ODR_HIGH(GPIOA_PIN6) | \ + PIN_ODR_HIGH(GPIOA_PIN7) | \ + PIN_ODR_HIGH(GPIOA_PIN8) | \ + PIN_ODR_HIGH(GPIOA_PIN9) | \ + PIN_ODR_HIGH(GPIOA_PIN10) | \ + PIN_ODR_HIGH(GPIOA_USB_DM) | \ + PIN_ODR_HIGH(GPIOA_USB_DP) | \ + PIN_ODR_HIGH(GPIOA_SWDIO) | \ + PIN_ODR_HIGH(GPIOA_SWCLK) | \ + PIN_ODR_HIGH(GPIOA_PIN15)) +#define VAL_GPIOA_AFRL (PIN_AFIO_AF(GPIOA_BUTTON, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN7, 0U)) +#define VAL_GPIOA_AFRH (PIN_AFIO_AF(GPIOA_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DM, 0U) | \ + PIN_AFIO_AF(GPIOA_USB_DP, 0U) | \ + PIN_AFIO_AF(GPIOA_SWDIO, 0U) | \ + PIN_AFIO_AF(GPIOA_SWCLK, 0U) | \ + PIN_AFIO_AF(GPIOA_PIN15, 0U)) + +/* + * GPIOB setup: + * + * PB0 - PIN0 (input pullup). + * PB1 - PIN1 (input pullup). + * PB2 - PIN2 (input pullup). + * PB3 - PIN3 (input pullup). + * PB4 - PIN4 (input pullup). + * PB5 - PIN5 (input pullup). + * PB6 - PIN6 (input pullup). + * PB7 - PIN7 (input pullup). + * PB8 - PIN8 (input pullup). + * PB9 - PIN9 (input pullup). + * PB10 - PIN10 (input pullup). + * PB11 - PIN11 (input pullup). + * PB12 - PIN12 (input pullup). + * PB13 - SPI2_SCK (alternate 0). + * PB14 - SPI2_MISO (alternate 0). + * PB15 - SPI2_MOSI (alternate 0). + */ +#define VAL_GPIOB_MODER (PIN_MODE_INPUT(GPIOB_PIN0) | \ + PIN_MODE_INPUT(GPIOB_PIN1) | \ + PIN_MODE_INPUT(GPIOB_PIN2) | \ + PIN_MODE_INPUT(GPIOB_PIN3) | \ + PIN_MODE_INPUT(GPIOB_PIN4) | \ + PIN_MODE_INPUT(GPIOB_PIN5) | \ + PIN_MODE_INPUT(GPIOB_PIN6) | \ + PIN_MODE_INPUT(GPIOB_PIN7) | \ + PIN_MODE_INPUT(GPIOB_PIN8) | \ + PIN_MODE_INPUT(GPIOB_PIN9) | \ + PIN_MODE_INPUT(GPIOB_PIN10) | \ + PIN_MODE_INPUT(GPIOB_PIN11) | \ + PIN_MODE_INPUT(GPIOB_PIN12) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_SCK) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MISO) | \ + PIN_MODE_ALTERNATE(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OTYPER (PIN_OTYPE_PUSHPULL(GPIOB_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOB_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_SCK) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MISO) | \ + PIN_OTYPE_PUSHPULL(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOB_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN1) | \ + PIN_OSPEED_HIGH(GPIOB_PIN2) | \ + PIN_OSPEED_HIGH(GPIOB_PIN3) | \ + PIN_OSPEED_HIGH(GPIOB_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOB_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_SCK) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MISO) | \ + PIN_OSPEED_VERYLOW(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_PUPDR (PIN_PUPDR_PULLUP(GPIOB_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOB_PIN12) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_SCK) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MISO) | \ + PIN_PUPDR_FLOATING(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_ODR (PIN_ODR_HIGH(GPIOB_PIN0) | \ + PIN_ODR_HIGH(GPIOB_PIN1) | \ + PIN_ODR_HIGH(GPIOB_PIN2) | \ + PIN_ODR_HIGH(GPIOB_PIN3) | \ + PIN_ODR_HIGH(GPIOB_PIN4) | \ + PIN_ODR_HIGH(GPIOB_PIN5) | \ + PIN_ODR_HIGH(GPIOB_PIN6) | \ + PIN_ODR_HIGH(GPIOB_PIN7) | \ + PIN_ODR_HIGH(GPIOB_PIN8) | \ + PIN_ODR_HIGH(GPIOB_PIN9) | \ + PIN_ODR_HIGH(GPIOB_PIN10) | \ + PIN_ODR_HIGH(GPIOB_PIN11) | \ + PIN_ODR_HIGH(GPIOB_PIN12) | \ + PIN_ODR_HIGH(GPIOB_SPI2_SCK) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MISO) | \ + PIN_ODR_HIGH(GPIOB_SPI2_MOSI)) +#define VAL_GPIOB_AFRL (PIN_AFIO_AF(GPIOB_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN7, 0U)) +#define VAL_GPIOB_AFRH (PIN_AFIO_AF(GPIOB_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOB_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_SCK, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MISO, 0U) | \ + PIN_AFIO_AF(GPIOB_SPI2_MOSI, 0U)) + +/* + * GPIOC setup: + * + * PC0 - MEMS_CS (output pushpull maximum). + * PC1 - PIN1 (input pullup). + * PC2 - PIN2 (input pullup). + * PC3 - PIN3 (input pullup). + * PC4 - PIN4 (input pullup). + * PC5 - PIN5 (input pullup). + * PC6 - LED_RED (output pushpull maximum). + * PC7 - LED_BLUE (output pushpull maximum). + * PC8 - LED_ORANGE (output pushpull maximum). + * PC9 - LED_GREEN (output pushpull maximum). + * PC10 - PIN10 (input pullup). + * PC11 - PIN11 (input pullup). + * PC12 - PIN12 (input pullup). + * PC13 - PIN13 (input pullup). + * PC14 - OSC32_IN (input floating). + * PC15 - OSC32_OUT (input floating). + */ +#define VAL_GPIOC_MODER (PIN_MODE_OUTPUT(GPIOC_MEMS_CS) | \ + PIN_MODE_INPUT(GPIOC_PIN1) | \ + PIN_MODE_INPUT(GPIOC_PIN2) | \ + PIN_MODE_INPUT(GPIOC_PIN3) | \ + PIN_MODE_INPUT(GPIOC_PIN4) | \ + PIN_MODE_INPUT(GPIOC_PIN5) | \ + PIN_MODE_OUTPUT(GPIOC_LED_RED) | \ + PIN_MODE_OUTPUT(GPIOC_LED_BLUE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_ORANGE) | \ + PIN_MODE_OUTPUT(GPIOC_LED_GREEN) | \ + PIN_MODE_INPUT(GPIOC_PIN10) | \ + PIN_MODE_INPUT(GPIOC_PIN11) | \ + PIN_MODE_INPUT(GPIOC_PIN12) | \ + PIN_MODE_INPUT(GPIOC_PIN13) | \ + PIN_MODE_INPUT(GPIOC_OSC32_IN) | \ + PIN_MODE_INPUT(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OTYPER (PIN_OTYPE_PUSHPULL(GPIOC_MEMS_CS) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_RED) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_BLUE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_ORANGE) | \ + PIN_OTYPE_PUSHPULL(GPIOC_LED_GREEN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOC_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_OSPEEDR (PIN_OSPEED_HIGH(GPIOC_MEMS_CS) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN5) | \ + PIN_OSPEED_HIGH(GPIOC_LED_RED) | \ + PIN_OSPEED_HIGH(GPIOC_LED_BLUE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_ORANGE) | \ + PIN_OSPEED_HIGH(GPIOC_LED_GREEN) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOC_PIN13) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_IN) | \ + PIN_OSPEED_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_PUPDR (PIN_PUPDR_FLOATING(GPIOC_MEMS_CS) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN5) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_RED) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_BLUE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_ORANGE) | \ + PIN_PUPDR_FLOATING(GPIOC_LED_GREEN) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOC_PIN13) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_IN) | \ + PIN_PUPDR_FLOATING(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_ODR (PIN_ODR_HIGH(GPIOC_MEMS_CS) | \ + PIN_ODR_HIGH(GPIOC_PIN1) | \ + PIN_ODR_HIGH(GPIOC_PIN2) | \ + PIN_ODR_HIGH(GPIOC_PIN3) | \ + PIN_ODR_HIGH(GPIOC_PIN4) | \ + PIN_ODR_HIGH(GPIOC_PIN5) | \ + PIN_ODR_LOW(GPIOC_LED_RED) | \ + PIN_ODR_LOW(GPIOC_LED_BLUE) | \ + PIN_ODR_LOW(GPIOC_LED_ORANGE) | \ + PIN_ODR_LOW(GPIOC_LED_GREEN) | \ + PIN_ODR_HIGH(GPIOC_PIN10) | \ + PIN_ODR_HIGH(GPIOC_PIN11) | \ + PIN_ODR_HIGH(GPIOC_PIN12) | \ + PIN_ODR_HIGH(GPIOC_PIN13) | \ + PIN_ODR_HIGH(GPIOC_OSC32_IN) | \ + PIN_ODR_HIGH(GPIOC_OSC32_OUT)) +#define VAL_GPIOC_AFRL (PIN_AFIO_AF(GPIOC_MEMS_CS, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_RED, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_BLUE, 0U)) +#define VAL_GPIOC_AFRH (PIN_AFIO_AF(GPIOC_LED_ORANGE, 0U) | \ + PIN_AFIO_AF(GPIOC_LED_GREEN, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOC_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_IN, 0U) | \ + PIN_AFIO_AF(GPIOC_OSC32_OUT, 0U)) + +/* + * GPIOD setup: + * + * PD0 - PIN0 (input pullup). + * PD1 - PIN1 (input pullup). + * PD2 - PIN2 (input pullup). + * PD3 - PIN3 (input pullup). + * PD4 - PIN4 (input pullup). + * PD5 - PIN5 (input pullup). + * PD6 - PIN6 (input pullup). + * PD7 - PIN7 (input pullup). + * PD8 - PIN8 (input pullup). + * PD9 - PIN9 (input pullup). + * PD10 - PIN10 (input pullup). + * PD11 - PIN11 (input pullup). + * PD12 - PIN12 (input pullup). + * PD13 - PIN13 (input pullup). + * PD14 - PIN14 (input pullup). + * PD15 - PIN15 (input pullup). + */ +#define VAL_GPIOD_MODER (PIN_MODE_INPUT(GPIOD_PIN0) | \ + PIN_MODE_INPUT(GPIOD_PIN1) | \ + PIN_MODE_INPUT(GPIOD_PIN2) | \ + PIN_MODE_INPUT(GPIOD_PIN3) | \ + PIN_MODE_INPUT(GPIOD_PIN4) | \ + PIN_MODE_INPUT(GPIOD_PIN5) | \ + PIN_MODE_INPUT(GPIOD_PIN6) | \ + PIN_MODE_INPUT(GPIOD_PIN7) | \ + PIN_MODE_INPUT(GPIOD_PIN8) | \ + PIN_MODE_INPUT(GPIOD_PIN9) | \ + PIN_MODE_INPUT(GPIOD_PIN10) | \ + PIN_MODE_INPUT(GPIOD_PIN11) | \ + PIN_MODE_INPUT(GPIOD_PIN12) | \ + PIN_MODE_INPUT(GPIOD_PIN13) | \ + PIN_MODE_INPUT(GPIOD_PIN14) | \ + PIN_MODE_INPUT(GPIOD_PIN15)) +#define VAL_GPIOD_OTYPER (PIN_OTYPE_PUSHPULL(GPIOD_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOD_PIN15)) +#define VAL_GPIOD_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOD_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOD_PIN15)) +#define VAL_GPIOD_PUPDR (PIN_PUPDR_PULLUP(GPIOD_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOD_PIN15)) +#define VAL_GPIOD_ODR (PIN_ODR_HIGH(GPIOD_PIN0) | \ + PIN_ODR_HIGH(GPIOD_PIN1) | \ + PIN_ODR_HIGH(GPIOD_PIN2) | \ + PIN_ODR_HIGH(GPIOD_PIN3) | \ + PIN_ODR_HIGH(GPIOD_PIN4) | \ + PIN_ODR_HIGH(GPIOD_PIN5) | \ + PIN_ODR_HIGH(GPIOD_PIN6) | \ + PIN_ODR_HIGH(GPIOD_PIN7) | \ + PIN_ODR_HIGH(GPIOD_PIN8) | \ + PIN_ODR_HIGH(GPIOD_PIN9) | \ + PIN_ODR_HIGH(GPIOD_PIN10) | \ + PIN_ODR_HIGH(GPIOD_PIN11) | \ + PIN_ODR_HIGH(GPIOD_PIN12) | \ + PIN_ODR_HIGH(GPIOD_PIN13) | \ + PIN_ODR_HIGH(GPIOD_PIN14) | \ + PIN_ODR_HIGH(GPIOD_PIN15)) +#define VAL_GPIOD_AFRL (PIN_AFIO_AF(GPIOD_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN7, 0U)) +#define VAL_GPIOD_AFRH (PIN_AFIO_AF(GPIOD_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOD_PIN15, 0U)) + +/* + * GPIOE setup: + * + * PE0 - PIN0 (input pullup). + * PE1 - PIN1 (input pullup). + * PE2 - PIN2 (input pullup). + * PE3 - PIN3 (input pullup). + * PE4 - PIN4 (input pullup). + * PE5 - PIN5 (input pullup). + * PE6 - PIN6 (input pullup). + * PE7 - PIN7 (input pullup). + * PE8 - PIN8 (input pullup). + * PE9 - PIN9 (input pullup). + * PE10 - PIN10 (input pullup). + * PE11 - PIN11 (input pullup). + * PE12 - PIN12 (input pullup). + * PE13 - PIN13 (input pullup). + * PE14 - PIN14 (input pullup). + * PE15 - PIN15 (input pullup). + */ +#define VAL_GPIOE_MODER (PIN_MODE_INPUT(GPIOE_PIN0) | \ + PIN_MODE_INPUT(GPIOE_PIN1) | \ + PIN_MODE_INPUT(GPIOE_PIN2) | \ + PIN_MODE_INPUT(GPIOE_PIN3) | \ + PIN_MODE_INPUT(GPIOE_PIN4) | \ + PIN_MODE_INPUT(GPIOE_PIN5) | \ + PIN_MODE_INPUT(GPIOE_PIN6) | \ + PIN_MODE_INPUT(GPIOE_PIN7) | \ + PIN_MODE_INPUT(GPIOE_PIN8) | \ + PIN_MODE_INPUT(GPIOE_PIN9) | \ + PIN_MODE_INPUT(GPIOE_PIN10) | \ + PIN_MODE_INPUT(GPIOE_PIN11) | \ + PIN_MODE_INPUT(GPIOE_PIN12) | \ + PIN_MODE_INPUT(GPIOE_PIN13) | \ + PIN_MODE_INPUT(GPIOE_PIN14) | \ + PIN_MODE_INPUT(GPIOE_PIN15)) +#define VAL_GPIOE_OTYPER (PIN_OTYPE_PUSHPULL(GPIOE_PIN0) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN1) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOE_PIN15)) +#define VAL_GPIOE_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOE_PIN0) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN1) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOE_PIN15)) +#define VAL_GPIOE_PUPDR (PIN_PUPDR_PULLUP(GPIOE_PIN0) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN1) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOE_PIN15)) +#define VAL_GPIOE_ODR (PIN_ODR_HIGH(GPIOE_PIN0) | \ + PIN_ODR_HIGH(GPIOE_PIN1) | \ + PIN_ODR_HIGH(GPIOE_PIN2) | \ + PIN_ODR_HIGH(GPIOE_PIN3) | \ + PIN_ODR_HIGH(GPIOE_PIN4) | \ + PIN_ODR_HIGH(GPIOE_PIN5) | \ + PIN_ODR_HIGH(GPIOE_PIN6) | \ + PIN_ODR_HIGH(GPIOE_PIN7) | \ + PIN_ODR_HIGH(GPIOE_PIN8) | \ + PIN_ODR_HIGH(GPIOE_PIN9) | \ + PIN_ODR_HIGH(GPIOE_PIN10) | \ + PIN_ODR_HIGH(GPIOE_PIN11) | \ + PIN_ODR_HIGH(GPIOE_PIN12) | \ + PIN_ODR_HIGH(GPIOE_PIN13) | \ + PIN_ODR_HIGH(GPIOE_PIN14) | \ + PIN_ODR_HIGH(GPIOE_PIN15)) +#define VAL_GPIOE_AFRL (PIN_AFIO_AF(GPIOE_PIN0, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN1, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN7, 0U)) +#define VAL_GPIOE_AFRH (PIN_AFIO_AF(GPIOE_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOE_PIN15, 0U)) + +/* + * GPIOF setup: + * + * PF0 - OSC_IN (input floating). + * PF1 - OSC_OUT (input floating). + * PF2 - PIN2 (input pullup). + * PF3 - PIN3 (input pullup). + * PF4 - PIN4 (input pullup). + * PF5 - PIN5 (input pullup). + * PF6 - PIN6 (input pullup). + * PF7 - PIN7 (input pullup). + * PF8 - PIN8 (input pullup). + * PF9 - PIN9 (input pullup). + * PF10 - PIN10 (input pullup). + * PF11 - PIN11 (input pullup). + * PF12 - PIN12 (input pullup). + * PF13 - PIN13 (input pullup). + * PF14 - PIN14 (input pullup). + * PF15 - PIN15 (input pullup). + */ +#define VAL_GPIOF_MODER (PIN_MODE_INPUT(GPIOF_OSC_IN) | \ + PIN_MODE_INPUT(GPIOF_OSC_OUT) | \ + PIN_MODE_INPUT(GPIOF_PIN2) | \ + PIN_MODE_INPUT(GPIOF_PIN3) | \ + PIN_MODE_INPUT(GPIOF_PIN4) | \ + PIN_MODE_INPUT(GPIOF_PIN5) | \ + PIN_MODE_INPUT(GPIOF_PIN6) | \ + PIN_MODE_INPUT(GPIOF_PIN7) | \ + PIN_MODE_INPUT(GPIOF_PIN8) | \ + PIN_MODE_INPUT(GPIOF_PIN9) | \ + PIN_MODE_INPUT(GPIOF_PIN10) | \ + PIN_MODE_INPUT(GPIOF_PIN11) | \ + PIN_MODE_INPUT(GPIOF_PIN12) | \ + PIN_MODE_INPUT(GPIOF_PIN13) | \ + PIN_MODE_INPUT(GPIOF_PIN14) | \ + PIN_MODE_INPUT(GPIOF_PIN15)) +#define VAL_GPIOF_OTYPER (PIN_OTYPE_PUSHPULL(GPIOF_OSC_IN) | \ + PIN_OTYPE_PUSHPULL(GPIOF_OSC_OUT) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN2) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN3) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN4) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN5) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN6) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN7) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN8) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN9) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN10) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN11) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN12) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN13) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN14) | \ + PIN_OTYPE_PUSHPULL(GPIOF_PIN15)) +#define VAL_GPIOF_OSPEEDR (PIN_OSPEED_VERYLOW(GPIOF_OSC_IN) | \ + PIN_OSPEED_VERYLOW(GPIOF_OSC_OUT) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN2) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN3) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN4) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN5) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN6) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN7) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN8) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN9) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN10) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN11) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN12) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN13) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN14) | \ + PIN_OSPEED_VERYLOW(GPIOF_PIN15)) +#define VAL_GPIOF_PUPDR (PIN_PUPDR_FLOATING(GPIOF_OSC_IN) | \ + PIN_PUPDR_FLOATING(GPIOF_OSC_OUT) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN2) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN3) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN4) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN5) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN6) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN7) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN8) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN9) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN10) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN11) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN12) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN13) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN14) | \ + PIN_PUPDR_PULLUP(GPIOF_PIN15)) +#define VAL_GPIOF_ODR (PIN_ODR_HIGH(GPIOF_OSC_IN) | \ + PIN_ODR_HIGH(GPIOF_OSC_OUT) | \ + PIN_ODR_HIGH(GPIOF_PIN2) | \ + PIN_ODR_HIGH(GPIOF_PIN3) | \ + PIN_ODR_HIGH(GPIOF_PIN4) | \ + PIN_ODR_HIGH(GPIOF_PIN5) | \ + PIN_ODR_HIGH(GPIOF_PIN6) | \ + PIN_ODR_HIGH(GPIOF_PIN7) | \ + PIN_ODR_HIGH(GPIOF_PIN8) | \ + PIN_ODR_HIGH(GPIOF_PIN9) | \ + PIN_ODR_HIGH(GPIOF_PIN10) | \ + PIN_ODR_HIGH(GPIOF_PIN11) | \ + PIN_ODR_HIGH(GPIOF_PIN12) | \ + PIN_ODR_HIGH(GPIOF_PIN13) | \ + PIN_ODR_HIGH(GPIOF_PIN14) | \ + PIN_ODR_HIGH(GPIOF_PIN15)) +#define VAL_GPIOF_AFRL (PIN_AFIO_AF(GPIOF_OSC_IN, 0U) | \ + PIN_AFIO_AF(GPIOF_OSC_OUT, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN2, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN3, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN4, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN5, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN6, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN7, 0U)) +#define VAL_GPIOF_AFRH (PIN_AFIO_AF(GPIOF_PIN8, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN9, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN10, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN11, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN12, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN13, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN14, 0U) | \ + PIN_AFIO_AF(GPIOF_PIN15, 0U)) + + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* BOARD_H */ diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk new file mode 100644 index 000000000..b98dcdd26 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/board.mk @@ -0,0 +1,5 @@ +# List of all the board related files. +BOARDSRC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY/board.c + +# Required include directories +BOARDINC = $(BOARD_PATH)/boards/ST_STM32F072B_DISCOVERY diff --git a/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg new file mode 100644 index 000000000..9c7cf4fd7 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/boards/ST_STM32F072B_DISCOVERY/cfg/board.chcfg @@ -0,0 +1,703 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- STM32F0xx board Template --> +<board + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:noNamespaceSchemaLocation="http://www.chibios.org/xml/schema/boards/stm32f0xx_board.xsd"> + <configuration_settings> + <templates_path>resources/gencfg/processors/boards/stm32f0xx/templates</templates_path> + <output_path>..</output_path> + <hal_version>3.0.x</hal_version> + </configuration_settings> + <board_name>ST STM32F072B-Discovery</board_name> + <board_id>ST_STM32F072B_DISCOVERY</board_id> + <board_functions></board_functions> + <subtype>STM32F072xB</subtype> + <clocks HSEFrequency="0" HSEBypass="true" LSEFrequency="0" + LSEBypass="false" LSEDrive="3 High Drive (default)" /> + <ports> + <GPIOA> + <pin0 + ID="BUTTON" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Input" + Alternate="0" /> + <pin1 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin2 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin3 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin4 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin5 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin6 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin7 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin8 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin9 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin10 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin11 + ID="USB_DM" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Input" + Alternate="0" /> + <pin12 + ID="USB_DP" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Input" + Alternate="0" /> + <pin13 + ID="SWDIO" + Type="PushPull" + Speed="Maximum" + Resistor="PullUp" + Level="High" + Mode="Alternate" + Alternate="0" /> + <pin14 + ID="SWCLK" + Type="PushPull" + Speed="Maximum" + Resistor="PullDown" + Level="High" + Mode="Alternate" + Alternate="0" /> + <pin15 + ID="" + Type="PushPull" + Speed="Maximum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + </GPIOA> + <GPIOB> + <pin0 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin1 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin2 + ID="" + Type="PushPull" + Speed="Maximum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin3 + ID="" + Type="PushPull" + Speed="Maximum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin4 + ID="" + Type="PushPull" + Speed="Maximum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin5 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin6 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin7 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin8 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin9 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin10 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin11 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin12 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin13 + ID="SPI2_SCK" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Alternate" + Alternate="0" /> + <pin14 + ID="SPI2_MISO" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Alternate" + Alternate="0" /> + <pin15 + ID="SPI2_MOSI" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Alternate" + Alternate="0" /> + </GPIOB> + <GPIOC> + <pin0 + ID="MEMS_CS" + Type="PushPull" + Speed="Maximum" + Resistor="Floating" + Level="High" + Mode="Output" + Alternate="0" /> + <pin1 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin2 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin3 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin4 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin5 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin6 + ID="LED_RED" + Type="PushPull" + Speed="Maximum" + Resistor="Floating" + Level="Low" + Mode="Output" + Alternate="0" /> + <pin7 + ID="LED_BLUE" + Type="PushPull" + Speed="Maximum" + Resistor="Floating" + Level="Low" + Mode="Output" + Alternate="0" /> + <pin8 + ID="LED_ORANGE" + Type="PushPull" + Speed="Maximum" + Resistor="Floating" + Level="Low" + Mode="Output" + Alternate="0" ></pin8> + <pin9 + ID="LED_GREEN" + Type="PushPull" + Speed="Maximum" + Resistor="Floating" + Level="Low" + Mode="Output" + Alternate="0" /> + <pin10 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin11 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin12 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin13 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin14 + ID="OSC32_IN" + Type="PushPull" + Speed="Maximum" + Resistor="Floating" + Level="High" + Mode="Input" + Alternate="0" /> + <pin15 + ID="OSC32_OUT" + Type="PushPull" + Speed="Maximum" + Resistor="Floating" + Level="High" + Mode="Input" + Alternate="0" /> + </GPIOC> + <GPIOD> + <pin0 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin1 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin2 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin3 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin4 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin5 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin6 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin7 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin8 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin9 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin10 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin11 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin12 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin13 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin14 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin15 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + </GPIOD> + <GPIOE> + <pin0 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin1 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin2 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin3 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin4 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin5 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin6 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin7 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin8 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin9 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin10 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin11 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin12 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin13 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin14 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + <pin15 ID="" Type="PushPull" Speed="Minimum" Resistor="PullUp" + Level="High" Mode="Input" Alternate="0" /> + </GPIOE> + <GPIOF> + <pin0 + ID="OSC_IN" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Input" + Alternate="0" /> + <pin1 + ID="OSC_OUT" + Type="PushPull" + Speed="Minimum" + Resistor="Floating" + Level="High" + Mode="Input" + Alternate="0" /> + <pin2 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin3 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin4 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin5 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin6 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin7 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin8 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin9 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin10 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin11 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin12 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin13 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin14 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + <pin15 + ID="" + Type="PushPull" + Speed="Minimum" + Resistor="PullUp" + Level="High" + Mode="Input" + Alternate="0" /> + </GPIOF> + </ports> +</board> diff --git a/keyboards/cannonkeys/satisfaction75/bootloader_defs.h b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h new file mode 100644 index 000000000..02c48c4e6 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/cannonkeys/satisfaction75/chconf.h b/keyboards/cannonkeys/satisfaction75/chconf.h new file mode 100644 index 000000000..99fa8ce39 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/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 10000 + +/** + * @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 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @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 0 + +/** + * @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 FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @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 FALSE + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @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/cannonkeys/satisfaction75/config.h b/keyboards/cannonkeys/satisfaction75/config.h new file mode 100644 index 000000000..dd2d9bc57 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/config.h @@ -0,0 +1,107 @@ +/* +Copyright 2015 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCA04 +#define PRODUCT_ID 0x57F5 +#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 QMK +#define PRODUCT Satisfaction75 +#define DESCRIPTION Satisfaction 75 Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +#define MATRIX_COL_PINS { B1, B2, B10, B11, B12, B13, B14, A8, A9, A10, B0, A7, A5, B5, A15, A1 } +#define MATRIX_ROW_PINS { B3, B4, A0, A2, A4, A3 } +#define DIODE_DIRECTION COL2ROW + +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B9 } +#define ENCODERS_PAD_B { B8 } + +//LEDS A6, RGB B15 +#define BACKLIGHT_LEVELS 24 +#define BACKLIGHT_BREATHING +#define BREATHING_PERIOD 6 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + +#ifdef QWIIC_MICRO_OLED_ENABLE + +#undef I2C_ADDRESS_SA0_1 +#define I2C_ADDRESS_SA0_1 0b0111100 +#define LCDWIDTH 128 +#define LCDHEIGHT 32 + +#endif + + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x02 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*6*16*2)) = (35+768) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 803 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 221 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 + + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/cannonkeys/satisfaction75/halconf.h b/keyboards/cannonkeys/satisfaction75/halconf.h new file mode 100644 index 000000000..9a9ab838e --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/halconf.h @@ -0,0 +1,354 @@ +/* + 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 TRUE +#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 TRUE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC TRUE +#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 FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI TRUE +#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 1 +#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/cannonkeys/satisfaction75/i2c_master.c b/keyboards/cannonkeys/satisfaction75/i2c_master.c new file mode 100644 index 000000000..a19dbcc9f --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/i2c_master.c @@ -0,0 +1,116 @@ +/* Copyright 2018 Jack Humbert + * Copyright 2018 Yiancar + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +/* This library is only valid for STM32 processors. + * This library follows the convention of the AVR i2c_master library. + * As a result addresses are expected to be already shifted (addr << 1). + * I2CD1 is the default driver which corresponds to pins B6 and B7. This + * can be changed. + * Please ensure that HAL_USE_I2C is TRUE in the halconf.h file and that + * STM32_I2C_USE_I2C1 is TRUE in the mcuconf.h file. Pins B6 and B7 are used + * but using any other I2C pins should be trivial. + */ + +#include "i2c_master.h" +#include "quantum.h" +#include <string.h> +#include <hal.h> +#include "chtypes.h" +#include "ch.h" + +static uint8_t i2c_address; + +// This configures the I2C clock to 400khz assuming a 48Mhz clock +// For more info : https://www.st.com/en/embedded-software/stsw-stm32126.html +static const I2CConfig i2cconfig = { + STM32_TIMINGR_PRESC(0x00U) | + STM32_TIMINGR_SCLDEL(0x03U) | STM32_TIMINGR_SDADEL(0x01U) | + STM32_TIMINGR_SCLH(0x03U) | STM32_TIMINGR_SCLL(0x09U), + 0, + 0 +}; + +__attribute__ ((weak)) +void i2c_init(void) +{ + // Try releasing special pins for a short time + palSetPadMode(GPIOB, 6, PAL_MODE_INPUT); + palSetPadMode(GPIOB, 7, PAL_MODE_INPUT); + + chThdSleepMilliseconds(10); + + palSetPadMode(GPIOB, 6, PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN); + palSetPadMode(GPIOB, 7, PAL_MODE_ALTERNATE(1) | PAL_STM32_OTYPE_OPENDRAIN); + + //i2cInit(); //This is invoked by halInit() so no need to redo it. +} + +// This is usually not needed +uint8_t i2c_start(uint8_t address) +{ + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + return 0; +} + +uint8_t i2c_transmit(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) +{ + msg_t status = MSG_OK; + + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + i2cAcquireBus(&I2C_DRIVER); + status = i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, 0, 0, MS2ST(timeout)); + i2cReleaseBus(&I2C_DRIVER); + return status; +} + +uint8_t i2c_receive(uint8_t address, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = address; + i2cStart(&I2C_DRIVER, &i2cconfig); + return i2cMasterReceiveTimeout(&I2C_DRIVER, (i2c_address >> 1), data, length, MS2ST(timeout)); +} + +uint8_t i2c_writeReg(uint8_t devaddr, uint8_t regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + + uint8_t complete_packet[length + 1]; + for(uint8_t i = 0; i < length; i++) + { + complete_packet[i+1] = data[i]; + } + complete_packet[0] = regaddr; + + return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), complete_packet, length + 1, 0, 0, MS2ST(timeout)); +} + +uint8_t i2c_readReg(uint8_t devaddr, uint8_t* regaddr, uint8_t* data, uint16_t length, uint16_t timeout) +{ + i2c_address = devaddr; + i2cStart(&I2C_DRIVER, &i2cconfig); + return i2cMasterTransmitTimeout(&I2C_DRIVER, (i2c_address >> 1), regaddr, 1, data, length, MS2ST(timeout)); +} + +// This is usually not needed. It releases the driver to allow pins to become GPIO again. +uint8_t i2c_stop(uint16_t timeout) +{ + i2cStop(&I2C_DRIVER); + return 0; +} diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c new file mode 100644 index 000000000..5e87c73dc --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +/* +Copyright 2012,2013 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_default( + KC_ESC, 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_GRV, 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_BSPC, ENC_PRESS, + 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_BSLS, 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_ENTER, KC_PGUP, + KC_LSFT, 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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c new file mode 100644 index 000000000..e76c79a71 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/keymap.c @@ -0,0 +1,49 @@ +/* +Copyright 2012,2013 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_default( + KC_ESC, 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_GRV, 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_BSPC, ENC_PRESS, + 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_BSLS, 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_ENTER, KC_PGUP, + KC_LSFT, 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, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + [1] = LAYOUT_default( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, OLED_TOGG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CLOCK_SET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk new file mode 100644 index 000000000..d12497792 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/keymaps/via/rules.mk @@ -0,0 +1,5 @@ +# rules.mk overrides to enable VIA + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes + diff --git a/keyboards/cannonkeys/satisfaction75/led.c b/keyboards/cannonkeys/satisfaction75/led.c new file mode 100644 index 000000000..3ddcec202 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/led.c @@ -0,0 +1,240 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "hal.h" +#include "led_custom.h" +#include "satisfaction75.h" +#include "printf.h" + +static void breathing_callback(PWMDriver *pwmp); + +static PWMConfig pwmCFG = { + 0xFFFF, /* PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + NULL, /* No Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +static PWMConfig pwmCFG_breathing = { + 0xFFFF, /* 10kHz PWM clock frequency */ + 256, /* PWM period (in ticks) 1S (1/10kHz=0.1mS 0.1ms*10000 ticks=1S) */ + breathing_callback, /* Breathing Callback */ + { + {PWM_OUTPUT_ACTIVE_HIGH, NULL}, /* Enable Channel 0 */ + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL}, + {PWM_OUTPUT_DISABLED, NULL} + }, + 0, /* HW dependent part.*/ + 0 +}; + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + + +void backlight_init_ports(void) { + palSetPadMode(GPIOA, 6, PAL_MODE_ALTERNATE(1)); + pwmStart(&PWMD3, &pwmCFG); + if(kb_backlight_config.enable){ + if(kb_backlight_config.breathing){ + breathing_enable(); + } else{ + backlight_set(kb_backlight_config.level); + } + } else { + backlight_set(0); + } +} + +void backlight_set(uint8_t level) { + uint32_t duty = (uint32_t)(cie_lightness(0xFFFF * (uint32_t) level / BACKLIGHT_LEVELS)); + if (level == 0) { + // Turn backlight off + pwmDisableChannel(&PWMD3, 0); + } else { + // Turn backlight on + if(!is_breathing()){ + pwmEnableChannel(&PWMD3, 0, PWM_FRACTION_TO_WIDTH(&PWMD3,0xFFFF,duty)); + } + } +} + + +uint8_t backlight_tick = 0; + +void backlight_task(void) { +} + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +bool is_breathing(void) { + return PWMD3.config == &pwmCFG_breathing; +} + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 256 / 2;} while (0) + + +void breathing_interrupt_enable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG_breathing); + chSysLockFromISR(); + pwmEnablePeriodicNotification(&PWMD3); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + 0xFFFF + ) + ); + chSysUnlockFromISR(); +} + +void breathing_interrupt_disable(void){ + pwmStop(&PWMD3); + pwmStart(&PWMD3, &pwmCFG); +} + +void breathing_enable(void) +{ + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + breathing_interrupt_enable(); +} + +void breathing_pulse(void) +{ + if (kb_backlight_config.level == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + breathing_interrupt_enable(); +} + +void breathing_disable(void) +{ + breathing_interrupt_disable(); + // Restore backlight level + backlight_set(kb_backlight_config.level); +} + +void breathing_self_disable(void) +{ + if (kb_backlight_config.level == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()){ + breathing_disable(); + } else { + breathing_enable(); + } +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * kb_backlight_config.level; +} + +static void breathing_callback(PWMDriver *pwmp) +{ + (void)pwmp; + uint16_t interval = (uint16_t) breathing_period * 256 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 256); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + breathing_interrupt_disable(); + } + + uint32_t duty = cie_lightness(scale_backlight(breathing_table[index] * 256)); + + chSysLockFromISR(); + pwmEnableChannelI( + &PWMD3, + 0, + PWM_FRACTION_TO_WIDTH( + &PWMD3, + 0xFFFF, + duty + ) + ); + chSysUnlockFromISR(); +} diff --git a/keyboards/cannonkeys/satisfaction75/led_custom.h b/keyboards/cannonkeys/satisfaction75/led_custom.h new file mode 100644 index 000000000..fe5c9e5dc --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/led_custom.h @@ -0,0 +1,5 @@ +#pragma once + +void backlight_task(void); +void breathing_interrupt_disable(void); +void breathing_interrupt_enable(void); diff --git a/keyboards/cannonkeys/satisfaction75/mcuconf.h b/keyboards/cannonkeys/satisfaction75/mcuconf.h new file mode 100644 index 000000000..6d8985796 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/mcuconf.h @@ -0,0 +1,176 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF +// #define STM32F070xB + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED TRUE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSE + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 TRUE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_I2C1_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 7) +#define STM32_I2C_I2C1_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 6) +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 TRUE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_RX_DMA_STREAM STM32_DMA_STREAM_ID(1, 4) +#define STM32_SPI_SPI2_TX_DMA_STREAM STM32_DMA_STREAM_ID(1, 5) +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/cannonkeys/satisfaction75/readme.md b/keyboards/cannonkeys/satisfaction75/readme.md new file mode 100644 index 000000000..361d1eb0f --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/readme.md @@ -0,0 +1,12 @@ +# Satisfaction75 + +Satisfaction75 Keyboard + +Keyboard Maintainer: [Andrew Kannan](https://github.com/awkannan1) +Hardware Supported: STM32F072CBT6 + +Make example for this keyboard (after setting up your build environment): + + make cannonkeys/Satisfaction75:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/cannonkeys/satisfaction75/rules.mk b/keyboards/cannonkeys/satisfaction75/rules.mk new file mode 100644 index 000000000..88ab45920 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/rules.mk @@ -0,0 +1,57 @@ +# project specific files +# SRC = ssd1306.c +## chip/board settings +# the next two should match the directories in +# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ +# or <this_dir>/ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in <chibios>/os/hal/boards/ +# or <this_dir>/boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# + +SRC += led.c \ + satisfaction_encoder.c \ + satisfaction_oled.c + +#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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file +ENCODER_ENABLE = yes +QWIIC_ENABLE += MICRO_OLED +#BACKLIGHT_ENABLE = yes + +# RAW_ENABLE = yes +# DYNAMIC_KEYMAP_ENABLE = yes + +DEFAULT_FOLDER = cannonkeys/satisfaction75 diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.c b/keyboards/cannonkeys/satisfaction75/satisfaction75.c new file mode 100644 index 000000000..1423b11b0 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.c @@ -0,0 +1,382 @@ +#include "satisfaction75.h" +#include "print.h" +#include "debug.h" + +#include "ch.h" +#include "hal.h" + +// #ifdef QWIIC_MICRO_OLED_ENABLE +#include "micro_oled.h" +#include "qwiic.h" + +#include "timer.h" + +#include "raw_hid.h" +#include "dynamic_keymap.h" +#include "tmk_core/common/eeprom.h" + +// HACK +#include "keyboards/zeal60/zeal60_api.h" // Temporary hack +#include "keyboards/zeal60/zeal60_keycodes.h" // Temporary hack + + +/* Artificial delay added to get media keys to work in the encoder*/ +#define MEDIA_KEY_DELAY 10 + +uint16_t last_flush; + +volatile uint8_t led_numlock = false; +volatile uint8_t led_capslock = false; +volatile uint8_t led_scrolllock = false; + +uint8_t layer; + +bool queue_for_send = false; +bool clock_set_mode = false; +uint8_t oled_mode = OLED_DEFAULT; +bool oled_sleeping = false; + +uint8_t encoder_value = 32; +uint8_t encoder_mode = ENC_MODE_VOLUME; +uint8_t enabled_encoder_modes = 0x1F; + +RTCDateTime last_timespec; +uint16_t last_minute = 0; + +uint8_t time_config_idx = 0; +int8_t hour_config = 0; +int16_t minute_config = 0; +int8_t year_config = 0; +int8_t month_config = 0; +int8_t day_config = 0; +uint8_t previous_encoder_mode = 0; + +backlight_config_t kb_backlight_config = { + .enable = true, + .breathing = true, + .level = BACKLIGHT_LEVELS +}; + +bool eeprom_is_valid(void) +{ + return (eeprom_read_word(((void*)EEPROM_MAGIC_ADDR)) == EEPROM_MAGIC && + eeprom_read_byte(((void*)EEPROM_VERSION_ADDR)) == EEPROM_VERSION); +} + +void eeprom_set_valid(bool valid) +{ + eeprom_update_word(((void*)EEPROM_MAGIC_ADDR), valid ? EEPROM_MAGIC : 0xFFFF); + eeprom_update_byte(((void*)EEPROM_VERSION_ADDR), valid ? EEPROM_VERSION : 0xFF); +} + +void eeprom_reset(void) +{ + // Set the Zeal60 specific EEPROM state as invalid. + eeprom_set_valid(false); + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); +} + +#ifdef RAW_ENABLE + +void raw_hid_receive( uint8_t *data, uint8_t length ) +{ + uint8_t *command_id = &(data[0]); + uint8_t *command_data = &(data[1]); + switch ( *command_id ) + { + case id_get_protocol_version: + { + command_data[0] = PROTOCOL_VERSION >> 8; + command_data[1] = PROTOCOL_VERSION & 0xFF; + break; + } + case id_get_keyboard_value: + { + if ( command_data[0] == id_uptime ) + { + uint32_t value = timer_read32(); + command_data[1] = (value >> 24 ) & 0xFF; + command_data[2] = (value >> 16 ) & 0xFF; + command_data[3] = (value >> 8 ) & 0xFF; + command_data[4] = value & 0xFF; + } + else + { + *command_id = id_unhandled; + } + break; + } +#ifdef DYNAMIC_KEYMAP_ENABLE + case id_dynamic_keymap_get_keycode: + { + uint16_t keycode = dynamic_keymap_get_keycode( command_data[0], command_data[1], command_data[2] ); + command_data[3] = keycode >> 8; + command_data[4] = keycode & 0xFF; + break; + } + case id_dynamic_keymap_set_keycode: + { + dynamic_keymap_set_keycode( command_data[0], command_data[1], command_data[2], ( command_data[3] << 8 ) | command_data[4] ); + break; + } + case id_dynamic_keymap_reset: + { + dynamic_keymap_reset(); + break; + } + case id_dynamic_keymap_macro_get_count: + { + command_data[0] = dynamic_keymap_macro_get_count(); + break; + } + case id_dynamic_keymap_macro_get_buffer_size: + { + uint16_t size = dynamic_keymap_macro_get_buffer_size(); + command_data[0] = size >> 8; + command_data[1] = size & 0xFF; + break; + } + case id_dynamic_keymap_macro_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_macro_set_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_macro_reset: + { + dynamic_keymap_macro_reset(); + break; + } + case id_dynamic_keymap_get_layer_count: + { + command_data[0] = dynamic_keymap_get_layer_count(); + break; + } + case id_dynamic_keymap_get_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_get_buffer( offset, size, &command_data[3] ); + break; + } + case id_dynamic_keymap_set_buffer: + { + uint16_t offset = ( command_data[0] << 8 ) | command_data[1]; + uint16_t size = command_data[2]; // size <= 28 + dynamic_keymap_set_buffer( offset, size, &command_data[3] ); + break; + } +#endif // DYNAMIC_KEYMAP_ENABLE + case id_eeprom_reset: + { + eeprom_reset(); + break; + } + case id_bootloader_jump: + { + // Need to send data back before the jump + // Informs host that the command is handled + raw_hid_send( data, length ); + // Give host time to read it + wait_ms(100); + bootloader_jump(); + break; + } + default: + { + // Unhandled message. + *command_id = id_unhandled; + break; + } + } + + // Return same buffer with values changed + raw_hid_send( data, length ); + +} + +#endif + + +void read_host_led_state(void) { + uint8_t leds = host_keyboard_leds(); + if (leds & (1 << USB_LED_NUM_LOCK)) { + if (led_numlock == false){ + led_numlock = true;} + } else { + if (led_numlock == true){ + led_numlock = false;} + } + if (leds & (1 << USB_LED_CAPS_LOCK)) { + if (led_capslock == false){ + led_capslock = true;} + } else { + if (led_capslock == true){ + led_capslock = false;} + } + if (leds & (1 << USB_LED_SCROLL_LOCK)) { + if (led_scrolllock == false){ + led_scrolllock = true;} + } else { + if (led_scrolllock == true){ + led_scrolllock = false;} + } +} + +uint32_t layer_state_set_kb(uint32_t state) { + state = layer_state_set_user(state); + layer = biton32(state); + queue_for_send = true; + return state; +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + queue_for_send = true; + switch (keycode) { + case OLED_TOGG: + if (record->event.pressed) { + oled_mode = (oled_mode + 1) % _NUM_OLED_MODES; + draw_ui(); + } + return false; + case CLOCK_SET: + if (record->event.pressed) { + if(clock_set_mode){ + pre_encoder_mode_change(); + clock_set_mode = false; + encoder_mode = previous_encoder_mode; + post_encoder_mode_change(); + + }else{ + previous_encoder_mode = encoder_mode; + pre_encoder_mode_change(); + clock_set_mode = true; + encoder_mode = ENC_MODE_CLOCK_SET; + post_encoder_mode_change(); + } + } + return false; + case ENC_PRESS: + if (record->event.pressed) { + uint16_t mapped_code = handle_encoder_press(); + uint16_t held_keycode_timer = timer_read(); + if(mapped_code != 0){ + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } + unregister_code(mapped_code); + } + } else { + // Do something else when release + } + return false; + default: + break; + } + +#ifdef DYNAMIC_KEYMAP_ENABLE + // Handle macros + if (record->event.pressed) { + if ( keycode >= MACRO00 && keycode <= MACRO15 ) + { + uint8_t id = keycode - MACRO00; + dynamic_keymap_macro_send(id); + return false; + } + } +#endif //DYNAMIC_KEYMAP_ENABLE + + return process_record_user(keycode, record); +} + + +void encoder_update_kb(uint8_t index, bool clockwise) { + encoder_value = (encoder_value + (clockwise ? 1 : -1)) % 64; + queue_for_send = true; + if (index == 0) { + if (layer == 0){ + uint16_t mapped_code = 0; + if (clockwise) { + mapped_code = handle_encoder_clockwise(); + } else { + mapped_code = handle_encoder_ccw(); + } + uint16_t held_keycode_timer = timer_read(); + if(mapped_code != 0){ + register_code(mapped_code); + while (timer_elapsed(held_keycode_timer) < MEDIA_KEY_DELAY){ /* no-op */ } + unregister_code(mapped_code); + } + } else { + if(clockwise){ + change_encoder_mode(false); + } else { + change_encoder_mode(true); + } + } + } +} + +void eeprom_init_kb(void) +{ + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + if (eeprom_is_valid()) { + //backlight_config_load(); + } else { + // If the EEPROM has not been saved before, or is out of date, + // save the default values to the EEPROM. Default values + // come from construction of the zeal_backlight_config instance. + //backlight_config_save(); +#ifdef DYNAMIC_KEYMAP_ENABLE + // This resets the keymaps in EEPROM to what is in flash. + dynamic_keymap_reset(); + // This resets the macros in EEPROM to nothing. + dynamic_keymap_macro_reset(); +#endif + // Save the magic number last, in case saving was interrupted + eeprom_set_valid(true); + } +} + +void matrix_init_kb(void) +{ + eeprom_init_kb(); + rtcGetTime(&RTCD1, &last_timespec); + queue_for_send = true; + backlight_init_ports(); + matrix_init_user(); +} + + +void matrix_scan_kb(void) { + rtcGetTime(&RTCD1, &last_timespec); + uint16_t minutes_since_midnight = last_timespec.millisecond / 1000 / 60; + + if (minutes_since_midnight != last_minute){ + last_minute = minutes_since_midnight; + if(!oled_sleeping){ + queue_for_send = true; + } + } + + if (queue_for_send && oled_mode != OLED_OFF) { + oled_sleeping = false; + read_host_led_state(); + draw_ui(); + queue_for_send = false; + } + if (timer_elapsed(last_flush) > ScreenOffInterval && !oled_sleeping) { + send_command(DISPLAYOFF); /* 0xAE */ + oled_sleeping = true; + } +} + diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction75.h b/keyboards/cannonkeys/satisfaction75/satisfaction75.h new file mode 100644 index 000000000..5f9a1e48b --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction75.h @@ -0,0 +1,118 @@ +#pragma once + +#include "quantum.h" + +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array + #define LAYOUT_default( \ + K000, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K115, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K315, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K415, \ + K500, K501, K502, K505, K509, K510, K511, K512, K513, K515 \ +) { \ + { K000, KC_NO, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, KC_NO, KC_NO }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, KC_NO, K115 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO, K215 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, KC_NO, KC_NO, K315 }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, KC_NO, K415 }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, K509, K510, K511, K512, K513, KC_NO, K515 } \ +} + +/* screen off after this many milliseconds */ +#define ScreenOffInterval 60000 /* milliseconds */ + +typedef union { + uint8_t raw; + struct { + bool enable :1; + bool breathing : 1; + uint8_t level :6; + }; +} backlight_config_t; + +// Start these at the USER code range in VIA +enum my_keycodes { + ENC_PRESS = 0x5F80, + CLOCK_SET, + OLED_TOGG +}; + +enum encoder_modes { + ENC_MODE_VOLUME, + ENC_MODE_MEDIA, + ENC_MODE_SCROLL, + ENC_MODE_BRIGHTNESS, + ENC_MODE_BACKLIGHT, + ENC_MODE_CUSTOM0, + ENC_MODE_CUSTOM1, + ENC_MODE_CUSTOM2, + _NUM_ENCODER_MODES, + ENC_MODE_CLOCK_SET // This shouldn't be included in the default modes, so we put it after NUM_ENCODER_MODES +}; + +enum oled_modes { + OLED_DEFAULT, + OLED_TIME, + OLED_OFF, + _NUM_OLED_MODES +}; + + +// Keyboard Information +extern volatile uint8_t led_numlock; +extern volatile uint8_t led_capslock; +extern volatile uint8_t led_scrolllock; +extern uint8_t layer; + +// OLED Behavior +extern uint16_t last_flush; +extern bool queue_for_send; +extern uint8_t oled_mode; +extern bool oled_sleeping; + +// Encoder Behavior +extern uint8_t encoder_value; +extern uint8_t encoder_mode; +extern uint8_t enabled_encoder_modes; + +// RTC +extern RTCDateTime last_timespec; +extern uint16_t last_minute; + +// RTC Configuration +extern bool clock_set_mode; +extern uint8_t time_config_idx; +extern int8_t hour_config; +extern int16_t minute_config; +extern int8_t year_config; +extern int8_t month_config; +extern int8_t day_config; +extern uint8_t previous_encoder_mode; + +// Backlighting +extern backlight_config_t kb_backlight_config; +extern bool kb_backlight_breathing; + +void pre_encoder_mode_change(void); +void post_encoder_mode_change(void); +void change_encoder_mode(bool negative); +uint16_t handle_encoder_clockwise(void); +uint16_t handle_encoder_ccw(void); +uint16_t handle_encoder_press(void); + +void update_time_config(int8_t increment); + +__attribute__ ((weak)) +void draw_ui(void); +void draw_default(void); +void draw_clock(void); + +void backlight_init_ports(void); +void backlight_set(uint8_t level); +bool is_breathing(void); +void breathing_enable(void); +void breathing_disable(void); +// void backlight_save_to_eeprom(uint8_t level); +// uint8_t backlight_config_load(); diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c new file mode 100644 index 000000000..88996f829 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_encoder.c @@ -0,0 +1,174 @@ +#include "satisfaction75.h" + +void pre_encoder_mode_change(){ + if(encoder_mode == ENC_MODE_CLOCK_SET){ + RTCDateTime timespec; + timespec.year = year_config; + timespec.month = month_config; + timespec.day = day_config; + // timespec.dayofweek = last_timespec.dayofweek; + // timespec.dstflag = last_timespec.dstflag; + timespec.millisecond = (hour_config * 60 + minute_config) * 60 * 1000; + rtcSetTime(&RTCD1, ×pec); + } +} + +void post_encoder_mode_change(){ + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour_config = (last_minute / 60); + minute_config = last_minute % 60; + year_config = last_timespec.year; + month_config = last_timespec.month; + day_config = last_timespec.day; + time_config_idx = 0; + } +} + +void change_encoder_mode(bool negative){ + pre_encoder_mode_change(); + do { + if(negative){ + if (encoder_mode == 0){ + encoder_mode = _NUM_ENCODER_MODES - 1; + } else{ + encoder_mode = encoder_mode - 1; + } + } else { + encoder_mode = (encoder_mode + 1) % _NUM_ENCODER_MODES; + } + } while(((1 << encoder_mode) & enabled_encoder_modes) == 0); + post_encoder_mode_change(); +} + +void update_time_config(int8_t increment){ + uint8_t day_limit = 31; + uint16_t adjusted_year = 1980 + year_config; + switch(time_config_idx){ + case 0: // hour + default: + hour_config = (hour_config + increment) % 24; + if (hour_config < 0){ + hour_config += 24; + } + break; + case 1: // minute + minute_config = (minute_config + increment) % 60; + if (minute_config < 0){ + minute_config += 60; + } + break; + case 2: // year + year_config += increment; + break; + case 3: // month + month_config = (month_config % 12) + increment; + if (month_config <= 0){ + month_config += 12; + } + break; + case 4: //day + if (month_config == 9 || month_config == 4 || month_config == 6 || month_config == 11){ + day_limit = 30; + } else if(month_config == 2){ + day_limit = adjusted_year % 4 == 0 && !(adjusted_year % 100 == 0 && adjusted_year % 400 != 0) ? 29 : 28; + } + day_config = (day_config % day_limit) + increment; + if(day_config <= 0){ + day_config += day_limit; + } + break; + } +} + +uint16_t handle_encoder_clockwise(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mapped_code = KC_VOLU; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_NEXT_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_D; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_INC; + kb_backlight_config.level = kb_backlight_config.level + 1; + if(kb_backlight_config.level > BACKLIGHT_LEVELS){ + kb_backlight_config.level = BACKLIGHT_LEVELS; + } + backlight_set(kb_backlight_config.level); + break; + case ENC_MODE_BRIGHTNESS: + mapped_code = KC_BRIGHTNESS_UP; + break; + case ENC_MODE_CLOCK_SET: + update_time_config(1); + queue_for_send = true; + break; + } + return mapped_code; +} + +uint16_t handle_encoder_ccw(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mapped_code = KC_VOLD; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_PREV_TRACK; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_WH_U; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_DEC; + if(kb_backlight_config.level != 0){ + kb_backlight_config.level = kb_backlight_config.level - 1; + } + backlight_set(kb_backlight_config.level); + break; + case ENC_MODE_BRIGHTNESS: + mapped_code = KC_BRIGHTNESS_DOWN; + break; + case ENC_MODE_CLOCK_SET: + update_time_config(-1); + queue_for_send = true; + break; + } + return mapped_code; +} + +uint16_t handle_encoder_press(){ + uint16_t mapped_code = 0; + switch(encoder_mode){ + case ENC_MODE_VOLUME: + mapped_code = KC_MUTE; + break; + case ENC_MODE_MEDIA: + mapped_code = KC_MEDIA_PLAY_PAUSE; + break; + case ENC_MODE_SCROLL: + mapped_code = KC_BTN3; + break; + case ENC_MODE_BACKLIGHT: + // mapped_code = BL_TOGG; + kb_backlight_config.breathing = !kb_backlight_config.breathing; + if(!kb_backlight_config.breathing){ + breathing_disable(); + } else{ + breathing_enable(); + } + break; + case ENC_MODE_CLOCK_SET: + time_config_idx = (time_config_idx + 1) % 5; + default: + case ENC_MODE_BRIGHTNESS: + break; + } + return mapped_code; +} diff --git a/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c new file mode 100644 index 000000000..a92d61c56 --- /dev/null +++ b/keyboards/cannonkeys/satisfaction75/satisfaction_oled.c @@ -0,0 +1,269 @@ +#include "satisfaction75.h" +#include "micro_oled.h" + +__attribute__ ((weak)) +void draw_ui() { + clear_buffer(); + last_flush = timer_read(); + send_command(DISPLAYON); + if(clock_set_mode){ + draw_clock(); + return; + } + switch (oled_mode){ + default: + case OLED_DEFAULT: + draw_default(); + break; + case OLED_TIME: + draw_clock(); + break; + case OLED_OFF: + send_command(DISPLAYOFF); + break; + } +} + +void draw_encoder(int8_t startX, int8_t startY, bool show_legend){ + if(show_legend){ + draw_string(startX + 1, startY + 2, "ENC", PIXEL_ON, NORM, 0); + } else { + startX -= 22; + } + draw_rect_filled_soft(startX + 22, startY + 1, 3 + (3 * 6), 9, PIXEL_ON, NORM); + char* mode_string = ""; + switch(encoder_mode){ + default: + case ENC_MODE_VOLUME: + mode_string = "VOL"; + break; + case ENC_MODE_MEDIA: + mode_string = "MED"; + break; + case ENC_MODE_SCROLL: + mode_string = "SCR"; + break; + case ENC_MODE_BRIGHTNESS: + mode_string = "BRT"; + break; + case ENC_MODE_BACKLIGHT: + mode_string = "BKL"; + break; + case ENC_MODE_CLOCK_SET: + mode_string = "CLK"; + break; + case ENC_MODE_CUSTOM0: + mode_string = "CS0"; + break; + case ENC_MODE_CUSTOM1: + mode_string = "CS1"; + break; + case ENC_MODE_CUSTOM2: + mode_string = "CS2"; + break; + } + draw_string(startX + 24, startY + 2, mode_string, PIXEL_ON, XOR, 0); +} + +void draw_layer_section(int8_t startX, int8_t startY, bool show_legend){ + if(show_legend){ + draw_string(startX + 1, startY + 2, "LAYER", PIXEL_ON, NORM, 0); + } else { + startX -= 32; + } + draw_rect_filled_soft(startX + 32, startY + 1, 9, 9, PIXEL_ON, NORM); + draw_char(startX + 34, startY + 2, layer + 0x30, PIXEL_ON, XOR, 0); +} + +void draw_default(){ + uint8_t hour = last_minute / 60; + uint16_t minute = last_minute % 60; + + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour = hour_config; + minute = minute_config; + } + + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0){ + hour = 12; + } + char hour_str[2] = ""; + char min_str[2] = ""; + + sprintf(hour_str, "%02d", hour); + sprintf(min_str, "%02d", minute); + + uint8_t mods = get_mods(); + +/* Layer indicator is 41 x 10 pixels */ + draw_layer_section(0,0,true); + +#define ENCODER_INDICATOR_X 45 +#define ENCODER_INDICATOR_Y 0 + draw_encoder(ENCODER_INDICATOR_X, ENCODER_INDICATOR_Y, true); +/* Matrix display is 19 x 9 pixels */ +#define MATRIX_DISPLAY_X 0 +#define MATRIX_DISPLAY_Y 18 + + for (uint8_t x = 0; x < MATRIX_ROWS; x++) { + for (uint8_t y = 0; y < MATRIX_COLS; y++) { + draw_pixel(MATRIX_DISPLAY_X + y + 2, MATRIX_DISPLAY_Y + x + 2,(matrix_get_row(x) & (1 << y)) > 0, NORM); + } + } + draw_rect_soft(MATRIX_DISPLAY_X, MATRIX_DISPLAY_Y, 19, 9, PIXEL_ON, NORM); + /* hadron oled location on thumbnail */ + draw_rect_filled_soft(MATRIX_DISPLAY_X + 14, MATRIX_DISPLAY_Y + 2, 3, 1, PIXEL_ON, NORM); + +/* Mod display is 41 x 16 pixels */ +#define MOD_DISPLAY_X 30 +#define MOD_DISPLAY_Y 18 + + if (mods & MOD_LSFT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 0, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 3, MOD_DISPLAY_Y + 2, "S", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LCTL) { + draw_rect_filled_soft(MOD_DISPLAY_X + 10, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 13, MOD_DISPLAY_Y + 2, "C", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LALT) { + draw_rect_filled_soft(MOD_DISPLAY_X + 20, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 23, MOD_DISPLAY_Y + 2, "A", PIXEL_ON, NORM, 0); + } + if (mods & MOD_LGUI) { + draw_rect_filled_soft(MOD_DISPLAY_X + 30, MOD_DISPLAY_Y, 5 + (1 * 6), 11, PIXEL_ON, NORM); + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_OFF, NORM, 0); + } else { + draw_string(MOD_DISPLAY_X + 33, MOD_DISPLAY_Y + 2, "G", PIXEL_ON, NORM, 0); + } + +/* Lock display is 23 x 21 */ +#define LOCK_DISPLAY_X 100 +#define LOCK_DISPLAY_Y 0 + + if (led_capslock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_OFF, NORM, 0); + } else if (led_capslock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y +1, "CAP", PIXEL_ON, NORM, 0); + } + + if (led_scrolllock == true) { + draw_rect_filled_soft(LOCK_DISPLAY_X + 0, LOCK_DISPLAY_Y + 11, 5 + (3 * 6), 9, PIXEL_ON, NORM); + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_OFF, NORM, 0); + } else if (led_scrolllock == false) { + draw_string(LOCK_DISPLAY_X + 3, LOCK_DISPLAY_Y + 11 +1, "SCR", PIXEL_ON, NORM, 0); + } + +#define TIME_DISPLAY_X 82 +#define TIME_DISPLAY_Y 22 + draw_string(TIME_DISPLAY_X, TIME_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 0); + draw_string(TIME_DISPLAY_X + 11, TIME_DISPLAY_Y, ":", PIXEL_ON, NORM, 0); + draw_string(TIME_DISPLAY_X + 15, TIME_DISPLAY_Y, min_str, PIXEL_ON, NORM, 0); + if(is_pm){ + draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "pm", PIXEL_ON, NORM, 0); + } else{ + draw_string(TIME_DISPLAY_X + 27, TIME_DISPLAY_Y, "am", PIXEL_ON, NORM, 0); + } + + send_buffer(); +} + +void draw_clock(){ + int8_t hour = last_minute / 60; + int16_t minute = last_minute % 60; + int16_t year = last_timespec.year + 1980; + int8_t month = last_timespec.month; + int8_t day = last_timespec.day; + + if(encoder_mode == ENC_MODE_CLOCK_SET){ + hour = hour_config; + minute = minute_config; + year = year_config + 1980; + month = month_config; + day = day_config; + } + + bool is_pm = (hour / 12) > 0; + hour = hour % 12; + if (hour == 0){ + hour = 12; + } + char hour_str[2] = ""; + char min_str[2] = ""; + char year_str[4] = ""; + char month_str[2] = ""; + char day_str[2] = ""; + + sprintf(hour_str, "%02d", hour); + sprintf(min_str, "%02d", minute); + sprintf(year_str, "%d", year); + sprintf(month_str, "%02d", month); + sprintf(day_str, "%02d", day); + + +#define DATE_DISPLAY_X 6 +#define DATE_DISPLAY_Y 0 + draw_string(DATE_DISPLAY_X, DATE_DISPLAY_Y, year_str, PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 25, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y, month_str, PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 44, DATE_DISPLAY_Y, "-", PIXEL_ON, NORM, 0); + draw_string(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y, day_str, PIXEL_ON, NORM, 0); + +#define CLOCK_DISPLAY_X 6 +#define CLOCK_DISPLAY_Y 14 + draw_string(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y, hour_str, PIXEL_ON, NORM, 1); + draw_string(CLOCK_DISPLAY_X + 17, CLOCK_DISPLAY_Y, ":", PIXEL_ON, NORM, 1); + draw_string(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y, min_str, PIXEL_ON, NORM, 1); + if(is_pm){ + draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "pm", PIXEL_ON, NORM, 1); + } else{ + draw_string(CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y, "am", PIXEL_ON, NORM, 1); + } + + if(clock_set_mode){ + switch(time_config_idx){ + case 0: // hour + default: + draw_line(CLOCK_DISPLAY_X, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 16, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); + break; + case 1: // minute + draw_line(CLOCK_DISPLAY_X + 25, CLOCK_DISPLAY_Y + 17, CLOCK_DISPLAY_X + 41, CLOCK_DISPLAY_Y + 17, PIXEL_ON, NORM); + break; + case 2: // year + draw_line(DATE_DISPLAY_X, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 23, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); + break; + case 3: // month + draw_line(DATE_DISPLAY_X + 31, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 43, DATE_DISPLAY_Y + 9, PIXEL_ON, NORM); + break; + case 4: //day + draw_line(DATE_DISPLAY_X + 50, DATE_DISPLAY_Y + 9, DATE_DISPLAY_X + 61, DATE_DISPLAY_Y + 9,PIXEL_ON, NORM); + break; + } + } + + draw_encoder(80, 0, true); + draw_layer_section(80, 11, true); + +#define CAPS_DISPLAY_X 86 +#define CAPS_DISPLAY_Y 22 + + if (led_capslock == true) { + draw_rect_filled_soft(CAPS_DISPLAY_X, CAPS_DISPLAY_Y, 5 + (4 * 6), 9, PIXEL_ON, NORM); + draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_OFF, NORM, 0); + } else if (led_capslock == false) { + draw_string(CAPS_DISPLAY_X + 3, CAPS_DISPLAY_Y +1, "CAPS", PIXEL_ON, NORM, 0); + } + + + send_buffer(); + +} diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h index 0e70094ae..d552fee5b 100644 --- a/keyboards/canoe/config.h +++ b/keyboards/canoe/config.h @@ -43,7 +43,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md index b8ddadea7..729ab1a0f 100644 --- a/keyboards/canoe/readme.md +++ b/keyboards/canoe/readme.md @@ -34,8 +34,8 @@ macOS: 3. Install the following packages: ``` brew install python - brew install pyusb - brew install --HEAD`https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb + pip install pyusb + brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb 4. Place your keyboard into reset. 5. Flash the board by typing `bootloadHID -r` followed by the path to your `.hex` file. diff --git a/keyboards/chibios_test/config.h b/keyboards/chibios_test/config.h index 89eb1f33b..91350c445 100644 --- a/keyboards/chibios_test/config.h +++ b/keyboards/chibios_test/config.h @@ -44,13 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/chimera_ergo/config.h b/keyboards/chimera_ergo/config.h index 8ce195cc0..4a47effdd 100644 --- a/keyboards/chimera_ergo/config.h +++ b/keyboards/chimera_ergo/config.h @@ -41,12 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/chimera_ergo/matrix.c b/keyboards/chimera_ergo/matrix.c index 21d46ef9b..d512a51d9 100644 --- a/keyboards/chimera_ergo/matrix.c +++ b/keyboards/chimera_ergo/matrix.c @@ -112,7 +112,7 @@ uint8_t matrix_scan(void) if (timeout > 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -134,7 +134,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/chimera_ls/config.h b/keyboards/chimera_ls/config.h index 254dad306..d7a21892a 100644 --- a/keyboards/chimera_ls/config.h +++ b/keyboards/chimera_ls/config.h @@ -41,12 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/chimera_ls/matrix.c b/keyboards/chimera_ls/matrix.c index 665d0d357..72fe44137 100644 --- a/keyboards/chimera_ls/matrix.c +++ b/keyboards/chimera_ls/matrix.c @@ -116,7 +116,7 @@ uint8_t matrix_scan(void) if (timeout > 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -138,7 +138,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/chimera_ortho/config.h b/keyboards/chimera_ortho/config.h index 4bf85eb88..1282008e2 100644 --- a/keyboards/chimera_ortho/config.h +++ b/keyboards/chimera_ortho/config.h @@ -41,12 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/chimera_ortho/matrix.c b/keyboards/chimera_ortho/matrix.c index 66d29f8b3..dc38ba74f 100644 --- a/keyboards/chimera_ortho/matrix.c +++ b/keyboards/chimera_ortho/matrix.c @@ -102,7 +102,7 @@ uint8_t matrix_scan(void) if (timeout > 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -124,7 +124,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/christmas_tree/config.h b/keyboards/christmas_tree/config.h index 4929f0ef5..769a9e98b 100644 --- a/keyboards/christmas_tree/config.h +++ b/keyboards/christmas_tree/config.h @@ -55,9 +55,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #endif diff --git a/keyboards/ckeys/handwire_101/config.h b/keyboards/ckeys/handwire_101/config.h index 7689c4703..106a7fd96 100755 --- a/keyboards/ckeys/handwire_101/config.h +++ b/keyboards/ckeys/handwire_101/config.h @@ -121,11 +121,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -194,4 +189,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - diff --git a/keyboards/ckeys/nakey/config.h b/keyboards/ckeys/nakey/config.h index 38fed297e..cdd16015d 100644 --- a/keyboards/ckeys/nakey/config.h +++ b/keyboards/ckeys/nakey/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/ckeys/obelus/config.h b/keyboards/ckeys/obelus/config.h index a1451c142..4ef308819 100644 --- a/keyboards/ckeys/obelus/config.h +++ b/keyboards/ckeys/obelus/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/clueboard/17/config.h b/keyboards/clueboard/17/config.h index bd64dfd27..21728348d 100644 --- a/keyboards/clueboard/17/config.h +++ b/keyboards/clueboard/17/config.h @@ -62,11 +62,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Underlight configuration */ #define RGB_DI_PIN F6 diff --git a/keyboards/clueboard/2x1800/config.h b/keyboards/clueboard/2x1800/config.h index cddcd1ce7..1b47a9d65 100644 --- a/keyboards/clueboard/2x1800/config.h +++ b/keyboards/clueboard/2x1800/config.h @@ -115,11 +115,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/clueboard/60/config.h b/keyboards/clueboard/60/config.h index c7dbf8ad0..aa544c70b 100644 --- a/keyboards/clueboard/60/config.h +++ b/keyboards/clueboard/60/config.h @@ -80,11 +80,6 @@ */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/clueboard/66/rev1/config.h b/keyboards/clueboard/66/rev1/config.h index a35c0d0f6..f8fb4bd35 100644 --- a/keyboards/clueboard/66/rev1/config.h +++ b/keyboards/clueboard/66/rev1/config.h @@ -32,11 +32,6 @@ /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/clueboard/66/rev2/config.h b/keyboards/clueboard/66/rev2/config.h index 0216b5e1f..9227cd2df 100644 --- a/keyboards/clueboard/66/rev2/config.h +++ b/keyboards/clueboard/66/rev2/config.h @@ -31,11 +31,6 @@ /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/clueboard/66/rev3/config.h b/keyboards/clueboard/66/rev3/config.h index e7cda4ccf..ba646f157 100644 --- a/keyboards/clueboard/66/rev3/config.h +++ b/keyboards/clueboard/66/rev3/config.h @@ -31,11 +31,6 @@ /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/clueboard/66/rev4/config.h b/keyboards/clueboard/66/rev4/config.h index 19a9837a3..540b38722 100644 --- a/keyboards/clueboard/66/rev4/config.h +++ b/keyboards/clueboard/66/rev4/config.h @@ -37,11 +37,6 @@ /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/clueboard/66_hotswap/config.h b/keyboards/clueboard/66_hotswap/config.h index d676af0ca..88adb5737 100644 --- a/keyboards/clueboard/66_hotswap/config.h +++ b/keyboards/clueboard/66_hotswap/config.h @@ -36,11 +36,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/clueboard/card/config.h b/keyboards/clueboard/card/config.h index 805982121..9520c31a6 100644 --- a/keyboards/clueboard/card/config.h +++ b/keyboards/clueboard/card/config.h @@ -39,7 +39,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL - + /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 20 @@ -87,11 +87,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/clueboard/card/keymaps/default/keymap.c b/keyboards/clueboard/card/keymaps/default/keymap.c index 687343e1b..0fa1d9d98 100644 --- a/keyboards/clueboard/card/keymaps/default/keymap.c +++ b/keyboards/clueboard/card/keymaps/default/keymap.c @@ -1,12 +1,18 @@ #include QMK_KEYBOARD_H +enum custom_keycodes { + SONG_SU = SAFE_RANGE, + SONG_SC, + SONG_GB +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( RGB_TOG, RGB_SAI, RGB_VAI, \ RGB_HUD, RGB_HUI, \ RGB_MOD, RGB_SAD, RGB_VAD, \ BL_STEP, \ - F(0), F(1), F(2) \ + SONG_SU,SONG_SC,SONG_GB \ ) }; @@ -23,28 +29,6 @@ float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), - [1] = ACTION_FUNCTION(1), - [2] = ACTION_FUNCTION(2) -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch (id) { - case 0: - PLAY_SONG(tone_startup); - break; - case 1: - PLAY_SONG(music_scale); - break; - case 2: - PLAY_SONG(tone_goodbye); - break; - } - } -}; - void matrix_init_user(void) { } @@ -53,7 +37,31 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + switch (keycode) { + case SONG_SU: + if (record->event.pressed) { + PLAY_SONG(tone_startup); + } + + return false; + + case SONG_SC: + if (record->event.pressed) { + PLAY_SONG(music_scale); + } + + return false; + + case SONG_GB: + if (record->event.pressed) { + PLAY_SONG(tone_goodbye); + } + + return false; + + default: + return true; + } } void led_set_user(uint8_t usb_led) { diff --git a/keyboards/comet46/keymaps/satt/config.h b/keyboards/comet46/keymaps/satt/config.h index c99de2cf8..a3ca2ebfe 100644 --- a/keyboards/comet46/keymaps/satt/config.h +++ b/keyboards/comet46/keymaps/satt/config.h @@ -21,11 +21,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef CONFIG_USER_H #define CONFIG_USER_H -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ -) - /* Use I2C or Serial */ #define USE_I2C diff --git a/keyboards/comet46/matrix.c b/keyboards/comet46/matrix.c index 66d29f8b3..dc38ba74f 100644 --- a/keyboards/comet46/matrix.c +++ b/keyboards/comet46/matrix.c @@ -102,7 +102,7 @@ uint8_t matrix_scan(void) if (timeout > 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -124,7 +124,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/contra/config.h b/keyboards/contra/config.h index c6bb374da..8e1369f12 100755 --- a/keyboards/contra/config.h +++ b/keyboards/contra/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/contra/keymaps/maxr1998/keymap.c b/keyboards/contra/keymaps/maxr1998/keymap.c index 4d731c08b..326d5876d 100644 --- a/keyboards/contra/keymaps/maxr1998/keymap.c +++ b/keyboards/contra/keymaps/maxr1998/keymap.c @@ -19,16 +19,17 @@ enum contra_layers { _QWERTZ, - _FUNC, - _NUMROW, - _NUMROW_L3, + _FN, + _NR, + _NR_L3, + _FX, _GAMING }; -#define KC_I3 LM(_NUMROW, MOD_LALT) -#define KC_NR MO(_NUMROW) -#define NR_L3 SAFE_RANGE -#define FUN MO(_FUNC) +#define KC_I3 LM(_NR, MOD_LALT) +#define KC_NR SAFE_RANGE +#define KC_N3 (SAFE_RANGE + 1) +#define KC_FN MO(_FN) #define G_1 TO(_GAMING) #define G_0 TG(_GAMING) @@ -49,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_GESC, 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, DE_PLUS, KC_ENT }, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, KC_RSFT}, - {KC_LCTL, KC_LGUI, KC_LALT, KC_I3, KC_NR, KC_SPC, KC_SPC, NR_L3, FUN, KC_LEFT, KC_DOWN, KC_RGHT} + {KC_LCTL, KC_LGUI, KC_LALT, KC_I3, KC_NR, KC_SPC, KC_SPC, KC_N3, KC_FN, KC_LEFT, KC_DOWN, KC_RGHT} }, /* Function layer @@ -60,10 +61,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | RGBH-| RGBT | RGBH+| PgUp | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | ---- | ---- | | | ---- | ---- | Home | PgDn | End | + * | | | | ---- | ---- | | ---- | ---- | Home | PgDn | End | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = { +[_FN] = { {_______, _______, _______, _______, _______, _______, _______, DE_UE, _______, DE_OE, _______, KC_DEL }, {KC_LOCK, DE_AE, DE_SS, _______, _______, G_1, _______, RGB_M_P, RGB_M_B, RGB_M_SW,_______, _______}, {_______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_TOG, RGB_HUI, KC_PGUP, _______}, @@ -72,26 +73,44 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Numrow layer (special characters with Shift and ISO_L3_Shift) * ,-----------------------------------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | | | | | | | | | | #' | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | <> | | | | | | | | | | -_ | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | ---- | ---- | | | ---- | ---- | | | | + * | | | | ---- | ---- | | ---- | ---- | | | | * `-----------------------------------------------------------------------------------' */ -[_NUMROW] = { +[_NR] = { {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DE_HASH, _______}, {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, - {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______} + {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} }, -[_NUMROW_L3] = { - {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, _______}, +[_NR_L3] = { + {_______, DE_1, DE_2, DE_3, DE_4, DE_5, DE_6, DE_7, DE_8, DE_9, DE_0, DE_SS }, {_______, DE_Q, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, DE_LESS, _______, _______, _______, _______, _______, _______, _______, _______, DE_MINS, _______}, - {_______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______} + {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} +}, + +/* Function keys + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FX] = { + {KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12 }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, _______, _______} }, /* Gaming @@ -102,17 +121,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Space| | | | | | | | Reset| | | | + * | Space| | | | | | | Leave| | | | * `-----------------------------------------------------------------------------------' */ [_GAMING] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {KC_SPC, _______, _______, _______, _______, _______, _______, _______, G_0, _______, _______, _______} + {KC_SPC, XXXXXXX, _______, _______, _______, _______, _______, _______, G_0, _______, _______, _______} } }; +void update_tri_layer_user(void); + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { case KC_BSPC: @@ -125,20 +146,36 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { unregister_code(DE_SS); } return true; - case NR_L3: + case KC_NR: if (record->event.pressed) { - register_code(KC_ALGR); - layer_on(_NUMROW_L3); + layer_on(_NR); } else { - layer_off(_NUMROW_L3); - unregister_code(KC_ALGR); + layer_off(_NR); + } + update_tri_layer_user(); + return false; + case KC_N3: + if (record->event.pressed) { + layer_on(_NR_L3); + } else { + layer_off(_NR_L3); } + update_tri_layer_user(); return false; default: return true; } } +void update_tri_layer_user(void) { + update_tri_layer(_NR, _NR_L3, _FX); + if (layer_state_is(_NR_L3) && !layer_state_is(_FX)) { + register_code(KC_ALGR); + } else { + unregister_code(KC_ALGR); + } +} + void led_set_user(uint8_t usb_led) { // Force-enable Numlock if (!(usb_led & (1<<USB_LED_NUM_LOCK))) { diff --git a/keyboards/converter/adb_usb/README.md b/keyboards/converter/adb_usb/README.md index ed7175008..8de9b9ad4 100644 --- a/keyboards/converter/adb_usb/README.md +++ b/keyboards/converter/adb_usb/README.md @@ -1,4 +1,4 @@ -ADB-to USB Keyboard Converter +ADB-to-USB Keyboard Converter ============================= This firmware converts Apple Desktop Bus (ADB) keyboard protocol to USB so that you can use an ADB keyboard on a modern computer. It works on the PJRC Teensy 2.0 and other USB AVR MCUs (ATMega32U4, AT90USB64/128, etc) and needs at least 10KB of flash memory. @@ -81,3 +81,4 @@ though the ADB protocol itself supports it. See protocol/adb.c for more info. QMK Port Changelog --------- - 2018/09/16 - Initial release. +- 2018/12/23 - Fixed lock LED support. diff --git a/keyboards/converter/adb_usb/led.c b/keyboards/converter/adb_usb/led.c index ea9bf77b5..3ee64a8e7 100644 --- a/keyboards/converter/adb_usb/led.c +++ b/keyboards/converter/adb_usb/led.c @@ -23,5 +23,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void led_set(uint8_t usb_led) { - adb_host_kbd_led(ADB_ADDR_KEYBOARD, ~usb_led); + adb_host_kbd_led(~usb_led); } diff --git a/keyboards/converter/adb_usb/matrix.c b/keyboards/converter/adb_usb/matrix.c index 8ee48bf23..4a70eb502 100644 --- a/keyboards/converter/adb_usb/matrix.c +++ b/keyboards/converter/adb_usb/matrix.c @@ -58,26 +58,20 @@ void matrix_scan_user(void) { void matrix_init(void) { - // LED on - DDRD |= (1<<6); PORTD |= (1<<6); - adb_host_init(); + // wait for keyboard to boot up and receive command _delay_ms(2000); // initialize matrix state: all keys off for (uint8_t i=0; i < MATRIX_ROWS; i++) matrix[i] = 0x00; - led_set(host_keyboard_leds()); - - // debug_enable = false; + // debug_enable = true; // debug_matrix = true; // debug_keyboard = true; // debug_mouse = true; // print("debug enabled.\n"); - // LED off - DDRD |= (1<<6); PORTD &= ~(1<<6); matrix_init_quantum(); } diff --git a/keyboards/converter/adb_usb/rules.mk b/keyboards/converter/adb_usb/rules.mk index 3a9b6dedc..7901898c7 100644 --- a/keyboards/converter/adb_usb/rules.mk +++ b/keyboards/converter/adb_usb/rules.mk @@ -1,7 +1,7 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 +# atmega32u4 Teensy2.0 +# atemga32u4 TMK Converter rev.1 +# atemga32u2 TMK Converter rev.2 MCU = atmega32u4 # Processor frequency. @@ -50,24 +50,23 @@ BOOTLOADER = caterina # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 +# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 # LUFA bootloader 4096 # USBaspLoader 2048 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA -EXTRAKEY_ENABLE = yes -USB_HID_ENABLE = yes -BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA +EXTRAKEY_ENABLE = yes +USB_HID_ENABLE = yes +BACKLIGHT_ENABLE = no +#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +CUSTOM_MATRIX = yes -CUSTOM_MATRIX = yes -SRC = matrix.c \ - adb.c +SRC = matrix.c adb.c led.c diff --git a/keyboards/converter/hp_46010a/rules.mk b/keyboards/converter/hp_46010a/rules.mk index ddd2d593b..25be64999 100644 --- a/keyboards/converter/hp_46010a/rules.mk +++ b/keyboards/converter/hp_46010a/rules.mk @@ -39,7 +39,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = halfkay @@ -48,8 +48,8 @@ BOOTLOADER = halfkay # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = no # 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 @@ -62,11 +62,9 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no SPLIT_KEYBOARD = no WAIT_FOR_USB = yes - +LAYOUTS_HAS_RGB = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -LAYOUTS_HAS_RGB = NO - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes -SRC = matrix.c
\ No newline at end of file + +SRC = matrix.c diff --git a/keyboards/converter/ibm_5291/rules.mk b/keyboards/converter/ibm_5291/rules.mk index ca0c850c0..57e385f0a 100644 --- a/keyboards/converter/ibm_5291/rules.mk +++ b/keyboards/converter/ibm_5291/rules.mk @@ -39,7 +39,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = halfkay @@ -62,11 +62,9 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. API_SYSEX_ENABLE = no SPLIT_KEYBOARD = no WAIT_FOR_USB = yes - +LAYOUTS_HAS_RGB = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -LAYOUTS_HAS_RGB = NO - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend CUSTOM_MATRIX = yes -SRC = matrix.c
\ No newline at end of file + +SRC = matrix.c diff --git a/keyboards/converter/ibm_terminal/config.h b/keyboards/converter/ibm_terminal/config.h index 4dd85f698..ba9ec82fa 100644 --- a/keyboards/converter/ibm_terminal/config.h +++ b/keyboards/converter/ibm_terminal/config.h @@ -39,11 +39,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_RALT) | MOD_BIT(KC_RCTL)) \ ) -/* +/* * PS/2 USART configuration for ATMega32U4 */ #ifdef PS2_USE_USART diff --git a/keyboards/converter/ibm_terminal/rules.mk b/keyboards/converter/ibm_terminal/rules.mk index 77b3a6f3f..3fa879246 100644 --- a/keyboards/converter/ibm_terminal/rules.mk +++ b/keyboards/converter/ibm_terminal/rules.mk @@ -36,7 +36,6 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 @@ -46,11 +45,11 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration @@ -61,12 +60,11 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. PS2_USE_USART = yes -API_SYSEX_ENABLE = n -CUSTOM_MATRIX = yes - +API_SYSEX_ENABLE = no # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +CUSTOM_MATRIX = yes -SRC = matrix.c led.c
\ No newline at end of file +SRC = matrix.c led.c diff --git a/keyboards/converter/m0110_usb/config.h b/keyboards/converter/m0110_usb/config.h index 79abb9a88..02e4c30fb 100644 --- a/keyboards/converter/m0110_usb/config.h +++ b/keyboards/converter/m0110_usb/config.h @@ -39,8 +39,8 @@ Ported to QMK by Techsock <info@techsock.com> /* magic key */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LGUI)) || \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT) | MOD_BIT(KC_LCTL)) \ ) /* boot magic key */ diff --git a/keyboards/converter/m0110_usb/rules.mk b/keyboards/converter/m0110_usb/rules.mk index 3b4ca83b7..bffee05fd 100644 --- a/keyboards/converter/m0110_usb/rules.mk +++ b/keyboards/converter/m0110_usb/rules.mk @@ -1,7 +1,7 @@ # MCU name -# atmega32u4 Teensy2.0 -# atemga32u4 TMK Converter rev.1 -# atemga32u2 TMK Converter rev.2 +# atmega32u4 Teensy2.0 +# atemga32u4 TMK Converter rev.1 +# atemga32u2 TMK Converter rev.2 MCU = atmega32u4 # Processor frequency. @@ -43,31 +43,30 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina # Boot Section Size in *bytes* # Teensy halfKay 512 # Teensy++ halfKay 1024 -# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 +# Atmel DFU loader 4096 for TMK Converter rev.1/rev.2 # LUFA bootloader 4096 # USBaspLoader 2048 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA -EXTRAKEY_ENABLE = yes -USB_HID_ENABLE = yes -BACKLIGHT_ENABLE = no -#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - not yet supported in LUFA +EXTRAKEY_ENABLE = yes +USB_HID_ENABLE = yes +BACKLIGHT_ENABLE = no +#BLUETOOTH = AdafruitBLE # For Adafruit Feather 32U4 BLE support, uncomment this line +CUSTOM_MATRIX = yes -CUSTOM_MATRIX = yes -SRC = matrix.c \ - m0110.c +SRC = matrix.c m0110.c diff --git a/keyboards/converter/palm_usb/config.h b/keyboards/converter/palm_usb/config.h index 4520725a1..4233a53ef 100644 --- a/keyboards/converter/palm_usb/config.h +++ b/keyboards/converter/palm_usb/config.h @@ -34,19 +34,19 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // IO pins to serial // https://deskthority.net/wiki/Arduino_Pro_Micro for pin lookup -#define VCC_PIN D1 // pro micro 2 +#define VCC_PIN D1 // pro micro 2 #define RX_PIN D0 //pro micro 3 , was 8 on cy384 #define RTS_PIN C6 // 5 //[ was D4 // 4 on the cy384 -#define DCD_PIN E6 //7 +#define DCD_PIN E6 //7 // if using the particular arduino pinout of CY384 -#ifdef CY384 +#ifdef CY384 #define GND_PIN D7 //6 #define PULLDOWN_PIN B1 // 15 #endif #ifndef HANDSPRING -// Set to 1 for Handspring or to disable RTS/DCD based handshake. +// Set to 1 for Handspring or to disable RTS/DCD based handshake. #define HANDSPRING 0 #endif @@ -59,9 +59,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ - keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + get_mods() == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ + get_mods() == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) @@ -74,10 +74,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define SERIAL_SOFT_BIT_ORDER_LSB #if (HANDSPRING == 0) #define SERIAL_SOFT_LOGIC_NEGATIVE //RS232 logic -#endif +#endif /* RXD Port */ #define SERIAL_SOFT_RXD_ENABLE - + // we are using Pro micro pin 3 / D0 as serial #define SERIAL_SOFT_RXD_DDR DDRD #define SERIAL_SOFT_RXD_PORT PORTD diff --git a/keyboards/converter/palm_usb/rules.mk b/keyboards/converter/palm_usb/rules.mk index 35ea3995e..8dfc2ca4d 100644 --- a/keyboards/converter/palm_usb/rules.mk +++ b/keyboards/converter/palm_usb/rules.mk @@ -9,38 +9,34 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTLOADER = caterina # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode -UNICODEMAP_ENABLE = no +UNICODEMAP_ENABLE = no BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -CUSTOM_MATRIX = yes - +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #HARDWARE_SERIAL = yes +CUSTOM_MATRIX = yes SRC += matrix.c - ifdef HARDWARE_SERIAL - # untested with palm_usb - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL + # Untested with palm_usb + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL else - SRC += protocol/serial_soft.c + SRC += protocol/serial_soft.c endif DEFAULT_FOLDER = converter/palm_usb/stowaway - diff --git a/keyboards/converter/sun_usb/config.h b/keyboards/converter/sun_usb/config.h index f7ad41639..7713e0a91 100644 --- a/keyboards/converter/sun_usb/config.h +++ b/keyboards/converter/sun_usb/config.h @@ -33,9 +33,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ - keyboard_report->mods == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ + get_mods() == (MOD_BIT(KC_LALT) | MOD_BIT(KC_RALT)) || \ + get_mods() == (MOD_BIT(KC_LGUI) | MOD_BIT(KC_RGUI)) || \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) diff --git a/keyboards/converter/sun_usb/rules.mk b/keyboards/converter/sun_usb/rules.mk index 3cf503b1d..22311c3d4 100644 --- a/keyboards/converter/sun_usb/rules.mk +++ b/keyboards/converter/sun_usb/rules.mk @@ -9,14 +9,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT BOOTLOADER = lufa-dfu # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration +CONSOLE_ENABLE = yes # 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 = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls @@ -24,21 +24,18 @@ AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode UNICODEMAP_ENABLE = yes BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -CUSTOM_MATRIX = yes - +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend #HARDWARE_SERIAL = yes +CUSTOM_MATRIX = yes SRC += matrix.c led.c - ifdef HARDWARE_SERIAL - SRC += protocol/serial_uart.c - OPT_DEFS += -DHARDWARE_SERIAL + SRC += protocol/serial_uart.c + OPT_DEFS += -DHARDWARE_SERIAL else - SRC += protocol/serial_soft.c + SRC += protocol/serial_soft.c endif DEFAULT_FOLDER = converter/sun_usb/type5 diff --git a/keyboards/converter/usb_usb/config.h b/keyboards/converter/usb_usb/config.h index deee35948..1cab3c1c3 100644 --- a/keyboards/converter/usb_usb/config.h +++ b/keyboards/converter/usb_usb/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT QMK USB-USB Converter #define DESCRIPTION USB to USB Keyboard Converter with QMK - /* size of virtual matrix */ #define MATRIX_ROWS 16 #define MATRIX_COLS 16 @@ -40,9 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* matrix scanning is done in custom_matrix.cpp */ #define DIODE_DIRECTION CUSTOM_MATRIX -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/converter/usb_usb/rules.mk b/keyboards/converter/usb_usb/rules.mk index 7a8f24bb4..dfe89ee7d 100644 --- a/keyboards/converter/usb_usb/rules.mk +++ b/keyboards/converter/usb_usb/rules.mk @@ -1,7 +1,6 @@ # MCU name MCU = atmega32u4 - # Processor frequency. # This will define a symbol, F_CPU, in all source code files equal to the # processor frequency in Hz. You can then use this symbol in your source code to @@ -23,7 +22,6 @@ F_CPU ?= 16000000 DEFAULT_FOLDER = converter/usb_usb/hasu - # # LUFA specific # @@ -45,7 +43,7 @@ F_USB = $(F_CPU) # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina @@ -55,15 +53,15 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Build Options # comment out to disable the options. # -# 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) -# COMMAND_ENABLE = yes # Commands for debug and configuration -# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA -# BACKLIGHT_ENABLE = yes -USB_HID_ENABLE = yes +#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) +#COMMAND_ENABLE = yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +#BACKLIGHT_ENABLE = yes +USB_HID_ENABLE = yes +CUSTOM_MATRIX = yes -CUSTOM_MATRIX = yes -SRC = custom_matrix.cpp
\ No newline at end of file +SRC = custom_matrix.cpp diff --git a/keyboards/converter/xt_usb/config.h b/keyboards/converter/xt_usb/config.h index 963a3c639..ecebc123f 100644 --- a/keyboards/converter/xt_usb/config.h +++ b/keyboards/converter/xt_usb/config.h @@ -31,8 +31,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \ - keyboard_report->mods == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) || \ + get_mods() == (MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RSHIFT)) \ ) diff --git a/keyboards/converter/xt_usb/rules.mk b/keyboards/converter/xt_usb/rules.mk index 0b8731f32..1f9625183 100644 --- a/keyboards/converter/xt_usb/rules.mk +++ b/keyboards/converter/xt_usb/rules.mk @@ -14,7 +14,6 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 - # # LUFA specific # @@ -42,21 +41,19 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # BOOTLOADER = caterina # Pro Micro BOOTLOADER = halfkay # Teensy - # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE = no # 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) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # USB Nkey Rollover -XT_ENABLE = yes -CUSTOM_MATRIX = yes +BOOTMAGIC_ENABLE = no # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover +XT_ENABLE = yes +CUSTOM_MATRIX = yes +SRC = matrix.c led.c # Optimize size but this may cause error "relocation truncated to fit" #EXTRALDFLAGS = -Wl,--relax - -SRC = matrix.c led.c diff --git a/keyboards/cospad/config.h b/keyboards/cospad/config.h index 4bdf434a4..1f7c174e6 100644 --- a/keyboards/cospad/config.h +++ b/keyboards/cospad/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/crkbd/keymaps/drashna/keymap.c b/keyboards/crkbd/keymaps/drashna/keymap.c index 678fd33b5..0a9ff24ff 100644 --- a/keyboards/crkbd/keymaps/drashna/keymap.c +++ b/keyboards/crkbd/keymaps/drashna/keymap.c @@ -58,6 +58,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_crkbd_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_crkbd_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_crkbd_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_crkbd_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, diff --git a/keyboards/crkbd/keymaps/omgvee/config.h b/keyboards/crkbd/keymaps/omgvee/config.h index bed797e92..95d5328ad 100644 --- a/keyboards/crkbd/keymaps/omgvee/config.h +++ b/keyboards/crkbd/keymaps/omgvee/config.h @@ -43,3 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 #define BACKLIGHT_LEVELS 10 + +#undef PRODUCT +#define PRODUCT "Vee's hotswappable Helidox/Corne/CRKBD split keeb" diff --git a/keyboards/crkbd/keymaps/omgvee/keymap.c b/keyboards/crkbd/keymaps/omgvee/keymap.c index fbd29e774..5c4dd416e 100644 --- a/keyboards/crkbd/keymaps/omgvee/keymap.c +++ b/keyboards/crkbd/keymaps/omgvee/keymap.c @@ -44,6 +44,7 @@ enum macro_keycodes { #define KC_LOWER LOWER #define KC_RAISE RAISE #define KC_RST RESET +#define KC_ERST EEPROM_RESET #define KC_LRST RGBRST #define KC_LTOG RGB_TOG #define KC_LHUI RGB_HUI @@ -85,11 +86,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + TAB, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| SFCPS, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, BSLS,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, SLSH, RSFT,\ + CTLTB, XXXXX, VOLD, VOLU, MUTE, MPLY, UNDS, PLUS, LBRC, RBRC, SLSH, RSFT,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \ //`--------------------' `--------------------' @@ -97,11 +98,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_kc( \ //,-----------------------------------------. ,-----------------------------------------. - RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + RST, LRST, XXXXX, XXXXX, XXXXX, ERST, MNXT, MPRV, MFFD, MRWD, XXXXX, EJCT,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ + LTOG, LHUI, LSAI, LVAI, PGUP, HOME, LEFT, DOWN, UP, RIGHT, XXXXX, XXXXX,\ //|------+------+------+------+------+------| |------+------+------+------+------+------| - LMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, BRID, BRIU, VOLD, VOLU, MUTE, XXXXX,\ + LMOD, LHUD, LSAD, LVAD, PGDN, END, BRID, BRIU, VOLD, VOLU, MUTE, MPLY,\ //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| GUIEI, LOWER, ENT, SPC, RAISE, ALTKN \ //`--------------------' `--------------------' @@ -158,7 +159,10 @@ void matrix_render_user(struct CharacterMatrix *matrix) { //matrix_write_ln(matrix, read_host_led_state()); //matrix_write_ln(matrix, read_timelog()); } else { - matrix_write(matrix, read_logo()); + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write(matrix, read_logo()); } } diff --git a/keyboards/crkbd/keymaps/omgvee/readme.md b/keyboards/crkbd/keymaps/omgvee/readme.md index 707f44a9c..bc316c2a3 100644 --- a/keyboards/crkbd/keymaps/omgvee/readme.md +++ b/keyboards/crkbd/keymaps/omgvee/readme.md @@ -2,7 +2,7 @@ ====================================================== -![My beloved HeliDox keeb](https://imgur.com/a/t5m6rmW) +![My beloved HeliDox keeb](https://i.imgur.com/NbVAB3g.jpg) - media keys and media controls - in-switch LED intensity controls (+/-) @@ -13,3 +13,6 @@ - arrow keys on one layer(most likely on the ADJUST one) See keymap.c for layouts + + +P.S> this lil' keeb is so addictive I have no words, really... diff --git a/keyboards/crkbd/keymaps/omgvee/rules.mk b/keyboards/crkbd/keymaps/omgvee/rules.mk index 21ec12ada..16deaf45d 100644 --- a/keyboards/crkbd/keymaps/omgvee/rules.mk +++ b/keyboards/crkbd/keymaps/omgvee/rules.mk @@ -4,12 +4,12 @@ # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = no # Audio control and System control(+450) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration -NKRO_ENABLE = no # 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 +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode diff --git a/keyboards/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h index 915779060..55bf5930f 100644 --- a/keyboards/crkbd/rev1/config.h +++ b/keyboards/crkbd/rev1/config.h @@ -50,11 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/cu24/config.h b/keyboards/cu24/config.h index df009c953..351694a11 100644 --- a/keyboards/cu24/config.h +++ b/keyboards/cu24/config.h @@ -107,11 +107,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/cu75/config.h b/keyboards/cu75/config.h index c21e1da01..baaed33e6 100644 --- a/keyboards/cu75/config.h +++ b/keyboards/cu75/config.h @@ -89,11 +89,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/daisy/config.h b/keyboards/daisy/config.h index d2ab92f87..4698c216e 100644 --- a/keyboards/daisy/config.h +++ b/keyboards/daisy/config.h @@ -35,7 +35,6 @@ #define BACKLIGHT_PIN D0 #define BACKLIGHT_LEVELS 6 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -82,11 +81,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/dc01/arrow/config.h b/keyboards/dc01/arrow/config.h index 75c674f63..f734d9b18 100644 --- a/keyboards/dc01/arrow/config.h +++ b/keyboards/dc01/arrow/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dc01/arrow/matrix.c b/keyboards/dc01/arrow/matrix.c index 85591f602..dd5e2ee9c 100644 --- a/keyboards/dc01/arrow/matrix.c +++ b/keyboards/dc01/arrow/matrix.c @@ -218,7 +218,7 @@ bool matrix_is_modified(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/dc01/left/config.h b/keyboards/dc01/left/config.h index e3d49404e..9a8ba1b55 100644 --- a/keyboards/dc01/left/config.h +++ b/keyboards/dc01/left/config.h @@ -55,7 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -107,11 +106,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dc01/left/matrix.c b/keyboards/dc01/left/matrix.c index 806583580..cbe3b3f3d 100644 --- a/keyboards/dc01/left/matrix.c +++ b/keyboards/dc01/left/matrix.c @@ -158,7 +158,7 @@ void matrix_init(void) { matrix[i] = 0; matrix_debouncing[i] = 0; } - + matrix_init_quantum(); } @@ -209,7 +209,7 @@ uint8_t matrix_scan(void) debouncing = false; } # endif - + if (i2c_transaction(SLAVE_I2C_ADDRESS_RIGHT, 0x3F, 0)){ //error has occured for main right half error_count_right++; if (error_count_right > ERROR_DISCONNECT_COUNT){ //disconnect half @@ -220,7 +220,7 @@ uint8_t matrix_scan(void) }else{ //no error error_count_right = 0; } - + if (i2c_transaction(SLAVE_I2C_ADDRESS_ARROW, 0X3FFF, 8)){ //error has occured for arrow cluster error_count_arrow++; if (error_count_arrow > ERROR_DISCONNECT_COUNT){ //disconnect arrow cluster @@ -258,7 +258,7 @@ bool matrix_is_modified(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/dc01/numpad/config.h b/keyboards/dc01/numpad/config.h index 16d75b2a8..982be6645 100644 --- a/keyboards/dc01/numpad/config.h +++ b/keyboards/dc01/numpad/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dc01/numpad/matrix.c b/keyboards/dc01/numpad/matrix.c index 39637241d..5a13f3ff2 100644 --- a/keyboards/dc01/numpad/matrix.c +++ b/keyboards/dc01/numpad/matrix.c @@ -218,7 +218,7 @@ bool matrix_is_modified(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/dc01/right/config.h b/keyboards/dc01/right/config.h index a1d49cc5c..e7aea97a3 100644 --- a/keyboards/dc01/right/config.h +++ b/keyboards/dc01/right/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dc01/right/matrix.c b/keyboards/dc01/right/matrix.c index 50fe19b8d..6d981797c 100644 --- a/keyboards/dc01/right/matrix.c +++ b/keyboards/dc01/right/matrix.c @@ -218,7 +218,7 @@ bool matrix_is_modified(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/deltasplit75/v2/config.h b/keyboards/deltasplit75/v2/config.h index 475a5c9dc..fc85f9125 100644 --- a/keyboards/deltasplit75/v2/config.h +++ b/keyboards/deltasplit75/v2/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 @@ -82,5 +77,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/dichotomy/config.h b/keyboards/dichotomy/config.h index f0847ec52..2fc098fe3 100755 --- a/keyboards/dichotomy/config.h +++ b/keyboards/dichotomy/config.h @@ -41,12 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/dichotomy/matrix.c b/keyboards/dichotomy/matrix.c index 14c3f0d8e..f14c90128 100755 --- a/keyboards/dichotomy/matrix.c +++ b/keyboards/dichotomy/matrix.c @@ -198,7 +198,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/diverge3/config.h b/keyboards/diverge3/config.h index 464dc835f..27938cf23 100644 --- a/keyboards/diverge3/config.h +++ b/keyboards/diverge3/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 5 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -63,7 +62,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -107,11 +105,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/divergetm2/config.h b/keyboards/divergetm2/config.h index cbeeff9aa..a5b1eaa68 100644 --- a/keyboards/divergetm2/config.h +++ b/keyboards/divergetm2/config.h @@ -48,7 +48,6 @@ /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION ROW2COL - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -73,10 +72,3 @@ * useful if your keyboard/keypad is missing keys and you want magic key support. * */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - - diff --git a/keyboards/dk60/config.h b/keyboards/dk60/config.h index 5b712fe9b..9df384740 100644 --- a/keyboards/dk60/config.h +++ b/keyboards/dk60/config.h @@ -47,9 +47,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #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)) \ - ) #endif diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index 4a7dcddfd..74d27de39 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -72,11 +72,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define TAPPING_TERM 200 #endif diff --git a/keyboards/do60/keymaps/default/keymap.c b/keyboards/do60/keymaps/default/keymap.c index 7c66f0ac0..75afb7a34 100644 --- a/keyboards/do60/keymaps/default/keymap.c +++ b/keyboards/do60/keymaps/default/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, \ 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_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, KC_SLSH, KC_UP, KC_SLSH, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, KC_BSPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [1] = LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, BL_TOGG,BL_ON, BL_INC, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, BL_STEP,BL_OFF, BL_DEC, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - }; - // Macros /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -44,4 +39,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -};
\ No newline at end of file +}; diff --git a/keyboards/do60/keymaps/test/keymap.c b/keyboards/do60/keymaps/test/keymap.c index 6bac713fd..f145177b0 100644 --- a/keyboards/do60/keymaps/test/keymap.c +++ b/keyboards/do60/keymaps/test/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, \ 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_NO, KC_ENT, \ KC_LSFT, KC_NO, 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_SLSH, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [1] = LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions - const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - }; - // Macros /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/fourier/keymaps/default/rules.mk b/keyboards/doro67/readme.md index e69de29bb..e69de29bb 100644 --- a/keyboards/fourier/keymaps/default/rules.mk +++ b/keyboards/doro67/readme.md diff --git a/keyboards/doro67/regular/config.h b/keyboards/doro67/regular/config.h new file mode 100644 index 000000000..9ba591cdd --- /dev/null +++ b/keyboards/doro67/regular/config.h @@ -0,0 +1,31 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER 80ultraman +#define PRODUCT doro67 +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D4, D6, D7, B4, B5, B6, C6, C7, F5, F6, F7 } + +#define DIODE_DIRECTION COL2ROW + diff --git a/keyboards/doro67/regular/info.json b/keyboards/doro67/regular/info.json new file mode 100644 index 000000000..68c9f5dbd --- /dev/null +++ b/keyboards/doro67/regular/info.json @@ -0,0 +1,82 @@ +{ + "keyboard_name": "", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [ + {"label":"K00", "x":0, "y":0}, + {"label":"K01", "x":1, "y":0}, + {"label":"K02", "x":2, "y":0}, + {"label":"K03", "x":3, "y":0}, + {"label":"K04", "x":4, "y":0}, + {"label":"K05", "x":5, "y":0}, + {"label":"K06", "x":6, "y":0}, + {"label":"K07", "x":7, "y":0}, + {"label":"K08", "x":8, "y":0}, + {"label":"K09", "x":9, "y":0}, + {"label":"K0A", "x":10, "y":0}, + {"label":"K0B", "x":11, "y":0}, + {"label":"K0C", "x":12, "y":0}, + {"label":"K0D", "x":13, "y":0, "w":2}, + {"label":"K0E", "x":15, "y":0}, + {"label":"K10", "x":0, "y":1, "w":1.5}, + {"label":"K11", "x":1.5, "y":1}, + {"label":"K12", "x":2.5, "y":1}, + {"label":"K13", "x":3.5, "y":1}, + {"label":"K14", "x":4.5, "y":1}, + {"label":"K15", "x":5.5, "y":1}, + {"label":"K16", "x":6.5, "y":1}, + {"label":"K17", "x":7.5, "y":1}, + {"label":"K18", "x":8.5, "y":1}, + {"label":"K19", "x":9.5, "y":1}, + {"label":"K1A", "x":10.5, "y":1}, + {"label":"K1B", "x":11.5, "y":1}, + {"label":"K1C", "x":12.5, "y":1}, + {"label":"K1D", "x":13.5, "y":1, "w":1.5}, + {"label":"K1E", "x":15, "y":1}, + {"label":"K20", "x":0, "y":2, "w":1.75}, + {"label":"K21", "x":1.75, "y":2}, + {"label":"K22", "x":2.75, "y":2}, + {"label":"K23", "x":3.75, "y":2}, + {"label":"K24", "x":4.75, "y":2}, + {"label":"K25", "x":5.75, "y":2}, + {"label":"K26", "x":6.75, "y":2}, + {"label":"K27", "x":7.75, "y":2}, + {"label":"K28", "x":8.75, "y":2}, + {"label":"K29", "x":9.75, "y":2}, + {"label":"K2A", "x":10.75, "y":2}, + {"label":"K2B", "x":11.75, "y":2}, + {"label":"K2D", "x":12.75, "y":2, "w":2.25}, + {"label":"K2E", "x":15, "y":2}, + {"label":"K30", "x":0, "y":3, "w":2.25}, + {"label":"K32", "x":2.25, "y":3}, + {"label":"K33", "x":3.25, "y":3}, + {"label":"K34", "x":4.25, "y":3}, + {"label":"K35", "x":5.25, "y":3}, + {"label":"K36", "x":6.25, "y":3}, + {"label":"K37", "x":7.25, "y":3}, + {"label":"K38", "x":8.25, "y":3}, + {"label":"K39", "x":9.25, "y":3}, + {"label":"K3A", "x":10.25, "y":3}, + {"label":"K3B", "x":11.25, "y":3}, + {"label":"K3C", "x":12.25, "y":3, "w":1.75}, + {"label":"K3D", "x":14, "y":3}, + {"label":"K3E", "x":15, "y":3}, + {"label":"K40", "x":0, "y":4, "w":1.25}, + {"label":"K41", "x":1.25, "y":4, "w":1.25}, + {"label":"K42", "x":2.5, "y":4, "w":1.25}, + {"label":"K43", "x":3.75, "y":4, "w":6.25}, + {"label":"K49", "x":10, "y":4, "w":1.25}, + {"label":"K4A", "x":11.25, "y":4, "w":1.25}, + {"label":"K4C", "x":13, "y":4}, + {"label":"K4D", "x":14, "y":4}, + {"label":"K4E", "x":15, "y":4} + ] + } + } + } +
\ No newline at end of file diff --git a/keyboards/kbd67/hotswap/keymaps/default/config.h b/keyboards/doro67/regular/keymaps/default/config.h index 26c6d6ade..26c6d6ade 100644 --- a/keyboards/kbd67/hotswap/keymaps/default/config.h +++ b/keyboards/doro67/regular/keymaps/default/config.h diff --git a/keyboards/doro67/regular/keymaps/default/keymap.c b/keyboards/doro67/regular/keymaps/default/keymap.c new file mode 100644 index 000000000..5271d42c1 --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/keymap.c @@ -0,0 +1,134 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( \ + KC_GRV, 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_BSPC, 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_BSLS, 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_ENT, KC_PGUP, KC_LSFT, \ + KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PGDN, KC_LCTL, KC_LGUI, \ + KC_LALT, KC_SPC, KC_LALT, KC_LGUI, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + [1] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [2] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [3] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [4] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [5] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [6] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [7] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [8] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [9] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [10] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [11] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [12] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [13] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [14] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ), + [15] = LAYOUT( \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/doro67/regular/keymaps/default/readme.md b/keyboards/doro67/regular/keymaps/default/readme.md new file mode 100644 index 000000000..7443a357f --- /dev/null +++ b/keyboards/doro67/regular/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for doro67 diff --git a/keyboards/doro67/regular/readme.md b/keyboards/doro67/regular/readme.md new file mode 100644 index 000000000..71d27ceb5 --- /dev/null +++ b/keyboards/doro67/regular/readme.md @@ -0,0 +1,15 @@ +# Regular PCB for the Doro67 + +Regular PCB for the Doro67 having ONLY one layout. This is not the PCB with RGB support. + +Do not flash RGB firmware for this board. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Doro67 Regular PCB +Hardware Availability: [Geekhack GB](https://geekhack.org/index.php?topic=97265.0) + +Make example for this keyboard (after setting up your build environment): + + make doro67/regular:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/doro67/regular/regular.c b/keyboards/doro67/regular/regular.c new file mode 100644 index 000000000..ad4cc279c --- /dev/null +++ b/keyboards/doro67/regular/regular.c @@ -0,0 +1,47 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "regular.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(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(E6); + } else { + writePinLow(E6); + } + led_set_user(usb_led); +} diff --git a/keyboards/doro67/regular/regular.h b/keyboards/doro67/regular/regular.h new file mode 100644 index 000000000..76d606b13 --- /dev/null +++ b/keyboards/doro67/regular/regular.h @@ -0,0 +1,41 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K43, K49, K4A, K4C, K4D, K4E \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, KC_NO, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, K41, K42, K43, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K49, K4A, KC_NO, K4C, K4D, K4E }, \ +} + diff --git a/keyboards/doro67/regular/rules.mk b/keyboards/doro67/regular/rules.mk new file mode 100644 index 000000000..831bd0e61 --- /dev/null +++ b/keyboards/doro67/regular/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/duck/eagle_viper/v2/config.h b/keyboards/duck/eagle_viper/v2/config.h index 9c49344ff..f454b2e0e 100644 --- a/keyboards/duck/eagle_viper/v2/config.h +++ b/keyboards/duck/eagle_viper/v2/config.h @@ -40,11 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* number of backlight levels */ #define BACKLIGHT_LEVELS 3 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/duck/jetfire/config.h b/keyboards/duck/jetfire/config.h index 54c5321c6..f49a29888 100644 --- a/keyboards/duck/jetfire/config.h +++ b/keyboards/duck/jetfire/config.h @@ -34,7 +34,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW - #define BACKLIGHT_LEVELS 1 #define RGB_DI_PIN D6 @@ -49,7 +48,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 - /* If defined, GRAVE_ESC will always act as ESC when CTRL is held. * This is userful for the Windows task manager shortcut (ctrl+shift+esc). */ @@ -88,11 +86,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -197,4 +190,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/duck/lightsaver/config.h b/keyboards/duck/lightsaver/config.h index 745af4330..9e3a08fbd 100644 --- a/keyboards/duck/lightsaver/config.h +++ b/keyboards/duck/lightsaver/config.h @@ -40,11 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/duck/octagon/v1/config.h b/keyboards/duck/octagon/v1/config.h index a2b3d6413..5400c53ef 100644 --- a/keyboards/duck/octagon/v1/config.h +++ b/keyboards/duck/octagon/v1/config.h @@ -40,11 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/duck/octagon/v2/config.h b/keyboards/duck/octagon/v2/config.h index 7adcb2760..78d18d3bb 100644 --- a/keyboards/duck/octagon/v2/config.h +++ b/keyboards/duck/octagon/v2/config.h @@ -40,11 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* number of backlight levels */ #define BACKLIGHT_LEVELS 1 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN D6 #define RGBLED_NUM 17 diff --git a/keyboards/dz60/config.h b/keyboards/dz60/config.h index e58eae085..46702adcd 100644 --- a/keyboards/dz60/config.h +++ b/keyboards/dz60/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 diff --git a/keyboards/dz60/keymaps/LEdiodes/config.h b/keyboards/dz60/keymaps/LEdiodes/config.h index 4f991b9ca..6cdc4a91e 100644 --- a/keyboards/dz60/keymaps/LEdiodes/config.h +++ b/keyboards/dz60/keymaps/LEdiodes/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 16 diff --git a/keyboards/kbd6x/keymaps/konstantin/config.h b/keyboards/dz60/keymaps/billypython/config.h index 4b511eb84..4b511eb84 100644 --- a/keyboards/kbd6x/keymaps/konstantin/config.h +++ b/keyboards/dz60/keymaps/billypython/config.h diff --git a/keyboards/dz60/keymaps/billypython/keymap.c b/keyboards/dz60/keymaps/billypython/keymap.c new file mode 100644 index 000000000..78fc55f6f --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/keymap.c @@ -0,0 +1,46 @@ +#include QMK_KEYBOARD_H +#include "billypython.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Base layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │Esc│ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ \ │ ` │ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │Bspc │ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │FnCaps│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ Enter │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + * │LShift │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │RSC│ ↑ │Del│ + * ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │LCtl│LGui│LAlt│ Space │RAl│FnL│ ← │ ↓ │ → │ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_BASE] = LAYOUT_directional( \ + 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_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, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSF_RCT, KC_UP, KC_DEL, \ + KC_LCTL, KC_LGUI, KC_LALT, XXXXXXX, KC_SPC, XXXXXXX, KC_RALT, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /* Function layer + * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ + * │ │F1 │F2 │F3 │F4 │F5 │F6 │F7 │F8 │F9 │F10│F11│F12│ │PSc│ + * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┤ + * │ M4 │M2 │M↑ │M1 │M3 │M5 │ │PgU│ ↑ │PgD│Ply│Prv│Nxt│Clear│ + * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤ + * │ │M← │M↓ │M→ │MW↑│ │Hom│ ← │ ↓ │ → │End│ │ │ + * ├──────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬───┬───┤ + * │ │MA0│MA2│MW←│MW→│ │ │ │Vo-│Vo+│Mut│App│PgU│Ins│ + * ├────┬──┴─┬─┴──┬┴───┴───┴───┴───┴───┴───┼───┼───┼───┼───┼───┤ + * │ │ │ │ MW↓ │ │ │Hom│PgD│End│ + * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┘ + */ + [L_FN] = LAYOUT_directional( \ + _______, 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_PSCR, \ + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, KC_INS, \ + _______, _______, _______, XXXXXXX, KC_WH_D, XXXXXXX, _______, _______, KC_HOME, KC_PGDN, KC_END \ + ), +}; diff --git a/keyboards/dz60/keymaps/billypython/rules.mk b/keyboards/dz60/keymaps/billypython/rules.mk new file mode 100644 index 000000000..332613604 --- /dev/null +++ b/keyboards/dz60/keymaps/billypython/rules.mk @@ -0,0 +1,8 @@ +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = no +COMMAND_ENABLE = yes +CONSOLE_ENABLE = yes +EXTRAKEY_ENABLE = yes +MOUSEKEY_ENABLE = yes +RGBLIGHT_ENABLE = no +TAP_DANCE_ENABLE = yes diff --git a/keyboards/dz60/keymaps/mechmerlin/keymap.c b/keyboards/dz60/keymaps/mechmerlin/keymap.c index 1a8593ef1..f7ad17fd8 100644 --- a/keyboards/dz60/keymaps/mechmerlin/keymap.c +++ b/keyboards/dz60/keymaps/mechmerlin/keymap.c @@ -12,7 +12,7 @@ enum keyboard_layers { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_60_b_ansi( - 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_BSPC, KC_BSPC, + KC_GESC, 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_BSPC, KC_BSPC, 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_BSLS, KC_CTCP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSSH, KC_UP, KC_DEL, diff --git a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.c b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c index 4331155df..4331155df 100644 --- a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.c +++ b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.c diff --git a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.h b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h index ec26557f3..988e6af34 100644 --- a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.h +++ b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.h @@ -25,7 +25,7 @@ * Board identifier. */ #define BOARD_GENERIC_STM32_F303XC -#define BOARD_NAME "Planck PCB" +#define BOARD_NAME "DZ60RGB PCB" /* * Board oscillators-related settings. diff --git a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.mk b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk index 43377629a..43377629a 100644 --- a/keyboards/preonic/rev3/boards/GENERIC_STM32_F303XC/board.mk +++ b/keyboards/dztech/boards/GENERIC_STM32_F303XC/board.mk diff --git a/keyboards/preonic/rev3/bootloader_defs.h b/keyboards/dztech/dz60rgb/bootloader_defs.h index 3b0e9d20a..3b0e9d20a 100644 --- a/keyboards/preonic/rev3/bootloader_defs.h +++ b/keyboards/dztech/dz60rgb/bootloader_defs.h diff --git a/keyboards/preonic/rev3/chconf.h b/keyboards/dztech/dz60rgb/chconf.h index b52ca7d2c..1d9f12ff1 100644 --- a/keyboards/preonic/rev3/chconf.h +++ b/keyboards/dztech/dz60rgb/chconf.h @@ -41,14 +41,14 @@ * @brief System time counter resolution. * @note Allowed values are 16 or 32 bits. */ -#define CH_CFG_ST_RESOLUTION 16 +#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 10000 +#define CH_CFG_ST_FREQUENCY 100000 /** * @brief Time delta constant for the tick-less mode. diff --git a/keyboards/dztech/dz60rgb/config.h b/keyboards/dztech/dz60rgb/config.h new file mode 100644 index 000000000..167b67a87 --- /dev/null +++ b/keyboards/dztech/dz60rgb/config.h @@ -0,0 +1,36 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1219 +#define DEVICE_VER 0x0001 +#define MANUFACTURER DOU +#define PRODUCT DZ60RGB +#define DESCRIPTION DZ60 ARM RGB keyboard +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +#define MATRIX_ROW_PINS { B1, B10, B11, B14, B12 } +#define MATRIX_COL_PINS {A6, A7, B0, B13, B15, A8, A15, B3, B4, B5, B8, B9, C13, C14 } + +/* #define UNUSED_PINS {A0,A1,A2, A3,A4,A9,A10,C15,A13,A14,B2}*/ + +#define DIODE_DIRECTION COL2ROW + +#define DEBOUNCE 3 + +#define RGB_DISABLE_AFTER_TIMEOUT 0 // number of ticks to wait until disabling effects +#define RGB_DISABLE_WHEN_USB_SUSPENDED false // turn off effects when suspended +#define RGB_MATRIX_SKIP_FRAMES 0 +#define RGB_MATRIX_KEYPRESSES +#define DISABLE_RGB_MATRIX_SPLASH +#define DISABLE_RGB_MATRIX_MULTISPLASH +#define DISABLE_RGB_MATRIX_SOLID_MULTISPLASH +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 63 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL diff --git a/keyboards/dztech/dz60rgb/dz60rgb.c b/keyboards/dztech/dz60rgb/dz60rgb.c new file mode 100644 index 000000000..4a4893b8e --- /dev/null +++ b/keyboards/dztech/dz60rgb/dz60rgb.c @@ -0,0 +1,172 @@ +#include "dz60rgb.h" +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, K_14, J_14, L_14}, + {0, K_13, J_13, L_13}, + {0, K_12, J_12, L_12}, + {0, K_11, J_11, L_11}, + {0, K_10, J_10, L_10}, + {0, K_9, J_9, L_9}, + {0, K_8, J_8, L_8}, + {0, K_7, J_7, L_7}, + {0, K_6, J_6, L_6}, + {0, K_5, J_5, L_5}, + {0, K_4, J_4, L_4}, + {0, K_3, J_3, L_3}, + {0, K_2, J_2, L_2}, + {0, K_1, J_1, L_1}, + + {0, H_14, G_14, I_14}, + {0, H_13, G_13, I_13}, + {0, H_12, G_12, I_12}, + {0, H_11, G_11, I_11}, + {0, H_10, G_10, I_10}, + {0, H_9, G_9, I_9}, + {0, H_8, G_8, I_8}, + {0, H_7, G_7, I_7}, + {0, H_6, G_6, I_6}, + {0, H_5, G_5, I_5}, + {0, H_4, G_4, I_4}, + {0, H_3, G_3, I_3}, + {0, H_2, G_2, I_2}, + {0, H_1, G_1, I_1}, + + {0, E_14, D_14, F_14}, + {0, E_12, D_12, F_12}, + {0, E_11, D_11, F_11}, + {0, E_10, D_10, F_10}, + {0, E_9, D_9, F_9}, + {0, E_8, D_8, F_8}, + {0, E_7, D_7, F_7}, + {0, E_6, D_6, F_6}, + {0, E_5, D_5, F_5}, + {0, E_4, D_4, F_4}, + {0, E_3, D_3, F_3}, + {0, E_2, D_2, F_2}, + {0, E_1, D_1, F_1}, + + {0, B_14, A_14, C_14}, + {0, B_13, A_13, C_13}, + {0, B_11, A_11, C_11}, + {0, B_10, A_10, C_10}, + {0, B_9, A_9, C_9}, + {0, B_8, A_8, C_8}, + {0, B_7, A_7, C_7}, + {0, B_6, A_6, C_6}, + {0, B_5, A_5, C_5}, + {0, B_4, A_4, C_4}, + {0, B_3, A_3, C_3}, + {0, B_2, A_2, C_2}, + {0, B_1, A_1, C_1}, + + {0, B_15, A_15, C_15}, + {0, E_13, D_13, F_13}, + {0, B_12, A_12, C_12}, + {0, E_15, D_15, F_15}, + {0, H_15, G_15, I_15}, + {0, B_16, A_16, C_16}, + {0, E_16, D_16, F_16}, + {0, H_16, G_16, I_16}, + {0, K_16, J_16, L_16}, +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { + {{0|(13<<4)}, {17.23*13, 0}, 1}, + {{0|(12<<4)}, {17.23*12, 0}, 1}, + {{0|(11<<4)}, {17.23*11, 0}, 1}, + {{0|(10<<4)}, {17.23*10, 0}, 1}, + {{0|(9<<4)}, {17.23*9, 0}, 1}, + {{0|(8<<4)}, {17.23*8, 0}, 1}, + {{0|(7<<4)}, {17.23*7, 0}, 1}, + {{0|(6<<4)}, { 17.23*6, 0}, 1}, + {{0|(5<<4)}, { 17.23*5, 0}, 1}, + {{0|(4<<4)}, { 17.23*4, 0}, 1}, + {{0|(3<<4)}, { 17.23*3, 0}, 1}, + {{0|(2<<4)}, { 17.23*2, 0}, 1}, + {{0|(1<<4)}, { 17.23*1, 0}, 1}, + {{0|(0<<4)}, { 17.23*0, 0}, 1}, + + {{1|(13<<4)}, {17.23*13, 16}, 1}, + {{1|(12<<4)}, {17.23*12, 16}, 0}, + {{1|(11<<4)}, {17.23*11, 16}, 0}, + {{1|(10<<4)}, {17.23*10, 16}, 0}, + {{1|(9<<4)}, {17.23*9, 16}, 0}, + {{1|(8<<4)}, {17.23*8, 16}, 0}, + {{1|(7<<4)}, {17.23*7, 16}, 0}, + {{1|(6<<4)}, { 17.23*6, 16}, 0}, + {{1|(5<<4)}, { 17.23*5, 16}, 0}, + {{1|(4<<4)}, { 17.23*4, 16}, 0}, + {{1|(3<<4)}, { 17.23*3, 16}, 0}, + {{1|(2<<4)}, { 17.23*2, 16}, 0}, + {{1|(1<<4)}, { 17.23*1, 16}, 0}, + {{1|(0<<4)}, { 17.23*0, 16}, 1}, + + {{2|(13<<4)}, {17.23*13, 32}, 1}, + {{2|(11<<4)}, {17.23*11, 32}, 0}, + {{2|(10<<4)}, {17.23*10, 32}, 0}, + {{2|(9<<4)}, {17.23*9, 32}, 0}, + {{2|(8<<4)}, {17.23*8, 32}, 0}, + {{2|(7<<4)}, {17.23*7, 32}, 0}, + {{2|(6<<4)}, { 17.23*6, 32}, 0}, + {{2|(5<<4)}, { 17.23*5, 32}, 0}, + {{2|(4<<4)}, { 17.23*4, 32}, 0}, + {{2|(3<<4)}, { 17.23*3, 32}, 0}, + {{2|(2<<4)}, { 17.23*2, 32}, 0}, + {{2|(1<<4)}, { 17.23*1, 32}, 0}, + {{2|(0<<4)}, { 17.23*0, 32}, 1}, + + {{3|(13<<4)}, {17.23*13, 48}, 1}, + {{3|(11<<4)}, {17.23*11, 48}, 0}, + {{3|(10<<4)}, {17.23*10, 48}, 0}, + {{3|(9<<4)}, {17.23*9, 48}, 0}, + {{3|(8<<4)}, {17.23*8, 48}, 0}, + {{3|(7<<4)}, {17.23*7, 48}, 0}, + {{3|(6<<4)}, { 17.23*6, 48}, 0}, + {{3|(5<<4)}, { 17.23*5, 48}, 0}, + {{3|(4<<4)}, { 17.23*4, 48}, 0}, + {{3|(3<<4)}, { 17.23*3, 48}, 0}, + {{3|(2<<4)}, { 17.23*2, 48}, 0}, + {{3|(1<<4)}, { 17.23*1, 48}, 0}, + {{3|(0<<4)}, { 17.23*0, 48}, 1}, + + {{4|(13<<4)}, {17.23*13, 64}, 1}, + {{4|(11<<4)}, {17.23*11, 64}, 1}, + {{4|(10<<4)}, {17.23*10, 64}, 1}, + {{4|(9<<4)}, {17.23*9, 64}, 1}, + {{4|(8<<4)}, {17.23*8, 64}, 1}, + {{4|(5<<4)}, { 17.23*5, 64}, 0}, + {{4|(2<<4)}, { 17.23*2, 64}, 1}, + {{4|(1<<4)}, { 17.23*1, 64}, 1}, + {{4|(0<<4)}, { 17.23*0, 64}, 1}, + +}; + +void matrix_init_kb(void) { + matrix_init_user(); +} + + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + + +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); +} diff --git a/keyboards/dztech/dz60rgb/dz60rgb.h b/keyboards/dztech/dz60rgb/dz60rgb.h new file mode 100644 index 000000000..a029933f1 --- /dev/null +++ b/keyboards/dztech/dz60rgb/dz60rgb.h @@ -0,0 +1,16 @@ +#pragma once +#define XXX KC_NO +#include "quantum.h" +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K45, K48, K49, K4A, K4B, K4D \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, K45, XXX, XXX, K48, K49, K4A, K4B, XXX, K4D } \ +} diff --git a/keyboards/preonic/rev3/halconf.h b/keyboards/dztech/dz60rgb/halconf.h index 5e5d70219..eda293c49 100644 --- a/keyboards/preonic/rev3/halconf.h +++ b/keyboards/dztech/dz60rgb/halconf.h @@ -76,7 +76,7 @@ * @brief Enables the I2C subsystem. */ #if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE +#define HAL_USE_I2C TRUE #endif /** @@ -111,7 +111,7 @@ * @brief Enables the PWM subsystem. */ #if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM TRUE +#define HAL_USE_PWM FALSE #endif /** @@ -146,7 +146,7 @@ * @brief Enables the SERIAL over USB subsystem. */ #if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB TRUE +#define HAL_USE_SERIAL_USB FALSE #endif /** diff --git a/keyboards/dztech/dz60rgb/info.json b/keyboards/dztech/dz60rgb/info.json new file mode 100644 index 000000000..4615706c6 --- /dev/null +++ b/keyboards/dztech/dz60rgb/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "dz60rgb", + "url": "", + "maintainer": "dztch", + "width": 14, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"Shift", "x":11.25, "y":3, "w":1.75}, {"label":"\u2191", "x":13, "y":3},{"label":"?", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4}, {"label":"Ctrl", "x":11, "y":4}, {"label":"\u2190", "x":12, "y":4}, {"label":"\u2193", "x":13, "y":4}, {"label":"\u2192", "x":14, "y":4}] + } + } +} diff --git a/keyboards/dztech/dz60rgb/keymaps/default/keymap.c b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c new file mode 100644 index 000000000..8de71848d --- /dev/null +++ b/keyboards/dztech/dz60rgb/keymaps/default/keymap.c @@ -0,0 +1,165 @@ +#include QMK_KEYBOARD_H +extern bool g_suspend_state; +#define _LAYER0 0 +#define _LAYER1 1 +#define _LAYER2 2 +#define _LAYER3 3 +#define _LAYER4 4 +#define _LAYER5 5 +#define _LAYER6 6 +#define _LAYER7 7 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_LAYER0] = LAYOUT( /* Base */ + KC_GESC, 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_BSPC,\ + 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_BSLASH,\ + CTL_T(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_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ + KC_LCTL, KC_LGUI, LM(1, MOD_LALT), KC_SPC, KC_RALT, MO(1) , KC_LEFT, KC_DOWN, KC_RIGHT), + [_LAYER1] = LAYOUT( /* FN */ + TO(3), 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_DEL ,\ + KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_VOLU, KC_MUTE,\ + KC_TRNS, KC_TRNS, KC_TRNS, TO(4), KC_TRNS, KC_TRNS, KC_MPRV, KC_VOLD, KC_MNXT), + [_LAYER2] = LAYOUT( /* LIGHT */ + 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_DEL ,\ + KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER3] = LAYOUT( /* NUMPAD */ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSLS, KC_PAST, KC_PMNS, KC_PPLS, KC_TRNS,\ + KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, TO(0),\ + KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P4, KC_P5, KC_P6, KC_TRNS, KC_PENT,\ + KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P1, KC_P2, KC_P3, KC_TRNS, KC_TRNS,\ + KC_TRNS, KC_P0, KC_PDOT, KC_PENT, KC_P0, KC_PDOT, KC_TRNS, KC_TRNS, KC_TRNS), + [_LAYER4] = LAYOUT( /* MAC */ + KC_GESC, 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_BSPC,\ + 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_BSLASH,\ + CTL_T(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_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH), KC_UP, LT(2, KC_DEL),\ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(5) , KC_LEFT, KC_DOWN, KC_RIGHT), + }; + + + +void rgb_matrix_layer_helper (uint8_t red, uint8_t green, uint8_t blue, bool default_layer) { + rgb_led led; + for (int i = 0; i < DRIVER_LED_TOTAL; i++) { + led = g_rgb_leds[i]; + if (led.matrix_co.raw < 0xFF) { + if (led.modifier) { + rgb_matrix_set_color( i, red, green, blue ); + } + } + } +} + +void rgb_matrix_indicators_user(void) { + uint8_t this_led = host_keyboard_leds(); + if (!g_suspend_state) { + switch (biton32(layer_state)) { + case _LAYER1: + rgb_matrix_layer_helper(0xFF, 0x00, 0x00, false); break; + case _LAYER2: + rgb_matrix_layer_helper(0x00, 0xFF, 0x00, false); break; + case _LAYER4: + rgb_matrix_layer_helper(0xFF, 0xFF, 0x00, false); break; + } + } + if ( this_led & (1<<USB_LED_CAPS_LOCK)) { + rgb_matrix_set_color(40, 0xFF, 0xFF, 0xFF); + } + + switch (biton32(layer_state)) { + case _LAYER3: + if ( this_led & (1<<USB_LED_NUM_LOCK)) + { + rgb_matrix_set_color(13, 0xFF, 0x00, 0x00); + } + else + { + rgb_matrix_set_color(13, 0x00, 0x00, 0x00); + } + rgb_matrix_set_color(0, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(1, 0x00, 0x00, 0x00); + rgb_matrix_set_color(1, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(2, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(3, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(4, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(5, 0x00, 0x00, 0x00); + rgb_matrix_set_color(6, 0x00, 0x00, 0x00); + rgb_matrix_set_color(7, 0x00, 0x00, 0x00); + rgb_matrix_set_color(8, 0x00, 0x00, 0x00); + rgb_matrix_set_color(9, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(10, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(11, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(12, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(14, 0x00, 0x00, 0xFF); + rgb_matrix_set_color(15, 0x00, 0x00, 0x00); + rgb_matrix_set_color(16, 0x00, 0x00, 0x00); + rgb_matrix_set_color(17, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(18, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(19, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(20, 0x00, 0x00, 0x00); + rgb_matrix_set_color(21, 0x00, 0x00, 0x00); + rgb_matrix_set_color(22, 0x00, 0x00, 0x00); + rgb_matrix_set_color(23, 0x00, 0x00, 0x00); + rgb_matrix_set_color(24, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(25, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(26, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(27, 0x00, 0x00, 0x00); + rgb_matrix_set_color(28, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(29, 0x00, 0x00, 0x00); + rgb_matrix_set_color(30, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(31, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(32, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(33, 0x00, 0x00, 0x00); + rgb_matrix_set_color(34, 0x00, 0x00, 0x00); + rgb_matrix_set_color(35, 0x00, 0x00, 0x00); + rgb_matrix_set_color(36, 0x00, 0x00, 0x00); + rgb_matrix_set_color(37, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(38, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(39, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(40, 0x00, 0x00, 0x00); + rgb_matrix_set_color(41, 0x00, 0x00, 0x00); + rgb_matrix_set_color(42, 0x00, 0x00, 0x00); + rgb_matrix_set_color(43, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(44, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(45, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(46, 0x00, 0x00, 0x00); + rgb_matrix_set_color(47, 0x00, 0x00, 0x00); + rgb_matrix_set_color(48, 0x00, 0x00, 0x00); + rgb_matrix_set_color(49, 0x00, 0x00, 0x00); + rgb_matrix_set_color(50, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(51, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(52, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(53, 0x00, 0x00, 0x00); + rgb_matrix_set_color(54, 0x00, 0x00, 0x00); + rgb_matrix_set_color(55, 0x00, 0x00, 0x00); + rgb_matrix_set_color(56, 0x00, 0x00, 0x00); + rgb_matrix_set_color(57, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(58, 0x00, 0xFF, 0x00); + rgb_matrix_set_color(59, 0xFF, 0x00, 0x00); + rgb_matrix_set_color(60, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(61, 0xFF, 0xFF, 0x00); + rgb_matrix_set_color(62, 0x00, 0x00, 0x00); + break; + } +} + + + + + +void matrix_init_user(void) { + //user initialization +} + +void matrix_scan_user(void) { + //user matrix +} + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } diff --git a/keyboards/preonic/rev3/mcuconf.h b/keyboards/dztech/dz60rgb/mcuconf.h index 2d27bee4e..226da48d5 100644 --- a/keyboards/preonic/rev3/mcuconf.h +++ b/keyboards/dztech/dz60rgb/mcuconf.h @@ -154,7 +154,7 @@ /* * I2C driver system settings. */ -#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C1 TRUE #define STM32_I2C_USE_I2C2 FALSE #define STM32_I2C_BUSY_TIMEOUT 50 #define STM32_I2C_I2C1_IRQ_PRIORITY 10 @@ -183,8 +183,8 @@ */ #define STM32_PWM_USE_ADVANCED FALSE #define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 TRUE -#define STM32_PWM_USE_TIM3 TRUE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE #define STM32_PWM_USE_TIM4 FALSE #define STM32_PWM_USE_TIM8 FALSE #define STM32_PWM_TIM1_IRQ_PRIORITY 7 @@ -197,7 +197,7 @@ * SERIAL driver system settings. */ #define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 TRUE +#define STM32_SERIAL_USE_USART2 FALSE #define STM32_SERIAL_USE_USART3 FALSE #define STM32_SERIAL_USE_UART4 FALSE #define STM32_SERIAL_USE_UART5 FALSE @@ -225,7 +225,7 @@ * ST driver system settings. */ #define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 4 +#define STM32_ST_USE_TIMER 2 /* * UART driver system settings. diff --git a/keyboards/dztech/dz60rgb/readme.md b/keyboards/dztech/dz60rgb/readme.md new file mode 100644 index 000000000..a8dbb5af6 --- /dev/null +++ b/keyboards/dztech/dz60rgb/readme.md @@ -0,0 +1,15 @@ +# DZ60RGB + +![dz60rgb](https://cdn.shopify.com/s/files/1/0043/9140/3591/products/TIM_20190130170231_grande.jpg?v=1548839053) + +A customizable 60% RGB keyboard. + +Keyboard Maintainer: DZtech +Hardware Supported: DZtech +Hardware Availability: [kbdfans](https://kbdfans.myshopify.com/) + +Make example for this keyboard (after setting up your build environment): + + make dztech/dz60rgb:default + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/dztech/dz60rgb/rules.mk b/keyboards/dztech/dz60rgb/rules.mk new file mode 100644 index 000000000..cf89c4949 --- /dev/null +++ b/keyboards/dztech/dz60rgb/rules.mk @@ -0,0 +1,57 @@ +# project specific files + +## chip/board settings +# the next two should match the directories in +# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F3xx + +# Linker script to use +# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ +# or <this_dir>/ld/ +MCU_LDSCRIPT = STM32F303xC + +# Startup code to use +# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f3xx + +# Board: it should exist either in <chibios>/os/hal/boards/ +# or <this_dir>/boards +BOARD = GENERIC_STM32_F303XC + +# Cortex version +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 + +USE_FPU = yes + +# 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=0x08005000 +OPT_DEFS = + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Options to pass to dfu-util when flashing +DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave + +# Build Options +# comment out to disable the options. +# +BACKLIGHT_ENABLE = no +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration +MOUSEKEY_ENABLE = yes # Mouse keys +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover +AUDIO_ENABLE = no +RGB_MATRIX_ENABLE = IS31FL3733 # Use RGB matrix +NO_USB_STARTUP_CHECK = no # Disable initialization only when usb is plugged in diff --git a/keyboards/eco/config.h b/keyboards/eco/config.h index f6b78631e..f5820eafc 100644 --- a/keyboards/eco/config.h +++ b/keyboards/eco/config.h @@ -45,11 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/eco/keymaps/fsck/config.h b/keyboards/eco/keymaps/fsck/config.h new file mode 100644 index 000000000..b0a7901b2 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 Frederick Hirsch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/eco/keymaps/fsck/keymap.c b/keyboards/eco/keymaps/fsck/keymap.c new file mode 100644 index 000000000..8d7cb89c1 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/keymap.c @@ -0,0 +1,76 @@ +/* Copyright 2019 Frederick Hirsch + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _RAISE 3 + +enum eco_keycodes { + QWERTY = SAFE_RANGE, + RAISE +}; + +#define JC_Z CTL_T(KC_Z) +#define JC_X ALT_T(KC_X) +#define JC_C GUI_T(KC_C) +#define JC_COMM GUI_T(KC_COMM) +#define JC_DOT ALT_T(KC_DOT) +#define JC_SLSH CTL_T(KC_SLSH) + +#define JC_CAPS LT(_RAISE,KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Tab | 1 | 2 | 3 | 4 | 5 | - | = | 6 | 7 | 8 | 9 | 10 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ESC | Q | W | E | R | T | Home | PgUp | Y | U | I | O | P | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Raise| A | S | D | F | G | End | PgDn | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | Space | N | M | , | . | / | Shift| + * | | Ctrl | Alt | GUI | | | | GUI | Alt | Ctrl | | + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_HOME, KC_PGUP, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_QUOT, + JC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_END, KC_PGDN, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, JC_Z, JC_X, JC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, JC_COMM, JC_DOT, JC_SLSH, KC_RSFT +), + + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | ` | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | | Up | | | | |PrntSc| | | | [ | ] | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Left | Down | Right| | |ScrLck|Pause | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | |Insert| + * `-------------------------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, _______, KC_UP, _______, _______, _______, _______, KC_PSCR, _______, _______, _______, KC_LBRC, KC_RBRC, KC_BSLS, + _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS +) +};
\ No newline at end of file diff --git a/keyboards/eco/keymaps/fsck/readme.md b/keyboards/eco/keymaps/fsck/readme.md new file mode 100644 index 000000000..1f3678daf --- /dev/null +++ b/keyboards/eco/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![eco:fsck Layout Image](https://i.imgur.com/Sb8n8B0.png) + +# ECO Layout by fsck + +This is the fsck layout for the eco keyboard. The bottom row of the default layer are dual function tap/hold keys.
\ No newline at end of file diff --git a/keyboards/eco/keymaps/fsck/rules.mk b/keyboards/eco/keymaps/fsck/rules.mk new file mode 100644 index 000000000..8fb2adf38 --- /dev/null +++ b/keyboards/eco/keymaps/fsck/rules.mk @@ -0,0 +1,19 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # 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 = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# 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/ep/40/config.h b/keyboards/ep/40/config.h index 90630cd68..0a2495953 100644 --- a/keyboards/ep/40/config.h +++ b/keyboards/ep/40/config.h @@ -91,10 +91,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/ep/96/config.h b/keyboards/ep/96/config.h index 0c37e4c59..943855309 100644 --- a/keyboards/ep/96/config.h +++ b/keyboards/ep/96/config.h @@ -56,7 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -209,4 +203,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/ergo42/rev1/config.h b/keyboards/ergo42/rev1/config.h index a7edb4097..f9d909cc7 100644 --- a/keyboards/ergo42/rev1/config.h +++ b/keyboards/ergo42/rev1/config.h @@ -59,11 +59,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 @@ -87,5 +82,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/ergodash/mini/config.h b/keyboards/ergodash/mini/config.h index 11cff145e..fc63cc1e9 100644 --- a/keyboards/ergodash/mini/config.h +++ b/keyboards/ergodash/mini/config.h @@ -66,11 +66,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/ergodash/readme.md b/keyboards/ergodash/readme.md index 7fa76344f..40d9fddfa 100644 --- a/keyboards/ergodash/readme.md +++ b/keyboards/ergodash/readme.md @@ -13,6 +13,19 @@ Make example for this keyboard (after setting up your build environment): See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +Install Example: (for pro micro) + `make ergodash/rev2:default:avrdude` + +Note: + "rev2" is for PCB ver 1.1,1.2 + "rev1" is from earlier pcb + # Layout ![layout](https://github.com/omkbd/picture/blob/master/ergodash-layout.png) + +Layout Note: +- In thumb cluster, it is not possible to use all 5 positions as small keys. (as pictured) +- The top 2 1u keys in the thumb cluster share the same connection. +- 2u key (center) position shares with the lower 1u key position + ![PCB](https://github.com/omkbd/picture/blob/master/Ergodash_PCB.jpg) diff --git a/keyboards/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h index d3f3314ee..160e70362 100644 --- a/keyboards/ergodash/rev1/config.h +++ b/keyboards/ergodash/rev1/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 @@ -84,5 +79,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/ergodash/rev2/config.h b/keyboards/ergodash/rev2/config.h index 5f9c68991..09657250b 100644 --- a/keyboards/ergodash/rev2/config.h +++ b/keyboards/ergodash/rev2/config.h @@ -63,11 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 @@ -91,5 +86,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/ergodone/config.h b/keyboards/ergodone/config.h index 2c764d782..815af357d 100644 --- a/keyboards/ergodone/config.h +++ b/keyboards/ergodone/config.h @@ -37,8 +37,8 @@ /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) /* number of backlight levels */ diff --git a/keyboards/ergodone/keymaps/default/keymap.c b/keyboards/ergodone/keymaps/default/keymap.c index cbc180d6a..92c140f26 100644 --- a/keyboards/ergodone/keymaps/default/keymap.c +++ b/keyboards/ergodone/keymaps/default/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -143,10 +143,6 @@ 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) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/config.h b/keyboards/ergodox_ez/config.h index ee768853a..096368f7a 100644 --- a/keyboards/ergodox_ez/config.h +++ b/keyboards/ergodox_ez/config.h @@ -55,8 +55,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) /* number of backlight levels */ diff --git a/keyboards/ergodox_ez/i2cmaster.h b/keyboards/ergodox_ez/i2cmaster.h deleted file mode 100644 index 3917b9e6c..000000000 --- a/keyboards/ergodox_ez/i2cmaster.h +++ /dev/null @@ -1,178 +0,0 @@ -#ifndef _I2CMASTER_H -#define _I2CMASTER_H 1 -/************************************************************************* -* Title: C include file for the I2C master interface -* (i2cmaster.S or twimaster.c) -* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury -* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device -* Usage: see Doxygen manual -**************************************************************************/ - -#ifdef DOXYGEN -/** - @defgroup pfleury_ic2master I2C Master library - @code #include <i2cmaster.h> @endcode - - @brief I2C (TWI) Master Software Library - - Basic routines for communicating with I2C slave devices. This single master - implementation is limited to one bus master on the I2C bus. - - This I2c library is implemented as a compact assembler software implementation of the I2C protocol - which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). - Since the API for these two implementations is exactly the same, an application can be linked either against the - software I2C implementation or the hardware I2C implementation. - - Use 4.7k pull-up resistor on the SDA and SCL pin. - - Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module - i2cmaster.S to your target when using the software I2C implementation ! - - Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. - - @note - The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted - to GNU assembler and AVR-GCC C call interface. - Replaced the incorrect quarter period delays found in AVR300 with - half period delays. - - @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury - - @par API Usage Example - The following code shows typical usage of this library, see example test_i2cmaster.c - - @code - - #include <i2cmaster.h> - - - #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet - - int main(void) - { - unsigned char ret; - - i2c_init(); // initialize I2C library - - // write 0x75 to EEPROM address 5 (Byte Write) - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - i2c_write(0x05); // write address = 5 - i2c_write(0x75); // write value 0x75 to EEPROM - i2c_stop(); // set stop conditon = release bus - - - // read previously written value back from EEPROM address 5 - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - - i2c_write(0x05); // write address = 5 - i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode - - ret = i2c_readNak(); // read one byte from EEPROM - i2c_stop(); - - for(;;); - } - @endcode - -*/ -#endif /* DOXYGEN */ - -/**@{*/ - -#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 -#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" -#endif - -#include <avr/io.h> - -/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_READ 1 - -/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_WRITE 0 - - -/** - @brief initialize the I2C master interace. Need to be called only once - @param void - @return none - */ -extern void i2c_init(void); - - -/** - @brief Terminates the data transfer and releases the I2C bus - @param void - @return none - */ -extern void i2c_stop(void); - - -/** - @brief Issues a start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_start(unsigned char addr); - - -/** - @brief Issues a repeated start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_rep_start(unsigned char addr); - - -/** - @brief Issues a start condition and sends address and transfer direction - - If device is busy, use ack polling to wait until device ready - @param addr address and transfer direction of I2C device - @return none - */ -extern void i2c_start_wait(unsigned char addr); - - -/** - @brief Send one byte to I2C device - @param data byte to be transfered - @retval 0 write successful - @retval 1 write failed - */ -extern unsigned char i2c_write(unsigned char data); - - -/** - @brief read one byte from the I2C device, request more data from device - @return byte read from I2C device - */ -extern unsigned char i2c_readAck(void); - -/** - @brief read one byte from the I2C device, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_readNak(void); - -/** - @brief read one byte from the I2C device - - Implemented as a macro, which calls either i2c_readAck or i2c_readNak - - @param ack 1 send ack, request more data from device<br> - 0 send nak, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_read(unsigned char ack); -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - - -/**@}*/ -#endif diff --git a/keyboards/ergodox_ez/keymaps/default/keymap.c b/keyboards/ergodox_ez/keymaps/default/keymap.c index 5834fa43a..40d0a1eaf 100644 --- a/keyboards/ergodox_ez/keymaps/default/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ 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) -}; - bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { switch (keycode) { diff --git a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c index 038940772..864c62a47 100644 --- a/keyboards/ergodox_ez/keymaps/default_osx/keymap.c +++ b/keyboards/ergodox_ez/keymaps/default_osx/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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),KC_LGUI, 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, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -138,10 +138,6 @@ 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) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_ez/twimaster.c b/keyboards/ergodox_ez/twimaster.c deleted file mode 100644 index f91c08e6e..000000000 --- a/keyboards/ergodox_ez/twimaster.c +++ /dev/null @@ -1,208 +0,0 @@ -/************************************************************************* -* Title: I2C master library using hardware TWI interface -* Author: Peter Fleury <pfleury@gmx.ch> http://jump.to/fleury -* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device with hardware TWI -* Usage: API compatible with I2C Software Library i2cmaster.h -**************************************************************************/ -#include <inttypes.h> -#include <compat/twi.h> - -#include <i2cmaster.h> - - -/* define CPU frequency in Mhz here if not defined in Makefile */ -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -/* I2C clock in Hz */ -#define SCL_CLOCK 400000L - - -/************************************************************************* - Initialization of the I2C bus interface. Need to be called only once -*************************************************************************/ -void i2c_init(void) -{ - /* initialize TWI clock - * minimal values in Bit Rate Register (TWBR) and minimal Prescaler - * bits in the TWI Status Register should give us maximal possible - * I2C bus speed - about 444 kHz - * - * for more details, see 20.5.2 in ATmega16/32 secification - */ - - TWSR = 0; /* no prescaler */ - TWBR = 10; /* must be >= 10 for stable operation */ - -}/* i2c_init */ - - -/************************************************************************* - Issues a start condition and sends address and transfer direction. - return 0 = device accessible, 1= failed to access device -*************************************************************************/ -unsigned char i2c_start(unsigned char address) -{ - uint8_t twst; - - // send START condition - TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); - - // wait until transmission completed - while(!(TWCR & (1<<TWINT))); - - // check value of TWI Status Register. Mask prescaler bits. - twst = TW_STATUS & 0xF8; - if ( (twst != TW_START) && (twst != TW_REP_START)) return 1; - - // send device address - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - // wail until transmission completed and ACK/NACK has been received - while(!(TWCR & (1<<TWINT))); - - // check value of TWI Status Register. Mask prescaler bits. - twst = TW_STATUS & 0xF8; - if ( (twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK) ) return 1; - - return 0; - -}/* i2c_start */ - - -/************************************************************************* - Issues a start condition and sends address and transfer direction. - If device is busy, use ack polling to wait until device is ready - - Input: address and transfer direction of I2C device -*************************************************************************/ -void i2c_start_wait(unsigned char address) -{ - uint8_t twst; - - - while ( 1 ) - { - // send START condition - TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); - - // wait until transmission completed - while(!(TWCR & (1<<TWINT))); - - // check value of TWI Status Register. Mask prescaler bits. - twst = TW_STATUS & 0xF8; - if ( (twst != TW_START) && (twst != TW_REP_START)) continue; - - // send device address - TWDR = address; - TWCR = (1<<TWINT) | (1<<TWEN); - - // wail until transmission completed - while(!(TWCR & (1<<TWINT))); - - // check value of TWI Status Register. Mask prescaler bits. - twst = TW_STATUS & 0xF8; - if ( (twst == TW_MT_SLA_NACK )||(twst ==TW_MR_DATA_NACK) ) - { - /* device busy, send stop condition to terminate write operation */ - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - // wait until stop condition is executed and bus released - while(TWCR & (1<<TWSTO)); - - continue; - } - //if( twst != TW_MT_SLA_ACK) return 1; - break; - } - -}/* i2c_start_wait */ - - -/************************************************************************* - Issues a repeated start condition and sends address and transfer direction - - Input: address and transfer direction of I2C device - - Return: 0 device accessible - 1 failed to access device -*************************************************************************/ -unsigned char i2c_rep_start(unsigned char address) -{ - return i2c_start( address ); - -}/* i2c_rep_start */ - - -/************************************************************************* - Terminates the data transfer and releases the I2C bus -*************************************************************************/ -void i2c_stop(void) -{ - /* send stop condition */ - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); - - // wait until stop condition is executed and bus released - while(TWCR & (1<<TWSTO)); - -}/* i2c_stop */ - - -/************************************************************************* - Send one byte to I2C device - - Input: byte to be transfered - Return: 0 write successful - 1 write failed -*************************************************************************/ -unsigned char i2c_write( unsigned char data ) -{ - uint8_t twst; - - // send data to the previously addressed device - TWDR = data; - TWCR = (1<<TWINT) | (1<<TWEN); - - // wait until transmission completed - while(!(TWCR & (1<<TWINT))); - - // check value of TWI Status Register. Mask prescaler bits - twst = TW_STATUS & 0xF8; - if( twst != TW_MT_DATA_ACK) return 1; - return 0; - -}/* i2c_write */ - - -/************************************************************************* - Read one byte from the I2C device, request more data from device - - Return: byte read from I2C device -*************************************************************************/ -unsigned char i2c_readAck(void) -{ - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWEA); - while(!(TWCR & (1<<TWINT))); - - return TWDR; - -}/* i2c_readAck */ - - -/************************************************************************* - Read one byte from the I2C device, read is followed by a stop condition - - Return: byte read from I2C device -*************************************************************************/ -unsigned char i2c_readNak(void) -{ - TWCR = (1<<TWINT) | (1<<TWEN); - while(!(TWCR & (1<<TWINT))); - - return TWDR; - -}/* i2c_readNak */ diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h index 0e64897cb..a64f3f4a1 100644 --- a/keyboards/ergodox_infinity/config.h +++ b/keyboards/ergodox_infinity/config.h @@ -47,8 +47,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) /* key matrix size */ diff --git a/keyboards/ergodox_infinity/keymaps/default/keymap.c b/keyboards/ergodox_infinity/keymaps/default/keymap.c index cbc180d6a..92c140f26 100644 --- a/keyboards/ergodox_infinity/keymaps/default/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/default/keymap.c @@ -53,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, TT(SYMB), KC_LALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN,KC_TAB, KC_ENT @@ -143,10 +143,6 @@ 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) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h b/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h index 187ce8703..2e83f799c 100644 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/config.h @@ -49,8 +49,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) /* key matrix size */ diff --git a/keyboards/ergoinu/config.h b/keyboards/ergoinu/config.h index de72635b1..a59e5da74 100644 --- a/keyboards/ergoinu/config.h +++ b/keyboards/ergoinu/config.h @@ -64,11 +64,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 B6 diff --git a/keyboards/ergotravel/keymaps/default/config.h b/keyboards/ergotravel/keymaps/default/config.h index eeca26ce1..7461cf321 100644 --- a/keyboards/ergotravel/keymaps/default/config.h +++ b/keyboards/ergotravel/keymaps/default/config.h @@ -30,7 +30,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 +#define RGBLED_NUM 14 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/ergotravel/keymaps/default/keymap.c b/keyboards/ergotravel/keymaps/default/keymap.c index d6f8d1171..fd0d75ade 100644 --- a/keyboards/ergotravel/keymaps/default/keymap.c +++ b/keyboards/ergotravel/keymaps/default/keymap.c @@ -16,56 +16,45 @@ enum custom_keycodes { // #define KC_ KC_TRNS #define _______ KC_TRNS - +#define CALTDEL LCTL(LALT(KC_DEL)) +#define TSKMGR LCTL(LSFT(KC_ESC)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, KC_EQL, 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_A, KC_A, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LBRC, KC_RBRC, 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_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' ), [_LOWER] = LAYOUT( - //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_A, KC_B, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TAB, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_D, KC_Y, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_HOME, KC_PGUP, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_END , KC_PGDN, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_BSLS, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_BSPC, KC_BSPC, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, \ + _______, _______, _______, _______, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), [_RAISE] = LAYOUT( - //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_A, KC_B, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_C, KC_D, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' + + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + _______, KC_4, KC_5, KC_6, KC_PLUS, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + KC_ENT, KC_7, KC_8, KC_9, KC_MINS, _______, _______, _______, _______, KC_NUHS, KC_NUBS, KC_MUTE, _______, KC_BSLS, \ + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), [_ADJUST] = LAYOUT( - //,--------+--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------+--------. - KC_ESC, 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_BSPC, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_C, KC_D, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_A, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, - //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------| - KC_LCTL, KC_LGUI, KC_LALT, ADJUST, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT - //`--------+--------+--------+--------+--------+--------+--------/ \--------+--------+--------+--------+--------+--------+--------' + TSKMGR, _______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAI, RGB_SAI, RGB_HUI, CALTDEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_RMOD, RGB_VAD, RGB_SAD, RGB_HUD, RGB_TOG, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_STEP, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET ) }; diff --git a/keyboards/ergotravel/rev1/config.h b/keyboards/ergotravel/rev1/config.h index e6d557361..1d8a60afd 100644 --- a/keyboards/ergotravel/rev1/config.h +++ b/keyboards/ergotravel/rev1/config.h @@ -51,11 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 diff --git a/keyboards/espectro/config.h b/keyboards/espectro/config.h index 294091d58..438530c41 100755 --- a/keyboards/espectro/config.h +++ b/keyboards/espectro/config.h @@ -42,7 +42,6 @@ #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 - /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 @@ -52,11 +51,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLED_NUM 18 @@ -67,4 +61,3 @@ #define RGBLIGHT_ANIMATIONS #endif - diff --git a/keyboards/evil80/config.h b/keyboards/evil80/config.h index 81138a770..6bb286146 100644 --- a/keyboards/evil80/config.h +++ b/keyboards/evil80/config.h @@ -40,11 +40,6 @@ /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/exclusive/e6_rgb/config.h b/keyboards/exclusive/e6_rgb/config.h new file mode 100644 index 000000000..cb213c25e --- /dev/null +++ b/keyboards/exclusive/e6_rgb/config.h @@ -0,0 +1,65 @@ +/** + * config.h + * + */ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xDEAD +#define PRODUCT_ID 0xFEED +#define DEVICE_VER 0x0062 +#define MANUFACTURER astro +#define PRODUCT e6rgb +#define DESCRIPTION 60% rgb keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 +/* key matrix pins */ +#define MATRIX_ROW_PINS { F1, F4, F5, F6, D6 } +#define MATRIX_COL_PINS { D7, B4, B5, B6, C6, C7, F7, F0, B0, B1, D2, D3, B3, B2 } +#define UNUSED_PINS +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +//rgb light setting +#define RGBLED_NUM 6 +#define RGB_DI_PIN B7 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#define DRIVER_ADDR_1 0b1010000 +#define DRIVER_ADDR_2 0b1010000 // this is here for compliancy reasons. + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 63 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + +// tapping setting +#define TAPPING_TERM 200 +#define RETRO_TAPPING +#define PERMISSIVE_HOLD diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.c b/keyboards/exclusive/e6_rgb/e6_rgb.c new file mode 100644 index 000000000..d50af86b5 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/e6_rgb.c @@ -0,0 +1,204 @@ +/** + * e6_rgb.c + */ + +#include "e6_rgb.h" + +#ifdef RGB_MATRIX_ENABLE +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { + setPinOutput(D5); + writePinHigh(D5); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ +//cs1 + {0, K_1, J_1, L_1}, + {0, H_1, G_1, I_1}, + {0, E_1, D_1, F_1}, + {0, B_1, A_1, C_1}, + +//cs2 + {0, K_2, J_2, L_2}, + {0, H_2, G_2, I_2}, + {0, E_2, D_2, F_2}, + {0, B_2, A_2, C_2}, +//cs3 + {0, K_3, J_3, L_3}, + {0, H_3, G_3, I_3}, + {0, E_3, D_3, F_3}, + {0, B_3, A_3, C_3}, +//cs4 + {0, K_4, J_4, L_4}, + {0, H_4, G_4, I_4}, + {0, E_4, D_4, F_4}, + {0, B_4, A_4, C_4}, +//cs5 + {0, K_5, J_5, L_5}, + {0, H_5, G_5, I_5}, + {0, E_5, D_5, F_5}, + {0, B_5, A_5, C_5}, +//cs6 + {0, K_6, J_6, L_6}, + {0, H_6, G_6, I_6}, + {0, E_6, D_6, F_6}, + {0, B_6, A_6, C_6}, +//cs7 + {0, K_7, J_7, L_7}, + {0, H_7, G_7, I_7}, + {0, E_7, D_7, F_7}, + {0, B_7, A_7, C_7}, +//cs8 + {0, K_8, J_8, L_8}, + {0, H_8, G_8, I_8}, + {0, E_8, D_8, F_8}, + {0, B_8, A_8, C_8}, +//cs9 + {0, K_9, J_9, L_9}, + {0, H_9, G_9, I_9}, + {0, E_9, D_9, F_9}, + {0, B_9, A_9, C_9}, +//cs10 + {0, K_10, J_10, L_10}, + {0, H_10, G_10, I_10}, + {0, E_10, D_10, F_10}, + {0, B_10, A_10, C_10}, +//cs11 + {0, K_11, J_11, L_11}, + {0, H_11, G_11, I_11}, + {0, E_11, D_11, F_11}, + {0, B_11, A_11, C_11}, +//cs12 + {0, K_12, J_12, L_12}, + {0, H_12, G_12, I_12}, + {0, E_12, D_12, F_12}, + {0, B_12, A_12, C_12}, +//cs13 + {0, K_13, J_13, L_13}, + {0, H_13, G_13, I_13}, + {0, E_13, D_13, F_13}, + {0, B_13, A_13, C_13}, +//cs14 + {0, K_14, J_14, L_14}, + {0, H_14, G_14, I_14}, + {0, E_14, D_14, F_14}, + {0, B_14, A_14, C_14}, +//cs15 + {0, K_15, J_15, L_15}, + + {0, E_15, D_15, F_15}, + {0, B_15, A_15, C_15}, +//cs16 + {0, K_16, J_16, L_16}, + {0, H_16, G_16, I_16}, + {0, E_16, D_16, F_16}, + {0, B_16, A_16, C_16}, +}; +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +/* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ +//cs1 + {{0|(0<<4)}, { 0, 0}, 1}, + {{0|(1<<4)}, { 17, 0}, 0}, + {{1|(0<<4)}, { 0, 16}, 1}, + {{2|(0<<4)}, { 0, 32}, 1}, + +//cs2 + {{0|(2<<4)}, { 34, 0}, 0}, + {{0|(3<<4)}, { 51, 0}, 0}, + {{1|(1<<4)}, { 17, 16}, 0}, + {{1|(2<<4)}, { 34, 16}, 0}, +//cs3 + {{2|(1<<4)}, { 17, 32}, 0}, + {{2|(2<<4)}, { 34, 32}, 0}, + {{3|(1<<4)}, { 17, 48}, 0}, + {{3|(2<<4)}, { 34, 48}, 0}, +//cs4 + {{0|(4<<4)}, { 68, 0}, 0}, + {{0|(5<<4)}, { 85, 0}, 0}, + {{1|(3<<4)}, { 51, 16}, 0}, + {{1|(4<<4)}, { 68, 16}, 0}, +//cs5 + {{0|(11<<4)}, {187, 0}, 0}, + {{0|(12<<4)}, {204, 0}, 0}, + {{1|(11<<4)}, {187, 16}, 0}, + {{1|(12<<4)}, {204, 16}, 0}, +//cs6 + {{0|(7<<4)}, {119, 0}, 0}, + {{0|(8<<4)}, {136, 0}, 0}, + {{1|(7<<4)}, {119, 16}, 0}, + {{1|(8<<4)}, {136, 16}, 0}, +//cs7 + {{0|(9<<4)}, {153, 0}, 0}, + {{0|(10<<4)}, {170, 0}, 0}, + {{1|(9<<4)}, {153, 16}, 0}, + {{1|(10<<4)}, {170, 16}, 0}, +//cs8 + {{0|(13<<4)}, {221, 0}, 0}, + {{0|(14<<4)}, {221, 0}, 0}, + {{1|(13<<4)}, {221, 32}, 1}, + {{2|(12<<4)}, {221, 16}, 1}, +//cs9 + {{2|(3<<4)}, { 51, 32}, 0}, + {{2|(4<<4)}, { 68, 32}, 0}, + {{3|(3<<4)}, { 51, 48}, 0}, + {{3|(4<<4)}, { 68, 48}, 0}, +//cs10 + {{0|(6<<4)}, {102, 0}, 0}, + {{1|(5<<4)}, { 85, 16}, 0}, + {{1|(6<<4)}, {102, 16}, 0}, + {{2|(5<<4)}, { 85, 32}, 0}, +//cs11 + {{2|(6<<4)}, {102, 32}, 0}, + {{3|(5<<4)}, { 85, 48}, 0}, + {{3|(6<<4)}, {102, 48}, 0}, + {{4|(5<<4)}, {102, 64}, 0}, +//cs12 + {{2|(7<<4)}, {119, 32}, 0}, + {{2|(8<<4)}, {136, 32}, 0}, + {{3|(7<<4)}, {119, 48}, 0}, + {{3|(8<<4)}, {136, 48}, 0}, +//cs13 + {{2|(9<<4)}, {153, 32}, 0}, + {{2|(10<<4)}, {170, 32}, 0}, + {{3|(9<<4)}, {153, 48}, 0}, + {{4|(6<<4)}, {136, 48}, 1}, +//cs14 + {{2|(11<<4)}, {187, 32}, 0}, + {{3|(10<<4)}, {170, 48}, 0}, + {{3|(11<<4)}, {187, 48}, 1}, + {{4|(7<<4)}, {153, 48}, 1}, +//cs15 + {{3|(12<<4)}, {221, 48}, 1}, + + {{4|(9<<4)}, {221, 64}, 1}, + {{4|(8<<4)}, {204, 64}, 1}, +//cs16 + {{3|(0<<4)}, { 0, 48}, 1}, + {{4|(0<<4)}, { 0, 64}, 1}, + {{4|(1<<4)}, { 17, 64}, 1}, + {{4|(2<<4)}, { 34, 64}, 1}, +}; +#endif diff --git a/keyboards/exclusive/e6_rgb/e6_rgb.h b/keyboards/exclusive/e6_rgb/e6_rgb.h new file mode 100644 index 000000000..01f700c00 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/e6_rgb.h @@ -0,0 +1,83 @@ + /** + * e6_rgb.h + * + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT_60_ansi( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, KC_NO}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} + +#define LAYOUT_60_wkl( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} + +#define LAYOUT_60_hhkb( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k42, k43, k47, k49, k4a \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3c, k3d}, \ + {KC_NO, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, KC_NO} \ +} +#define LAYOUT_60_wkl_split_bs( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, KC_NO, k49, k4a, k4b} \ +} +#define LAYOUT_60_ansi_split_bs_shift( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, \ + k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3d, \ + k40, k42, k43, k47, k48, k49, k4a, k4b \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1e}, \ + {k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2e, k0e}, \ + {k30, k32, k33, k34, k35, k36, k37, k38, KC_NO, k39, k3a, k3b, k3c, k3d}, \ + {k40, k42, k43, KC_NO, KC_NO, KC_NO, k47, KC_NO, KC_NO, KC_NO, k48, k49, k4a, k4b} \ +} diff --git a/keyboards/exclusive/e6_rgb/info.json b/keyboards/exclusive/e6_rgb/info.json new file mode 100644 index 000000000..80f361002 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/info.json @@ -0,0 +1,21 @@ +{ + "keyboard_name": "e6_rgb", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_wkl": { + "key_count":61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.5}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}, {"label":"Ctrl", "x":13.5, "y":4, "w":1.5}] + }, + "LAYOUT_60_ansi": { + "key_count":61, + "layout": [{"label":"~", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":2.75}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"Menu", "x":12.5, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_60_hhkb": { + "key_count":60, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"|", "x":13, "y":0}, {"label":"~", "x":14, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"Backspace", "x":13.5, "y":1, "w":1.5}, {"label":"Control", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"Fn", "x":14, "y":3}, {"label":"Win", "x":1.5, "y":4}, {"label":"Alt", "x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":7}, {"label":"Alt", "x":11, "y":4, "w":1.5}, {"label":"Win", "x":12.5, "y":4}] + } + } +} diff --git a/keyboards/exclusive/e6_rgb/keymaps/60_ansi/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_ansi/keymap.c new file mode 100644 index 000000000..0f7f09f55 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/60_ansi/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_ansi( + KC_GRV, 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_BSPC,\ + 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_BSLS,\ + 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_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + [1] = LAYOUT_60_ansi( + KC_ESC, 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, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______), +}; diff --git a/keyboards/exclusive/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c new file mode 100644 index 000000000..1ecde0089 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/60_ansi_split_bs_shift/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_ansi_split_bs_shift( + 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_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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_END,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, KC_RGUI, TG(1), KC_RCTL), + [1] = LAYOUT_60_ansi_split_bs_shift( + _______, 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_PSCR,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,TG(0),_______), +}; diff --git a/keyboards/exclusive/e6_rgb/keymaps/60_hhkb/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_hhkb/keymap.c new file mode 100644 index 000000000..e1d2cca37 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/60_hhkb/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_hhkb( + 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_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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS,\ + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1)), + [1] = LAYOUT_60_hhkb( + _______, 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, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______, _______, _______,_______), +}; diff --git a/keyboards/exclusive/e6_rgb/keymaps/60_wkl/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_wkl/keymap.c new file mode 100644 index 000000000..e149c7f06 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/60_wkl/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl( + KC_GRV, 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_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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_DEL,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl( + KC_ESC, 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_DEL,\ + RESET, RGB_TOG, RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,TG(0),_______), +}; diff --git a/keyboards/exclusive/e6_rgb/keymaps/60_wkl_split_bs/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/60_wkl_split_bs/keymap.c new file mode 100644 index 000000000..d9a7885eb --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/60_wkl_split_bs/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_60_wkl_split_bs( + 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_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_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, KC_END,\ + KC_CAPS, KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT, TG(1), KC_RCTL), + [1] = LAYOUT_60_wkl_split_bs( + _______, 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_PSCR,\ + RESET, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,TG(0),_______), +}; diff --git a/keyboards/exclusive/e6_rgb/keymaps/default/keymap.c b/keyboards/exclusive/e6_rgb/keymaps/default/keymap.c new file mode 100644 index 000000000..0f7f09f55 --- /dev/null +++ b/keyboards/exclusive/e6_rgb/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| BSp | + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| + * |-----------------------------------------------------------' + * |Ctrl |Gui|Alt | Space |Alt |Gui|Fn |Ctrl | + * `-----------------------------------------------------------' + */ + [0] = LAYOUT_60_ansi( + KC_GRV, 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_BSPC,\ + 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_BSLS,\ + 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_ENT,\ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT,\ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + [1] = LAYOUT_60_ansi( + KC_ESC, 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, RGB_TOG,RGB_MOD,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN,KC_UP,KC_RIGHT,_______,_______,_______,\ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______,_______,_______, _______, _______,_______,_______,_______), +}; diff --git a/keyboards/exclusive/e6_rgb/readme.md b/keyboards/exclusive/e6_rgb/readme.md new file mode 100644 index 000000000..b252ab53b --- /dev/null +++ b/keyboards/exclusive/e6_rgb/readme.md @@ -0,0 +1,12 @@ +# e6 pcb with rgb + +A full rgb pcb for exclusive E6V1&V2 + +Keyboard Maintainer: [astro](https://github.com/yulei) +Hardware Supported: E6V1, E6V2 + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e6_rgb:60_ansi + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/exclusive/e6_rgb/rules.mk b/keyboards/exclusive/e6_rgb/rules.mk new file mode 100644 index 000000000..9e4e0f58f --- /dev/null +++ b/keyboards/exclusive/e6_rgb/rules.mk @@ -0,0 +1,77 @@ +# MCU name +MCU = atmega32u4 + +# project specific files +#SRC = + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu +#OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Do not put the microcontroller into power saving mode +# when we get USB suspend event. We want it to keep updating +# backlight effects. +#OPT_DEFS += -DNO_SUSPEND_POWER_DOWN + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +#RGBLIGHT_ENABLE = yes # Use RGB bottom light +RGB_MATRIX_ENABLE = IS31FL3733# Use RGB matrix +LAYOUTS = 60_ansi 60_hhkb diff --git a/keyboards/e6v2/le/config.h b/keyboards/exclusive/e6v2/le/config.h index e15545150..580929ba8 100644 --- a/keyboards/e6v2/le/config.h +++ b/keyboards/exclusive/e6v2/le/config.h @@ -56,10 +56,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - - - #endif diff --git a/keyboards/e6v2/le/info.json b/keyboards/exclusive/e6v2/le/info.json index 5a44eab18..5a44eab18 100644 --- a/keyboards/e6v2/le/info.json +++ b/keyboards/exclusive/e6v2/le/info.json diff --git a/keyboards/e6v2/le/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/le/keymaps/default/keymap.c index b785a3279..b785a3279 100644 --- a/keyboards/e6v2/le/keymaps/default/keymap.c +++ b/keyboards/exclusive/e6v2/le/keymaps/default/keymap.c diff --git a/keyboards/e6v2/le/keymaps/eric/keymap.c b/keyboards/exclusive/e6v2/le/keymaps/eric/keymap.c index 4d3052ef2..4d3052ef2 100644 --- a/keyboards/e6v2/le/keymaps/eric/keymap.c +++ b/keyboards/exclusive/e6v2/le/keymaps/eric/keymap.c diff --git a/keyboards/e6v2/le/keymaps/johu/keymap.c b/keyboards/exclusive/e6v2/le/keymaps/johu/keymap.c index 691f0e73c..691f0e73c 100644 --- a/keyboards/e6v2/le/keymaps/johu/keymap.c +++ b/keyboards/exclusive/e6v2/le/keymaps/johu/keymap.c diff --git a/keyboards/e6v2/le/keymaps/johu/readme.md b/keyboards/exclusive/e6v2/le/keymaps/johu/readme.md index 605a14a1c..605a14a1c 100644 --- a/keyboards/e6v2/le/keymaps/johu/readme.md +++ b/keyboards/exclusive/e6v2/le/keymaps/johu/readme.md diff --git a/keyboards/e6v2/le/le.c b/keyboards/exclusive/e6v2/le/le.c index f27bdc113..f27bdc113 100644 --- a/keyboards/e6v2/le/le.c +++ b/keyboards/exclusive/e6v2/le/le.c diff --git a/keyboards/e6v2/le/le.h b/keyboards/exclusive/e6v2/le/le.h index d52560dfb..d52560dfb 100644 --- a/keyboards/e6v2/le/le.h +++ b/keyboards/exclusive/e6v2/le/le.h diff --git a/keyboards/e6v2/le/readme.md b/keyboards/exclusive/e6v2/le/readme.md index 844b31568..b57bb0160 100644 --- a/keyboards/e6v2/le/readme.md +++ b/keyboards/exclusive/e6v2/le/readme.md @@ -10,10 +10,10 @@ Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.o Make example for this keyboard (after setting up your build environment): - make e6v2/le:default + make exclusive/e6v2/le:default Or to make and flash: - make e6v2/le:default:dfu + make exclusive/e6v2/le:default:dfu -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
\ No newline at end of file +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/e6v2/le/rules.mk b/keyboards/exclusive/e6v2/le/rules.mk index 7d28042d8..7d28042d8 100644 --- a/keyboards/e6v2/le/rules.mk +++ b/keyboards/exclusive/e6v2/le/rules.mk diff --git a/keyboards/e6v2/oe/config.h b/keyboards/exclusive/e6v2/oe/config.h index b80afcb51..0bb89eba6 100644 --- a/keyboards/e6v2/oe/config.h +++ b/keyboards/exclusive/e6v2/oe/config.h @@ -56,10 +56,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - - - #endif diff --git a/keyboards/e6v2/oe/info.json b/keyboards/exclusive/e6v2/oe/info.json index 7c1401727..7c1401727 100644 --- a/keyboards/e6v2/oe/info.json +++ b/keyboards/exclusive/e6v2/oe/info.json diff --git a/keyboards/e6v2/oe/keymaps/amnesia0287/keymap.c b/keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/keymap.c index 7e64b1212..7e64b1212 100644 --- a/keyboards/e6v2/oe/keymaps/amnesia0287/keymap.c +++ b/keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/keymap.c diff --git a/keyboards/e6v2/oe/keymaps/amnesia0287/readme.md b/keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/readme.md index 4cc97aef0..4cc97aef0 100644 --- a/keyboards/e6v2/oe/keymaps/amnesia0287/readme.md +++ b/keyboards/exclusive/e6v2/oe/keymaps/amnesia0287/readme.md diff --git a/keyboards/e6v2/oe/keymaps/default/keymap.c b/keyboards/exclusive/e6v2/oe/keymaps/default/keymap.c index 945787f0d..945787f0d 100644 --- a/keyboards/e6v2/oe/keymaps/default/keymap.c +++ b/keyboards/exclusive/e6v2/oe/keymaps/default/keymap.c diff --git a/keyboards/e6v2/oe/keymaps/default/readme.md b/keyboards/exclusive/e6v2/oe/keymaps/default/readme.md index e72647364..e72647364 100644 --- a/keyboards/e6v2/oe/keymaps/default/readme.md +++ b/keyboards/exclusive/e6v2/oe/keymaps/default/readme.md diff --git a/keyboards/e6v2/oe/oe.c b/keyboards/exclusive/e6v2/oe/oe.c index 10cd59f0c..10cd59f0c 100644 --- a/keyboards/e6v2/oe/oe.c +++ b/keyboards/exclusive/e6v2/oe/oe.c diff --git a/keyboards/e6v2/oe/oe.h b/keyboards/exclusive/e6v2/oe/oe.h index 0746039fe..0746039fe 100644 --- a/keyboards/e6v2/oe/oe.h +++ b/keyboards/exclusive/e6v2/oe/oe.h diff --git a/keyboards/e6v2/oe/readme.md b/keyboards/exclusive/e6v2/oe/readme.md index 9d5dd6261..9d5dd6261 100644 --- a/keyboards/e6v2/oe/readme.md +++ b/keyboards/exclusive/e6v2/oe/readme.md diff --git a/keyboards/e6v2/oe/rules.mk b/keyboards/exclusive/e6v2/oe/rules.mk index 7d28042d8..7d28042d8 100644 --- a/keyboards/e6v2/oe/rules.mk +++ b/keyboards/exclusive/e6v2/oe/rules.mk diff --git a/keyboards/e6v2/readme.md b/keyboards/exclusive/e6v2/readme.md index c09d1ccf1..c09d1ccf1 100644 --- a/keyboards/e6v2/readme.md +++ b/keyboards/exclusive/e6v2/readme.md diff --git a/keyboards/exclusive/e7v1/config.h b/keyboards/exclusive/e7v1/config.h new file mode 100644 index 000000000..eacb3ba31 --- /dev/null +++ b/keyboards/exclusive/e7v1/config.h @@ -0,0 +1,47 @@ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x7050 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Exclusive / E-Team +#define PRODUCT E7-V1 +#define DESCRIPTION E7-V1 QMK PCB(LED) + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 16 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5 } +#define MATRIX_COL_PINS { B6, D0, D1, D2, D3, D4, D5, D6, D7, C6, C7, F4, F5, F6, F7, F1 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 6 +#endif + +/* 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 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 20 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/exclusive/e7v1/e7v1.c b/keyboards/exclusive/e7v1/e7v1.c new file mode 100644 index 000000000..381585e6c --- /dev/null +++ b/keyboards/exclusive/e7v1/e7v1.c @@ -0,0 +1,25 @@ +#include "e7v1.h" + +void matrix_init_kb(void) { + setPinOutput(F0); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + writePinHigh(F0); + } else { + writePinLow(F0); + } + + led_set_user(usb_led); +} + diff --git a/keyboards/exclusive/e7v1/e7v1.h b/keyboards/exclusive/e7v1/e7v1.h new file mode 100644 index 000000000..2fc7acb3b --- /dev/null +++ b/keyboards/exclusive/e7v1/e7v1.h @@ -0,0 +1,103 @@ +#pragma once + +#include "quantum.h" + +// layout with all the switches supported by the PCB +#define LAYOUT_all( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K511, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, K511, K512, K513, K514, K515 } \ +} + +#define LAYOUT_75_ansi( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +// Ansi layout with a 7u space bar +#define LAYOUT_75_ansi_7u( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +// ANSI layout with split backspace +#define LAYOUT_75_ansi_splitbs( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400 , K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +// ANSI layout with split backspace +#define LAYOUT_75_ansi_7u_splitbs( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, \ + K400 , K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, KC_NO, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, KC_NO, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} + +#define LAYOUT_75_iso( \ + K000, K001, K002, K003, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K114, K115, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K215, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K214, K313, \ + K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K413, K414, \ + K500, K501, K502, K505, K510, K512, K513, K514, K515 \ +) { \ + { K000, K001, K002, K003, KC_NO, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, KC_NO, K114, K115 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215 }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, KC_NO }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, KC_NO, K413, K414, KC_NO }, \ + { K500, K501, K502, KC_NO, KC_NO, K505, KC_NO, KC_NO, KC_NO, KC_NO, K510, KC_NO, K512, K513, K514, K515 } \ +} diff --git a/keyboards/exclusive/e7v1/info.json b/keyboards/exclusive/e7v1/info.json new file mode 100644 index 000000000..e675e661f --- /dev/null +++ b/keyboards/exclusive/e7v1/info.json @@ -0,0 +1,25 @@ +{ + "keyboard_name": "E7-V1", + "url": "", + "maintainer": "masterzen", + "width": 16.25, + "height": 6.5, + "layouts": { + "LAYOUT_all": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"x":13, "y":1.5}, {"label":"Backspace", "x":14, "y":1.5}, {"label":"Page Up", "x":15.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"\\", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"Z", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5}, {"label":"Win", "x":11, "y":5.5}, {"x":12, "y":5.5}, {"label":"\u2190", "x":13.25, "y":5.75}, {"label":"\u2193", "x":14.25, "y":5.75}, {"label":"\u2192", "x":15.25, "y":5.75}] + }, + "LAYOUT_75_ansi": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Page Up", "x":15.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"\\", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.75}, {"label":"\u2193", "x":14.25, "y":5.75}, {"label":"\u2192", "x":15.25, "y":5.75}] + }, + "LAYOUT_75_ansi_7u": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5, "w":2}, {"label":"Page Up", "x":15.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5, "w":1.5}, {"x":3, "y":5.5, "w":7}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.75}, {"label":"\u2193", "x":14.25, "y":5.75}, {"label":"\u2192", "x":15.25, "y":5.75}] }, + "LAYOUT_75_ansi_7u_splitbs": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"Del", "x":14, "y":1.5}, {"label":"Page Up", "x":15.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.5}, {"label":"Win", "x":1.5, "y":5.5, "w":1.5}, {"x":3, "y":5.5, "w":7}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.75}, {"label":"\u2193", "x":14.25, "y":5.75}, {"label":"\u2192", "x":15.25, "y":5.75}] + }, + "LAYOUT_75_iso": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"Backspace", "x":13, "y":1.5, "w":2}, {"label":"Page Up", "x":15.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Page down", "x":15.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"x":12.75, "y":3.5}, {"label":"Enter", "x":13.75, "y":2.5, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":4.5, "w":1.25}, {"label":"Z", "x":1.25, "y":4.5}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.75}, {"label":"\u2193", "x":14.25, "y":5.75}, {"label":"\u2192", "x":15.25, "y":5.75}]}, + "LAYOUT_75_ansi_splitbs": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.25, "y":0}, {"label":"F2", "x":2.25, "y":0}, {"label":"F3", "x":3.25, "y":0}, {"label":"F4", "x":4.25, "y":0}, {"label":"F5", "x":5.5, "y":0}, {"label":"F6", "x":6.5, "y":0}, {"label":"F7", "x":7.5, "y":0}, {"label":"F8", "x":8.5, "y":0}, {"label":"F9", "x":9.75, "y":0}, {"label":"F10", "x":10.75, "y":0}, {"label":"F11", "x":11.75, "y":0}, {"label":"F12", "x":12.75, "y":0}, {"label":"Home", "x":14, "y":0}, {"label":"End", "x":15.25, "y":0}, {"label":"~", "x":0, "y":1.5}, {"label":"!", "x":1, "y":1.5}, {"label":"@", "x":2, "y":1.5}, {"label":"#", "x":3, "y":1.5}, {"label":"$", "x":4, "y":1.5}, {"label":"%", "x":5, "y":1.5}, {"label":"^", "x":6, "y":1.5}, {"label":"&", "x":7, "y":1.5}, {"label":"*", "x":8, "y":1.5}, {"label":"(", "x":9, "y":1.5}, {"label":")", "x":10, "y":1.5}, {"label":"_", "x":11, "y":1.5}, {"label":"+", "x":12, "y":1.5}, {"label":"|", "x":13, "y":1.5}, {"label":"Del", "x":14, "y":1.5}, {"label":"Page Up", "x":15.25, "y":1.5}, {"label":"Tab", "x":0, "y":2.5, "w":1.5}, {"label":"Q", "x":1.5, "y":2.5}, {"label":"W", "x":2.5, "y":2.5}, {"label":"E", "x":3.5, "y":2.5}, {"label":"R", "x":4.5, "y":2.5}, {"label":"T", "x":5.5, "y":2.5}, {"label":"Y", "x":6.5, "y":2.5}, {"label":"U", "x":7.5, "y":2.5}, {"label":"I", "x":8.5, "y":2.5}, {"label":"O", "x":9.5, "y":2.5}, {"label":"P", "x":10.5, "y":2.5}, {"label":"{", "x":11.5, "y":2.5}, {"label":"}", "x":12.5, "y":2.5}, {"label":"Backspace", "x":13.5, "y":2.5, "w":1.5}, {"label":"Page down", "x":15.25, "y":2.5}, {"label":"Caps Lock", "x":0, "y":3.5, "w":1.75}, {"label":"A", "x":1.75, "y":3.5}, {"label":"S", "x":2.75, "y":3.5}, {"label":"D", "x":3.75, "y":3.5}, {"label":"F", "x":4.75, "y":3.5}, {"label":"G", "x":5.75, "y":3.5}, {"label":"H", "x":6.75, "y":3.5}, {"label":"J", "x":7.75, "y":3.5}, {"label":"K", "x":8.75, "y":3.5}, {"label":"L", "x":9.75, "y":3.5}, {"label":":", "x":10.75, "y":3.5}, {"label":"\"", "x":11.75, "y":3.5}, {"label":"Enter", "x":12.75, "y":3.5, "w":2.25}, {"label":"Shift", "x":0, "y":4.5, "w":2.25}, {"label":"Z", "x":2.25, "y":4.5}, {"label":"X", "x":3.25, "y":4.5}, {"label":"C", "x":4.25, "y":4.5}, {"label":"V", "x":5.25, "y":4.5}, {"label":"B", "x":6.25, "y":4.5}, {"label":"N", "x":7.25, "y":4.5}, {"label":"M", "x":8.25, "y":4.5}, {"label":"<", "x":9.25, "y":4.5}, {"label":">", "x":10.25, "y":4.5}, {"label":"?", "x":11.25, "y":4.5}, {"label":"Shift", "x":12.25, "y":4.5, "w":1.75}, {"label":"\u2191", "x":14.25, "y":4.75}, {"label":"Ctrl", "x":0, "y":5.5, "w":1.25}, {"label":"Win", "x":1.25, "y":5.5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.5, "w":1.25}, {"x":3.75, "y":5.5, "w":6.25}, {"label":"Alt", "x":10, "y":5.5, "w":1.5}, {"label":"Win", "x":11.5, "y":5.5, "w":1.5}, {"label":"\u2190", "x":13.25, "y":5.75}, {"label":"\u2193", "x":14.25, "y":5.75}, {"label":"\u2192", "x":15.25, "y":5.75}] + } + } +} diff --git a/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/keymap.c b/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/keymap.c new file mode 100644 index 000000000..242020b20 --- /dev/null +++ b/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |\ |Del|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | BSpc|▓PgDn| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_75_ansi_splitbs( + KC_ESC, 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_INS, 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_MINS, KC_EQL, KC_BSLS,KC_DEL, KC_PGUP, + 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_PGDN, + 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_ENT, + KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_75_ansi_splitbs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD), + + +}; diff --git a/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/readme.md b/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/readme.md new file mode 100644 index 000000000..be9f4c312 --- /dev/null +++ b/keyboards/exclusive/e7v1/keymaps/ansi_splitbs/readme.md @@ -0,0 +1,5 @@ +# ANSI split backspace Keymap + +Split backspace ANSI keymap with a base layer and an adjust layer. + +Keymap Maintainer: [masterzen](https://github.com/amnesia0287) diff --git a/keyboards/exclusive/e7v1/keymaps/default/keymap.c b/keyboards/exclusive/e7v1/keymaps/default/keymap.c new file mode 100644 index 000000000..189c01eca --- /dev/null +++ b/keyboards/exclusive/e7v1/keymaps/default/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Ins|▓|Del| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |Backspace|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | \ |▓PgDn| + * |---------------------------------------------------------------------| + * |Caps |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_75_ansi( + KC_ESC, 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_INS, 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_MINS, KC_EQL, KC_BSPC, KC_PGUP, + 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_BSLS, KC_PGDN, + 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_ENT, + KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_75_ansi( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, MO(1), RGB_MOD, RGB_VAD, RGB_HUD), + + +}; diff --git a/keyboards/exclusive/e7v1/keymaps/default/readme.md b/keyboards/exclusive/e7v1/keymaps/default/readme.md new file mode 100644 index 000000000..a6fc70a6a --- /dev/null +++ b/keyboards/exclusive/e7v1/keymaps/default/readme.md @@ -0,0 +1,5 @@ +# Default Keymap + +Default ANSI keymap with a base layer and an adjust layer. + +Keymap Maintainer: [masterzen](https://github.com/amnesia0287) diff --git a/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c b/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c new file mode 100644 index 000000000..61a41f629 --- /dev/null +++ b/keyboards/exclusive/e7v1/keymaps/masterzen/keymap.c @@ -0,0 +1,138 @@ +#include QMK_KEYBOARD_H + +enum layers { + BASE, // qwerty linux + OSX, // qwerty osx + + _ADJUST, // function key layer +}; + +enum keycodes { + // default layout switcher + LAY_LIN = SAFE_RANGE, + LAY_OSX +}; + +/* + * ,---------------------------------------------------------------------| + * |Esc|▓|F1 |F2 |F3 |F4 |▓|F5 |F6 |F7 |F8 |▓|F9 |F10|F11|F12|▓|Hom|▓|End| + * |---------------------------------------------------------------------| + * |` |1 |2 |3 |4 |5 |6 |7 |8 |9 |0 |- |= |\ |Del|▓PgU | + * |---------------------------------------------------------------------| + * |Tab |Q |W |E |R |T |Y |U |I |O |P |[ | ] | BSpc|▓PgDn| + * |---------------------------------------------------------------------| + * |LCTRL |A |S |D |F |G |H |J |K |L |; |' | Enter |▓▓▓▓▓▓▓| + * |---------------------------------------------------------------------| + * |Shft |Z |X |C |V |B |N |M |, |. |/ |Shift |▓| Up |▓▓| + * |---------------------------------------------------------------------| + * |Ctrl|GUI |Alt | Space |Alt |Fn |▓|Lt |Dn |Rt | + * `---------------------------------------------------------------------|' + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [BASE] = LAYOUT_75_ansi_splitbs( + KC_ESC, 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_HOME, LT(_ADJUST,KC_END), + KC_GRV, 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_DEL, KC_PGUP, + 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_PGDN, + 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_ENT, + KC_LSFT, 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RGHT), + + [OSX] = LAYOUT_75_ansi_splitbs( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LCTL, KC_LALT, KC_LGUI, _______, KC_LGUI, KC_RALT, _______, _______, _______), + + [_ADJUST] = LAYOUT_75_ansi_splitbs( + RESET, LAY_LIN, LAY_OSX, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MO(_ADJUST), + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, BL_DEC, BL_INC, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, + _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_VAD, RGB_HUD), + + +}; + +extern rgblight_config_t rgblight_config; + +bool edit = false; +uint32_t mode; +uint16_t hue; +uint8_t sat; +uint8_t val; + +void matrix_init_user(void) +{ + mode = rgblight_config.mode; +} + + +void persistent_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) + { + /* layout switcher */ + case LAY_LIN: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << BASE); + } + return false; + break; + case LAY_OSX: + if (record->event.pressed) + { + persistent_default_layer_set(1UL << OSX); + } + return false; + break; + case RGB_MOD: + // allows to set the rgb mode while in the ADJUST layer which uses + // its own mode + if (record->event.pressed) + { + rgblight_mode(mode); + rgblight_step(); + mode = rgblight_config.mode; + } + return false; + break; + } + return true; +} + +uint32_t layer_state_set_user(uint32_t state) +{ + if (state == BASE && edit == true) + { + hue = rgblight_get_hue(); + sat = rgblight_get_sat(); + val = rgblight_get_val(); + edit = false; + } + + switch (biton32(state)) + { + case _ADJUST: + mode = rgblight_get_mode(); + rgblight_mode_noeeprom(1); + rgblight_setrgb(0xD3, 0x7F, 0xED); + edit = true; + break; + default: + rgblight_mode(mode); + rgblight_sethsv(hue, sat, val); + break; + } + return state; +} diff --git a/keyboards/exclusive/e7v1/keymaps/masterzen/readme.md b/keyboards/exclusive/e7v1/keymaps/masterzen/readme.md new file mode 100644 index 000000000..ee4f2a531 --- /dev/null +++ b/keyboards/exclusive/e7v1/keymaps/masterzen/readme.md @@ -0,0 +1,14 @@ +# masterzen's Keymap + +![masterzen keymap Layout Image](https://imgur.com/SF4UP2j) + +Keymap Maintainer: [masterzen](https://github.com/masterzen) + + +Difference from base layout: + * split backspace + * Home & End on last keys of row 0 instead of Insert/Del + * Fn is on the End key when hold + * supports both a windows/linux keymap and osx keymap + * layer change is reflected in the rgb leds of the logo + diff --git a/keyboards/exclusive/e7v1/readme.md b/keyboards/exclusive/e7v1/readme.md new file mode 100644 index 000000000..9d1b8538b --- /dev/null +++ b/keyboards/exclusive/e7v1/readme.md @@ -0,0 +1,15 @@ +# E7-V1 + +![E7-V1](https://imgur.com/a/5v5pV9U) + +A 75% keyboard made by Exclusive and run in a Geekhack group buy. + +Keyboard Maintainer: [masterzen](https://github.com/masterzen) +Hardware Supported: E7 - V1 QMK PCB LED +Hardware Availability: [https://geekhack.org/index.php?topic=97182.msg2654226#msg2654226](https://geekhack.org/index.php?topic=97182.msg2654226#msg2654226) + +Make example for this keyboard (after setting up your build environment): + + make exclusive/e7v1:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/exclusive/e7v1/rules.mk b/keyboards/exclusive/e7v1/rules.mk new file mode 100644 index 000000000..f903df7de --- /dev/null +++ b/keyboards/exclusive/e7v1/rules.mk @@ -0,0 +1,54 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB 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 +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = yes diff --git a/keyboards/exclusive/readme.md b/keyboards/exclusive/readme.md new file mode 100644 index 000000000..85409c923 --- /dev/null +++ b/keyboards/exclusive/readme.md @@ -0,0 +1,9 @@ +# Exclusive Firmware + +All files related to firmware of keyboards designed by Exclusive. + +## Keyboards + +* [e6_rgb](./e6_rgb/): maintainer [astro](https://github.com/yulei) +* [e6-v2](./e6v2/): maintainers [MechMerlin](https://github.com/mechmerlin), [amnesia0287](https://github.com/amnesia0287) +* [e7-v1](./e7v1): maintainer [masterzen](https://github.com/masterzen) diff --git a/keyboards/facew/config.h b/keyboards/facew/config.h index d42440486..c952ca737 100644 --- a/keyboards/facew/config.h +++ b/keyboards/facew/config.h @@ -43,7 +43,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/fc660c/config.h b/keyboards/fc660c/config.h index 9771c8c03..96f04b097 100644 --- a/keyboards/fc660c/config.h +++ b/keyboards/fc660c/config.h @@ -52,13 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/fc980c/config.h b/keyboards/fc980c/config.h index 1b1f41c90..a6cb97756 100644 --- a/keyboards/fc980c/config.h +++ b/keyboards/fc980c/config.h @@ -56,13 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/felix/config.h b/keyboards/felix/config.h index 003fe87dc..0e5dd9d2d 100644 --- a/keyboards/felix/config.h +++ b/keyboards/felix/config.h @@ -37,12 +37,6 @@ /* 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)) \ -) - - /* there is no rgb underglow by default. */ #define RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/fleuron/config.h b/keyboards/fleuron/config.h index a3ff43b06..cccb798be 100644 --- a/keyboards/fleuron/config.h +++ b/keyboards/fleuron/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/fortitude60/rev1/config.h b/keyboards/fortitude60/rev1/config.h index b89f5c7df..2fa179ae2 100644 --- a/keyboards/fortitude60/rev1/config.h +++ b/keyboards/fortitude60/rev1/config.h @@ -58,11 +58,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 */ #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN B5 diff --git a/keyboards/four_banger/config.h b/keyboards/four_banger/config.h index 761ddba71..4567cec8e 100644 --- a/keyboards/four_banger/config.h +++ b/keyboards/four_banger/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/fourier/rev1/rev1.c b/keyboards/fourier/rev1/rev1.c deleted file mode 100644 index 1e662e7b8..000000000 --- a/keyboards/fourier/rev1/rev1.c +++ /dev/null @@ -1,5 +0,0 @@ -#include "fourier.h" - -void matrix_init_kb(void) { - matrix_init_user(); -}; diff --git a/keyboards/fourier/rev1/rev1.h b/keyboards/fourier/rev1/rev1.h deleted file mode 100644 index ac889462b..000000000 --- a/keyboards/fourier/rev1/rev1.h +++ /dev/null @@ -1,21 +0,0 @@ -#pragma once - -#include "fourier.h" -#include "quantum.h" - -#define LAYOUT( \ - LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ - LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ - LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ - LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ - ) \ - { \ - { LA1, LA2, LA3, LA4, LA5, LA6, KC_NO}, \ - { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO}, \ - { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO}, \ - { LD1, LD2, LD3, LD4, LD5, KC_NO, KC_NO}, \ - { RA1, RA2, RA3, RA4, RA5, RA6, RA7}, \ - { RB1, RB2, RB3, RB4, RB5, KC_NO, RB7}, \ - { RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \ - { RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \ - } diff --git a/keyboards/fractal/config.h b/keyboards/fractal/config.h index 396c3b4b9..fce0931c2 100755 --- a/keyboards/fractal/config.h +++ b/keyboards/fractal/config.h @@ -39,11 +39,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/gergo/config.h b/keyboards/gergo/config.h index a795f8dba..e4c61ecb0 100644 --- a/keyboards/gergo/config.h +++ b/keyboards/gergo/config.h @@ -24,11 +24,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Defaults */ #ifndef BALLSTEP #define BALLSTEP 20 -#endif +#endif #ifndef SCROLLSTEP #define SCROLLSTEP 1 -#endif +#endif #define VERBOSE @@ -36,7 +36,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x1307 #define DEVICE_VER 0x0001 -#define MANUFACTURER g Heavy Industries +#define MANUFACTURER g Heavy Industries #define PRODUCT Gergo #define DESCRIPTION QMK keyboard firmware for Gergo @@ -65,8 +65,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) #define DEBOUNCE 5 diff --git a/keyboards/gergo/gergo.c b/keyboards/gergo/gergo.c index c6ba91bb2..d32792e2a 100644 --- a/keyboards/gergo/gergo.c +++ b/keyboards/gergo/gergo.c @@ -64,3 +64,21 @@ out: //uprintf("Init %x\n", mcp23018_status); return mcp23018_status; } + +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + { {0,0}, {0,7}, {2,7}, {3,7} }, + { {0,8}, {1,8}, {2,8}, {3,8} }, + { {0,9}, {1,9}, {2,9}, {3,9} }, + { {0,10}, {1,10}, {2,10}, {3,10} }, + { {0,11}, {1,11}, {2,11}, {3,11} }, + { {0,12}, {1,12}, {2,12}, {0,0} }, + { {0,13}, {1,13}, {2,13}, {0,0} }, + + { {1,0}, {0,0}, {2,0}, {3,0} }, + { {0,1}, {1,1}, {2,1}, {3,1} }, + { {0,2}, {1,2}, {2,2}, {3,2} }, + { {0,3}, {1,3}, {2,3}, {3,3} }, + { {0,4}, {1,4}, {2,4}, {3,4} }, + { {0,5}, {1,5}, {2,5}, {3,5} }, + { {0,6}, {1,6}, {2,6}, {3,6} } +}; diff --git a/keyboards/gergo/gergo.h b/keyboards/gergo/gergo.h index c0d885029..0292c512a 100644 --- a/keyboards/gergo/gergo.h +++ b/keyboards/gergo/gergo.h @@ -48,7 +48,7 @@ uint8_t init_mcp23018(void); { L01, L11, L21, KC_NO}, \ { L00, L10, L20, KC_NO}, \ \ - { R10, KC_NO, R20, R30}, \ + { KC_NO, R10, R20, R30}, \ { R00, R11, R21, R31}, \ { R01, R12, R22, R32}, \ { R02, R13, R23, R33}, \ diff --git a/keyboards/gh60/config.h b/keyboards/gh60/config.h index 97753bc06..a99dd4e59 100644 --- a/keyboards/gh60/config.h +++ b/keyboards/gh60/config.h @@ -99,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/gh60/keymaps/dbroqua/config.h b/keyboards/gh60/keymaps/dbroqua/config.h index fd63c9a8f..380b8303f 100644 --- a/keyboards/gh60/keymaps/dbroqua/config.h +++ b/keyboards/gh60/keymaps/dbroqua/config.h @@ -96,11 +96,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/gh60/keymaps/default/keymap.c b/keyboards/gh60/keymaps/default/keymap.c index f8ca9a35c..14a71af29 100644 --- a/keyboards/gh60/keymaps/default/keymap.c +++ b/keyboards/gh60/keymaps/default/keymap.c @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_GRV, 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_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, - KC_LSFT, F(1), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, F(0), KC_RSFT, + KC_LSFT, TG(2), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(1), KC_RSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSLS, KC_RALT, KC_RGUI, KC_APP, KC_RCTL ), /* 1: fn */ @@ -33,11 +33,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay - [1] = ACTION_LAYER_TOGGLE(2), // toggle arrow overlay -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/gh60/keymaps/robotmaxtron/config.h b/keyboards/gh60/keymaps/robotmaxtron/config.h index 925a69efe..ec2f8ceea 100644 --- a/keyboards/gh60/keymaps/robotmaxtron/config.h +++ b/keyboards/gh60/keymaps/robotmaxtron/config.h @@ -99,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/gh80_3000/config.h b/keyboards/gh80_3000/config.h index ca72aba5a..7fb418312 100644 --- a/keyboards/gh80_3000/config.h +++ b/keyboards/gh80_3000/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/gonnerd/config.h b/keyboards/gonnerd/config.h index cad8fe586..40615da5f 100644 --- a/keyboards/gonnerd/config.h +++ b/keyboards/gonnerd/config.h @@ -35,9 +35,4 @@ /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/cod67/cod67.c b/keyboards/gray_studio/cod67/cod67.c index b6c04a3e5..b6c04a3e5 100644 --- a/keyboards/cod67/cod67.c +++ b/keyboards/gray_studio/cod67/cod67.c diff --git a/keyboards/cod67/cod67.h b/keyboards/gray_studio/cod67/cod67.h index 2d3911e69..2d3911e69 100644 --- a/keyboards/cod67/cod67.h +++ b/keyboards/gray_studio/cod67/cod67.h diff --git a/keyboards/cod67/config.h b/keyboards/gray_studio/cod67/config.h index 612379271..51c695de4 100644 --- a/keyboards/cod67/config.h +++ b/keyboards/gray_studio/cod67/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_PIN D4 #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -104,11 +103,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/cod67/info.json b/keyboards/gray_studio/cod67/info.json index 44854af8c..44854af8c 100644 --- a/keyboards/cod67/info.json +++ b/keyboards/gray_studio/cod67/info.json diff --git a/keyboards/cod67/keymaps/default/keymap.c b/keyboards/gray_studio/cod67/keymaps/default/keymap.c index 9e1273a18..9e1273a18 100644 --- a/keyboards/cod67/keymaps/default/keymap.c +++ b/keyboards/gray_studio/cod67/keymaps/default/keymap.c diff --git a/keyboards/cod67/keymaps/default/readme.md b/keyboards/gray_studio/cod67/keymaps/default/readme.md index cfbf846a9..cfbf846a9 100644 --- a/keyboards/cod67/keymaps/default/readme.md +++ b/keyboards/gray_studio/cod67/keymaps/default/readme.md diff --git a/keyboards/cod67/readme.md b/keyboards/gray_studio/cod67/readme.md index 5e64ff758..7f91cf30d 100644 --- a/keyboards/cod67/readme.md +++ b/keyboards/gray_studio/cod67/readme.md @@ -1,13 +1,11 @@ # Gray COD67 -![cod67](imgur.com image replace me!) - The Gray COD67 is a 60% keyboard with a modern and bold design. It features 20 RGB Underglow LED lights and a unique diffuser placement. The COD67 has the most stunning RGB light strip for a custom mechanical keyboard. It also features a center mounted USB C port. There were only 75 units made worldwide. Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) -Hardware Supported: Gray COD67 +Hardware Supported: Gray COD67 Hardware Availability: [Zfrontier](https://en.zfrontier.com/products/cod67) At this time, flashing ONLY works on Windows systems. @@ -18,9 +16,9 @@ The COD67 will show up as a drive. Make example for this keyboard (after setting up your build environment): - make cod67:default:bin + make gray_studio/cod67:default:bin -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). Rename the resulting `.bin` file to `cod67.bin`. diff --git a/keyboards/cod67/rules.mk b/keyboards/gray_studio/cod67/rules.mk index 45eb6ee37..45eb6ee37 100644 --- a/keyboards/cod67/rules.mk +++ b/keyboards/gray_studio/cod67/rules.mk diff --git a/keyboards/gray_studio/readme.md b/keyboards/gray_studio/readme.md new file mode 100644 index 000000000..dc1baa516 --- /dev/null +++ b/keyboards/gray_studio/readme.md @@ -0,0 +1 @@ +# Gray Studio diff --git a/keyboards/gray_studio/space65/config.h b/keyboards/gray_studio/space65/config.h new file mode 100644 index 000000000..2c05979f7 --- /dev/null +++ b/keyboards/gray_studio/space65/config.h @@ -0,0 +1,244 @@ +/* +Copyright 2019 MechMerlin + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Gray Studio +#define PRODUCT Space65 +#define DESCRIPTION 65% custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D0, D1, F0, F4, F1 } +#define MATRIX_COL_PINS { B0, B3, F5, F6, F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +/* + * Split Keyboard specific options, make sure you have 'SPLIT_KEYBOARD = yes' in your rules.mk, and define SOFT_SERIAL_PIN. + */ +#define SOFT_SERIAL_PIN D0 // or D1, D2, D3, E6 + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 6 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +// /*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +// /*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +/* defined by default; to change, uncomment and set to the combination you want */ +// #define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ + +/* Bootmagic Lite key configuration */ +// #define BOOTMAGIC_LITE_ROW 0 +// #define BOOTMAGIC_LITE_COLUMN 0 diff --git a/keyboards/gray_studio/space65/info.json b/keyboards/gray_studio/space65/info.json new file mode 100644 index 000000000..9c1d439b4 --- /dev/null +++ b/keyboards/gray_studio/space65/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Gray Studio Space65", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":0, "y":1, "w":1.5}, {"x":1.5, "y":1}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.5}, {"x":15, "y":1}, {"x":0, "y":2, "w":1.75}, {"x":1.75, "y":2}, {"x":2.75, "y":2}, {"x":3.75, "y":2}, {"x":4.75, "y":2}, {"x":5.75, "y":2}, {"x":6.75, "y":2}, {"x":7.75, "y":2}, {"x":8.75, "y":2}, {"x":9.75, "y":2}, {"x":10.75, "y":2}, {"x":11.75, "y":2}, {"x":12.75, "y":2, "w":2.25}, {"x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"x":2.25, "y":3}, {"x":3.25, "y":3}, {"x":4.25, "y":3}, {"x":5.25, "y":3}, {"x":6.25, "y":3}, {"x":7.25, "y":3}, {"x":8.25, "y":3}, {"x":9.25, "y":3}, {"x":10.25, "y":3}, {"x":11.25, "y":3}, {"x":12.25, "y":3, "w":1.75}, {"x":14, "y":3}, {"x":15, "y":3}, {"x":0, "y":4, "w":1.25}, {"x":1.25, "y":4, "w":1.25}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4, "w":1.25}, {"x":11.25, "y":4, "w":1.25}, {"x":13, "y":4}, {"x":14, "y":4}, {"x":15, "y":4}] + } + } +}
\ No newline at end of file diff --git a/keyboards/gray_studio/space65/keymaps/default/config.h b/keyboards/gray_studio/space65/keymaps/default/config.h new file mode 100644 index 000000000..26c6d6ade --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here diff --git a/keyboards/gray_studio/space65/keymaps/default/keymap.c b/keyboards/gray_studio/space65/keymaps/default/keymap.c new file mode 100644 index 000000000..229a0c574 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/default/keymap.c @@ -0,0 +1,73 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +// Defines the keycodes used by our macros in process_record_user +enum custom_keycodes { + QMKBEST = SAFE_RANGE, + QMKURL +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( \ + 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_BSPC, KC_BSPC, KC_DEL, \ + 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_BSLS, KC_INS, \ + 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_ENT, KC_PGUP, \ + KC_LSFT, KC_LSFT, 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_SPC, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), +[1] = LAYOUT( \ + 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_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_TRNS, KC_HOME, KC_PGDN, KC_END \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QMKBEST: + if (record->event.pressed) { + // when keycode QMKBEST is pressed + SEND_STRING("QMK is the best thing ever!"); + } else { + // when keycode QMKBEST is released + } + break; + case QMKURL: + if (record->event.pressed) { + // when keycode QMKURL is pressed + SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); + } else { + // when keycode QMKURL is released + } + break; + } + return true; +} + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/gray_studio/space65/keymaps/default/readme.md b/keyboards/gray_studio/space65/keymaps/default/readme.md new file mode 100644 index 000000000..944c1e8a0 --- /dev/null +++ b/keyboards/gray_studio/space65/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for space65 diff --git a/keyboards/gray_studio/space65/readme.md b/keyboards/gray_studio/space65/readme.md new file mode 100644 index 000000000..00d289e3b --- /dev/null +++ b/keyboards/gray_studio/space65/readme.md @@ -0,0 +1,15 @@ +# Gray Studio Space65 + +A 65% keyboard with RGB underglow, backlighting, and USB C. Its design was inspired by the Voyager I space probe and Apple II home computer. + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Gray Studio Space65 +Hardware Availability: [Geekhack Group Buy](https://geekhack.org/index.php?topic=98768.0) + +**Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode. + +Make example for this keyboard (after setting up your build environment): + + make gray_studio/space65:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/gray_studio/space65/rules.mk b/keyboards/gray_studio/space65/rules.mk new file mode 100644 index 000000000..10bd7cf03 --- /dev/null +++ b/keyboards/gray_studio/space65/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/gray_studio/space65/space65.c b/keyboards/gray_studio/space65/space65.c new file mode 100644 index 000000000..f9f2224ab --- /dev/null +++ b/keyboards/gray_studio/space65/space65.c @@ -0,0 +1,48 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "space65.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(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(E6); + } else { + writePinLow(E6); + } + + led_set_user(usb_led); +} diff --git a/keyboards/gray_studio/space65/space65.h b/keyboards/gray_studio/space65/space65.h new file mode 100644 index 000000000..b7d8580c0 --- /dev/null +++ b/keyboards/gray_studio/space65/space65.h @@ -0,0 +1,42 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, \ + k10, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2F, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3D, k3E, k3F, \ + k40, k41, k43, k45, k47, k48, k4A, k4B, k4D, k4E, k4F \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F }, \ + { k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1F }, \ + { k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, KC_NO, k2F }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, KC_NO, k3D, k3E, k3F }, \ + { k40, k41, KC_NO, k43, KC_NO, k45, KC_NO, k47, k48, KC_NO, k4A, k4B, KC_NO, k4D, k4E, k4F }, \ +} + diff --git a/keyboards/gskt00/config.h b/keyboards/gskt00/config.h index f36493f28..376f89dbe 100755 --- a/keyboards/gskt00/config.h +++ b/keyboards/gskt00/config.h @@ -30,10 +30,3 @@ /* 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)) \ -) - - diff --git a/keyboards/h87a/config.h b/keyboards/h87a/config.h index a98b7b283..a7a94a0bc 100644 --- a/keyboards/h87a/config.h +++ b/keyboards/h87a/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -66,11 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/hadron/config.h b/keyboards/hadron/config.h index d54d2c543..7024f8fcb 100644 --- a/keyboards/hadron/config.h +++ b/keyboards/hadron/config.h @@ -26,9 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT Hadron Keyboard #define DESCRIPTION A low profile ortholinear keyboard - - - //#define AUDIO_VOICES //#define BACKLIGHT_PIN B7 @@ -50,11 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -72,5 +64,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - diff --git a/keyboards/hadron/ver3/config.h b/keyboards/hadron/ver3/config.h index 7db500304..d6c3830df 100644 --- a/keyboards/hadron/ver3/config.h +++ b/keyboards/hadron/ver3/config.h @@ -27,7 +27,6 @@ #define MATRIX_ROWS 5 #define MATRIX_COLS 15 - //Audio #undef AUDIO_VOICES #undef C6_AUDIO @@ -96,11 +95,6 @@ */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -167,7 +161,6 @@ #endif - /* Control 1 register settings */ #define DRIVE_TIME 25 #define AC_COUPLE 0 diff --git a/keyboards/handwired/108key_trackpoint/config.h b/keyboards/handwired/108key_trackpoint/config.h index 7a63fe262..a773a72b1 100644 --- a/keyboards/handwired/108key_trackpoint/config.h +++ b/keyboards/handwired/108key_trackpoint/config.h @@ -65,9 +65,3 @@ #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE - -/* key combination for commkand */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - diff --git a/keyboards/handwired/arrow_pad/config.h b/keyboards/handwired/arrow_pad/config.h index 3d8d8709a..1ae3d21c4 100644 --- a/keyboards/handwired/arrow_pad/config.h +++ b/keyboards/handwired/arrow_pad/config.h @@ -98,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h index a095e8737..9b6ecfaa3 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_21/config.h @@ -96,11 +96,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h index e940acaa0..db89e4b84 100644 --- a/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h +++ b/keyboards/handwired/arrow_pad/keymaps/pad_24/config.h @@ -98,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/atreus50/config.h b/keyboards/handwired/atreus50/config.h index 2e34e0f89..4cdc7ed12 100644 --- a/keyboards/handwired/atreus50/config.h +++ b/keyboards/handwired/atreus50/config.h @@ -44,7 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -58,7 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - /* ws2812 RGB LED */ #define RGB_DI_PIN C6 #define RGBLIGHT_ANIMATIONS @@ -67,7 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - /* * Force NKRO * @@ -101,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/bluepill/config.h b/keyboards/handwired/bluepill/config.h index aeab1808a..6d583b989 100644 --- a/keyboards/handwired/bluepill/config.h +++ b/keyboards/handwired/bluepill/config.h @@ -29,11 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlighting include */ /*#define BACKLIGHT_PIN 19 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/handwired/ck4x4/bootloader_defs.h b/keyboards/handwired/ck4x4/bootloader_defs.h new file mode 100644 index 000000000..02c48c4e6 --- /dev/null +++ b/keyboards/handwired/ck4x4/bootloader_defs.h @@ -0,0 +1,7 @@ +/* Address for jumping to bootloader on STM32 chips. */ +/* It is chip dependent, the correct number can be looked up here (page 175): + * http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf + * This also requires a patch to chibios: + * <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch + */ +#define STM32_BOOTLOADER_ADDRESS 0x1FFFC800 diff --git a/keyboards/handwired/ck4x4/chconf.h b/keyboards/handwired/ck4x4/chconf.h new file mode 100644 index 000000000..99fa8ce39 --- /dev/null +++ b/keyboards/handwired/ck4x4/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 10000 + +/** + * @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 2 + +/** @} */ + +/*===========================================================================*/ +/** + * @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 0 + +/** + * @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 FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @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 FALSE + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** + * @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 FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @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/handwired/ck4x4/ck4x4.c b/keyboards/handwired/ck4x4/ck4x4.c new file mode 100644 index 000000000..3091ce9c0 --- /dev/null +++ b/keyboards/handwired/ck4x4/ck4x4.c @@ -0,0 +1 @@ +#include "ck4x4.h" diff --git a/keyboards/handwired/ck4x4/ck4x4.h b/keyboards/handwired/ck4x4/ck4x4.h new file mode 100644 index 000000000..33c1b8dd9 --- /dev/null +++ b/keyboards/handwired/ck4x4/ck4x4.h @@ -0,0 +1,15 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33 \ +) {\ +{ k00, k01, k02, k03 }, \ +{ k10, k11, k12, k13 }, \ +{ k20, k21, k22, k23 }, \ +{ k30, k31, k32, k33 }, \ +} diff --git a/keyboards/handwired/ck4x4/config.h b/keyboards/handwired/ck4x4/config.h new file mode 100644 index 000000000..4ee5e8f4a --- /dev/null +++ b/keyboards/handwired/ck4x4/config.h @@ -0,0 +1,70 @@ +/* +Copyright 2015 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6464 +#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 QMK +#define PRODUCT CK4x4 +#define DESCRIPTION Cannon Keys 4x4 MacroPad + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 + +#define MATRIX_COL_PINS { B7, B8, B9, B10 } +#define MATRIX_ROW_PINS { B3, B4, B5, B6 } +#define DIODE_DIRECTION COL2ROW + +//LEDS A6, RGB B15 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 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 + + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + diff --git a/keyboards/handwired/ck4x4/halconf.h b/keyboards/handwired/ck4x4/halconf.h new file mode 100644 index 000000000..8b9724b1a --- /dev/null +++ b/keyboards/handwired/ck4x4/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 FALSE +#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 1 +#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/handwired/ck4x4/keymaps/default/keymap.c b/keyboards/handwired/ck4x4/keymaps/default/keymap.c new file mode 100644 index 000000000..d3717754d --- /dev/null +++ b/keyboards/handwired/ck4x4/keymaps/default/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2012,2013 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT(KC_7, KC_8, KC_9, KC_MINUS, \ + KC_4, KC_5, KC_6, KC_PLUS, \ + KC_1, KC_2, KC_3, KC_ENTER, \ + RESET, KC_NO, KC_NO, KC_NO \ + ), // test with KC_CAPS, KC_A, RESET +}; + +const uint16_t fn_actions[] = { +}; diff --git a/keyboards/handwired/ck4x4/mcuconf.h b/keyboards/handwired/ck4x4/mcuconf.h new file mode 100644 index 000000000..faca3defd --- /dev/null +++ b/keyboards/handwired/ck4x4/mcuconf.h @@ -0,0 +1,171 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/handwired/ck4x4/readme.md b/keyboards/handwired/ck4x4/readme.md new file mode 100644 index 000000000..d25a9c4df --- /dev/null +++ b/keyboards/handwired/ck4x4/readme.md @@ -0,0 +1,3 @@ +# CK4x4 + +Cannon Keys 4x4 Macro Pad diff --git a/keyboards/handwired/ck4x4/rules.mk b/keyboards/handwired/ck4x4/rules.mk new file mode 100644 index 000000000..7ed9022e6 --- /dev/null +++ b/keyboards/handwired/ck4x4/rules.mk @@ -0,0 +1,49 @@ +# project specific files +# SRC = matrix.c \ +# led.c + +## chip/board settings +# the next two should match the directories in +# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ +# or <this_dir>/ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in <chibios>/os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in <chibios>/os/hal/boards/ +# or <this_dir>/boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards/<FOO>/bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# <tmk_dir>/tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# 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 +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover +CUSTOM_MATRIX = no # Custom matrix file + +DEFAULT_FOLDER = handwired/ck4x4 diff --git a/keyboards/handwired/cmd60/config.h b/keyboards/handwired/cmd60/config.h index 27eb400b8..e95cac1e4 100644 --- a/keyboards/handwired/cmd60/config.h +++ b/keyboards/handwired/cmd60/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/dactyl/config.h b/keyboards/handwired/dactyl/config.h index 08931ecd3..8d42c0ae4 100644 --- a/keyboards/handwired/dactyl/config.h +++ b/keyboards/handwired/dactyl/config.h @@ -53,8 +53,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) /* fix space cadet rollover issue */ diff --git a/keyboards/handwired/dactyl/keymaps/default/keymap.c b/keyboards/handwired/dactyl/keymaps/default/keymap.c index c4a638c2a..db666f43f 100644 --- a/keyboards/handwired/dactyl/keymaps/default/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/default/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_RALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ 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) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c index 56762d1b6..7c44f78a6 100644 --- a/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c +++ b/keyboards/handwired/dactyl/keymaps/dvorak/keymap.c @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSLS, KC_D, KC_H, KC_T, KC_N, LT(MDIA, KC_S), GUI_T(KC_SLSH), KC_B, KC_M, KC_W, KC_V, CTL_T(KC_Z), KC_RSFT, - KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, TT(SYMB), KC_RALT, CTL_T(KC_ESC), KC_PGUP, KC_PGDN, KC_TAB, KC_ENT @@ -137,10 +137,6 @@ 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) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/handwired/dactyl_manuform/config.h b/keyboards/handwired/dactyl_manuform/config.h index 0e6f3f98e..5e7605d3a 100644 --- a/keyboards/handwired/dactyl_manuform/config.h +++ b/keyboards/handwired/dactyl_manuform/config.h @@ -46,11 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Enables This makes it easier for fast typists to use dual-function keys */ #define PERMISSIVE_HOLD @@ -59,7 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLED_NUM 12 // Number of LEDs - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/datahand/config.h b/keyboards/handwired/datahand/config.h index 1ba8479f0..75d8372bf 100644 --- a/keyboards/handwired/datahand/config.h +++ b/keyboards/handwired/datahand/config.h @@ -71,11 +71,6 @@ * useful if your keyboard/keypad is missing keys and you want magic key support. */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Command/Windows key option * diff --git a/keyboards/handwired/downbubble/config.h b/keyboards/handwired/downbubble/config.h index 0da13a4b1..77e34ceab 100644 --- a/keyboards/handwired/downbubble/config.h +++ b/keyboards/handwired/downbubble/config.h @@ -130,11 +130,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/fivethirteen/config.h b/keyboards/handwired/fivethirteen/config.h index 76596342b..685d421b1 100644 --- a/keyboards/handwired/fivethirteen/config.h +++ b/keyboards/handwired/fivethirteen/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/frenchdev/config.h b/keyboards/handwired/frenchdev/config.h index dd386402c..b01eec7aa 100644 --- a/keyboards/handwired/frenchdev/config.h +++ b/keyboards/handwired/frenchdev/config.h @@ -59,8 +59,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ + get_mods() == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ ) /* diff --git a/keyboards/handwired/gamenum/config.h b/keyboards/handwired/gamenum/config.h index 6af876ab7..180b1b01a 100644 --- a/keyboards/handwired/gamenum/config.h +++ b/keyboards/handwired/gamenum/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/gamenum/keymaps/default/keymap.c b/keyboards/handwired/gamenum/keymaps/default/keymap.c index a18ffc89b..7d667cd39 100644 --- a/keyboards/handwired/gamenum/keymaps/default/keymap.c +++ b/keyboards/handwired/gamenum/keymaps/default/keymap.c @@ -7,21 +7,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [DEF] = LAYOUT( - KC_FN0, KC_SLSH, KC_ASTR, KC_MINS, \ + TO(HDN), KC_SLSH, KC_ASTR, KC_MINS, \ KC_7, KC_8, KC_9, KC_PLUS, \ KC_4, KC_5, KC_6, \ KC_1, KC_2, KC_3, \ KC_0, KC_DOT, KC_ENT \ ), [HDN] = LAYOUT( - KC_FN1, KC_1, KC_2, KC_3, \ + TO(OSY), KC_1, KC_2, KC_3, \ KC_Q, KC_W, KC_E, KC_R, \ KC_A, KC_S, KC_D, \ KC_Z, KC_X, KC_C, \ KC_LSFT, KC_LALT, KC_SPC \ ), [OSY] = LAYOUT( - KC_A, KC_Q, KC_1, KC_FN2, \ + KC_A, KC_Q, KC_1, TO(DEF), \ KC_S, KC_W, KC_2, KC_LALT, \ KC_D, KC_E, KC_3, \ KC_F, KC_R, KC_4, \ @@ -29,36 +29,36 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ) }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_SET(HDN, ON_PRESS), - [1] = ACTION_LAYER_SET(OSY, ON_PRESS), - [2] = ACTION_LAYER_SET(DEF, ON_PRESS), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { return MACRO_NONE; }; -bool process_record_user (uint16_t keycode, keyrecord_t *record) { +bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch(keycode) { - case KC_FN0: - if (record->event.pressed) { - PORTC |= (1 << 6); // PC6 goes high - } - break; - case KC_FN1: - if (record->event.pressed) { - PORTC &= ~(1 << 6); // PC6 goes high - PORTD |= (1<<4); - } - break; - case KC_FN2: - if (record->event.pressed) { - PORTD &= ~(1 << 4); // PC6 goes high - } - break; + case TO(HDN): + if (record->event.pressed) { + PORTC |= (1 << 6); // PC6 goes high + } + + return true; + + case TO(OSY): + if (record->event.pressed) { + PORTC &= ~(1 << 6); // PC6 goes high + PORTD |= (1<<4); + } + + return true; + + case TO(DEF): + if (record->event.pressed) { + PORTD &= ~(1 << 4); // PC6 goes high + } + + return true; + + default: + return true; } - return true; } diff --git a/keyboards/handwired/hexon38/config.h b/keyboards/handwired/hexon38/config.h index 23eb51e01..5453eda54 100644 --- a/keyboards/handwired/hexon38/config.h +++ b/keyboards/handwired/hexon38/config.h @@ -33,12 +33,6 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/handwired/ibm122m/config.h b/keyboards/handwired/ibm122m/config.h index 1c8e0587d..3986f0ded 100644 --- a/keyboards/handwired/ibm122m/config.h +++ b/keyboards/handwired/ibm122m/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 15 @@ -104,11 +103,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define B6_AUDIO #define C6_AUDIO diff --git a/keyboards/handwired/jn68m/config.h b/keyboards/handwired/jn68m/config.h index 22ab1158d..9cb001723 100644 --- a/keyboards/handwired/jn68m/config.h +++ b/keyboards/handwired/jn68m/config.h @@ -47,8 +47,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/handwired/kbod/config.h b/keyboards/handwired/kbod/config.h index d3869f99e..8772ead3a 100644 --- a/keyboards/handwired/kbod/config.h +++ b/keyboards/handwired/kbod/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -99,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/kbod/keymaps/default/keymap.c b/keyboards/handwired/kbod/keymaps/default/keymap.c index 063a94b4d..49083820a 100644 --- a/keyboards/handwired/kbod/keymaps/default/keymap.c +++ b/keyboards/handwired/kbod/keymaps/default/keymap.c @@ -2,6 +2,11 @@ #define MODS_PRESSED(btn) (get_mods() & (MOD_BIT(KC_L##btn)|MOD_BIT(KC_R##btn))) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE, + ALT_F4 +}; + #define SET_WHETHER(mask, btn1, btn2) \ if (record->event.pressed) { \ if (mask) { \ @@ -24,7 +29,7 @@ if (record->event.pressed) { \ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( /* Base */ - F(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ + SFT_ESC, KC_1, KC_2, KC_3, ALT_F4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ 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_BSLS, \ 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_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -38,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT \ ), LAYOUT( /* Keypad layer */ - TO(0), KC_1, KC_2, KC_3, F(1), KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, \ + TO(0), KC_1, KC_2, KC_3, ALT_F4, KC_5, KC_6, KC_P7, KC_P8, KC_P9, KC_P0, KC_PMNS, KC_PPLS, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, KC_P0, KC_PDOT, KC_BTN1, KC_MS_U, KC_BTN2, \ @@ -53,24 +58,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(0), - [1] = ACTION_FUNCTION(1), -}; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: + SET_WHETHER(MODS_PRESSED(SHIFT), KC_ESC, KC_GRAVE); + + return false; + + case ALT_F4: + SET_WHETHER(MODS_PRESSED(ALT), KC_4, KC_F4); + return false; -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_mask; - static uint8_t alt_mask; - switch (id) { - case 0: - shift_esc_mask = MODS_PRESSED(SHIFT); - SET_WHETHER(shift_esc_mask, KC_ESC, KC_GRAVE); - break; - case 1: - alt_mask = MODS_PRESSED(ALT); - SET_WHETHER(alt_mask, KC_4, KC_F4); - break; + default: + return true; } } diff --git a/keyboards/handwired/maartenwut/config.h b/keyboards/handwired/maartenwut/config.h index 066f13856..b939fa1f6 100755 --- a/keyboards/handwired/maartenwut/config.h +++ b/keyboards/handwired/maartenwut/config.h @@ -34,11 +34,6 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define QMK_ESC_OUTPUT C6 // usually COL #define QMK_ESC_INPUT D0 // usually ROW diff --git a/keyboards/handwired/magicforce61/config.h b/keyboards/handwired/magicforce61/config.h index bb329541c..c6c689ab6 100644 --- a/keyboards/handwired/magicforce61/config.h +++ b/keyboards/handwired/magicforce61/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/magicforce68/config.h b/keyboards/handwired/magicforce68/config.h index 1e2b7d3e7..dc0a82c94 100644 --- a/keyboards/handwired/magicforce68/config.h +++ b/keyboards/handwired/magicforce68/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/minorca/config.h b/keyboards/handwired/minorca/config.h index 4cdafcbd2..c30d54db7 100644 --- a/keyboards/handwired/minorca/config.h +++ b/keyboards/handwired/minorca/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/ms_sculpt_mobile/config.h b/keyboards/handwired/ms_sculpt_mobile/config.h index c3bdf333e..6739b44fc 100644 --- a/keyboards/handwired/ms_sculpt_mobile/config.h +++ b/keyboards/handwired/ms_sculpt_mobile/config.h @@ -46,7 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { B7, D0, D1, D2, D3, D4, D5, D6, D7, E0,E1,C1, C0, C3, C2, C5, C4,C7} #define UNUSED_PINS { B6,B5,B4,B3,B2,B1,B0 } - #endif /* COL2ROW or ROW2COL */ @@ -58,7 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* * Magic Key Options * @@ -71,12 +69,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/nicekey/config.h b/keyboards/handwired/nicekey/config.h index 652711be8..4af56cc52 100644 --- a/keyboards/handwired/nicekey/config.h +++ b/keyboards/handwired/nicekey/config.h @@ -47,13 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h index 3c0af7bf7..fc6068628 100644 --- a/keyboards/handwired/not_so_minidox/config.h +++ b/keyboards/handwired/not_so_minidox/config.h @@ -61,11 +61,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 @@ -79,6 +74,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - #endif diff --git a/keyboards/handwired/numbrero/config.h b/keyboards/handwired/numbrero/config.h index cbcb1d826..bb178bd22 100644 --- a/keyboards/handwired/numbrero/config.h +++ b/keyboards/handwired/numbrero/config.h @@ -37,11 +37,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 5 diff --git a/keyboards/handwired/numpad20/config.h b/keyboards/handwired/numpad20/config.h index 847f2111f..c597494c4 100644 --- a/keyboards/handwired/numpad20/config.h +++ b/keyboards/handwired/numpad20/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/onekey/config.h b/keyboards/handwired/onekey/config.h index c0a6b5839..4a3042eea 100644 --- a/keyboards/handwired/onekey/config.h +++ b/keyboards/handwired/onekey/config.h @@ -47,13 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/ortho5x13/config.h b/keyboards/handwired/ortho5x13/config.h index f85159596..1e2128b65 100644 --- a/keyboards/handwired/ortho5x13/config.h +++ b/keyboards/handwired/ortho5x13/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/ortho60/hsv2rgb.c b/keyboards/handwired/ortho60/hsv2rgb.c deleted file mode 100644 index adb7af8fa..000000000 --- a/keyboards/handwired/ortho60/hsv2rgb.c +++ /dev/null @@ -1,80 +0,0 @@ -/* hsv2rgb.c - * Integer only conversion functions between HSV and RGB - */ - -#include "hsv2rgb.h" - -// TODO fix these buggy macros -#define max(x,y) ((x>y) ? x:y) -#define min(x,y) ((x>y) ? y:x) -#define min3(x,y,z) (min(min(x,y),z)) -#define max3(x,y,z) (max(max(x,y),z)) - - -rgb_color hsv2rgb(hsv_color hsv) -{ - // From : http://qscribble.blogspot.fr/2008/06/integer-conversion-from-hsl-to-rgb.html - int h = hsv.h; - int s = hsv.s; - int v = hsv.v; - rgb_color rgb = {0, 0, 0}; - - if (v == 0) - return rgb; - - // sextant = 0 .. 5 - int sextant = (h*6)/256; - // f = 0 .. 42 - int f = h - (sextant*256)/6; - - int p = (v * (256 - s))/256; - int q = (v * (256*43 - s*f))/(256*43); - int t = (v * (256*43 - s*(43-f)))/(256*43); - - // Corrige les erreurs dues aux arrondis - p = max(min(p, 255), 0); - q = max(min(q, 255), 0); - t = max(min(t, 255), 0); - - switch(sextant){ - case 0: rgb.r = v; rgb.g = t; rgb.b = p; break; - case 1: rgb.r = q; rgb.g = v; rgb.b = p; break; - case 2: rgb.r = p; rgb.g = v; rgb.b = t; break; - case 3: rgb.r = p; rgb.g = q; rgb.b = v; break; - case 4: rgb.r = t; rgb.g = p; rgb.b = v; break; - default:rgb.r = v; rgb.g = p; rgb.b = q; break; - } - return rgb; -} - - -hsv_color rgb2hsv(rgb_color rgb) -{ - // From : http://www.ruinelli.ch/rgb-to-hsv - hsv_color hsv = {0, 0, 0}; - int min, max, delta; - - min = min3(rgb.r, rgb.g, rgb.b); - max = max3(rgb.r, rgb.g, rgb.b); - - if(max==0) { - hsv.h = 0; - hsv.s = 0; - hsv.v = 0; - return hsv; - } - - hsv.v = max; - delta = max - min; - - hsv.s = (delta)*255 / max; - - if(rgb.r == max) - hsv.h = (rgb.g - rgb.b)*42/delta; // between yellow & magenta - else if(rgb.g == max) - hsv.h = 120 + (rgb.b - rgb.r)*42/delta; // between cyan & yellow - else - hsv.h = 240 + (rgb.r - rgb.g)*42/delta; // between magenta & cyan - - return hsv; -}
\ No newline at end of file diff --git a/keyboards/handwired/ortho60/hsv2rgb.h b/keyboards/handwired/ortho60/hsv2rgb.h deleted file mode 100644 index 99566c32c..000000000 --- a/keyboards/handwired/ortho60/hsv2rgb.h +++ /dev/null @@ -1,23 +0,0 @@ -/* hsv2rgb.h - * Convert Hue Saturation Value to Red Green Blue - * - * Programme de convertion d'une information HSV en RGB - */ -#ifndef HSV2RGB_H -#define HSV2RGB_H - -typedef struct { - unsigned char h; - unsigned char s; - unsigned char v; -} hsv_color; - -typedef struct { - unsigned char r; - unsigned char g; - unsigned char b; -} rgb_color; - -rgb_color hsv2rgb(hsv_color hsv); - -#endif
\ No newline at end of file diff --git a/keyboards/handwired/ortho60/led.c b/keyboards/handwired/ortho60/led.c deleted file mode 100644 index f15baed16..000000000 --- a/keyboards/handwired/ortho60/led.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "hal.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -void backlight_init_ports(void) { - printf("backlight_init_ports()\n"); - #ifdef BACKLIGHT_ENABLE - palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(GPIOA, 8); - #endif -} - -void backlight_set(uint8_t level) { - printf("backlight_set(%d)\n", level); - #ifdef BACKLIGHT_ENABLE - if (level == 0) { - // Turn backlight off - palSetPad(GPIOA, 8); - } else { - // Turn backlight on - palClearPad(GPIOA, 8); - } - #endif -} - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - palClearPad(GPIOC, 13); - } else { - palSetPad(GPIOC, 13); - } -} diff --git a/keyboards/handwired/ortho60/underglow.c b/keyboards/handwired/ortho60/underglow.c deleted file mode 100644 index 1383af189..000000000 --- a/keyboards/handwired/ortho60/underglow.c +++ /dev/null @@ -1,157 +0,0 @@ -#include "ch.h" -#include "hal.h" - -#include "hsv2rgb.h" -#include "underglow.h" - -#define BYTES_FOR_LED_BYTE 4 -#define NB_COLORS 3 -#define BYTES_FOR_LED BYTES_FOR_LED_BYTE*NB_COLORS -#define DATA_SIZE BYTES_FOR_LED*NB_LEDS -#define RESET_SIZE 200 -#define PREAMBLE_SIZE 4 - -// Define the spi your LEDs are plugged to here -#define LEDS_SPI SPID2 -// Define the number of LEDs you wish to control in your LED strip -#define NB_LEDS 8 - -#define LED_SPIRAL 1 - -static uint8_t txbuf[PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE]; -static uint8_t get_protocol_eq(uint8_t data, int pos); - -/* - * This lib is meant to be used asynchronously, thus the colors contained in - * the txbuf will be sent in loop, so that the colors are always the ones you - * put in the table (the user thus have less to worry about) - * - * Since the data are sent via DMA, and the call to spiSend is a blocking one, - * the processor ressources are not used to much, if you see your program being - * too slow, simply add a: - * chThdSleepMilliseconds(x); - * after the spiSend, where you increment x untill you are satisfied with your - * program speed, another trick may be to lower this thread priority : your call - */ -static THD_WORKING_AREA(LEDS_THREAD_WA, 128); -static THD_FUNCTION(ledsThread, arg) { - (void) arg; - while(1){ - spiSend(&LEDS_SPI, PREAMBLE_SIZE + DATA_SIZE + RESET_SIZE, txbuf); - } -} - -#if LED_SPIRAL -/* - * 'Led spiral' is a simple demo in which we put all the leds to the same - * color, where this color does all the hsv circle in loop. - * If you want to launch the thread that will chage the led colors to the - * appropriate value, simply set LED_SPIRAL to 1. - */ -static THD_WORKING_AREA(HSVTRANS_WA, 128); -static THD_FUNCTION(hsv_transThread, arg){ - (void) arg; - hsv_color color = {0, 255, 127}; - while(1){ - color.h += 1; - color.h %= 256; - set_leds_color_hsv(color); - chThdSleepMilliseconds(50); - } -} -#endif - -static const SPIConfig spicfg = { - NULL, - GPIOB, - 15, - SPI_CR1_BR_1|SPI_CR1_BR_0 // baudrate : fpclk / 8 => 1tick is 0.32us -}; - -/* - * Function used to initialize the driver. - * - * Starts by shutting off all the LEDs. - * Then gets access on the LED_SPI driver. - * May eventually launch an animation on the LEDs (e.g. a thread setting the - * txbuff values) - */ -void leds_init(void){ - for(int i = 0; i < RESET_SIZE; i++) - txbuf[DATA_SIZE+i] = 0x00; - for (int i=0; i<PREAMBLE_SIZE; i++) - txbuf[i] = 0x00; - spiAcquireBus(&LEDS_SPI); /* Acquire ownership of the bus. */ - spiStart(&LEDS_SPI, &spicfg); /* Setup transfer parameters. */ - spiSelect(&LEDS_SPI); /* Slave Select assertion. */ - chThdCreateStatic(LEDS_THREAD_WA, sizeof(LEDS_THREAD_WA),NORMALPRIO, ledsThread, NULL); -#if LED_SPIRAL - chThdCreateStatic(HSVTRANS_WA, sizeof(HSVTRANS_WA), - NORMALPRIO, hsv_transThread, NULL); -#endif -} - -/* - * As the trick here is to use the SPI to send a huge pattern of 0 and 1 to - * the ws2812b protocol, we use this helper function to translate bytes into - * 0s and 1s for the LED (with the appropriate timing). - */ -static uint8_t get_protocol_eq(uint8_t data, int pos){ - uint8_t eq = 0; - if (data & (1 << (2*(3-pos)))) - eq = 0b1110; - else - eq = 0b1000; - if (data & (2 << (2*(3-pos)))) - eq += 0b11100000; - else - eq += 0b10000000; - return eq; -} - -/* - * If you want to set a LED's color in the HSV color space, simply call this - * function with a hsv_color containing the desired color and the index of the - * led on the LED strip (starting from 0, the first one being the closest the - * first plugged to the board) - * - * Only set the color of the LEDs through the functions given by this API - * (unless you really know what you are doing) - */ -void set_led_color_hsv(hsv_color color, int pos){ - set_led_color_rgb(hsv2rgb(color), pos); -} - -/* - * If you want to set a LED's color in the RGB color space, simply call this - * function with a hsv_color containing the desired color and the index of the - * led on the LED strip (starting from 0, the first one being the closest the - * first plugged to the board) - * - * Only set the color of the LEDs through the functions given by this API - * (unless you really know what you are doing) - */ -void set_led_color_rgb(rgb_color color, int pos){ - for(int j = 0; j < 4; j++) - txbuf[PREAMBLE_SIZE + BYTES_FOR_LED*pos + j] = get_protocol_eq(color.g, j); - for(int j = 0; j < 4; j++) - txbuf[PREAMBLE_SIZE + BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE+j] = get_protocol_eq(color.r, j); - for(int j = 0; j < 4; j++) - txbuf[PREAMBLE_SIZE + BYTES_FOR_LED*pos + BYTES_FOR_LED_BYTE*2+j] = get_protocol_eq(color.b, j); -} - -/* - * Same as the two above, but sets all the LEDs in the LED strip (HSV) - */ -void set_leds_color_hsv(hsv_color color){ - for(int i = 0; i < NB_LEDS; i++) - set_led_color_hsv(color, i); -} - -/* - * Same as the two above, but sets all the LEDs in the LED strip (RGB) - */ -void set_leds_color_rgb(rgb_color color){ - for(int i = 0; i < NB_LEDS; i++) - set_led_color_rgb(color, i); -}
\ No newline at end of file diff --git a/keyboards/handwired/ortho60/underglow.h b/keyboards/handwired/ortho60/underglow.h deleted file mode 100644 index ff1195279..000000000 --- a/keyboards/handwired/ortho60/underglow.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "hsv2rgb.h" - -void set_leds_color_hsv(hsv_color color); -void set_leds_color_rgb(rgb_color color); -void set_led_color_hsv(hsv_color color, int pos); -void set_led_color_rgb(rgb_color color, int pos); - -void leds_init(void); diff --git a/keyboards/handwired/pilcrow/config.h b/keyboards/handwired/pilcrow/config.h index d63eeba36..8f562de3b 100644 --- a/keyboards/handwired/pilcrow/config.h +++ b/keyboards/handwired/pilcrow/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/practice60/hsv2rgb.c b/keyboards/handwired/practice60/hsv2rgb.c deleted file mode 100644 index adb7af8fa..000000000 --- a/keyboards/handwired/practice60/hsv2rgb.c +++ /dev/null @@ -1,80 +0,0 @@ -/* hsv2rgb.c - * Integer only conversion functions between HSV and RGB - */ - -#include "hsv2rgb.h" - -// TODO fix these buggy macros -#define max(x,y) ((x>y) ? x:y) -#define min(x,y) ((x>y) ? y:x) -#define min3(x,y,z) (min(min(x,y),z)) -#define max3(x,y,z) (max(max(x,y),z)) - - -rgb_color hsv2rgb(hsv_color hsv) -{ - // From : http://qscribble.blogspot.fr/2008/06/integer-conversion-from-hsl-to-rgb.html - int h = hsv.h; - int s = hsv.s; - int v = hsv.v; - rgb_color rgb = {0, 0, 0}; - - if (v == 0) - return rgb; - - // sextant = 0 .. 5 - int sextant = (h*6)/256; - // f = 0 .. 42 - int f = h - (sextant*256)/6; - - int p = (v * (256 - s))/256; - int q = (v * (256*43 - s*f))/(256*43); - int t = (v * (256*43 - s*(43-f)))/(256*43); - - // Corrige les erreurs dues aux arrondis - p = max(min(p, 255), 0); - q = max(min(q, 255), 0); - t = max(min(t, 255), 0); - - switch(sextant){ - case 0: rgb.r = v; rgb.g = t; rgb.b = p; break; - case 1: rgb.r = q; rgb.g = v; rgb.b = p; break; - case 2: rgb.r = p; rgb.g = v; rgb.b = t; break; - case 3: rgb.r = p; rgb.g = q; rgb.b = v; break; - case 4: rgb.r = t; rgb.g = p; rgb.b = v; break; - default:rgb.r = v; rgb.g = p; rgb.b = q; break; - } - return rgb; -} - - -hsv_color rgb2hsv(rgb_color rgb) -{ - // From : http://www.ruinelli.ch/rgb-to-hsv - hsv_color hsv = {0, 0, 0}; - int min, max, delta; - - min = min3(rgb.r, rgb.g, rgb.b); - max = max3(rgb.r, rgb.g, rgb.b); - - if(max==0) { - hsv.h = 0; - hsv.s = 0; - hsv.v = 0; - return hsv; - } - - hsv.v = max; - delta = max - min; - - hsv.s = (delta)*255 / max; - - if(rgb.r == max) - hsv.h = (rgb.g - rgb.b)*42/delta; // between yellow & magenta - else if(rgb.g == max) - hsv.h = 120 + (rgb.b - rgb.r)*42/delta; // between cyan & yellow - else - hsv.h = 240 + (rgb.r - rgb.g)*42/delta; // between magenta & cyan - - return hsv; -}
\ No newline at end of file diff --git a/keyboards/handwired/practice60/hsv2rgb.h b/keyboards/handwired/practice60/hsv2rgb.h deleted file mode 100644 index 99566c32c..000000000 --- a/keyboards/handwired/practice60/hsv2rgb.h +++ /dev/null @@ -1,23 +0,0 @@ -/* hsv2rgb.h - * Convert Hue Saturation Value to Red Green Blue - * - * Programme de convertion d'une information HSV en RGB - */ -#ifndef HSV2RGB_H -#define HSV2RGB_H - -typedef struct { - unsigned char h; - unsigned char s; - unsigned char v; -} hsv_color; - -typedef struct { - unsigned char r; - unsigned char g; - unsigned char b; -} rgb_color; - -rgb_color hsv2rgb(hsv_color hsv); - -#endif
\ No newline at end of file diff --git a/keyboards/handwired/practice60/led.c b/keyboards/handwired/practice60/led.c deleted file mode 100644 index f15baed16..000000000 --- a/keyboards/handwired/practice60/led.c +++ /dev/null @@ -1,51 +0,0 @@ -/* -Copyright 2012 Jun Wako <wakojun@gmail.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#include "hal.h" -#include "backlight.h" -#include "led.h" -#include "printf.h" - -void backlight_init_ports(void) { - printf("backlight_init_ports()\n"); - #ifdef BACKLIGHT_ENABLE - palSetPadMode(GPIOA, 8, PAL_MODE_OUTPUT_PUSHPULL); - palSetPad(GPIOA, 8); - #endif -} - -void backlight_set(uint8_t level) { - printf("backlight_set(%d)\n", level); - #ifdef BACKLIGHT_ENABLE - if (level == 0) { - // Turn backlight off - palSetPad(GPIOA, 8); - } else { - // Turn backlight on - palClearPad(GPIOA, 8); - } - #endif -} - -void led_set(uint8_t usb_led) -{ - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - palClearPad(GPIOC, 13); - } else { - palSetPad(GPIOC, 13); - } -} diff --git a/keyboards/handwired/practice60/practice60.c b/keyboards/handwired/practice60/practice60.c deleted file mode 100644 index 5d0fffbd0..000000000 --- a/keyboards/handwired/practice60/practice60.c +++ /dev/null @@ -1,32 +0,0 @@ - -#include "practice60.h" - -#include "ch.h" -#include "hal.h" - -#include "underglow.h" -#include "print.h" -#include "debug.h" -#include "util.h" - -/* generic STM32F103C8T6 board */ -#ifdef BOARD_GENERIC_STM32_F103 -#define LED_ON() do { palClearPad(GPIOC, 13) ;} while (0) -#define LED_OFF() do { palSetPad(GPIOC, 13); } while (0) -#define LED_TGL() do { palTogglePad(GPIOC, 13); } while (0) -#endif - -void matrix_init_kb(void){ - /* MOSI pin*/ - palSetPadMode(GPIOB, 15, PAL_MODE_STM32_ALTERNATE_PUSHPULL); - - LED_ON(); - palSetPad(GPIOA, 8); - wait_ms(500); - palClearPad(GPIOA, 8); - LED_OFF(); - - leds_init(); - - -} diff --git a/keyboards/handwired/practice60/readme.md b/keyboards/handwired/practice60/readme.md deleted file mode 100644 index b23d7de69..000000000 --- a/keyboards/handwired/practice60/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Practice 60 - -Blue Pill STM32F103C8T6 based 60% board
\ No newline at end of file diff --git a/keyboards/handwired/practice60/underglow.h b/keyboards/handwired/practice60/underglow.h deleted file mode 100644 index ff1195279..000000000 --- a/keyboards/handwired/practice60/underglow.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "hsv2rgb.h" - -void set_leds_color_hsv(hsv_color color); -void set_leds_color_rgb(rgb_color color); -void set_led_color_hsv(hsv_color color, int pos); -void set_led_color_rgb(rgb_color color, int pos); - -void leds_init(void); diff --git a/keyboards/handwired/prime_exl/config.h b/keyboards/handwired/prime_exl/config.h index e34fbb8cc..c5395dab4 100644 --- a/keyboards/handwired/prime_exl/config.h +++ b/keyboards/handwired/prime_exl/config.h @@ -49,8 +49,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/handwired/promethium/config.h b/keyboards/handwired/promethium/config.h index dca0aec2e..b5a0a7f4b 100644 --- a/keyboards/handwired/promethium/config.h +++ b/keyboards/handwired/promethium/config.h @@ -95,7 +95,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT) | MOD_BIT(KC_LCTRL) | MOD_BIT(KC_RCTRL)) \ ) /* control how magic key switches layers */ diff --git a/keyboards/handwired/promethium/matrix.c b/keyboards/handwired/promethium/matrix.c index 00f2b8e9d..0b4456e28 100644 --- a/keyboards/handwired/promethium/matrix.c +++ b/keyboards/handwired/promethium/matrix.c @@ -167,7 +167,7 @@ inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/handwired/pteron/config.h b/keyboards/handwired/pteron/config.h index 9650839e3..d0b074c68 100644 --- a/keyboards/handwired/pteron/config.h +++ b/keyboards/handwired/pteron/config.h @@ -25,10 +25,5 @@ /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 // 5 is default -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* prevent stuck modifiers */ #define PREVENT_STUCK_MODIFIERS diff --git a/keyboards/handwired/qc60/config.h b/keyboards/handwired/qc60/config.h index 00d095ddf..aad1d64a0 100644 --- a/keyboards/handwired/qc60/config.h +++ b/keyboards/handwired/qc60/config.h @@ -20,8 +20,3 @@ /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/handwired/reddot/config.h b/keyboards/handwired/reddot/config.h index 15f114297..82fe01863 100755 --- a/keyboards/handwired/reddot/config.h +++ b/keyboards/handwired/reddot/config.h @@ -46,7 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COL_PINS { B7, D0, D1, D2, D3, C6, C7, D5, D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } #define UNUSED_PINS - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -54,14 +53,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ //#define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ @@ -100,11 +97,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h index f2194e550..34def3815 100644 --- a/keyboards/handwired/retro_refit/config.h +++ b/keyboards/handwired/retro_refit/config.h @@ -54,7 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - /* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ #define FORCE_NKRO @@ -64,11 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * if your keyboard/keypad is missing keys and you want magic key support. */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/space_oddity/config.h b/keyboards/handwired/space_oddity/config.h index 46d854099..832216423 100644 --- a/keyboards/handwired/space_oddity/config.h +++ b/keyboards/handwired/space_oddity/config.h @@ -1,5 +1,4 @@ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -44,11 +43,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 @@ -56,5 +50,3 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #endif - -#endif diff --git a/keyboards/handwired/space_oddity/info.json b/keyboards/handwired/space_oddity/info.json new file mode 100644 index 000000000..37e24b33c --- /dev/null +++ b/keyboards/handwired/space_oddity/info.json @@ -0,0 +1,78 @@ +{ + "keyboard_name": "Space Oddity", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Macro 0", "x":0, "y":0, "w":2}, + {"label":"Macro 1", "x":2, "y":0, "w":2}, + {"label":"Macro 2", "x":4, "y":0, "w":2}, + {"label":"Macro 3", "x":6, "y":0, "w":2}, + {"label":"Macro 4", "x":8, "y":0, "w":2}, + {"label":"Dynamic Macro 1", "x":10, "y":0, "w":2}, + {"label":"Dynamic Macro 2", "x":12, "y":0, "w":2}, + {"label":"~", "x":0, "y":1, "w":2}, + {"label":"!", "x":2, "y":1}, + {"label":"@", "x":3, "y":1}, + {"label":"#", "x":4, "y":1}, + {"label":"$", "x":5, "y":1}, + {"label":"%", "x":6, "y":1}, + {"label":"^", "x":7, "y":1}, + {"label":"&", "x":8, "y":1}, + {"label":"*", "x":9, "y":1}, + {"label":"(", "x":10, "y":1}, + {"label":")", "x":11, "y":1}, + {"label":"Backspace", "x":12, "y":1, "w":2}, + {"label":"Tab", "x":0, "y":2, "w":2}, + {"label":"Q", "x":2, "y":2}, + {"label":"W", "x":3, "y":2}, + {"label":"E", "x":4, "y":2}, + {"label":"R", "x":5, "y":2}, + {"label":"T", "x":6, "y":2}, + {"label":"Y", "x":7, "y":2}, + {"label":"U", "x":8, "y":2}, + {"label":"I", "x":9, "y":2}, + {"label":"O", "x":10, "y":2}, + {"label":"P", "x":11, "y":2}, + {"label":"_", "x":12, "y":2, "w":2}, + {"label":"Esc (Ctrl)", "x":0, "y":3, "w":2}, + {"label":"A", "x":2, "y":3}, + {"label":"S", "x":3, "y":3}, + {"label":"D", "x":4, "y":3}, + {"label":"F", "x":5, "y":3}, + {"label":"G", "x":6, "y":3}, + {"label":"H", "x":7, "y":3}, + {"label":"J", "x":8, "y":3}, + {"label":"K", "x":9, "y":3}, + {"label":"L", "x":10, "y":3}, + {"label":":", "x":11, "y":3}, + {"label":"\"", "x":12, "y":3, "w":2}, + {"label":"Caps Lock (Shift)", "x":0.25, "y":4, "w":1.75}, + {"label":"Z", "x":2, "y":4}, + {"label":"X", "x":3, "y":4}, + {"label":"C", "x":4, "y":4}, + {"label":"V", "x":5, "y":4}, + {"label":"B", "x":6, "y":4}, + {"label":"N", "x":7, "y":4}, + {"label":"M", "x":8, "y":4}, + {"label":"<", "x":9, "y":4}, + {"label":">", "x":10, "y":4}, + {"label":"?", "x":11, "y":4}, + {"label":"Enter (Shift)", "x":12, "y":4, "w":1.75}, + {"label":"MO(2)", "x":1, "y":5}, + {"label":"MO(1)", "x":2, "y":5}, + {"label":"GUI", "x":3, "y":5}, + {"label":"Alt", "x":4, "y":5}, + {"label":"Ctrl", "x":5, "y":5, "w":2}, + {"label":"Space", "x":7, "y":5, "w":2}, + {"label":"Left (Alt)", "x":9, "y":5}, + {"label":"Right (Hyper)", "x":10, "y":5}, + {"label":"Up (MO(1))", "x":11, "y":5}, + {"label":"Down (MO(2))", "x":12, "y":5} + ] + } + } +} diff --git a/keyboards/handwired/space_oddity/keymaps/default/keymap.c b/keyboards/handwired/space_oddity/keymaps/default/keymap.c index 4230cdf8d..e7836353e 100644 --- a/keyboards/handwired/space_oddity/keymaps/default/keymap.c +++ b/keyboards/handwired/space_oddity/keymaps/default/keymap.c @@ -15,12 +15,16 @@ along with this program. If not, see <https://www.gnu.org/licenses/>. */ -#include "space_oddity.h" +#include QMK_KEYBOARD_H -// Planck keycodes needed for dynamic macros. -enum planck_keycodes { +// Custom keycodes needed for dynamic macros. +enum custom_keycodes { QWERTY = SAFE_RANGE, + PAIR_PR, + PAIR_BR, + PAIR_CB, + LAMBDA, DYNAMIC_MACRO_RANGE, }; @@ -34,15 +38,6 @@ enum { #include "dynamic_macro.h" -#define MOUSE_LAYER 2 - -// Toggle MOUSE_LAYER. Additional layers can be added for additional layouts or other special functions. -const uint16_t PROGMEM fn_actions[] = { - - [2] = ACTION_LAYER_TOGGLE(MOUSE_LAYER), - -}; - // Tap dance actions - double tap for Caps Lock. qk_tap_dance_action_t tap_dance_actions[] = { @@ -52,141 +47,105 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. - - ___________________________________________________________________________________ - | | | | | | Dynamic | Dynamic | - | Macro 0 | Macro 1 | Macro 2 | Macro 3 | Macro 4 | Macro 1 | Macro 2 | - |___________|___________|___________|___________|___________|___________|___________| - | | | | | | | | | | | | | - | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | TAB | Q | W | E | R | T | Y | U | I | O | P | - | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| - |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| - | | | | | | | ALT | HYP | LT 1| LT 2| - | M2 | M1 | GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| - |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| - */ - - KEYMAP( - M(0), M(1), M(2), M(3), M(4), DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, - 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_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, - CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), - MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTRL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN)), - - /* Function layer. - Blank keys correspond to the KC_TRNS keycode. - - ___________________________________________________________________________________ - | | | | | | DYN REC | DYN REC | - | Macro 7 | | | | | 1 | 2 | - |___________|___________|___________|___________|___________|___________|___________| - | DYN REC | | | | | | | | | | | | - | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | | - |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| - | | | | | | | | | | | - | | | | | | | | | | | - |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| - + /* Here is an ASCII version of the base layout. Note that Dynamic Macros 1 and 2 are considered Macro 5 and Macro 6. + * + * ___________________________________________________________________________________ + * | | | | | | Dynamic | Dynamic | + * | () | [] | {} | NO OP | NO OP | Macro 1 | Macro 2 | + * |___________|___________|___________|___________|___________|___________|___________| + * | | | | | | | | | | | | | + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BKSP | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | TAB | Q | W | E | R | T | Y | U | I | O | P | - | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * |ESC (CTL_T)| A | S | D | F | G | H | J | K | L | ; | ' | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | SHFT | Z | X | C | V | B | N | M | , | . | / |SHFT(ENT)| + * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + * | | | | | | | ALT | HYP | LT 1| LT 2| + * |MO(2)|MO(1)| GUI | ALT | CTRL | SPC |(LFT)|(RGT)| (UP)|(DWN)| + * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| */ - - KEYMAP( - M(7), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, DYN_REC_START1, DYN_REC_START2, - DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, - KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, - KC_TRNS, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - /* Mouse layer. - - ___________________________________________________________________________________ - | | | | | | | | - | | | | | | | | - |___________|___________|___________|___________|___________|___________|___________| - | | | | MS | | | | | | | | | - | | | | UP | | | | | | | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | MS | MS | MS | | | | | | | | - | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | | | | | | | | | | | | | - |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| - | | | | | | | | | | | | | - | |RESET| | | | | | | | | | | - |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| - | | | | | | | | | | | - | | | | | | | | | | F(2)| - |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + [0] = LAYOUT( \ + PAIR_PR, PAIR_BR, PAIR_CB, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, \ + 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_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, \ + CTL_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + TD(SFT_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_ENT), \ + MO(2), MO(1), KC_LGUI, KC_RALT, KC_LCTL, KC_SPC, ALT_T(KC_LEFT), ALL_T(KC_RGHT), LT(1, KC_UP), LT(2, KC_DOWN) \ + ), + + /* Function layer. + * Blank keys correspond to the KC_TRNS keycode. + * + * ___________________________________________________________________________________ + * | | | | | | DYN REC | DYN REC | + * | LAMBDA | | | | | 1 | 2 | + * |___________|___________|___________|___________|___________|___________|___________| + * | DYN REC | | | | | | | | | | | | + * | STOP | F1 | F2 | F3 | F4 | F5 | [ | 7 | 8 | 9 | * | DEL | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | | F6 | F7 | F8 | F9 | F10 | ] | 4 | 5 | 6 | + | = | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | \ | F11 | F12 | F13 | F14 | F15 | { | 1 | 2 | 3 | - | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | | F16 | F17 | F18 | F19 | F20 | } | 0 | , | . | / | | + * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + * | | | | | | | | | | | + * | | | | | | | | | | | + * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + * */ - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, KC_TRNS, KC_TRNS, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN2, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, F(2)) -}; -// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of -// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way, -// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for -// LaTeX editing. -// -// Customize to your heart's content! -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - - switch (id) { - case 0: - if (record->event.pressed) { - SEND_STRING("()"SS_TAP(X_LEFT)); - } - break; - - case 1: - if (record->event.pressed) { - SEND_STRING("[]"SS_TAP(X_LEFT)); - } - break; - - case 2: - if (record->event.pressed) { - SEND_STRING("{}"SS_TAP(X_LEFT)); - } - break; - - // Probably something only Lisp users will appreciate... - case 7: - if (record->event.pressed) { - SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); - } - break; - } + [1] = LAYOUT( \ + LAMBDA, _______, _______, _______, _______, DYN_REC_START1, DYN_REC_START2, \ + DYN_REC_STOP, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LBRC, KC_P7, KC_P8, KC_P9, KC_ASTR, KC_DEL, \ + _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_EQL, \ + KC_BSLS, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LCBR, KC_P1, KC_P2, KC_P3, KC_MINS, KC_PIPE, \ + _______, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, KC_RCBR, KC_P0, KC_COMM, KC_DOT, KC_SLSH, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Mouse layer. + * + * ___________________________________________________________________________________ + * | | | | | | | | + * | | | | | | | | + * |___________|___________|___________|___________|___________|___________|___________| + * | | | | MS | | | | | | | | | + * | | | | UP | | | | | | | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | MS | MS | MS | | | | | | | | + * | | | LFT | DWN | RGT | | | MS1 | MS3 | MS2 | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | | | | | | | | | | | | | + * |___________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|___________| + * | | | | | | | | | | | | | + * | |RESET| | | | | | | | | | | + * |_________|_____|_____|_____|_____|_____|_____|_____|_____|_____|_____|_________| + * | | | | | | | | | | | + * | | | | | | | | | | F(2)| + * |_____|_____|_____|_____|___________|___________|_____|_____|_____|_____| + * + */ - return MACRO_NONE; - -} + [2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, KC_MS_U, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, TG(2) \ + ) +}; void matrix_init_user(void) { } @@ -194,44 +153,79 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } +// Simple macro ideas follow. Each of them is designed to give you a quick way to create pairs of +// delimiters and then position the cursor between them, much like Emacs' ParEdit does. This way, +// you can have some convenient coding "helpers" even when not using Emacs. It is also nice for +// LaTeX editing. +// +// Customize to your heart's content! bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (!process_record_dynamic_macro(keycode, record)) { return false; } + + switch (keycode) { + + case PAIR_PR: + if (record->event.pressed) { + SEND_STRING("()"SS_TAP(X_LEFT)); + } + return false; + + case PAIR_BR: + if (record->event.pressed) { + SEND_STRING("[]"SS_TAP(X_LEFT)); + } + return false; + + case PAIR_CB: + if (record->event.pressed) { + SEND_STRING("{}"SS_TAP(X_LEFT)); + } + return false; + + // Probably something only Lisp users will appreciate... + case LAMBDA: + if (record->event.pressed) { + SEND_STRING("(lambda ())"SS_TAP(X_LEFT)SS_TAP(X_LEFT)); + } + return false; + } + return true; } void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } } diff --git a/keyboards/handwired/space_oddity/readme.md b/keyboards/handwired/space_oddity/readme.md index 07ec957fa..2997833f0 100644 --- a/keyboards/handwired/space_oddity/readme.md +++ b/keyboards/handwired/space_oddity/readme.md @@ -1,5 +1,6 @@ -Space Oddity Keyboard -===================== +# Space Oddity Keyboard + +![Space Oddity](https://i.imgur.com/dE9Y4XK.jpg) This firmware is for an Emacs-focused handwired custom keyboard using an Arduino Pro Micro. @@ -7,7 +8,10 @@ As originally designed, the top row consists of 2u keys which are used for user- Some simple example macros are included. To add your own, just add the number of the macro you want in the appropriate section. -A picture of the finished product can be found here: https://imgur.com/dE9Y4XK +This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome! + +Keyboard Maintainer: [James Taylor](https://github.com/broken-username) +Hardware Supported: Arduino Pro Micro ## Pinout @@ -15,11 +19,16 @@ The following pins are used: - Columns 1-12: B2, B6, B5, B4, E6, D7, C6, D4, D0, D1, D2, D3 - Rows 1-6: F4, F5, F6, F7, B1, B3 -## Compiling and loading the firmware +## Flashing + +Make example for this keyboard (after setting up your build environment): -To build the firmware, run `make handwired/space_oddity` from the toplevel directory. + make handwired/space_oddity:default -On GNU/Linux, you can flash the default layout onto the microcontroller by using `avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex`. Note that the device name under `/dev` may be different. +On GNU/Linux, you can flash the default layout onto the microcontroller by using + avrdude -p atmega32u4 -P /dev/ttyACM0 -c avr109 -U flash:w:handwired_space_oddity_default.hex + +Note that the device name under `/dev` may be different. -This design was conceived by James Taylor. Any requests for further information, suggestions, and/or tips for building your own are welcome!
\ No newline at end of file +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/handwired/space_oddity/rules.mk b/keyboards/handwired/space_oddity/rules.mk index 4dc93fad9..b597ef2b0 100644 --- a/keyboards/handwired/space_oddity/rules.mk +++ b/keyboards/handwired/space_oddity/rules.mk @@ -35,7 +35,7 @@ F_USB = $(F_CPU) # Bootloader # This definition is optional, and if your keyboard supports multiple bootloaders of -# different sizes, comment this out, and the correct address will be loaded +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. BOOTLOADER = caterina @@ -45,14 +45,14 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # Build Options # comment out to disable the options. # -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 ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/space_oddity/space_oddity.h b/keyboards/handwired/space_oddity/space_oddity.h index e9270d044..d35bfea58 100644 --- a/keyboards/handwired/space_oddity/space_oddity.h +++ b/keyboards/handwired/space_oddity/space_oddity.h @@ -1,9 +1,8 @@ -#ifndef KB_H -#define KB_H +#pragma once #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K000, K002, K004, K006, K008, K010, K011, \ K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, \ K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, \ @@ -18,5 +17,3 @@ { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411 }, \ { K500, K501, K502, K503, KC_NO, K505, KC_NO, K507, K508, K509, K510, K511 } \ } - -#endif
\ No newline at end of file diff --git a/keyboards/handwired/terminus_mini/config.h b/keyboards/handwired/terminus_mini/config.h index ef9a26a19..de146b225 100644 --- a/keyboards/handwired/terminus_mini/config.h +++ b/keyboards/handwired/terminus_mini/config.h @@ -105,11 +105,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c index 1c4af5f46..556b96c88 100644 --- a/keyboards/handwired/terminus_mini/keymaps/default/keymap.c +++ b/keyboards/handwired/terminus_mini/keymaps/default/keymap.c @@ -53,17 +53,10 @@ enum custom_macros { R_POINT }; - // Enable these functions using FUNC(n) macro. - const uint16_t PROGMEM fn_actions[] = { //ACTION_LAYER_TAP_TOGGLE requires that number of taps be defined in *config.h* - default set to 5 - [0] = ACTION_LAYER_TAP_KEY(_LOWER, KC_SPC), //Hold for momentary Lower layer, Tap for Space, - [1] = ACTION_LAYER_TAP_KEY(_RAISE, KC_ENT), //Hold for momentary Mouse layer, Tap for Enter, - [2] = ACTION_LAYER_MOMENTARY(_FUNCTION), //Hold for momentary Function - [3] = ACTION_LAYER_MOMENTARY(_MOUSE) //Hold for momentary MOUSE - }; -#define SPC_LW FUNC(0) -#define ENT_RS FUNC(1) -#define FNC FUNC(2) -#define MSE FUNC(3) +#define SPC_LW LT(_LOWER, KC_SPC) +#define ENT_RS LT(_RAISE, KC_ENT) +#define FNC MO(_FUNCTION) +#define MSE MO(_MOUSE) #define PIPE M(R_PIPE) #define POINT M(R_POINT) diff --git a/keyboards/handwired/trackpoint/config.h b/keyboards/handwired/trackpoint/config.h index 7558c03bf..22ec75f76 100644 --- a/keyboards/handwired/trackpoint/config.h +++ b/keyboards/handwired/trackpoint/config.h @@ -67,9 +67,4 @@ #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE - /* key combination for command */ - #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - #endif diff --git a/keyboards/handwired/tradestation/config.h b/keyboards/handwired/tradestation/config.h index 346577a92..22650d2f1 100644 --- a/keyboards/handwired/tradestation/config.h +++ b/keyboards/handwired/tradestation/config.h @@ -37,12 +37,6 @@ /* 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)) \ -) - - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 5 diff --git a/keyboards/handwired/traveller/config.h b/keyboards/handwired/traveller/config.h index 2b82da447..ccf214736 100644 --- a/keyboards/handwired/traveller/config.h +++ b/keyboards/handwired/traveller/config.h @@ -55,7 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -63,7 +62,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -111,11 +109,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/traveller/keymaps/default/keymap.c b/keyboards/handwired/traveller/keymaps/default/keymap.c index f7f08268f..1b1038fd7 100644 --- a/keyboards/handwired/traveller/keymaps/default/keymap.c +++ b/keyboards/handwired/traveller/keymaps/default/keymap.c @@ -38,9 +38,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * */ [_QW] = KEYMAP( - F(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL, - KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS, - CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT, + TG(_NAV), KC_GRV, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_MINS, KC_EQL, + KC_TAB, KC_Q, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_P, KC_BSLS, + CTL_T(KC_ESC), KC_A, KC_X, KC_C, KC_V, KC_B, KC_RCTL, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, KC_QUOT, KC_LSFT, KC_Z, KC_DEL, KC_LGUI, MO(_LW), KC_BSPC, KC_ENTER, KC_SPC, MO(_HI), KC_RGUI, KC_RALT, KC_SLSH, KC_RSFT ), @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_LW] = KEYMAP( - F(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) , + TG(_FKEYS), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, LCTL(LALT(KC_DEL)) , KC_TRNS, KC_1, KC_RBRC, KC_LPRN, KC_RPRN, KC_NO, KC_ASTR, KC_LPRN, KC_RPRN, KC_LBRC, KC_NO, KC_NO, KC_CAPS, KC_LBRC, KC_NO, KC_LCBR, KC_RCBR, KC_TILD, KC_TRNS, KC_HASH, KC_LCBR, KC_RCBR, KC_NO, KC_RBRC, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS @@ -81,11 +81,11 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_HI] = KEYMAP( - F(_FKEYS), KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, + TG(_FKEYS),KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PLUS, KC_TRNS, KC_EXLM, KC_AMPR, KC_PIPE, KC_DLR, KC_PERC, KC_VOLU, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_CAPS, KC_CIRC, KC_COLN, KC_DOT, KC_ASTR, KC_MINS, KC_TRNS, KC_VOLD, KC_PPLS, KC_PGUP, KC_HOME, KC_UP, KC_END, - KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, F(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT -), + KC_TRNS, KC_SLSH, KC_TRNS, KC_TRNS, TT(_LW), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT +), /* NAV - mouse & navigation //gui left and right are line home/end, or fore & back in browser @@ -103,7 +103,7 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_NAV] = KEYMAP( - F(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, + TG(_NAV), KC_NO, KC_NO, KC_UP, KC_NO, RGUI(KC_RIGHT), KC_WH_U, M(MUL), KC_MS_U, M(MUR), KC_NO, KC_ACL2, KC_TRNS, RGUI(KC_LEFT), KC_LEFT, KC_DOWN, KC_RIGHT, LCTL(KC_E), KC_BTN3, KC_MS_L, KC_MS_U, KC_MS_R, KC_NO, KC_ACL1, KC_TRNS, LCTL(KC_A), LGUI(KC_X),RGUI(KC_C), RGUI(KC_V),KC_NO, KC_ENTER, KC_WH_D, M(MDL), KC_MS_D, M(MDR), KC_UP, KC_ACL0, KC_TRNS, RGUI(KC_Z), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_BTN1, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT @@ -123,10 +123,10 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key */ [_FKEYS] = KEYMAP( - F(_FKEYS), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , - F(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, - KC_TRNS, F(RGBLED_TOGGLE), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + TG(_FKEYS),KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_RCTL, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_LALT , + TO(_QW), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, + KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), @@ -145,26 +145,14 @@ Right hand nav keys work pretty well chorded with the Right hand Hi Key [_TRNS] = { {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS}, {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} } }; - -const uint16_t PROGMEM fn_actions[] = { - [_QW] = ACTION_LAYER_ON(_QW,ON_RELEASE), // return to QWERTY layer - [_LW] = ACTION_LAYER_TAP_TOGGLE(_LW), // Turn on LW when holding, or tap 3 times to switch - [_NAV] = ACTION_LAYER_TOGGLE(_NAV), - [_FKEYS] = ACTION_LAYER_TOGGLE(_FKEYS), - - // Functions - [RGBLED_TOGGLE] = ACTION_FUNCTION(RGBLED_TOGGLE), - -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -230,21 +218,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; - - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - } -} - - - void LayerLEDSet(uint8_t layr) { switch (layr) { diff --git a/keyboards/handwired/woodpad/config.h b/keyboards/handwired/woodpad/config.h index b2eb7020f..f4d005307 100644 --- a/keyboards/handwired/woodpad/config.h +++ b/keyboards/handwired/woodpad/config.h @@ -99,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/handwired/xealous/rev1/config.h b/keyboards/handwired/xealous/rev1/config.h index 6fc769b5f..f58c8f90b 100644 --- a/keyboards/handwired/xealous/rev1/config.h +++ b/keyboards/handwired/xealous/rev1/config.h @@ -64,11 +64,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/handwired/xealousbrown/README.md b/keyboards/handwired/xealousbrown/README.md new file mode 100644 index 000000000..e6092ebb0 --- /dev/null +++ b/keyboards/handwired/xealousbrown/README.md @@ -0,0 +1,11 @@ +# XealouS Brown + +My first handwired keyboard. Originally used TMK, now ported in full glory to QMK. + +Build log at: +https://sites.google.com/site/xaelous/keyboards/handwired-keyboard + +Make example for this keyboard (after setting up your build environment): + + make handwired/xealous-brown:default + diff --git a/keyboards/handwired/xealousbrown/config.h b/keyboards/handwired/xealousbrown/config.h new file mode 100644 index 000000000..17aa6c94e --- /dev/null +++ b/keyboards/handwired/xealousbrown/config.h @@ -0,0 +1,48 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x606A +#define DEVICE_VER 0x0002 +#define MANUFACTURER XeaL +#define PRODUCT XeaLous Brown Keyboard +#define DESCRIPTION XeaLous Brown Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 13 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { D3, D2, D1, D0, D4 } +#define MATRIX_COL_PINS { C6, D7, E6, B4, B5, B6, B2, B3, B1, F7, F6, F5, F4 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW diff --git a/keyboards/handwired/xealousbrown/info.json b/keyboards/handwired/xealousbrown/info.json new file mode 100644 index 000000000..c39e76217 --- /dev/null +++ b/keyboards/handwired/xealousbrown/info.json @@ -0,0 +1,74 @@ +{ + "keyboard_name": "Xealous-Brown", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"`", "x":0, "y":0}, + {"label":"1", "x":1, "y":0}, + {"label":"2", "x":2, "y":0}, + {"label":"3", "x":3, "y":0}, + {"label":"4", "x":4, "y":0}, + {"label":"5", "x":5, "y":0}, + {"label":"6", "x":6, "y":0}, + {"label":"7", "x":7, "y":0}, + {"label":"8", "x":8, "y":0}, + {"label":"9", "x":9, "y":0}, + {"label":"0", "x":10, "y":0}, + {"label":"-", "x":11, "y":0}, + {"label":"=", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0, "w":2}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"[", "x":11.5, "y":1}, + {"label":"]", "x":12.5, "y":1}, + {"label":"\\", "x":13.5, "y":1, "w":1.5}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":";", "x":10.75, "y":2}, + {"label":"'", "x":11.75, "y":2}, + {"label":"Enter", "x":12.75, "y":2, "w":2.25}, + {"label":"Shift", "x":0, "y":3, "w":2.25}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":",", "x":9.25, "y":3}, + {"label":".", "x":10.25, "y":3}, + {"label":"/", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":2.75}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"GUI", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"label":"Space", "x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"GUI", "x":11.25, "y":4, "w":1.25}, + {"label":"Menu", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25} + ] + } + } +} diff --git a/keyboards/handwired/xealousbrown/keymaps/default/keymap.c b/keyboards/handwired/xealousbrown/keymaps/default/keymap.c new file mode 100644 index 000000000..6597c5667 --- /dev/null +++ b/keyboards/handwired/xealousbrown/keymaps/default/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT( /* Main layer */ + 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_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,\ + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENTER, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_BSLS, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_BSPC \ + ), + [1] = LAYOUT( /* FN_Layer */ + KC_GRV, 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_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK,KC_PAUS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_DEL, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL \ + ) +}; diff --git a/keyboards/wheatfield/blocked65/rules.mk b/keyboards/handwired/xealousbrown/rules.mk index 86525031a..2bad9a1c6 100755..100644 --- a/keyboards/wheatfield/blocked65/rules.mk +++ b/keyboards/handwired/xealousbrown/rules.mk @@ -1,3 +1,4 @@ + # MCU name MCU = atmega32u4 @@ -14,6 +15,7 @@ MCU = atmega32u4 # software delays. F_CPU = 16000000 + # # LUFA specific # @@ -36,24 +38,23 @@ F_USB = $(F_CPU) # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT -BOOTLOADER = atmel-dfu - -# Boot Section Size in *bytes* -# OPT_DEFS += -DBOOTLOADER_SIZE=4096 - +BOOTLOADER = caterina # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -NKRO_ENABLE = yes # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE = yes +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 + + diff --git a/keyboards/handwired/xealousbrown/xealousbrown.c b/keyboards/handwired/xealousbrown/xealousbrown.c new file mode 100644 index 000000000..5c8e2fb18 --- /dev/null +++ b/keyboards/handwired/xealousbrown/xealousbrown.c @@ -0,0 +1,8 @@ +#include "xealousbrown.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + matrix_init_user(); +} diff --git a/keyboards/handwired/xealousbrown/xealousbrown.h b/keyboards/handwired/xealousbrown/xealousbrown.h new file mode 100644 index 000000000..ff449e432 --- /dev/null +++ b/keyboards/handwired/xealousbrown/xealousbrown.h @@ -0,0 +1,20 @@ +#ifndef XEALOUSBROWN_H +#define XEALOUSBROWN_H + +#include "quantum.h" + +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K40, K41, K42, K45, K46, K47, K48, K49, K4C \ + ) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, K46, K47, K48, K49, KC_NO, KC_NO, K4C } \ +} + +#endif diff --git a/keyboards/helix/pico/config.h b/keyboards/helix/pico/config.h index b8822e227..343cecd59 100644 --- a/keyboards/helix/pico/config.h +++ b/keyboards/helix/pico/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT HelixPico #define DESCRIPTION A split keyboard for the cheap makers - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -71,11 +70,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Audio */ #ifdef AUDIO_ENABLE #define B5_AUDIO @@ -145,5 +139,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/helix/rev1/config.h b/keyboards/helix/rev1/config.h index 07b5c4f6f..22e61acc7 100644 --- a/keyboards/helix/rev1/config.h +++ b/keyboards/helix/rev1/config.h @@ -67,11 +67,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 @@ -94,5 +89,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/helix/rev2/config.h b/keyboards/helix/rev2/config.h index f7d35b371..2dc2fb8dd 100644 --- a/keyboards/helix/rev2/config.h +++ b/keyboards/helix/rev2/config.h @@ -27,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT Helix Beta #define DESCRIPTION A split keyboard for the cheap makers - #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -80,11 +79,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 @@ -161,5 +155,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/hhkb/config.h b/keyboards/hhkb/config.h index af7ecc5e2..fc747a6e9 100644 --- a/keyboards/hhkb/config.h +++ b/keyboards/hhkb/config.h @@ -49,11 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #ifdef HHKB_RN42_ENABLE // rn42 support -- acquired from the tmk repo. This is almost certainly not // integrated with qmk in the correct way. diff --git a/keyboards/hhkb/keymaps/bakingpy/keymap.c b/keyboards/hhkb/keymaps/bakingpy/keymap.c new file mode 100644 index 000000000..969f4fc4f --- /dev/null +++ b/keyboards/hhkb/keymaps/bakingpy/keymap.c @@ -0,0 +1,18 @@ +#include QMK_KEYBOARD_H + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_JP( + 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_DEL, KC_BSPC, + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_ENT, + KC_LSFT, 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_BSLS, + MO(1), KC_GRV, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_BSPC, KC_RGUI, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_JP( + KC_PWR, 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_INS, KC_DEL, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, _______, + _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_PWR, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, _______, KC_PENT, + _______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, _______, _______)}; diff --git a/keyboards/hhkb/keymaps/bakingpy/rules.mk b/keyboards/hhkb/keymaps/bakingpy/rules.mk new file mode 100644 index 000000000..a7f700f01 --- /dev/null +++ b/keyboards/hhkb/keymaps/bakingpy/rules.mk @@ -0,0 +1 @@ +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/mjt/config.h b/keyboards/hhkb/keymaps/mjt/config.h index d38611538..3b8f2e676 100644 --- a/keyboards/hhkb/keymaps/mjt/config.h +++ b/keyboards/hhkb/keymaps/mjt/config.h @@ -51,11 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/hid_liber/config.h b/keyboards/hid_liber/config.h index 0817db001..849c89ce3 100755 --- a/keyboards/hid_liber/config.h +++ b/keyboards/hid_liber/config.h @@ -85,11 +85,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/honeycomb/config.h b/keyboards/honeycomb/config.h new file mode 100755 index 000000000..abc273c97 --- /dev/null +++ b/keyboards/honeycomb/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2019 @filoxo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0xACC8 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Keyhive +#define PRODUCT Honeycomb Macropad +#define DESCRIPTION QMK firmware for Honeycomb Macropad + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 16 + +#define ONESHOT_TIMEOUT 500 + +/* 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 + +//UART settings for communication with the RF microcontroller +#define SERIAL_UART_BAUD 1000000 +#define SERIAL_UART_DATA UDR1 +#define SERIAL_UART_UBRR (F_CPU / (16UL * SERIAL_UART_BAUD) - 1) +#define SERIAL_UART_TXD_READY (UCSR1A & _BV(UDRE1)) +#define SERIAL_UART_RXD_PRESENT (UCSR1A & _BV(RXC1)) +#define SERIAL_UART_INIT() do { \ + /* baud rate */ \ + UBRR1L = SERIAL_UART_UBRR; \ + /* baud rate */ \ + UBRR1H = SERIAL_UART_UBRR >> 8; \ + /* enable TX and RX */ \ + UCSR1B = _BV(TXEN1) | _BV(RXEN1); \ + /* 8-bit data */ \ + UCSR1C = _BV(UCSZ11) | _BV(UCSZ10); \ +} while(0) diff --git a/keyboards/honeycomb/honeycomb.c b/keyboards/honeycomb/honeycomb.c new file mode 100755 index 000000000..add4af153 --- /dev/null +++ b/keyboards/honeycomb/honeycomb.c @@ -0,0 +1,92 @@ +#include "honeycomb.h" +#include "pointing_device.h" +#include "report.h" + +void uart_init(void) { + SERIAL_UART_INIT(); +} + +void pointing_device_task(void){ + /*report_mouse_t currentReport = {}; + SERIAL_UART_INIT(); + uint32_t timeout = 0; + + //the m character requests the RF slave to send the mouse report + SERIAL_UART_DATA = 'm'; + + //trust the external inputs completely, erase old data + uint8_t uart_data[5] = {0}; + + //there are 10 bytes corresponding to 10 columns, and an end byte + for (uint8_t i = 0; i < 5; i++) { + //wait for the serial data, timeout if it's been too long + //this only happened in testing with a loose wire, but does no + //harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + xprintf("\r\nTIMED OUT"); + break; + } + } + xprintf("\r\nGOT DATA for %d",i); + uart_data[i] = SERIAL_UART_DATA; + } + + //check for the end packet, bytes 1-4 are movement and scroll + //but byte 5 has bits 0-3 for the scroll button state + //(1000 if pressed, 0000 if not) and bits 4-7 are always 1 + //We can use this to verify the report sent properly. + if (uart_data[4] == 0x0F || uart_data[4] == 0x8F) + { + xprintf("\r\nREQUESTED MOUSE, RECEIVED %i, %i, %i, %i, %i",uart_data[0],uart_data[1],uart_data[2],uart_data[3],uart_data[4]); + currentReport = pointing_device_get_report(); + //shifting and transferring the info to the mouse report varaible + //mouseReport.x = 127 max -127 min + currentReport.x = (int8_t) uart_data[0]; + //mouseReport.y = 127 max -127 min + currentReport.y = (int8_t) uart_data[1]; + //mouseReport.v = 127 max -127 min (scroll vertical) + currentReport.v = (int8_t) uart_data[2]; + //mouseReport.h = 127 max -127 min (scroll horizontal) + currentReport.h = (int8_t) uart_data[3]; + //mouseReport.buttons = 0x31 max (bitmask for mouse buttons 1-5) 0x00 min + //mouse buttons 1 and 2 are handled by the keymap, but not 3 + if (uart_data[4] == 0x0F) { //then 3 is not pressed + currentReport.buttons &= ~MOUSE_BTN3; //MOUSE_BTN3 is def in report.h + } else { //3 must be pressed + currentReport.buttons |= MOUSE_BTN3; + } + pointing_device_set_report(currentReport); + } else { + xprintf("\r\nRequested packet, data 4 was %d",uart_data[4]); + }*/ + pointing_device_send(); +} + +void led_init(void) { + setPinOutput(D1); + writePinHigh(D1); + setPinOutput(F4); + writePinHigh(F4); + setPinOutput(F5); + writePinHigh(F5); +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + uart_init(); + led_init(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +} + +void led_set_kb(uint8_t usb_led) { + +} diff --git a/keyboards/honeycomb/honeycomb.h b/keyboards/honeycomb/honeycomb.h new file mode 100755 index 000000000..9374a02c5 --- /dev/null +++ b/keyboards/honeycomb/honeycomb.h @@ -0,0 +1,37 @@ +#pragma once + +#define HONEYCOMB_H + +#include "quantum.h" +#include "matrix.h" +#include "backlight.h" +#include <stddef.h> + +#define RED_LED_OFF() writePinHigh(F6) +#define RED_LED_ON() writePinLow(F6) +#define BLU_LED_OFF() writePinHigh(F5) +#define BLU_LED_ON() writePinLow(F5) +#define GRN_LED_OFF() writePinHigh(D1) +#define GRN_LED_ON() writePinLow(D1) + +#define SET_LED_OFF (RED_LED_OFF(); GRN_LED_OFF(); BLU_LED_OFF(); ) +#define SET_LED_RED (RED_LED_ON(); GRN_LED_OFF(); BLU_LED_OFF(); ) +#define SET_LED_BLUE (RED_LED_OFF(); GRN_LED_OFF(); BLU_LED_ON(); ) +#define SET_LED_GREEN (RED_LED_OFF(); GRN_LED_ON(); BLU_LED_OFF(); ) +#define SET_LED_YELLOW (RED_LED_ON(); GRN_LED_ON(); BLU_LED_OFF(); ) +#define SET_LED_MAGENTA (RED_LED_ON(); GRN_LED_OFF(); BLU_LED_ON(); ) +#define SET_LED_CYAN (RED_LED_OFF(); GRN_LED_ON(); BLU_LED_ON(); ) +#define SET_LED_WHITE (RED_LED_ON(); GRN_LED_ON(); BLU_LED_ON(); ) + +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguements +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k13, k14, k15, k16, \ + k09, k10, k11, k12, \ + k05, k06, k07, k08, \ + k01, k02, k03, k04 \ +) \ +{ \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14, k15, k16 } \ +} diff --git a/keyboards/honeycomb/keymaps/default/keymap.c b/keyboards/honeycomb/keymaps/default/keymap.c new file mode 100755 index 000000000..d0a596187 --- /dev/null +++ b/keyboards/honeycomb/keymaps/default/keymap.c @@ -0,0 +1,91 @@ +#include QMK_KEYBOARD_H + +// 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. +enum honeycomb_layers { + _BS, + _EN +}; + +// Macro definitions for readability +enum honeycomb_keycodes { + HW = SAFE_RANGE, + COPY, + PASTA +}; + +extern int8_t encoderValue; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BS] = LAYOUT( /* Base layout, put whatever defaults. */ + HW, COPY, PASTA, KC_MUTE, + KC_4, KC_5, KC_6, KC_7, + KC_8, KC_9, KC_A, KC_B, + KC_C, KC_D, KC_E, KC_F + ), + + [_EN] = LAYOUT( /* Alternate layer */ + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ) +}; + +report_mouse_t currentReport = {}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + //uint8_t layer = biton32(layer_state); // get the current layer + + // Basic example functions + switch (keycode) { + case HW: + if (record->event.pressed) { + SEND_STRING("Hello, world!"); + } else { + SEND_STRING("Goodbye, cruel world!"); + } + break; + case COPY: + if (record->event.pressed) { + tap_code16(LCTL(KC_C)); // Replace with tap_code16(LCMD(KC_C)) to enable for Mac + } + break; + case PASTA: + if (record->event.pressed) { + tap_code16(LCTL(KC_V)); // Replace with tap_code16(LCMD(KC_V)) to enable for Mac + } + break; + return false; + } + return true; +}; + +void matrix_scan_user(void) { + /* Leaving some LED stuff in here in comment form so you can see how to use it. + if (shiftLED || capsLED){ + red_led_on; + } else { + red_led_off; + } + if (numLED){ + grn_led_on; + } else { + grn_led_off; + } + if (mouseLED){ + blu_led_on; + } else { + blu_led_off; + }*/ + while (encoderValue < 0){ + tap_code(KC_VOLD); + encoderValue++; + } + while (encoderValue > 0){ + tap_code(KC_VOLU); + encoderValue--; + } +}; diff --git a/keyboards/honeycomb/matrix.c b/keyboards/honeycomb/matrix.c new file mode 100755 index 000000000..a06afb6d9 --- /dev/null +++ b/keyboards/honeycomb/matrix.c @@ -0,0 +1,202 @@ +/* +Copyright 2012 Jun Wako +Copyright 2014 Jack Humbert +Copyright 2019 @filoxo + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include <stdint.h> +#include <stdbool.h> +#if defined(__AVR__) +#include <avr/io.h> +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" +#include "honeycomb.h" +#include "pointing_device.h" +#include "report.h" + +#if (MATRIX_COLS <= 8) +# define print_matrix_header() print("\nr/c 01234567\n") +# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop(matrix[i]) +# define ROW_SHIFTER ((uint8_t)1) +#elif (MATRIX_COLS <= 16) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse16(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop16(matrix[i]) +# define ROW_SHIFTER ((uint16_t)1) +#elif (MATRIX_COLS <= 32) +# define print_matrix_header() print("\nr/c 0123456789ABCDEF0123456789ABCDEF\n") +# define print_matrix_row(row) print_bin_reverse32(matrix_get_row(row)) +# define matrix_bitpop(i) bitpop32(matrix[i]) +# define ROW_SHIFTER ((uint32_t)1) +#endif + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +//extern int8_t encoderValue; +int8_t encoderValue = 0; + +__attribute__ ((weak)) +void matrix_init_quantum(void) { + matrix_init_kb(); +} + +__attribute__ ((weak)) +void matrix_scan_quantum(void) { + matrix_scan_kb(); +} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +__attribute__ ((weak)) +void matrix_init_user(void) { +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { +} + +inline +uint8_t matrix_rows(void) { + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) { + return MATRIX_COLS; +} + +void matrix_init(void) { + + matrix_init_quantum(); +} + +uint8_t matrix_scan(void) +{ + SERIAL_UART_INIT(); + + uint32_t timeout = 0; + + // The 's' character requests the RF slave to send the matrix + SERIAL_UART_DATA = 's'; + + // Trust the external keystates entirely, erase the last data + uint8_t uart_data[4] = {0}; + + // There are 3 bytes corresponding to the data, and a checksum + for (uint8_t i = 0; i < 4; i++) { + // Wait for the serial data, timeout if it's been too long + // This only happened in testing with a loose wire, but does no + // harm to leave it in here + while(!SERIAL_UART_RXD_PRESENT){ + timeout++; + if (timeout > 10000){ + xprintf("\r\nTime out in keyboard."); + break; + } + } + uart_data[i] = SERIAL_UART_DATA; + } + + // Check for the end packet, it's our checksum. + // Will only be a match if the correct bytes were recieved + if (uart_data[3] == (uart_data[0] ^ uart_data[1] ^ uart_data[2])) { // This is an arbitrary checksum calculated by XORing all the data. + // Transferring the keystates to the QMK matrix variable + /* ASSUMING MSB FIRST */ + matrix[0] = ((uint16_t) uart_data[0] << 8) | ((uint16_t) uart_data[1]); + encoderValue += (int8_t) uart_data[2]; + if ((uart_data[0] | uart_data[1] | uart_data[2])!=0){ + xprintf("\r\n0x%0X%02X%02X",uart_data[0],uart_data[1], uart_data[2]); + } + /* OK, TURNS OUT THAT WAS A BAD ASSUMPTION */ + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + // I've unpacked these into the mirror image of what QMK expects them to be, so... + matrix[i] = bitrev16(matrix[i]); + // So I'll reverse it, and this should be fine now. + } + + // A mouse report for scrolling would go here, but I don't plan on doing scrolling with the encoder. So. + + report_mouse_t currentReport = {}; +/* + currentReport = pointing_device_get_report(); + //mouseReport.x = 127 max -127 min + currentReport.x = (int8_t) uart_data[6]; + //mouseReport.y = 127 max -127 min + currentReport.y = (int8_t) uart_data[7]; + //mouseReport.v = 127 max -127 min (scroll vertical) + currentReport.v = (int8_t) uart_data[8]; + //mouseReport.h = 127 max -127 min (scroll horizontal) + currentReport.h = (int8_t) uart_data[9]; + */ + /* + currentReport.x = 0; + currentReport.y = 0; + currentReport.v = 0; + currentReport.h = 0;*/ + + pointing_device_set_report(currentReport); + } else { + xprintf("\r\nRequested packet, data 3 was %d",uart_data[3]); + } + + matrix_scan_quantum(); + return 1; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1<col)); +} + +inline +matrix_row_t matrix_get_row(uint8_t row) +{ + return matrix[row]; +} + +void matrix_print(void) +{ + print_matrix_header(); + + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + phex(row); print(": "); + print_matrix_row(row); + print("\n"); + } +} + +uint8_t matrix_key_count(void) +{ + uint8_t count = 0; + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + count += matrix_bitpop(i); + } + return count; +} diff --git a/keyboards/honeycomb/readme.md b/keyboards/honeycomb/readme.md new file mode 100755 index 000000000..955f0ac7a --- /dev/null +++ b/keyboards/honeycomb/readme.md @@ -0,0 +1,20 @@ +Honeycomb Keyboard Firmware +====================== + +These configuration files use a completely different 'matrix scan' system than other keyboards, it relies on an external nRF51822 microcontroller maintaining a matrix of keystates received from the macropad - it also receives rotary encoder information from the macropad. The matrix.c file contains the code to poll the external microcontroller for the key matrix, and the keymap.c file contains example code for encoder use. As long as the relevant functions in these files are not changed, all other QMK features are supported. + +## Building + +Run the following command in your terminal: + +``` +make honeycomb:default +# or use this to automatically flash the controller +make honeycomb:default:avrdude +``` + +Follow the QMK guide for this or ask in Discord. + +### Other Keymaps + +Because this is a totally custom macropad, it is recommended that you copy the `default/` folder, rename it as desired, and modify the `keymap.c` to your liking.
\ No newline at end of file diff --git a/keyboards/honeycomb/rules.mk b/keyboards/honeycomb/rules.mk new file mode 100755 index 000000000..90992bad7 --- /dev/null +++ b/keyboards/honeycomb/rules.mk @@ -0,0 +1,68 @@ +# # project specific files +SRC += matrix.c + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +BOOTLOADER = caterina + +# Build Options +# comment out to disable the options. +# +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +#MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +POINTING_DEVICE_ENABLE = yes # Generic Pointer, not as big as mouse keys hopefully. +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +CUSTOM_MATRIX = yes # Remote matrix from the wireless bridge +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +# BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +# MIDI_ENABLE = YES # MIDI controls +UNICODE_ENABLE = YES # Unicode +# BLUETOOTH_ENABLE = yes # Enable Bluetooth with the Adafruit EZ-Key HID + +USB = /dev/ttyACM0 + +#upload: build +# $(honeycomb_UPLOAD_COMMAND) diff --git a/keyboards/hs60/v1/config.h b/keyboards/hs60/v1/config.h index c297a6e19..debc6bdde 100644 --- a/keyboards/hs60/v1/config.h +++ b/keyboards/hs60/v1/config.h @@ -102,11 +102,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/hs60/v2/config.h b/keyboards/hs60/v2/config.h index bc1681ffd..6f5e0012c 100644 --- a/keyboards/hs60/v2/config.h +++ b/keyboards/hs60/v2/config.h @@ -70,10 +70,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ /* Backlight options */ diff --git a/keyboards/idobo/config.h b/keyboards/idobo/config.h index f6b552bad..70b6a4806 100644 --- a/keyboards/idobo/config.h +++ b/keyboards/idobo/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/infinity60/config.h b/keyboards/infinity60/config.h index c1e9ec5b1..16272e427 100644 --- a/keyboards/infinity60/config.h +++ b/keyboards/infinity60/config.h @@ -39,11 +39,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 diff --git a/keyboards/jc65/v32a/config.h b/keyboards/jc65/v32a/config.h index 466cb7a28..a5ec23ae4 100644 --- a/keyboards/jc65/v32a/config.h +++ b/keyboards/jc65/v32a/config.h @@ -39,9 +39,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - diff --git a/keyboards/jc65/v32u4/config.h b/keyboards/jc65/v32u4/config.h index 6e1306b27..98256b128 100644 --- a/keyboards/jc65/v32u4/config.h +++ b/keyboards/jc65/v32u4/config.h @@ -54,10 +54,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ - ) - - - #endif diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h index 047be5707..70648d2f5 100644 --- a/keyboards/jd40/config.h +++ b/keyboards/jd40/config.h @@ -63,12 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 // Number of LEDs diff --git a/keyboards/jd45/config.h b/keyboards/jd45/config.h index 43d138f4e..d3137b9f4 100644 --- a/keyboards/jd45/config.h +++ b/keyboards/jd45/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/jd45/keymaps/mjt/config.h b/keyboards/jd45/keymaps/mjt/config.h index a8c8e9d17..5507caae5 100644 --- a/keyboards/jd45/keymaps/mjt/config.h +++ b/keyboards/jd45/keymaps/mjt/config.h @@ -59,11 +59,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/jj40/README.md b/keyboards/jj40/README.md index 26d551cf7..ed1ea90fe 100644 --- a/keyboards/jj40/README.md +++ b/keyboards/jj40/README.md @@ -69,3 +69,16 @@ Windows sometimes doesn't recognize the jj40. The easiest way of flashing a new 3. If you get an error such as "Resource Unavailable" when attemting to flash on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` for more info. + +## Recovery +If you flash a bad hex (e.g. you have a V1 board without RGB and compile/flash blindly without editing your rules.mk), your jj40 is now semi-bricked and you're stuck unless you have access to an ISP. The [ISP Flashing Guide](https://docs.qmk.fm/#/isp_flashing_guide) contains very good (but somewhat generalized) information. However, the instructions below should get you up and running provided you have an Arduino or clone. + +### Arduino Setup +1. Upload the ArduinoISP sketch onto your Arduino board (https://www.arduino.cc/en/Tutorial/ArduinoISP). +2. Wire the Arduino to the jj40. Match the data pins on the Arduino to those on the jj40. "RST" usually goes to D10 on the Arduino. I didn't need a capacitor when using my Uno. +![Imgur](https://i.imgur.com/oLWJOkQ.jpg) +3. Get a working bootloader from https://blog.winkeyless.kr/m/152. The file is called "main.hex" from the archive called "ps2avrGB_bootloader_161215.zip" Copy "main.hex" to your qmk folder. +4. Burn the bootloader with the following command +` avrdude -b 19200 -c avrisp -p atmega32 -v -e -U hfuse:w:0xD0:m -U lfuse:w:0x0F:m -U flash:w:main.hex:i -P comPORT` +Change `comPORT` to whatever port is used by the Arduino (e.g. `com11` in Windows or `/dev/ttyACM0` in Linux). Use Device Manager in Windows to find the port being used. Use `ls /dev/tty*` in Linux. +5. If this process is successful, you should now be able to upload normally. diff --git a/keyboards/jj40/config.h b/keyboards/jj40/config.h index 7fac1ed5b..67561b0b2 100644 --- a/keyboards/jj40/config.h +++ b/keyboards/jj40/config.h @@ -48,7 +48,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/jj4x4/README.md b/keyboards/jj4x4/README.md new file mode 100644 index 000000000..09684bd82 --- /dev/null +++ b/keyboards/jj4x4/README.md @@ -0,0 +1,71 @@ +# jj4x4 + +![jj4x4](https://cdn.shopify.com/s/files/1/2711/4238/products/JJ4x4case-1_1024x1024.jpg?v=1532325339) + +A 4x4 keypad kit made and KPRepublic on AliExpress. This is a chopped off version of the jj40 with rearranged keys. + +Keyboard Maintainer: [QMK Community](https://github.com/qmk) +Hardware Supported: Atmega32A +Hardware Availability: [AliExpress](https://www.aliexpress.com/item/jj4x4-jj4X4-16-keys-Custom-Mechanical-Keyboard-PCB-programmed-numpad-layouts-bface-firmware-with-rgb-bottom/32901955446.html?spm=2114.search0104.3.7.3ebf431ae1d9ic&ws_ab_test=searchweb0_0,searchweb201602_4_10065_10130_10068_10547_319_317_10548_10545_10696_453_10084_454_10083_433_10618_431_10307_537_536_10902_10059_10884_10887_321_322_10103,searchweb201603_6,ppcSwitch_0&algo_expid=9d1891dd-80af-4793-a889-5a62e1fdfdd8-1&algo_pvid=9d1891dd-80af-4793-a889-5a62e1fdfdd8&transAbTest=ae803_5) + +Make example for this keyboard (after setting up your build environment): + + make jj4x4:default:program + +See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. + +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. + +In addition you may need the AVR toolchain and `bootloadHID` ([GitHub repo](https://github.com/whiteneon/bootloadHID)) for flashing: + +For macOS: +``` +$ brew cask install crosspack-avr +$ brew install --HEAD https://raw.githubusercontent.com/robertgzr/homebrew-tap/master/bootloadhid.rb +``` + +For Linux: +``` +$ sudo apt install libusb-dev +$ wget https://www.obdev.at/downloads/vusb/bootloadHID.2012-12-08.tar.gz +$ tar -xzf bootloadHID.2012-12-08.tar.gz +$ cd bootloadHID.2012-12-08/commandline +$ make +$ sudo cp bootloadHID /usr/bin +``` + +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 +``` + +If you prefer (or are having issues with a `program` flash), you can just build it (`make jj40:<keymap-name>` and flash the firmware (`.hex` file) directly with +`bootloadHID` if you boot the board while holding down `8` (second from top, second from left, with usb plug is at the top) to keep it +in the bootloader: + +``` +$ make jj40 +$ bootloadHID -r jj4x4_default.hex +``` + +For Windows 10: +Windows sometimes doesn't recognize the jj4x4. The easiest way of flashing a new layout is probably using [HIDBootFlash](http://vusb.wikidot.com/project:hidbootflash). +1. Go to Windows Device Manager and find the keyboard (plug it in while holding down `8` (second from top, second from left, with usb plug is at the top)). It can be found under Human Interface Devices or under Keyboards. +2. Go to properties and the Details tab to find the hardware ID. You want the VID and the PID (code after the underscore). Plug them into HIDBootFlash and hit Find Device. +3. Use `make jj4x4:<keymap-name>` to generate the .hex file in the qmk basis folder. Select the .hex file in HIDBootFlash and press Flash Device. + + +## Troubleshooting + +1. Try plugging the board in while pressing `8` (usb plug at top, second from top, second from left). 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. +3. If you get an error such as "Resource Unavailable" when attemting to flash + on Linux, you may want to compile and run `tools/usb_detach.c`. See `tools/README.md` + for more info. diff --git a/keyboards/jj4x4/backlight.c b/keyboards/jj4x4/backlight.c new file mode 100644 index 000000000..fbd241fa9 --- /dev/null +++ b/keyboards/jj4x4/backlight.c @@ -0,0 +1,213 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#include "backlight.h" +#include "quantum.h" + +#include <avr/pgmspace.h> +#include <avr/interrupt.h> + +#include "backlight_custom.h" +#include "breathing_custom.h" + +// DEBUG +#include <stdlib.h> +#include <stdio.h> + +// Port D: digital pins of the AVR chipset +#define NUMLOCK_PORT (1 << 0) // D0 +#define CAPSLOCK_PORT (1 << 1) // D1 +#define BACKLIGHT_PORT (1 << 4) // D4 +#define SCROLLLOCK_PORT (1 << 6) // D6 + +#define TIMER_CLK_DIV64 0x03 ///< Timer clocked at F_CPU/64 +#define TIMER1PRESCALE TIMER_CLK_DIV64 ///< timer 1 prescaler default + +#define TIMER_PRESCALE_MASK 0x07 ///< Timer Prescaler Bit-Mask + +#define PWM_MAX 0xFF +#define TIMER_TOP 255 // 8 bit PWM + +extern backlight_config_t backlight_config; + +/** + * References + * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation + * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b + * Timers: http://www.avrbeginners.net/architecture/timers/timers.html + * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ + * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware + */ + +// @Override +// turn LEDs on and off depending on USB caps/num/scroll lock states. +__attribute__ ((weak)) +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + // turn on + DDRD |= NUMLOCK_PORT; + PORTD |= NUMLOCK_PORT; + } else { + // turn off + DDRD &= ~NUMLOCK_PORT; + PORTD &= ~NUMLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRD |= CAPSLOCK_PORT; + PORTD |= CAPSLOCK_PORT; + } else { + DDRD &= ~CAPSLOCK_PORT; + PORTD &= ~CAPSLOCK_PORT; + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRD |= SCROLLLOCK_PORT; + PORTD |= SCROLLLOCK_PORT; + } else { + DDRD &= ~SCROLLLOCK_PORT; + PORTD &= ~SCROLLLOCK_PORT; + } +} + +#ifdef BACKLIGHT_ENABLE + +// sets up Timer 1 for 8-bit PWM +void timer1PWMSetup(void) { // NOTE ONLY CALL THIS ONCE + // default 8 bit mode + TCCR1A &= ~(1 << 1); // cbi(TCCR1A,PWM11); <- set PWM11 bit to HIGH + TCCR1A |= (1 << 0); // sbi(TCCR1A,PWM10); <- set PWM10 bit to LOW + + // clear output compare value A + // outb(OCR1AH, 0); + // outb(OCR1AL, 0); + + // clear output comparator registers for B + OCR1BH = 0; // outb(OCR1BH, 0); + OCR1BL = 0; // outb(OCR1BL, 0); +} + +bool is_init = false; +void timer1Init(void) { + // timer1SetPrescaler(TIMER1PRESCALE) + // set to DIV/64 + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | TIMER1PRESCALE; + + // reset TCNT1 + TCNT1H = 0; // outb(TCNT1H, 0); + TCNT1L = 0; // outb(TCNT1L, 0); + + // TOIE1: Timer Overflow Interrupt Enable (Timer 1); + TIMSK |= _BV(TOIE1); // sbi(TIMSK, TOIE1); + + is_init = true; +} + +void timer1UnInit(void) { + // set prescaler back to NONE + (TCCR1B) = ((TCCR1B) & ~TIMER_PRESCALE_MASK) | 0x00; // TIMERRTC_CLK_STOP + + // disable timer overflow interrupt + TIMSK &= ~_BV(TOIE1); // overflow bit? + + setPWM(0); + + is_init = false; +} + + +// handle TCNT1 overflow +//! Interrupt handler for tcnt1 overflow interrupt +ISR(TIMER1_OVF_vect, ISR_NOBLOCK) +{ + // sei(); + // handle breathing here + #ifdef BACKLIGHT_BREATHING + if (is_breathing()) { + custom_breathing_handler(); + } + #endif + + // TODO call user defined function +} + +// enable timer 1 PWM +// timer1PWMBOn() +void timer1PWMBEnable(void) { + // turn on channel B (OC1B) PWM output + // set OC1B as non-inverted PWM + TCCR1A |= _BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +// disable timer 1 PWM +// timer1PWMBOff() +void timer1PWMBDisable(void) { + TCCR1A &= ~_BV(COM1B1); + TCCR1A &= ~_BV(COM1B0); +} + +void enableBacklight(void) { + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high +} + +void disableBacklight(void) { + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low +} + +void startPWM(void) { + timer1Init(); + timer1PWMBEnable(); + enableBacklight(); +} + +void stopPWM(void) { + timer1UnInit(); + disableBacklight(); + timer1PWMBDisable(); +} + +void b_led_init_ports(void) { + /* turn backlight on/off depending on user preference */ + #if BACKLIGHT_ON_STATE == 0 + // DDRx register: sets the direction of Port D + // DDRD &= ~BACKLIGHT_PORT; // set digital pin 4 as input + PORTD &= ~BACKLIGHT_PORT; // set digital pin 4 to low + #else + DDRD |= BACKLIGHT_PORT; // set digital pin 4 as output + PORTD |= BACKLIGHT_PORT; // set digital pin 4 to high + #endif + + timer1PWMSetup(); + startPWM(); + + #ifdef BACKLIGHT_BREATHING + breathing_enable(); + #endif +} + +void b_led_set(uint8_t level) { + if (level > BACKLIGHT_LEVELS) { + level = BACKLIGHT_LEVELS; + } + + setPWM((int)(TIMER_TOP * (float) level / BACKLIGHT_LEVELS)); +} + +// called every matrix scan +void b_led_task(void) { + // do nothing for now +} + +void setPWM(uint16_t xValue) { + if (xValue > TIMER_TOP) { + xValue = TIMER_TOP; + } + OCR1B = xValue; // timer1PWMBSet(xValue); +} + +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj4x4/backlight_custom.h b/keyboards/jj4x4/backlight_custom.h new file mode 100644 index 000000000..7210be840 --- /dev/null +++ b/keyboards/jj4x4/backlight_custom.h @@ -0,0 +1,15 @@ +/** + * Backlighting code for PS2AVRGB boards (ATMEGA32A) + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifndef BACKLIGHT_CUSTOM_H +#define BACKLIGHT_CUSTOM_H + +#include <avr/pgmspace.h> +void b_led_init_ports(void); +void b_led_set(uint8_t level); +void b_led_task(void); +void setPWM(uint16_t xValue); + +#endif // BACKLIGHT_CUSTOM_H diff --git a/keyboards/jj4x4/breathing_custom.h b/keyboards/jj4x4/breathing_custom.h new file mode 100644 index 000000000..71416b1b4 --- /dev/null +++ b/keyboards/jj4x4/breathing_custom.h @@ -0,0 +1,140 @@ +/** + * Breathing effect code for PS2AVRGB boards (ATMEGA32A) + * Works in conjunction with `backlight.c`. + * + * Code adapted from `quantum.c` to register with the existing TIMER1 overflow + * handler in `backlight.c` instead of setting up its own timer. + * Kenneth A. (github.com/krusli | krusli.me) + */ + +#ifdef BACKLIGHT_ENABLE +#ifdef BACKLIGHT_BREATHING + +#include "backlight_custom.h" + +#ifndef BREATHING_PERIOD +#define BREATHING_PERIOD 6 +#endif + +#define breathing_min() do {breathing_counter = 0;} while (0) +#define breathing_max() do {breathing_counter = breathing_period * 244 / 2;} while (0) + +// TODO make this share code with quantum.c + +#define BREATHING_NO_HALT 0 +#define BREATHING_HALT_OFF 1 +#define BREATHING_HALT_ON 2 +#define BREATHING_STEPS 128 + +static uint8_t breathing_period = BREATHING_PERIOD; +static uint8_t breathing_halt = BREATHING_NO_HALT; +static uint16_t breathing_counter = 0; + +static bool breathing = false; + +bool is_breathing(void) { + return breathing; +} + +// See http://jared.geek.nz/2013/feb/linear-led-pwm +static uint16_t cie_lightness(uint16_t v) { + if (v <= 5243) // if below 8% of max + return v / 9; // same as dividing by 900% + else { + uint32_t y = (((uint32_t) v + 10486) << 8) / (10486 + 0xFFFFUL); // add 16% of max and compare + // to get a useful result with integer division, we shift left in the expression above + // and revert what we've done again after squaring. + y = y * y * y >> 8; + if (y > 0xFFFFUL) // prevent overflow + return 0xFFFFU; + else + return (uint16_t) y; + } +} + +void breathing_enable(void) { + breathing = true; + breathing_counter = 0; + breathing_halt = BREATHING_NO_HALT; + // interrupt already registered +} + +void breathing_pulse(void) { + if (get_backlight_level() == 0) + breathing_min(); + else + breathing_max(); + breathing_halt = BREATHING_HALT_ON; + // breathing_interrupt_enable(); + breathing = true; +} + +void breathing_disable(void) { + breathing = false; + // backlight_set(get_backlight_level()); + b_led_set(get_backlight_level()); // custom implementation of backlight_set() +} + +void breathing_self_disable(void) +{ + if (get_backlight_level() == 0) + breathing_halt = BREATHING_HALT_OFF; + else + breathing_halt = BREATHING_HALT_ON; +} + +void breathing_toggle(void) { + if (is_breathing()) + breathing_disable(); + else + breathing_enable(); +} + +void breathing_period_set(uint8_t value) +{ + if (!value) + value = 1; + breathing_period = value; +} + +void breathing_period_default(void) { + breathing_period_set(BREATHING_PERIOD); +} + +void breathing_period_inc(void) +{ + breathing_period_set(breathing_period+1); +} + +void breathing_period_dec(void) +{ + breathing_period_set(breathing_period-1); +} + +/* To generate breathing curve in python: + * from math import sin, pi; [int(sin(x/128.0*pi)**4*255) for x in range(128)] + */ +static const uint8_t breathing_table[BREATHING_STEPS] PROGMEM = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 2, 3, 4, 5, 6, 8, 10, 12, 15, 17, 20, 24, 28, 32, 36, 41, 46, 51, 57, 63, 70, 76, 83, 91, 98, 106, 113, 121, 129, 138, 146, 154, 162, 170, 178, 185, 193, 200, 207, 213, 220, 225, 231, 235, 240, 244, 247, 250, 252, 253, 254, 255, 254, 253, 252, 250, 247, 244, 240, 235, 231, 225, 220, 213, 207, 200, 193, 185, 178, 170, 162, 154, 146, 138, 129, 121, 113, 106, 98, 91, 83, 76, 70, 63, 57, 51, 46, 41, 36, 32, 28, 24, 20, 17, 15, 12, 10, 8, 6, 5, 4, 3, 2, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + +// Use this before the cie_lightness function. +static inline uint16_t scale_backlight(uint16_t v) { + return v / BACKLIGHT_LEVELS * get_backlight_level(); +} + +void custom_breathing_handler(void) { + uint16_t interval = (uint16_t) breathing_period * 244 / BREATHING_STEPS; + // resetting after one period to prevent ugly reset at overflow. + breathing_counter = (breathing_counter + 1) % (breathing_period * 244); + uint8_t index = breathing_counter / interval % BREATHING_STEPS; + + if (((breathing_halt == BREATHING_HALT_ON) && (index == BREATHING_STEPS / 2)) || + ((breathing_halt == BREATHING_HALT_OFF) && (index == BREATHING_STEPS - 1))) + { + // breathing_interrupt_disable(); + } + + setPWM(cie_lightness(scale_backlight((uint16_t) pgm_read_byte(&breathing_table[index]) * 0x0101U))); +} + +#endif // BACKLIGHT_BREATHING +#endif // BACKLIGHT_ENABLE diff --git a/keyboards/jj4x4/config.h b/keyboards/jj4x4/config.h new file mode 100644 index 000000000..3ecdc06ea --- /dev/null +++ b/keyboards/jj4x4/config.h @@ -0,0 +1,51 @@ +/* +Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#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 Kprepublic +#define PRODUCT jj4x4 + +/* matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 4 +#define MATRIX_ROW_PINS { B5, B0, B3, B4 } +#define MATRIX_COL_PINS { A1, A0, A2, A3 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_LEVELS 12 +// #define BACKLIGHT_BREATHING // works, but BL_TOGG might not work + +#define TAPPING_TOGGLE 3 + +#define NO_UART 1 + +/* RGB underglow */ +// The RGB_DI_PIN value seems to be shared between all PS2AVRGB boards. +// The same pin is used on the JJ40, at least. +#define RGBLED_NUM 5 +#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/jj4x4/i2c.c b/keyboards/jj4x4/i2c.c new file mode 100644 index 000000000..c27f3e3d1 --- /dev/null +++ b/keyboards/jj4x4/i2c.c @@ -0,0 +1,104 @@ +/* +Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <avr/io.h> +#include <util/twi.h> + +#include "i2c.h" + +void i2c_set_bitrate(uint16_t bitrate_khz) { + uint8_t bitrate_div = ((F_CPU / 1000l) / bitrate_khz); + if (bitrate_div >= 16) { + bitrate_div = (bitrate_div - 16) / 2; + } + TWBR = bitrate_div; +} + +void i2c_init(void) { + // set pull-up resistors on I2C bus pins + PORTC |= 0b11; + + i2c_set_bitrate(400); + + // enable TWI (two-wire interface) + TWCR |= (1 << TWEN); + + // enable TWI interrupt and slave address ACK + TWCR |= (1 << TWIE); + TWCR |= (1 << TWEA); +} + +uint8_t i2c_start(uint8_t address) { + // reset TWI control register + TWCR = 0; + + // begin transmission and wait for it to end + TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); + while (!(TWCR & (1<<TWINT))); + + // check if the start condition was successfully transmitted + if ((TWSR & 0xF8) != TW_START) { + return 1; + } + + // transmit address and wait + TWDR = address; + TWCR = (1<<TWINT) | (1<<TWEN); + while (!(TWCR & (1<<TWINT))); + + // check if the device has acknowledged the READ / WRITE mode + uint8_t twst = TW_STATUS & 0xF8; + if ((twst != TW_MT_SLA_ACK) && (twst != TW_MR_SLA_ACK)) { + return 1; + } + + return 0; +} + +void i2c_stop(void) { + TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTO); +} + +uint8_t i2c_write(uint8_t data) { + TWDR = data; + + // transmit data and wait + TWCR = (1<<TWINT) | (1<<TWEN); + while (!(TWCR & (1<<TWINT))); + + if ((TWSR & 0xF8) != TW_MT_DATA_ACK) { + return 1; + } + + return 0; +} + +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length) { + if (i2c_start(address)) { + return 1; + } + + for (uint16_t i = 0; i < length; i++) { + if (i2c_write(data[i])) { + return 1; + } + } + + i2c_stop(); + + return 0; +} diff --git a/keyboards/jj4x4/i2c.h b/keyboards/jj4x4/i2c.h new file mode 100644 index 000000000..27c9d3d05 --- /dev/null +++ b/keyboards/jj4x4/i2c.h @@ -0,0 +1,25 @@ +/* +Copyright 2016 Luiz Ribeiro <luizribeiro@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef __I2C_H__ +#define __I2C_H__ + +void i2c_init(void); +void i2c_set_bitrate(uint16_t bitrate_khz); +uint8_t i2c_send(uint8_t address, uint8_t *data, uint16_t length); + +#endif diff --git a/keyboards/jj4x4/info.json b/keyboards/jj4x4/info.json new file mode 100644 index 000000000..602fdc90a --- /dev/null +++ b/keyboards/jj4x4/info.json @@ -0,0 +1,30 @@ +{ + "keyboard_name": "jj4x4", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x4": { + "key_count": 16, + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":3, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":3, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2}, + {"x":3, "y":2}, + {"x":0, "y":3}, + {"x":1, "y":3}, + {"x":2, "y":3}, + {"x":3, "y":3} + ] + } + } +}
\ No newline at end of file diff --git a/keyboards/jj4x4/jj4x4.c b/keyboards/jj4x4/jj4x4.c new file mode 100644 index 000000000..6fbff7afb --- /dev/null +++ b/keyboards/jj4x4/jj4x4.c @@ -0,0 +1,97 @@ +/* +Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> +Modified 2018 Kenneth A. <github.com/krusli> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include "jj4x4.h" + +#include <avr/pgmspace.h> + +#include "action_layer.h" +#include "quantum.h" + +#include "i2c.h" + +#include "backlight.h" +#include "backlight_custom.h" + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#ifdef BACKLIGHT_ENABLE +/// Overrides functions in `quantum.c` +void backlight_init_ports(void) { + b_led_init_ports(); +} + +void backlight_task(void) { + b_led_task(); +} + +void backlight_set(uint8_t level) { + b_led_set(level); +} +#endif + +#ifdef RGBLIGHT_ENABLE +extern rgblight_config_t rgblight_config; + +// custom RGB driver +void rgblight_set(void) { + if (!rgblight_config.enable) { + for (uint8_t i=0; i<RGBLED_NUM; i++) { + led[i].r = 0; + led[i].g = 0; + led[i].b = 0; + } + } + + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); +} + +bool rgb_init = false; + +void matrix_scan_kb(void) { + // if LEDs were previously on before poweroff, turn them back on + if (rgb_init == false && rgblight_config.enable) { + i2c_init(); + i2c_send(0xb0, (uint8_t*)led, 3 * RGBLED_NUM); + rgb_init = true; + } + + rgblight_task(); +#else +void matrix_scan_kb(void) { +#endif + matrix_scan_user(); + /* Nothing else for now. */ +} + +__attribute__((weak)) // overridable +void matrix_init_user(void) { + +} + + +__attribute__((weak)) // overridable +void matrix_scan_user(void) { + +} diff --git a/keyboards/jj4x4/jj4x4.h b/keyboards/jj4x4/jj4x4.h new file mode 100644 index 000000000..5a24b9033 --- /dev/null +++ b/keyboards/jj4x4/jj4x4.h @@ -0,0 +1,35 @@ +/* +Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "quantum.h" + +void matrix_init_user(void); // TODO port this to other PS2AVRGB boards + +#define LAYOUT_ortho_4x4( \ + K01, K02, K03, K04, \ + K11, K12, K13, K14, \ + K21, K22, K23, K24, \ + K31, K32, K33, K34 \ +) \ +{ \ + { K01, K02, K03, K04 }, \ + { K11, K12, K13, K14 }, \ + { K21, K22, K23, K24 }, \ + { K31, K32, K33, K34 } \ +} diff --git a/keyboards/jj4x4/keymaps/default/keymap.c b/keyboards/jj4x4/keymaps/default/keymap.c new file mode 100644 index 000000000..51d4e7d61 --- /dev/null +++ b/keyboards/jj4x4/keymaps/default/keymap.c @@ -0,0 +1,34 @@ +#include QMK_KEYBOARD_H + + +#define _QWERTY 0 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,---------------------------. + * | A | B | C | D | + * +------+------+------+------| + * | E | F | G | H | + * +------+------+------+------| + * | I | J | K | L | + * +------+------+------+------| + * | M | N | O | P | + * ----------------------------' + */ +[_QWERTY] = LAYOUT_ortho_4x4( \ + KC_A, KC_B, KC_C, KC_D, \ + KC_E, KC_F, KC_G, KC_H, \ + KC_I, KC_J, KC_K, KC_L, \ + KC_M, KC_N, KC_O, KC_P \ +), +}; + +// Loop +void matrix_scan_user(void) { + // Empty +}; diff --git a/keyboards/jj4x4/rules.mk b/keyboards/jj4x4/rules.mk new file mode 100644 index 000000000..d99aebbd2 --- /dev/null +++ b/keyboards/jj4x4/rules.mk @@ -0,0 +1,58 @@ +# Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# unsupported features for now +NO_UART = yes +NO_SUSPEND_POWER_DOWN = yes + +# processor frequency +F_CPU = 12000000 + +# Bootloader +# This definition is optional, and if your keyboard supports multiple bootloaders of +# different sizes, comment this out, and the correct address will be loaded +# automatically (+60). See bootloader.mk for all options. +BOOTLOADER = bootloadHID + +# build options +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = no +COMMAND_ENABLE = yes + +BACKLIGHT_ENABLE = yes +BACKLIGHT_CUSTOM_DRIVER = yes + +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +KEY_LOCK_ENABLE = yes + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +OPT_DEFS = -DDEBUG_LEVEL=0 + +SRC = i2c.c backlight.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex + +LAYOUTS = ortho_4x4 diff --git a/keyboards/jj4x4/tools/README.md b/keyboards/jj4x4/tools/README.md new file mode 100644 index 000000000..081984ed4 --- /dev/null +++ b/keyboards/jj4x4/tools/README.md @@ -0,0 +1,16 @@ +# JJ40 Tools + +## usb_detach.c + +When trying to flash on Linux, you may encounter a "Resource Unavailable" error. This means that Linux's HID driver has taken exclusive control of the keyboard, and the program script can't flash it. +This program can force Linux to give up a device, so that the programming script can reset it. + +### To compile: +``` +gcc usb_detach.c -o usb_detach +``` + +### To run: +1. Use `lsusb` to discover the Bus and Device numbers for your keyboard. +2. Run the program: `sudo ./usb_detach /dev/bus/usb/<BUS>/<DEVICE>`. +3. Build and program the firmware as normal. diff --git a/keyboards/jj4x4/tools/usb_detach.c b/keyboards/jj4x4/tools/usb_detach.c new file mode 100644 index 000000000..c21e47a7a --- /dev/null +++ b/keyboards/jj4x4/tools/usb_detach.c @@ -0,0 +1,33 @@ +/* Found at https://www.linuxquestions.org/questions/linux-hardware-18/how-to-unclaim-usb-device-558138/#post3406986 */ +#include <stdio.h> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <linux/ioctl.h> +#include <linux/usbdevice_fs.h> + +int main(int argc, char**argv) +{ + struct usbdevfs_ioctl command; + int ret; + int fd; + int i; + if (argc>1) { + fd = open(argv[1],O_RDWR); + if (fd<1){ + perror("unable to open file"); + return 1; + } + for (i=0;i<255;i++){ // hack: should fetch how many interface there is. + command.ifno = i; + command.ioctl_code = USBDEVFS_DISCONNECT; + command.data = NULL; + ret = ioctl(fd, USBDEVFS_IOCTL, &command); + if(ret!=-1) + printf("un claimed interface %d %d\n",i,ret); + } + } else { + printf ("usage: %s /dev/bus/usb/BUS/DEVICE\n",argv[0]); + printf("Release all interfaces of this usb device for usage in virtualisation\n"); + } +}
\ No newline at end of file diff --git a/keyboards/jj4x4/usbconfig.h b/keyboards/jj4x4/usbconfig.h new file mode 100644 index 000000000..ad97e7f0a --- /dev/null +++ b/keyboards/jj4x4/usbconfig.h @@ -0,0 +1,397 @@ +/* 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. + */ +// max power draw with maxed white underglow measured at 120 mA (peaks) +#define USB_CFG_MAX_BUS_POWER 100 +/* 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 'j', 'j', '4', '0' +#define USB_CFG_DEVICE_NAME_LEN 4 +/* 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__ */ diff --git a/keyboards/jj50/config.h b/keyboards/jj50/config.h index 6aa762883..0f09f02ff 100644 --- a/keyboards/jj50/config.h +++ b/keyboards/jj50/config.h @@ -48,7 +48,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/jm60/config.h b/keyboards/jm60/config.h index cb5c90bb1..0d2d0730e 100644 --- a/keyboards/jm60/config.h +++ b/keyboards/jm60/config.h @@ -50,11 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/k_type/config.h b/keyboards/k_type/config.h index 4937d9ad9..a841a5710 100644 --- a/keyboards/k_type/config.h +++ b/keyboards/k_type/config.h @@ -41,11 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/katana60/config.h b/keyboards/katana60/config.h index aaf2b5d54..177a09ff4 100644 --- a/keyboards/katana60/config.h +++ b/keyboards/katana60/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define TAPPING_TERM 200 /* control how magic key switches layers */ diff --git a/keyboards/kbd75/rev1/rev1.c b/keyboards/kbd75/rev1/rev1.c deleted file mode 100644 index 520a869e5..000000000 --- a/keyboards/kbd75/rev1/rev1.c +++ /dev/null @@ -1 +0,0 @@ -#include "rev1.h" diff --git a/keyboards/kbd75/rev2/rev2.c b/keyboards/kbd75/rev2/rev2.c deleted file mode 100644 index b1af81707..000000000 --- a/keyboards/kbd75/rev2/rev2.c +++ /dev/null @@ -1 +0,0 @@ -#include "rev2.h" diff --git a/keyboards/kbd75/rules.mk b/keyboards/kbd75/rules.mk deleted file mode 100644 index ae49271ab..000000000 --- a/keyboards/kbd75/rules.mk +++ /dev/null @@ -1 +0,0 @@ -DEFAULT_FOLDER = kbd75/rev1 diff --git a/keyboards/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbd8x/keymaps/default_backlighting/rules.mk deleted file mode 100644 index 07b9f81fd..000000000 --- a/keyboards/kbd8x/keymaps/default_backlighting/rules.mk +++ /dev/null @@ -1,17 +0,0 @@ -#Build Options - -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output on port C6 -FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/kbd19x/config.h b/keyboards/kbdfans/kbd19x/config.h index 47cfd7484..03b701b1c 100644 --- a/keyboards/kbd19x/config.h +++ b/keyboards/kbdfans/kbd19x/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -221,4 +216,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/kbd19x/info.json b/keyboards/kbdfans/kbd19x/info.json index 31f2f9cf5..31f2f9cf5 100644 --- a/keyboards/kbd19x/info.json +++ b/keyboards/kbdfans/kbd19x/info.json diff --git a/keyboards/kbd19x/kbd19x.c b/keyboards/kbdfans/kbd19x/kbd19x.c index 360345600..e6cd77d65 100644 --- a/keyboards/kbd19x/kbd19x.c +++ b/keyboards/kbdfans/kbd19x/kbd19x.c @@ -17,6 +17,15 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "kbd19x.h" +extern inline void kbd19x_caps_led_on(void); +extern inline void kbd19x_caps_led_off(void); + +extern inline void kbd19x_sclk_led_on(void); +extern inline void kbd19x_sclk_led_off(void); + +extern inline void kbd19x_nmlk_led_on(void); +extern inline void kbd19x_nmlk_led_off(void); + void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up diff --git a/keyboards/kbd19x/kbd19x.h b/keyboards/kbdfans/kbd19x/kbd19x.h index 728c7ca5c..73f3cbe16 100644 --- a/keyboards/kbd19x/kbd19x.h +++ b/keyboards/kbdfans/kbd19x/kbd19x.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef KBD19X_H -#define KBD19X_H +#pragma once #include "quantum.h" #include "led.h" @@ -100,4 +99,3 @@ inline void kbd19x_nmlk_led_off(void) { DDRB &= ~(1<<2); PORTB &= ~(1<<2); } {k05, k06, k07, k08, k15, k16, k17, k18, k25, k26, k27, k28, k36},\ {XXX, k1e, k0e, k2e, k4e, k37, k38, k39, k45, k46, k47, k48, XXX},\ } -#endif diff --git a/keyboards/kbd19x/keymaps/default/config.h b/keyboards/kbdfans/kbd19x/keymaps/default/config.h index 70028a525..70028a525 100644 --- a/keyboards/kbd19x/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd19x/keymaps/default/config.h diff --git a/keyboards/kbd19x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd19x/keymaps/default/keymap.c index c80607211..c80607211 100644 --- a/keyboards/kbd19x/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd19x/keymaps/default/keymap.c diff --git a/keyboards/kbd19x/keymaps/default/readme.md b/keyboards/kbdfans/kbd19x/keymaps/default/readme.md index 504a3ed02..504a3ed02 100644 --- a/keyboards/kbd19x/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd19x/keymaps/default/readme.md diff --git a/keyboards/kbd19x/readme.md b/keyboards/kbdfans/kbd19x/readme.md index ee4969b00..50adfb77f 100644 --- a/keyboards/kbd19x/readme.md +++ b/keyboards/kbdfans/kbd19x/readme.md @@ -1,4 +1,4 @@ -# kbd19x +# KBD19x ![kbd19x](https://i.imgur.com/0hWTEnh.jpg) @@ -8,12 +8,14 @@ The KBD19x is a compact-1800 keyboard kit produced by KBDfans, offering a number of layout options. +**Reset Sequence:** Using this firmware sets `BOOTLOADER_ENABLE` to `lite`. While plugging in, hold the top left key, commonly programmed as `Esc` to put your board into bootloader mode. + Keyboard Maintainer: [jshuf](https://github.com/jshuf) Hardware Supported: KBD19x PCB Hardware Availability: [KBDfans](https://kbdfans.cn) Make example for this keyboard (after setting up your build environment): - make kbd19x:default + make kbdfans/kbd19x:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbd19x/rules.mk b/keyboards/kbdfans/kbd19x/rules.mk index 8e50962af..b7a08f241 100644 --- a/keyboards/kbd19x/rules.mk +++ b/keyboards/kbdfans/kbd19x/rules.mk @@ -61,8 +61,8 @@ BOOTLOADER = atmel-dfu # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = no # Commands for debug and configuration diff --git a/keyboards/kbd4x/config.h b/keyboards/kbdfans/kbd4x/config.h index b967ab8f7..cac4ed95d 100644 --- a/keyboards/kbd4x/config.h +++ b/keyboards/kbdfans/kbd4x/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kbd4x/info.json b/keyboards/kbdfans/kbd4x/info.json index f9952e790..f9952e790 100644 --- a/keyboards/kbd4x/info.json +++ b/keyboards/kbdfans/kbd4x/info.json diff --git a/keyboards/kbd4x/kbd4x.c b/keyboards/kbdfans/kbd4x/kbd4x.c index 84ada250d..84ada250d 100644 --- a/keyboards/kbd4x/kbd4x.c +++ b/keyboards/kbdfans/kbd4x/kbd4x.c diff --git a/keyboards/kbd4x/kbd4x.h b/keyboards/kbdfans/kbd4x/kbd4x.h index d7a851e3e..d7a851e3e 100644 --- a/keyboards/kbd4x/kbd4x.h +++ b/keyboards/kbdfans/kbd4x/kbd4x.h diff --git a/keyboards/kbd4x/keymaps/default/config.h b/keyboards/kbdfans/kbd4x/keymaps/default/config.h index 7f3bd7dd5..7f3bd7dd5 100644 --- a/keyboards/kbd4x/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd4x/keymaps/default/config.h diff --git a/keyboards/kbd4x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd4x/keymaps/default/keymap.c index ad49b3799..ad49b3799 100644 --- a/keyboards/kbd4x/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd4x/keymaps/default/keymap.c diff --git a/keyboards/kbd4x/keymaps/default/readme.md b/keyboards/kbdfans/kbd4x/keymaps/default/readme.md index a950a25ac..a950a25ac 100644 --- a/keyboards/kbd4x/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd4x/keymaps/default/readme.md diff --git a/keyboards/kbd4x/readme.md b/keyboards/kbdfans/kbd4x/readme.md index 42dc45024..2e2a29290 100644 --- a/keyboards/kbd4x/readme.md +++ b/keyboards/kbdfans/kbd4x/readme.md @@ -10,6 +10,6 @@ Hardware Availability: https://kbdfans.cn/collections/diy-kit/products/kbd4x-cus Make example for this keyboard (after setting up your build environment): - make kbd4x:default + make kbdfans/kbd4x:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbd4x/rules.mk b/keyboards/kbdfans/kbd4x/rules.mk index 6cfd92bc6..6cfd92bc6 100644 --- a/keyboards/kbd4x/rules.mk +++ b/keyboards/kbdfans/kbd4x/rules.mk diff --git a/keyboards/kbd66/config.h b/keyboards/kbdfans/kbd66/config.h index 1802a0219..f9990c0e4 100644 --- a/keyboards/kbd66/config.h +++ b/keyboards/kbdfans/kbd66/config.h @@ -54,7 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_BREATHING #define BREATHING_PERIOD 6 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -106,11 +105,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kbd66/info.json b/keyboards/kbdfans/kbd66/info.json index 0308bfab7..0308bfab7 100644 --- a/keyboards/kbd66/info.json +++ b/keyboards/kbdfans/kbd66/info.json diff --git a/keyboards/kbd66/kbd66.c b/keyboards/kbdfans/kbd66/kbd66.c index 7a84b6368..7a84b6368 100644 --- a/keyboards/kbd66/kbd66.c +++ b/keyboards/kbdfans/kbd66/kbd66.c diff --git a/keyboards/kbd66/kbd66.h b/keyboards/kbdfans/kbd66/kbd66.h index 6a4b99ec4..6a4b99ec4 100644 --- a/keyboards/kbd66/kbd66.h +++ b/keyboards/kbdfans/kbd66/kbd66.h diff --git a/keyboards/kbd66/keymaps/ansi/config.h b/keyboards/kbdfans/kbd66/keymaps/ansi/config.h index c7b3d6ecc..c7b3d6ecc 100644 --- a/keyboards/kbd66/keymaps/ansi/config.h +++ b/keyboards/kbdfans/kbd66/keymaps/ansi/config.h diff --git a/keyboards/kbd66/keymaps/ansi/keymap.c b/keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c index d73e5aec8..d73e5aec8 100644 --- a/keyboards/kbd66/keymaps/ansi/keymap.c +++ b/keyboards/kbdfans/kbd66/keymaps/ansi/keymap.c diff --git a/keyboards/kbd66/keymaps/ansi/readme.md b/keyboards/kbdfans/kbd66/keymaps/ansi/readme.md index 6ad0d85e0..6ad0d85e0 100644 --- a/keyboards/kbd66/keymaps/ansi/readme.md +++ b/keyboards/kbdfans/kbd66/keymaps/ansi/readme.md diff --git a/keyboards/kbd66/keymaps/default/config.h b/keyboards/kbdfans/kbd66/keymaps/default/config.h index c7b3d6ecc..c7b3d6ecc 100644 --- a/keyboards/kbd66/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd66/keymaps/default/config.h diff --git a/keyboards/kbd66/keymaps/default/keymap.c b/keyboards/kbdfans/kbd66/keymaps/default/keymap.c index a969d6510..a969d6510 100644 --- a/keyboards/kbd66/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd66/keymaps/default/keymap.c diff --git a/keyboards/kbd66/keymaps/default/readme.md b/keyboards/kbdfans/kbd66/keymaps/default/readme.md index f4ab771a5..f4ab771a5 100644 --- a/keyboards/kbd66/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd66/keymaps/default/readme.md diff --git a/keyboards/kbd66/keymaps/iso/config.h b/keyboards/kbdfans/kbd66/keymaps/iso/config.h index c7b3d6ecc..c7b3d6ecc 100644 --- a/keyboards/kbd66/keymaps/iso/config.h +++ b/keyboards/kbdfans/kbd66/keymaps/iso/config.h diff --git a/keyboards/kbd66/keymaps/iso/keymap.c b/keyboards/kbdfans/kbd66/keymaps/iso/keymap.c index 5ee64e352..5ee64e352 100644 --- a/keyboards/kbd66/keymaps/iso/keymap.c +++ b/keyboards/kbdfans/kbd66/keymaps/iso/keymap.c diff --git a/keyboards/kbd66/keymaps/iso/readme.md b/keyboards/kbdfans/kbd66/keymaps/iso/readme.md index f325b741c..f325b741c 100644 --- a/keyboards/kbd66/keymaps/iso/readme.md +++ b/keyboards/kbdfans/kbd66/keymaps/iso/readme.md diff --git a/keyboards/kbd66/keymaps/maartenwut/config.h b/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h index c7b3d6ecc..c7b3d6ecc 100755 --- a/keyboards/kbd66/keymaps/maartenwut/config.h +++ b/keyboards/kbdfans/kbd66/keymaps/maartenwut/config.h diff --git a/keyboards/kbd66/keymaps/maartenwut/keymap.c b/keyboards/kbdfans/kbd66/keymaps/maartenwut/keymap.c index daeb93477..daeb93477 100755 --- a/keyboards/kbd66/keymaps/maartenwut/keymap.c +++ b/keyboards/kbdfans/kbd66/keymaps/maartenwut/keymap.c diff --git a/keyboards/kbd66/keymaps/maartenwut/readme.md b/keyboards/kbdfans/kbd66/keymaps/maartenwut/readme.md index 24be72c01..24be72c01 100755 --- a/keyboards/kbd66/keymaps/maartenwut/readme.md +++ b/keyboards/kbdfans/kbd66/keymaps/maartenwut/readme.md diff --git a/keyboards/kbd66/readme.md b/keyboards/kbdfans/kbd66/readme.md index 2ac555571..a2e5de015 100644 --- a/keyboards/kbd66/readme.md +++ b/keyboards/kbdfans/kbd66/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn), [Massdrop](https://www.mas Make example for this keyboard (after setting up your build environment): - make kbd66:default + make kbdfans/kbd66:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information.
\ No newline at end of file +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbdfans/kbd66/rules.mk b/keyboards/kbdfans/kbd66/rules.mk new file mode 100644 index 000000000..dcc9b5bbd --- /dev/null +++ b/keyboards/kbdfans/kbd66/rules.mk @@ -0,0 +1,68 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/kbd67/hotswap/config.h b/keyboards/kbdfans/kbd67/hotswap/config.h index f952235ad..f54ffa1ca 100644 --- a/keyboards/kbd67/hotswap/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/config.h @@ -130,11 +130,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kbd67/hotswap/hotswap.c b/keyboards/kbdfans/kbd67/hotswap/hotswap.c index e6999f6af..e6999f6af 100644 --- a/keyboards/kbd67/hotswap/hotswap.c +++ b/keyboards/kbdfans/kbd67/hotswap/hotswap.c diff --git a/keyboards/kbd67/hotswap/hotswap.h b/keyboards/kbdfans/kbd67/hotswap/hotswap.h index 57220050b..57220050b 100644 --- a/keyboards/kbd67/hotswap/hotswap.h +++ b/keyboards/kbdfans/kbd67/hotswap/hotswap.h diff --git a/keyboards/kbd67/hotswap/info.json b/keyboards/kbdfans/kbd67/hotswap/info.json index 9f23a5f34..9f23a5f34 100644 --- a/keyboards/kbd67/hotswap/info.json +++ b/keyboards/kbdfans/kbd67/hotswap/info.json diff --git a/keyboards/kbdfans/kbd67/hotswap/keymaps/default/config.h b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/config.h new file mode 100644 index 000000000..26c6d6ade --- /dev/null +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 MechMerlin + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +// place overrides here diff --git a/keyboards/kbd67/hotswap/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/keymap.c index 536963011..536963011 100644 --- a/keyboards/kbd67/hotswap/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/keymap.c diff --git a/keyboards/kbd67/hotswap/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/readme.md index 7e681294f..7e681294f 100644 --- a/keyboards/kbd67/hotswap/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/default/readme.md diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/config.h b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/config.h index cc06440e0..cc06440e0 100644 --- a/keyboards/kbd67/hotswap/keymaps/zunger/config.h +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/config.h diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/keymap.c b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c index 0d542bf84..0d542bf84 100644 --- a/keyboards/kbd67/hotswap/keymaps/zunger/keymap.c +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/keymap.c diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/readme.md b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/readme.md index 923a4824a..923a4824a 100644 --- a/keyboards/kbd67/hotswap/keymaps/zunger/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/readme.md diff --git a/keyboards/kbd67/hotswap/keymaps/zunger/rules.mk b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/rules.mk index a61cfa33f..a61cfa33f 100644 --- a/keyboards/kbd67/hotswap/keymaps/zunger/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/keymaps/zunger/rules.mk diff --git a/keyboards/kbd67/hotswap/readme.md b/keyboards/kbdfans/kbd67/hotswap/readme.md index 6b4070593..6b4070593 100644 --- a/keyboards/kbd67/hotswap/readme.md +++ b/keyboards/kbdfans/kbd67/hotswap/readme.md diff --git a/keyboards/kbd67/hotswap/rules.mk b/keyboards/kbdfans/kbd67/hotswap/rules.mk index f8667d280..f8667d280 100644 --- a/keyboards/kbd67/hotswap/rules.mk +++ b/keyboards/kbdfans/kbd67/hotswap/rules.mk diff --git a/keyboards/kbd67/readme.md b/keyboards/kbdfans/kbd67/readme.md index cdaf7e922..7ee3c6adb 100644 --- a/keyboards/kbd67/readme.md +++ b/keyboards/kbdfans/kbd67/readme.md @@ -9,7 +9,7 @@ Hardware Availability: KBDFans Make example for this keyboard (after setting up your build environment): - make kbd67/rev1:default - make kbd67/hotswap:default + make kbdfans/kbd67/rev1:default + make kbdfans/kbd67/hotswap:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbd67/rev1/config.h b/keyboards/kbdfans/kbd67/rev1/config.h index 2e3cf85c3..2a1e558ab 100644 --- a/keyboards/kbd67/rev1/config.h +++ b/keyboards/kbdfans/kbd67/rev1/config.h @@ -125,11 +125,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kbd67/rev1/info.json b/keyboards/kbdfans/kbd67/rev1/info.json index 70a926a7f..70a926a7f 100644 --- a/keyboards/kbd67/rev1/info.json +++ b/keyboards/kbdfans/kbd67/rev1/info.json diff --git a/keyboards/kbd67/rev1/keymaps/default/config.h b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h index a3ed4f762..a3ed4f762 100644 --- a/keyboards/kbd67/rev1/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/config.h diff --git a/keyboards/kbd67/rev1/keymaps/default/keymap.c b/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c index 89fa9a534..89fa9a534 100644 --- a/keyboards/kbd67/rev1/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/keymap.c diff --git a/keyboards/kbd67/rev1/keymaps/default/readme.md b/keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md index 2cb43c5e1..2cb43c5e1 100644 --- a/keyboards/kbd67/rev1/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd67/rev1/keymaps/default/readme.md diff --git a/keyboards/kbd67/rev1/readme.md b/keyboards/kbdfans/kbd67/rev1/readme.md index ab5209646..ab5209646 100644 --- a/keyboards/kbd67/rev1/readme.md +++ b/keyboards/kbdfans/kbd67/rev1/readme.md diff --git a/keyboards/kbd67/rev1/rev1.c b/keyboards/kbdfans/kbd67/rev1/rev1.c index 94cb9e553..94cb9e553 100644 --- a/keyboards/kbd67/rev1/rev1.c +++ b/keyboards/kbdfans/kbd67/rev1/rev1.c diff --git a/keyboards/kbd67/rev1/rev1.h b/keyboards/kbdfans/kbd67/rev1/rev1.h index 4ee136393..4ee136393 100644 --- a/keyboards/kbd67/rev1/rev1.h +++ b/keyboards/kbdfans/kbd67/rev1/rev1.h diff --git a/keyboards/kbd67/rev1/rules.mk b/keyboards/kbdfans/kbd67/rev1/rules.mk index 0d7c14ad4..0d7c14ad4 100644 --- a/keyboards/kbd67/rev1/rules.mk +++ b/keyboards/kbdfans/kbd67/rev1/rules.mk diff --git a/keyboards/kbd6x/config.h b/keyboards/kbdfans/kbd6x/config.h index 9f23fb867..4a3fb881b 100644 --- a/keyboards/kbd6x/config.h +++ b/keyboards/kbdfans/kbd6x/config.h @@ -61,7 +61,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_VAL_STEP 12 #endif - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -113,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kbd6x/info.json b/keyboards/kbdfans/kbd6x/info.json index 201c6bd3c..201c6bd3c 100644 --- a/keyboards/kbd6x/info.json +++ b/keyboards/kbdfans/kbd6x/info.json diff --git a/keyboards/kbd6x/kbd6x.c b/keyboards/kbdfans/kbd6x/kbd6x.c index f558af030..f558af030 100644 --- a/keyboards/kbd6x/kbd6x.c +++ b/keyboards/kbdfans/kbd6x/kbd6x.c diff --git a/keyboards/kbd6x/kbd6x.h b/keyboards/kbdfans/kbd6x/kbd6x.h index 3d0c70f77..3d0c70f77 100644 --- a/keyboards/kbd6x/kbd6x.h +++ b/keyboards/kbdfans/kbd6x/kbd6x.h diff --git a/keyboards/kbd6x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/default/keymap.c index e2e96fc63..e2e96fc63 100644 --- a/keyboards/kbd6x/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/default/keymap.c diff --git a/keyboards/kbd6x/keymaps/default/readme.md b/keyboards/kbdfans/kbd6x/keymaps/default/readme.md index c416cd8fa..c416cd8fa 100644 --- a/keyboards/kbd6x/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd6x/keymaps/default/readme.md diff --git a/keyboards/kbd6x/keymaps/hhkb-default-improved/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/keymap.c index 80c22e5d9..80c22e5d9 100644 --- a/keyboards/kbd6x/keymaps/hhkb-default-improved/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/keymap.c diff --git a/keyboards/kbd6x/keymaps/hhkb-default-improved/readme.md b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/readme.md index be22dd16c..be22dd16c 100644 --- a/keyboards/kbd6x/keymaps/hhkb-default-improved/readme.md +++ b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default-improved/readme.md diff --git a/keyboards/kbd6x/keymaps/hhkb-default/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default/keymap.c index 03153b67a..03153b67a 100644 --- a/keyboards/kbd6x/keymaps/hhkb-default/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default/keymap.c diff --git a/keyboards/kbd6x/keymaps/hhkb-default/readme.md b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default/readme.md index cf93c3553..cf93c3553 100644 --- a/keyboards/kbd6x/keymaps/hhkb-default/readme.md +++ b/keyboards/kbdfans/kbd6x/keymaps/hhkb-default/readme.md diff --git a/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h new file mode 100644 index 000000000..16387fa2f --- /dev/null +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/config.h @@ -0,0 +1,4 @@ +#pragma once + +#define LAYER_FN +#define SEND_STRING_CLEAN diff --git a/keyboards/kbd6x/keymaps/konstantin/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c index b400b0681..fa324be9a 100644 --- a/keyboards/kbd6x/keymaps/konstantin/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/keymap.c @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤ * │ │Mut│VoD│VoU│Ply│Prv│Nxt│MW←│MW→│M4 │M5 │ │ │ * └─────┬──┴┬──┴──┬┴───┴───┴───┴───┴───┴───┴──┬┴───┴┬───┬─┴───┘ - * │ │ │ MW↓ │ │ │ + * │ │ │ MW↓ │MAcl2│ │ * └───┴─────┴───────────────────────────┴─────┴───┘ */ [L_FN] = LAYOUT( @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, _______, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_BTN3, KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, _______, _______, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_MPRV, KC_MNXT, KC_WH_L, KC_WH_R, KC_BTN4, KC_BTN5, _______, _______, - XXXXXXX, _______, _______, KC_WH_D, _______, _______, XXXXXXX + XXXXXXX, _______, _______, KC_WH_D, KC_ACL2, _______, XXXXXXX ), /* RCtrl layer diff --git a/keyboards/kbd6x/keymaps/konstantin/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk index a45a631dc..a45a631dc 100644 --- a/keyboards/kbd6x/keymaps/konstantin/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/konstantin/rules.mk diff --git a/keyboards/kbd6x/keymaps/othi/config.h b/keyboards/kbdfans/kbd6x/keymaps/othi/config.h index 42f68b435..42f68b435 100644 --- a/keyboards/kbd6x/keymaps/othi/config.h +++ b/keyboards/kbdfans/kbd6x/keymaps/othi/config.h diff --git a/keyboards/kbd6x/keymaps/othi/keymap.c b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c index 1e0fc8ad7..1e0fc8ad7 100644 --- a/keyboards/kbd6x/keymaps/othi/keymap.c +++ b/keyboards/kbdfans/kbd6x/keymaps/othi/keymap.c diff --git a/keyboards/kbd6x/keymaps/othi/readme.md b/keyboards/kbdfans/kbd6x/keymaps/othi/readme.md index 95be36d05..95be36d05 100644 --- a/keyboards/kbd6x/keymaps/othi/readme.md +++ b/keyboards/kbdfans/kbd6x/keymaps/othi/readme.md diff --git a/keyboards/kbd6x/keymaps/othi/rules.mk b/keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk index 9cda4109d..9cda4109d 100644 --- a/keyboards/kbd6x/keymaps/othi/rules.mk +++ b/keyboards/kbdfans/kbd6x/keymaps/othi/rules.mk diff --git a/keyboards/kbd6x/readme.md b/keyboards/kbdfans/kbd6x/readme.md index 0e8e86562..1728c8c21 100644 --- a/keyboards/kbd6x/readme.md +++ b/keyboards/kbdfans/kbd6x/readme.md @@ -8,6 +8,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/products/kbd6x-wkl-hot-swap- Make example for this keyboard (after setting up your build environment): - make kbd6x:default + make kbdfans/kbd6x:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbd6x/rules.mk b/keyboards/kbdfans/kbd6x/rules.mk index e9b61a76d..e9b61a76d 100644 --- a/keyboards/kbd6x/rules.mk +++ b/keyboards/kbdfans/kbd6x/rules.mk diff --git a/keyboards/kbd75/config.h b/keyboards/kbdfans/kbd75/config.h index 726afcaf6..6f0cd86de 100644 --- a/keyboards/kbd75/config.h +++ b/keyboards/kbdfans/kbd75/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/kbd75/kbd75.c b/keyboards/kbdfans/kbd75/kbd75.c index 9f6e545ca..9f6e545ca 100644 --- a/keyboards/kbd75/kbd75.c +++ b/keyboards/kbdfans/kbd75/kbd75.c diff --git a/keyboards/kbd75/kbd75.h b/keyboards/kbdfans/kbd75/kbd75.h index 0798ad099..8e6f09450 100644 --- a/keyboards/kbd75/kbd75.h +++ b/keyboards/kbdfans/kbd75/kbd75.h @@ -3,11 +3,11 @@ #include "quantum.h" -#ifdef KEYBOARD_kbd75_rev1 +#ifdef KEYBOARD_kbdfans_kbd75_rev1 #include "rev1.h" #endif -#ifdef KEYBOARD_kbd75_rev2 +#ifdef KEYBOARD_kbdfans_kbd75_rev2 #include "../rev1/rev1.h" #include "rev2.h" #endif diff --git a/keyboards/kbd75/keymaps/adit/keymap.c b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c index 3c70d9786..b7cae4810 100644 --- a/keyboards/kbd75/keymaps/adit/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/adit/keymap.c @@ -2,8 +2,6 @@ #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( @@ -45,40 +43,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; } -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} - enum function_id { SHIFT_ESC, }; diff --git a/keyboards/kbd75/keymaps/default/keymap.c b/keyboards/kbdfans/kbd75/keymaps/default/keymap.c index 3074d8692..839030aaa 100644 --- a/keyboards/kbd75/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/default/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( @@ -22,12 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), }; - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } -} - diff --git a/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c b/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c new file mode 100644 index 000000000..cb43052c2 --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/digital/keymap.c @@ -0,0 +1,22 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( + KC_ESC, 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_MPRV, KC_MNXT, KC_MPLY, + KC_GRV, 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_DEL, KC_BSPC, KC_HOME, + 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_BSLS, KC_PGUP, + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN, + 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [1] = LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, KC_INS, + _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, BL_TOGG, BL_INC, BL_DEC, _______, _______, _______ + ) +}; diff --git a/keyboards/kbdfans/kbd75/keymaps/digital/readme.md b/keyboards/kbdfans/kbd75/keymaps/digital/readme.md new file mode 100644 index 000000000..99c95a00f --- /dev/null +++ b/keyboards/kbdfans/kbd75/keymaps/digital/readme.md @@ -0,0 +1,5 @@ +# digital KBD75 Keymap + +ISO KBD75 keymap. + +![KBD75 digital keymap](https://i.imgur.com/IMb7eML.png) diff --git a/keyboards/kbd75/keymaps/edulpn/README.md b/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md index 57989ff9b..57989ff9b 100644 --- a/keyboards/kbd75/keymaps/edulpn/README.md +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/README.md diff --git a/keyboards/kbd75/keymaps/edulpn/keymap.c b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c index 78a501ec4..78a501ec4 100644 --- a/keyboards/kbd75/keymaps/edulpn/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/edulpn/keymap.c diff --git a/keyboards/kbd75/keymaps/iso/keymap.c b/keyboards/kbdfans/kbd75/keymaps/iso/keymap.c index 230f1dd73..0b7c701a3 100644 --- a/keyboards/kbd75/keymaps/iso/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/iso/keymap.c @@ -1,7 +1,5 @@ #include QMK_KEYBOARD_H -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( @@ -22,11 +20,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } -} diff --git a/keyboards/kbd75/keymaps/smt/keymap.c b/keyboards/kbdfans/kbd75/keymaps/smt/keymap.c index a29a7e8a9..edf01c854 100644 --- a/keyboards/kbd75/keymaps/smt/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/smt/keymap.c @@ -12,10 +12,6 @@ enum planck_keycodes { DVORAK }; -// Helpful defines -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Custom macros #define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl #define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper (Super+Ctrl+Shift+Alt) diff --git a/keyboards/kbd75/keymaps/spacemanspiff/keymap.c b/keyboards/kbdfans/kbd75/keymaps/spacemanspiff/keymap.c index 82a2ad9be..05e7c5671 100644 --- a/keyboards/kbd75/keymaps/spacemanspiff/keymap.c +++ b/keyboards/kbdfans/kbd75/keymaps/spacemanspiff/keymap.c @@ -39,12 +39,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; - -void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 2); PORTB &= ~(1 << 2); - } else { - DDRB &= ~(1 << 2); PORTB &= ~(1 << 2); - } -} - diff --git a/keyboards/kbd75/keymaps/spacemanspiff/readme.md b/keyboards/kbdfans/kbd75/keymaps/spacemanspiff/readme.md index 6a78140a3..6a78140a3 100644 --- a/keyboards/kbd75/keymaps/spacemanspiff/readme.md +++ b/keyboards/kbdfans/kbd75/keymaps/spacemanspiff/readme.md diff --git a/keyboards/kbd75/readme.md b/keyboards/kbdfans/kbd75/readme.md index 4c93a8fbe..89fe27416 100644 --- a/keyboards/kbd75/readme.md +++ b/keyboards/kbdfans/kbd75/readme.md @@ -1,8 +1,7 @@ -KBD75 -=== +# KBD75 Keyboard Maintainer: QMK Community -Hardware Supported: KBD75 PCB rev 1 and 2 +Hardware Supported: KBD75 PCB rev 1 and 2 Hardware Availability: https://kbdfans.myshopify.com/products/kbd75-keyboard-set?variant=35638534029 The KBD75 has two revisions. Revision 2 has a USB C port and allows a numpad layout. `.hex` files made @@ -12,7 +11,7 @@ different areas. Make example for this keyboard (after setting up your build environment): - make kbd75/rev1:default - make kbd75/rev2:default + make kbdfans/kbd75/rev1:default + make kbdfans/kbd75/rev2:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbd75/rev1/info.json b/keyboards/kbdfans/kbd75/rev1/info.json index 4f963c2d8..4f963c2d8 100644 --- a/keyboards/kbd75/rev1/info.json +++ b/keyboards/kbdfans/kbd75/rev1/info.json diff --git a/keyboards/kbdfans/kbd75/rev1/rev1.c b/keyboards/kbdfans/kbd75/rev1/rev1.c new file mode 100644 index 000000000..d7d690381 --- /dev/null +++ b/keyboards/kbdfans/kbd75/rev1/rev1.c @@ -0,0 +1,17 @@ +#include "rev1.h" + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B2); + } else { + writePinLow(B2); + } + + led_set_user(usb_led); +} + +void matrix_init_kb(void) { + setPinOutput(B2); + matrix_init_user(); +} diff --git a/keyboards/kbd75/rev1/rev1.h b/keyboards/kbdfans/kbd75/rev1/rev1.h index fd3e6e488..fd3e6e488 100644 --- a/keyboards/kbd75/rev1/rev1.h +++ b/keyboards/kbdfans/kbd75/rev1/rev1.h diff --git a/keyboards/kbd75/rev1/rules.mk b/keyboards/kbdfans/kbd75/rev1/rules.mk index 9c4082da2..9c4082da2 100644 --- a/keyboards/kbd75/rev1/rules.mk +++ b/keyboards/kbdfans/kbd75/rev1/rules.mk diff --git a/keyboards/kbd75/rev2/info.json b/keyboards/kbdfans/kbd75/rev2/info.json index 31a5d3117..31a5d3117 100644 --- a/keyboards/kbd75/rev2/info.json +++ b/keyboards/kbdfans/kbd75/rev2/info.json diff --git a/keyboards/kbdfans/kbd75/rev2/rev2.c b/keyboards/kbdfans/kbd75/rev2/rev2.c new file mode 100644 index 000000000..2168738fa --- /dev/null +++ b/keyboards/kbdfans/kbd75/rev2/rev2.c @@ -0,0 +1,17 @@ +#include "rev2.h" + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if (IS_LED_ON(usb_led, USB_LED_CAPS_LOCK)) { + writePinHigh(B2); + } else { + writePinLow(B2); + } + + led_set_user(usb_led); +} + +void matrix_init_kb(void) { + setPinOutput(B2); + matrix_init_user(); +} diff --git a/keyboards/kbd75/rev2/rev2.h b/keyboards/kbdfans/kbd75/rev2/rev2.h index f2a1fead2..f2a1fead2 100644 --- a/keyboards/kbd75/rev2/rev2.h +++ b/keyboards/kbdfans/kbd75/rev2/rev2.h diff --git a/keyboards/kbd75/rev2/rules.mk b/keyboards/kbdfans/kbd75/rev2/rules.mk index 9c4082da2..9c4082da2 100644 --- a/keyboards/kbd75/rev2/rules.mk +++ b/keyboards/kbdfans/kbd75/rev2/rules.mk diff --git a/keyboards/kbdfans/kbd75/rules.mk b/keyboards/kbdfans/kbd75/rules.mk new file mode 100644 index 000000000..5c4617131 --- /dev/null +++ b/keyboards/kbdfans/kbd75/rules.mk @@ -0,0 +1 @@ +DEFAULT_FOLDER = kbdfans/kbd75/rev1 diff --git a/keyboards/kbd8x/config.h b/keyboards/kbdfans/kbd8x/config.h index 7749e0472..dca9b40ee 100644 --- a/keyboards/kbd8x/config.h +++ b/keyboards/kbdfans/kbd8x/config.h @@ -61,7 +61,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_VAL_STEP 8 #endif - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -113,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -194,5 +188,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - - diff --git a/keyboards/kbd8x/info.json b/keyboards/kbdfans/kbd8x/info.json index fe94f1b3a..fe94f1b3a 100644 --- a/keyboards/kbd8x/info.json +++ b/keyboards/kbdfans/kbd8x/info.json diff --git a/keyboards/kbd8x/kbd8x.c b/keyboards/kbdfans/kbd8x/kbd8x.c index 97c2e74e3..97c2e74e3 100644 --- a/keyboards/kbd8x/kbd8x.c +++ b/keyboards/kbdfans/kbd8x/kbd8x.c diff --git a/keyboards/kbd8x/kbd8x.h b/keyboards/kbdfans/kbd8x/kbd8x.h index f28b8ca7a..f28b8ca7a 100644 --- a/keyboards/kbd8x/kbd8x.h +++ b/keyboards/kbdfans/kbd8x/kbd8x.h diff --git a/keyboards/kbd8x/keymaps/default/config.h b/keyboards/kbdfans/kbd8x/keymaps/default/config.h index fa7db0bc1..fa7db0bc1 100644 --- a/keyboards/kbd8x/keymaps/default/config.h +++ b/keyboards/kbdfans/kbd8x/keymaps/default/config.h diff --git a/keyboards/kbd8x/keymaps/default/keymap.c b/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c index 3d315035b..a7dcd5518 100644 --- a/keyboards/kbd8x/keymaps/default/keymap.c +++ b/keyboards/kbdfans/kbd8x/keymaps/default/keymap.c @@ -25,6 +25,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_RSFT, KC_UP, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_MENU, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + [1] = LAYOUT_all( + 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, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, RESET, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, BL_TOGG, BL_INC, BL_DEC, BL_BRTG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) diff --git a/keyboards/kbd8x/keymaps/default/readme.md b/keyboards/kbdfans/kbd8x/keymaps/default/readme.md index 773a3dfba..773a3dfba 100644 --- a/keyboards/kbd8x/keymaps/default/readme.md +++ b/keyboards/kbdfans/kbd8x/keymaps/default/readme.md diff --git a/keyboards/kbd8x/keymaps/default_backlighting/config.h b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/config.h index fa7db0bc1..fa7db0bc1 100644 --- a/keyboards/kbd8x/keymaps/default_backlighting/config.h +++ b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/config.h diff --git a/keyboards/kbd8x/keymaps/default_backlighting/keymap.c b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c index e664575d5..e664575d5 100644 --- a/keyboards/kbd8x/keymaps/default_backlighting/keymap.c +++ b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/keymap.c diff --git a/keyboards/kbd8x/keymaps/default_backlighting/readme.md b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/readme.md index 773a3dfba..773a3dfba 100644 --- a/keyboards/kbd8x/keymaps/default_backlighting/readme.md +++ b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/readme.md diff --git a/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk new file mode 100644 index 000000000..d98bb1cb1 --- /dev/null +++ b/keyboards/kbdfans/kbd8x/keymaps/default_backlighting/rules.mk @@ -0,0 +1 @@ +#Build Options diff --git a/keyboards/kbd8x/readme.md b/keyboards/kbdfans/kbd8x/readme.md index 8c50af68f..9f8555560 100644 --- a/keyboards/kbd8x/readme.md +++ b/keyboards/kbdfans/kbd8x/readme.md @@ -1,4 +1,4 @@ -# KBD 8X +# KBD8X ![kbd8x](imgur.com image replace me!) @@ -10,6 +10,6 @@ Hardware Availability: [KBDFans](https://kbdfans.cn/blogs/updates/kbd-8x-update- Make example for this keyboard (after setting up your build environment): - make kbd8x:default + make kbdfans/kbd8x:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/kbd8x/rules.mk b/keyboards/kbdfans/kbd8x/rules.mk index e5925463e..be7577564 100644 --- a/keyboards/kbd8x/rules.mk +++ b/keyboards/kbdfans/kbd8x/rules.mk @@ -60,8 +60,8 @@ COMMAND_ENABLE = yes # Commands for debug and configuration SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend # if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work NKRO_ENABLE = no # USB Nkey Rollover -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default -RGBLIGHT_ENABLE ?= yes # Enable keyboard RGB underglow +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/kbdfans/readme.md b/keyboards/kbdfans/readme.md new file mode 100644 index 000000000..1ba5ed3d1 --- /dev/null +++ b/keyboards/kbdfans/readme.md @@ -0,0 +1,17 @@ +# KBDFans + +KBDfans is a keyboard retailer located in China. + +## Online Stores + +**Website:** https://kbdfans.cn/ +**AliExpress:** https://kbdfans.aliexpress.com/ +**eBay:** https://www.ebay.com/str/KBDfans/ +**Taobao:** https://yikewaishe.taobao.com/ + +## Social Media + +**Discord:** https://discord.gg/HMZKDhn +**Facebook:** https://www.facebook.com/KBDfanskeyboard/ +**Instagram:** https://www.instagram.com/kbdfans.cn/ + diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index 29695d0b9..5c002f9b3 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -102,11 +102,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kc60/keymaps/noroadsleft/keymap.c b/keyboards/kc60/keymaps/noroadsleft/keymap.c index f28f2144f..ee1f69e91 100644 --- a/keyboards/kc60/keymaps/noroadsleft/keymap.c +++ b/keyboards/kc60/keymaps/noroadsleft/keymap.c @@ -1,4 +1,5 @@ #include QMK_KEYBOARD_H +#include "version.h" #include <sendstring_dvorak.h> //#include <sendstring_colemak.h> #include <print.h> @@ -84,19 +85,19 @@ enum custom_keycodes { Q2_ESC, Q2_GRV, MC_UNDO, - MC_PSTE + MC_PSTE, + NUBS_Z, + VRSN }; -// define modifiers -#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL_MASK (MOD_BIT(KC_LCTL)|MOD_BIT(KC_RCTRL)) -#define MODS_ALT_MASK (MOD_BIT(KC_LALT)|MOD_BIT(KC_RALT)) -#define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +/******************* +** MODIFIER MASKS ** +*******************/ +#define MOD_MASK_RALT (MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { - uint8_t modifiers = get_mods(); switch(keycode) { // these are our macros! case F_CAPS: @@ -118,60 +119,49 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } }; return false; - break; case T_L3DED: if (record->event.pressed) { SEND_STRING("lavak3DED "); }; return false; - break; case G_PUSH: if (record->event.pressed) { SEND_STRING("git push origin "); }; return false; - break; case G_FTCH: if (record->event.pressed) { - SEND_STRING("git fetch upstream"); + if ( get_mods() & MOD_MASK_SHIFT ) { + clear_mods(); + SEND_STRING("git pull upstream "); + } else { + SEND_STRING("git fetch upstream "); + } }; return false; - break; case G_COMM: if (record->event.pressed) { SEND_STRING("git commit -m \"\"" SS_TAP(X_LEFT)); layer_off(_MACROS); }; return false; - break; - case G_RST: - if (record->event.pressed) { - SEND_STRING("git histt -n 10" SS_TAP(X_ENTER) "git reset --soft "); - layer_off(_MACROS); - }; - return false; - break; - case G_C10R: - if (record->event.pressed) { - SEND_STRING("cf/"); - layer_off(_MACROS); - }; - return false; - break; case G_BRCH: if (record->event.pressed) { - SEND_STRING("$(git branch-name)"); + if ( get_mods() & MOD_MASK_SHIFT ) { + clear_mods(); + SEND_STRING("master"); + } else { + SEND_STRING("$(git branch-name)"); + } layer_off(_MACROS); }; return false; - break; case SIGNA: if (record->event.pressed) { SEND_STRING("\\- @noroadsleft" SS_TAP(X_ENTER)); layer_off(_MACROS); }; return false; - break; case GO_Q2: if (record->event.pressed) { //default_layer_set(_QWERTY); @@ -180,7 +170,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { //layer_off(_SYSTEM); }; return false; - break; case Q2_ON: if (record->event.pressed) { SEND_STRING(SS_TAP(X_ENTER)); @@ -188,7 +177,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2_DVORAK); }; return false; - break; case Q2_OFF: if (record->event.pressed) { SEND_STRING(SS_TAP(X_ENTER)); @@ -196,7 +184,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2); }; return false; - break; case Q2_ESC: if (record->event.pressed) { SEND_STRING(SS_TAP(X_ESCAPE)); @@ -204,7 +191,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2); }; return false; - break; case Q2_GRV: if (record->event.pressed) { SEND_STRING(SS_TAP(X_GRAVE)); @@ -213,27 +199,38 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_on(_QUAKE2_CONSOLE); }; return false; - break; case MC_UNDO: if (record->event.pressed) { - if ( modifiers & MODS_SHIFT_MASK ) { + if ( get_mods() & MOD_MASK_SHIFT ) { SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); } else { SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_Z) SS_UP(X_LGUI) ); } }; return false; - break; case MC_PSTE: if (record->event.pressed) { - if ( modifiers & MODS_SHIFT_MASK ) { + if ( get_mods() & MOD_MASK_SHIFT ) { SEND_STRING( SS_DOWN(X_LSHIFT) SS_DOWN(X_LGUI) SS_DOWN(X_LALT) SS_TAP(X_V) SS_UP(X_LALT) SS_UP(X_LGUI) SS_UP(X_LSHIFT) ); } else { SEND_STRING( SS_DOWN(X_LGUI) SS_TAP(X_V) SS_UP(X_LGUI) ); } }; return false; - break; + case NUBS_Z: + if (record->event.pressed) { + if ( get_mods() & MOD_MASK_RALT ) { + SEND_STRING( SS_TAP(X_NONUS_BSLASH) ); + } else { + SEND_STRING( SS_TAP(X_Z) ); + } + }; + return false; + case VRSN: + if (record->event.pressed) { + SEND_STRING( QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ); + } + return false; } // switch() return true; }; @@ -252,7 +249,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_GESC, 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_BSPC, \ 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_BSLS, \ FW_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LSFT, NUBS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(_FW), KC_RCTL \ ), @@ -375,15 +372,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 TG(_MA), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, G_PUSH, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, G_RST, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ - _______, _______, _______, G_C10R, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ + _______, _______, _______, G_FTCH, G_COMM, _______, _______, _______, _______, T_L3DED, _______, _______, _______, \ + _______, _______, _______, _______, _______, G_BRCH, SIGNA, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, NO_CHNG, _______ \ ), /* System layer */ [_SYSTEM] = LAYOUT_60_ansi( // 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 - TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, XXXXXXX, XXXXXXX, \ + TG(_SY), TO(_QW), TO(_DV), TO(_CM), GO_Q2, XXXXXXX, XXXXXXX, XXXXXXX, RESET, XXXXXXX, DEBUG, XXXXXXX, VRSN, XXXXXXX, \ XXXXXXX, XXXXXXX, TG(_MC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, XXXXXXX, XXXXXXX, BL_DEC, BL_TOGG, BL_INC, BL_BRTG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ diff --git a/keyboards/kc60/keymaps/noroadsleft/readme.md b/keyboards/kc60/keymaps/noroadsleft/readme.md index 737fdc06b..59fbfd246 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme.md @@ -1,6 +1,6 @@ # @noroadsleft's KC60 keymap -### Last updated: September 2, 2018, 1:03 PM UTC-0700 +### Last updated: February 14, 2019, 3:50 AM UTC-0800 ![](https://i.imgur.com/tzhXQYI.jpg) diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md index bee0709f4..fff80760e 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch1.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md index 75a4fc524..142fe302f 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch2.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md index 80549ba5c..ebcb3cca8 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch3.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -18,9 +16,9 @@ These layers were born out of the confusion I have had trying to use the in-game chat and the console in [Quake 2](https://en.wikipedia.org/wiki/Quake_II). When Quake 2 came out, alternate keyboard layouts weren't really a thing. As a result, all in-game text input is hard-locked to US QWERTY, regardless of what the operating system is using for its input method. -I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L386), is a [macro](./keymap.c#L175-183) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. +I'm attempting to solve this by some creative use of QMK's macro feature. The keycode in the System layer that enables these layers, [`GO_Q2`](./keymap.c#L383), is a [macro](./keymap.c#L165-172) that sets the default layer to the QWERTY layer, then turns the Quake 2 layer `_Q2` on. The result is a partially-overwritten QWERTY layer, that has some keycodes with some creative layer switching. -When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L184-L191) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L192-L199) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L200-L207) that cancels the sending of the message, and undoes the layers. +When I hit the `Enter` key (bound in-game to text chat), the [macro keycode](./keymap.c#L173-L179) I've created sends the keycode for `Enter`, then follows with enabling the Hardware Dvorak layer and its corresponding overlay. Now the game is in text chat mode, and my keyboard is in Dvorak. When I hit `Enter` again, another `Enter` [keycode macro](./keymap.c#L180-L186) is sent, which sends the message, then the macro brings me back to the standard QWERTY+Quake 2 setup. Hitting `Escape` instead runs a [macro](./keymap.c#L187-L193) that cancels the sending of the message, and undoes the layers. I have been testing this configuration for a few months. Sometimes I end up still in Dvorak mode without any text input systems (in-game chat or the console) running, but it pretty much always happens when I'm focused on the game, so I don't know the cause yet. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md index f1b50846d..00e6b781b 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch4.md @@ -7,8 +7,6 @@ 4. **Function Layers** 5. [Other Layers](./readme_ch5.md) -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -44,7 +42,7 @@ Based on the Windows function layer, but removes some functions that are pointle Keycode(s) Sent | Notes :-------------------------------- | :---- -[`Q2_GRV`](./keymap.c#L208-L216) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. +[`Q2_GRV`](./keymap.c#L194-L201) | Sends `KC_GRV`, then enables the Dvorak, Quake 2 Dvorak, and Quake 2 Console layers. diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md index 64102eb88..e5ee7cbde 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_ch5.md @@ -7,8 +7,6 @@ 4. [Function Layers](./readme_ch4.md) 5. **Other Layers** -### Last updated: September 2, 2018, 1:03 PM UTC-0700 - ---- @@ -36,37 +34,79 @@ Tapping `Esc` exits the Macro layer, if the macro used doesn't do it automatical ### Macros -[![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0)](./keymap.c#L122-L127) -Inputs: `lavak3DED ` -Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). +#### [T_L3DED](./keymap.c#L122-L126) + +Output: `lavak3DED ` + +Twitch emote for [a streamer I watch a lot](https://www.twitch.tv/lavak3_). +![lavak3DED](https://static-cdn.jtvnw.net/emoticons/v1/821796/1.0) + +#### [G_PUSH](./keymap.c#L127-L131) + +Output: `git push origin ` -[G_PUSH](./keymap.c#L128-L133) -Inputs: `git push origin ` Everything from here down is related to Git or GitHub. -[G_FTCH](./keymap.c#L134-L139) -Inputs: `git fetch upstream` +#### [G_FTCH](./keymap.c#L132-L141) + +| Condition | Output | +| :-------- | :----- | +| If <kbd>Shift</kbd> is active | `git pull upstream ` | +| Otherwise | `git fetch upstream ` | + +#### [G_COMM](./keymap.c#L142-L147) + +Output: `git commit -m ""` <kbd>Left</kbd> -[G_COMM](./keymap.c#L140-L146) -Inputs: `git commit -m ""` `[Left]` Readies a `git commit` command, moves the cursor between the quotation marks, then disables the Macro layer. -[G_RST](./keymap.c#L147-L153) -Inputs: `git histt -n 10`, Enter, `git reset --soft ` -Runs a [git alias](./readme_git.md) that shows my last ten commits, then readies a `git reset --soft`. For when I commit something too soon. Disables the Macro layer when complete. +#### [G_BRCH](./keymap.c#L148-158) + +| Condition | Output | +| :-------- | :----- | +| If <kbd>Shift</kbd> is active | `master` | +| Otherwise | `$(git branch-name)` | -[G_C10R](./keymap.c#L154-L160) -Inputs: `cf/` -A branch prefix I use for my current work in QMK. Disables the Macro layer when finished. +`$(git branch-name)` is a [git alias](./readme_git.md) that returns the name of the current branch. This macro disables the Macro layer when finished. -[G_BRCH](./keymap.c#L161-L167) -Inputs: `$(git branch-name)` -A [git alias](./readme_git.md) that returns the name of the current branch. Disables the Macro layer when finished. +#### [SIGNA](./keymap.c#L159-L164) + +Output: `\- @noroadsleft` <kbd>Enter</kbd> -[SIGNA](./keymap.c#L168-L174) -Inputs: `\- @noroadsleft` `[Enter]` Sometimes on GitHub, I sign my comments. Types my GitHub name in Markdown syntax, and then taps the `Enter` key. Disables the Macro layer when finished. +#### [MC_UNDO](./keymap.c#L202-L210) + +| Condition | Output | +| :-------- | :----- | +| If <kbd>Shift</kbd> is active | <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Z</kbd> | +| Otherwise | <kbd>Command</kbd> + <kbd>Z</kbd> | + +An Undo shortcut that turns to Redo if <kbd>Shift</kbd> is being held. I'm not sure that part is required to get that behavior, but it works as desired, so I'm not messing with it. + +#### [MC_PSTE](./keymap.c#L211-L219) + +| Condition | Output | +| :-------- | :----- | +| If <kbd>Shift</kbd> is active | <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Option</kbd> + <kbd>V</kbd> | +| Otherwise | <kbd>Command</kbd> + <kbd>V</kbd> | + +The program I use this in uses <kbd>Shift</kbd> + <kbd>Command</kbd> + <kbd>Option</kbd> + <kbd>V</kbd> to paste while maintaining formatting (typeface, text size, etc.). Sometimes I want this and sometimes I don't. Using <kbd>Shift</kbd> changes the behavior. + +#### [NUBS_Z](./keymap.c#L220-L228) + +| Condition | Output | +| :-------- | :----- | +| If Right <kbd>Alt</kbd> is active | `KC_NUBS` | +| Otherwise | `KC_Z` | + +Sometimes I type in languages from countries that use ISO layout, but my keyboard is ANSI, so I have one key fewer. This macro simulates the Non-US Backslash key if I use Right Alt + Z. + +#### [VRSN](./keymap.c#L229-L233) + +Outputs a string that tells me the Git commit from which my flashed firmware was built. Looks something like: + + kc60/noroadsleft @ 0.6.240-20-ge91549-dirty ---- diff --git a/keyboards/kc60/keymaps/noroadsleft/readme_git.md b/keyboards/kc60/keymaps/noroadsleft/readme_git.md index 585d9c890..b81bb9409 100644 --- a/keyboards/kc60/keymaps/noroadsleft/readme_git.md +++ b/keyboards/kc60/keymaps/noroadsleft/readme_git.md @@ -4,46 +4,55 @@ ``` [alias] - # change branches + # Change branches co = checkout cob = checkout -b - # sync master - sync = "!f() { if [ $(git branch-name) != "master" ]; then git checkout master; fi; git pull upstream master; git push origin master; }; f" + # Cherry Pick + cp = cherry-pick + + # Check out a Pull Request + cop = "!f() { git fetch upstream pull/$1/head:pr/$1; git checkout pr/$1; }; f" + + # Sync master branch + sync = !git checkout master && git fetch upstream 2> /dev/null && git pull -n upstream master && git push origin master + + # Return the abbreviated SHA-1 of the last three commits, oldest to newest + rl = rev-list -n 3 --abbrev-commit --reverse HEAD + + # Add remote repo (for sending PRs to other forks, or checking out someone else's developments) + ar = "!f() { git remote add $1 https://github.com/$2/qmk_firmware.git; }; f" # Return the last five commits on the branch, in a more compact format - hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset%n %w(100,0,3)%s%d [%an]%n\" --graph --date=iso-local -n 5 - histm = log --pretty=format:\"%C(yellow)%h%Creset %w(100,0,3)%s%d [%an]\" --graph --date=iso-local -n 5 - histt = log --pretty=format:\"%C(yellow)%h%Creset %<(88,trunc)%s [%an]\" --graph --date=iso-local -n 5 - histb = log --reverse --pretty=format:\"- %<(98,trunc)%s [%an]\" --date=iso-local -n 5 + hist = log --pretty=format:\"%C(yellow)%h%Creset %Cgreen%ad%Creset %Cblue[%an%Cgreen% GK%Cblue]%C(yellow)%d%Creset%n %w(100,0,2)%s%n\" --graph --date=iso-local -n 5 + histt = log --pretty=format:\"* %C(yellow)%h%Creset %<(58,trunc)%s %Cblue%>(18,trunc)%an%Cgreen% G?%Creset @ %Cgreen%ad%Creset\" --date=iso-local -n 5 + histb = log --reverse --pretty=format:\"- %Cblue%>(20,trunc)%an %Creset%<(97,trunc)%s\" --date=iso-local -n 5 + + # Follow a file's filename history + follow = log --follow --name-only --pretty=format:\"%C(yellow)commit %H%Creset%d\nAuthor: %an <%ae>\nDate: %ad%n%n %s%n\" --date=iso-local # compact diff df = "diff --compact-summary" + # List all the files changed in a commit + dt = "diff-tree --no-commit-id --name-only -r" + # Short-form status - st = "!git status --short" + st = "!git status --short --untracked-files=no" # Returns the name of the current branch branch-name = "!git rev-parse --abbrev-ref HEAD" + bn = "!git branch-name" # short-form of the above - # short-form of the above - bn = "!git branch-name" + # Compare commit counts between current branch and QMK master + cc = "!f() { git fetch upstream; echo \"[0;32m$(git branch-name)[0m vs. [0;31mupstream/master[0m\"; git rev-list --left-right --count $(git branch-name)...upstream/master; }; f" - po = "push origin ($(git branch-name))" + # Push to origin repo + po = "push origin $(git branch-name)" # List the stashes sl = "stash list" - # Show the contents of a numbered stash - # Syntax: - # git st-show <int> - st-show = "!f() { git stash show stash@{$1} -p; }; f" - - # Apply a stash, without deleting it from the list of stashes - # Syntax: - # git st-copy <int> - st-copy = "!f() { git stash apply stash@{$1}; }; f" - # Unstage a file unstage = "reset HEAD" @@ -53,4 +62,15 @@ # Compare local master repo to its upstream branch. If anything is returned, local branch has diverged from upstream. cm = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master --compact-summary; }; f" cml = "!f() { git fetch upstream master; git diff $(git branch-name) upstream/master; }; f" + + # Delete a branch from local and remote + del-branch = "!f() { git branch -d $1; git push origin :$1; git fetch -p origin; }; f" + + # Rebase with signatures + rbv = rebase --exec 'git commit --amend --no-edit -n -S' -i + + # Force push without overwriting established history + pushf = push --force-with-lease + + ``` diff --git a/keyboards/kc60se/config.h b/keyboards/kc60se/config.h index 9f8b3e28a..54e66cb31 100644 --- a/keyboards/kc60se/config.h +++ b/keyboards/kc60se/config.h @@ -46,7 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 6 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -98,11 +97,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/bdn9/bdn9.c b/keyboards/keebio/bdn9/bdn9.c index 0ff55fd6d..0ff55fd6d 100644 --- a/keyboards/bdn9/bdn9.c +++ b/keyboards/keebio/bdn9/bdn9.c diff --git a/keyboards/bdn9/bdn9.h b/keyboards/keebio/bdn9/bdn9.h index 26b043560..26b043560 100644 --- a/keyboards/bdn9/bdn9.h +++ b/keyboards/keebio/bdn9/bdn9.h diff --git a/keyboards/bdn9/config.h b/keyboards/keebio/bdn9/config.h index 604da5ef4..23b92b6ce 100644 --- a/keyboards/bdn9/config.h +++ b/keyboards/keebio/bdn9/config.h @@ -32,7 +32,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_COLS 9 /* Keyboard Matrix Assignments */ -#define NO_PIN (~0) #define MATRIX_ROW_PINS { NO_PIN } #define MATRIX_COL_PINS { D2, D4, F4, D7, B1, B3, E6, B4, B2 } @@ -50,7 +49,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN D3 #ifdef RGB_DI_PIN - #define RGBLED_NUM 3 + #define RGBLED_NUM 4 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 @@ -67,8 +66,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/keebio/bdn9/info.json b/keyboards/keebio/bdn9/info.json new file mode 100644 index 000000000..a985a05e0 --- /dev/null +++ b/keyboards/keebio/bdn9/info.json @@ -0,0 +1,22 @@ +{ + "keyboard_name": "Keeb.io BDN9", + "url": "", + "maintainer": "nooges", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [ + {"x":0, "y":0}, + {"x":1, "y":0}, + {"x":2, "y":0}, + {"x":0, "y":1}, + {"x":1, "y":1}, + {"x":2, "y":1}, + {"x":0, "y":2}, + {"x":1, "y":2}, + {"x":2, "y":2} + ] + } + } +} diff --git a/keyboards/bdn9/keymaps/default/keymap.c b/keyboards/keebio/bdn9/keymaps/default/keymap.c index 66b9a3eb6..3bab86ae5 100644 --- a/keyboards/bdn9/keymaps/default/keymap.c +++ b/keyboards/keebio/bdn9/keymaps/default/keymap.c @@ -17,25 +17,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( - KC_A, KC_B, KC_C, \ - BL_STEP, KC_UP, RGB_MOD, \ + KC_MUTE, KC_HOME, KC_MPLY, \ + MO(1), KC_UP, RGB_MOD, \ KC_LEFT, KC_DOWN, KC_RGHT \ ), + [1] = LAYOUT( + RESET, BL_STEP, KC_STOP, \ + _______, KC_HOME, RGB_MOD, \ + KC_MPRV, KC_END, KC_MNXT \ + ), }; void encoder_update_user(uint8_t index, bool clockwise) { if (index == 0) { if (clockwise) { - tap_code(KC_PGDN); + tap_code(KC_VOLU); } else { - tap_code(KC_PGUP); + tap_code(KC_VOLD); } } else if (index == 1) { if (clockwise) { - tap_code(KC_DOWN); + tap_code(KC_PGDN); } else { - tap_code(KC_UP); + tap_code(KC_PGUP); } } } diff --git a/keyboards/bdn9/readme.md b/keyboards/keebio/bdn9/readme.md index c9d5ed0b3..ddbe7f144 100644 --- a/keyboards/bdn9/readme.md +++ b/keyboards/keebio/bdn9/readme.md @@ -10,6 +10,6 @@ Hardware Availability: [Keebio - BDN9](https://keeb.io/products/bdn9-3x3-9-key-m Make example for this keyboard (after setting up your build environment): - make bdn9:default + make keebio/bdn9:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/bdn9/rules.mk b/keyboards/keebio/bdn9/rules.mk index 3ab849108..3ab849108 100644 --- a/keyboards/bdn9/rules.mk +++ b/keyboards/keebio/bdn9/rules.mk diff --git a/keyboards/bfo9000/bfo9000.c b/keyboards/keebio/bfo9000/bfo9000.c index 2ae778e32..2ae778e32 100644 --- a/keyboards/bfo9000/bfo9000.c +++ b/keyboards/keebio/bfo9000/bfo9000.c diff --git a/keyboards/bfo9000/bfo9000.h b/keyboards/keebio/bfo9000/bfo9000.h index c3bd2236c..c3bd2236c 100644 --- a/keyboards/bfo9000/bfo9000.h +++ b/keyboards/keebio/bfo9000/bfo9000.h diff --git a/keyboards/bfo9000/config.h b/keyboards/keebio/bfo9000/config.h index 893fa5ab6..5dc2bd434 100644 --- a/keyboards/bfo9000/config.h +++ b/keyboards/keebio/bfo9000/config.h @@ -16,13 +16,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1169 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -46,14 +45,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 B4 - #define RGBLED_NUM 20 // Number of LEDs /* @@ -73,6 +66,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_ONESHOT //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - -#endif diff --git a/keyboards/bfo9000/i2c.c b/keyboards/keebio/bfo9000/i2c.c index 084c890c4..084c890c4 100644 --- a/keyboards/bfo9000/i2c.c +++ b/keyboards/keebio/bfo9000/i2c.c diff --git a/keyboards/bfo9000/i2c.h b/keyboards/keebio/bfo9000/i2c.h index c15b6bc50..c15b6bc50 100644 --- a/keyboards/bfo9000/i2c.h +++ b/keyboards/keebio/bfo9000/i2c.h diff --git a/keyboards/bfo9000/keymaps/andylikescandy6x18/config.h b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h index be57e385e..be57e385e 100644 --- a/keyboards/bfo9000/keymaps/andylikescandy6x18/config.h +++ b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/config.h diff --git a/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c index 24208e2a8..0aa1e780a 100644 --- a/keyboards/bfo9000/keymaps/andylikescandy6x18/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/andylikescandy6x18/keymap.c @@ -9,11 +9,6 @@ #define _RAISE 2 #define _NAVIGATION 3 - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Switch Layouts #define SWBASE M(_BASE) #define SWQWERTY M(_QWERTY) diff --git a/keyboards/keebio/bfo9000/keymaps/default/config.h b/keyboards/keebio/bfo9000/keymaps/default/config.h new file mode 100644 index 000000000..a9ae67911 --- /dev/null +++ b/keyboards/keebio/bfo9000/keymaps/default/config.h @@ -0,0 +1,27 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// #define USE_I2C + +/* Select hand configuration */ +// #define MASTER_RIGHT +// #define EE_HANDS diff --git a/keyboards/bfo9000/keymaps/default/keymap.c b/keyboards/keebio/bfo9000/keymaps/default/keymap.c index 5de5e123e..956e7b9ef 100644 --- a/keyboards/bfo9000/keymaps/default/keymap.c +++ b/keyboards/keebio/bfo9000/keymaps/default/keymap.c @@ -2,10 +2,6 @@ #define _BASE 0 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( \ diff --git a/keyboards/bfo9000/matrix.c b/keyboards/keebio/bfo9000/matrix.c index 2ca5f4d87..2ca5f4d87 100644 --- a/keyboards/bfo9000/matrix.c +++ b/keyboards/keebio/bfo9000/matrix.c diff --git a/keyboards/bfo9000/readme.md b/keyboards/keebio/bfo9000/readme.md index d2175af23..059f2800a 100644 --- a/keyboards/bfo9000/readme.md +++ b/keyboards/keebio/bfo9000/readme.md @@ -9,10 +9,10 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make bfo9000:default + make keebio/bfo9000:default Example of flashing this keyboard: - make bfo9000:default:avrdude + make keebio/bfo9000:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/bfo9000/rules.mk b/keyboards/keebio/bfo9000/rules.mk index d11f9a54e..d11f9a54e 100644 --- a/keyboards/bfo9000/rules.mk +++ b/keyboards/keebio/bfo9000/rules.mk diff --git a/keyboards/bfo9000/serial.c b/keyboards/keebio/bfo9000/serial.c index fea57b651..fea57b651 100644 --- a/keyboards/bfo9000/serial.c +++ b/keyboards/keebio/bfo9000/serial.c diff --git a/keyboards/bfo9000/serial.h b/keyboards/keebio/bfo9000/serial.h index 627619457..627619457 100644 --- a/keyboards/bfo9000/serial.h +++ b/keyboards/keebio/bfo9000/serial.h diff --git a/keyboards/bfo9000/split_util.c b/keyboards/keebio/bfo9000/split_util.c index 7f200e6c9..7f200e6c9 100644 --- a/keyboards/bfo9000/split_util.c +++ b/keyboards/keebio/bfo9000/split_util.c diff --git a/keyboards/bfo9000/split_util.h b/keyboards/keebio/bfo9000/split_util.h index 595a0659e..595a0659e 100644 --- a/keyboards/bfo9000/split_util.h +++ b/keyboards/keebio/bfo9000/split_util.h diff --git a/keyboards/chocopad/README.md b/keyboards/keebio/chocopad/README.md index ae28009c3..3cdb3b3b9 100644 --- a/keyboards/chocopad/README.md +++ b/keyboards/keebio/chocopad/README.md @@ -9,6 +9,6 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make chocopad:default + make keebio/chocopad:default See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/chocopad/chocopad.c b/keyboards/keebio/chocopad/chocopad.c index f54753af5..f54753af5 100644 --- a/keyboards/chocopad/chocopad.c +++ b/keyboards/keebio/chocopad/chocopad.c diff --git a/keyboards/chocopad/chocopad.h b/keyboards/keebio/chocopad/chocopad.h index ec73b1465..d37aefc57 100644 --- a/keyboards/chocopad/chocopad.h +++ b/keyboards/keebio/chocopad/chocopad.h @@ -1,5 +1,4 @@ -#ifndef CHOCOPAD_H -#define CHOCOPAD_H +#pragma once #include "quantum.h" @@ -28,5 +27,3 @@ KC_##C1, KC_##C2, KC_##C3, KC_##C4, \ KC_##D1, KC_##D2, KC_##D3, KC_##D4 \ ) - -#endif diff --git a/keyboards/chocopad/config.h b/keyboards/keebio/chocopad/config.h index d2a1a7b48..fb00ae70a 100644 --- a/keyboards/chocopad/config.h +++ b/keyboards/keebio/chocopad/config.h @@ -4,7 +4,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1144 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -35,11 +35,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 8 @@ -47,7 +42,6 @@ #define RGBLIGHT_VAL_STEP 8 #endif #define RGB_DI_PIN D3 - #define RGBLED_NUM 4 #endif diff --git a/keyboards/chocopad/info.json b/keyboards/keebio/chocopad/info.json index c5a7d42bb..c5a7d42bb 100644 --- a/keyboards/chocopad/info.json +++ b/keyboards/keebio/chocopad/info.json diff --git a/keyboards/chocopad/keymaps/default/config.h b/keyboards/keebio/chocopad/keymaps/default/config.h index 7fa3bf328..7fa3bf328 100644 --- a/keyboards/chocopad/keymaps/default/config.h +++ b/keyboards/keebio/chocopad/keymaps/default/config.h diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/keebio/chocopad/keymaps/default/keymap.c index df22e8b1f..7b4b752c9 100644 --- a/keyboards/chocopad/keymaps/default/keymap.c +++ b/keyboards/keebio/chocopad/keymaps/default/keymap.c @@ -4,8 +4,6 @@ #define _FN1 1 #define _FN2 2 -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_ortho_4x4( diff --git a/keyboards/chocopad/keymaps/default/rules.mk b/keyboards/keebio/chocopad/keymaps/default/rules.mk index a81250cdf..a81250cdf 100644 --- a/keyboards/chocopad/keymaps/default/rules.mk +++ b/keyboards/keebio/chocopad/keymaps/default/rules.mk diff --git a/keyboards/chocopad/keymaps/khord/config.h b/keyboards/keebio/chocopad/keymaps/khord/config.h index 7fa3bf328..7fa3bf328 100644 --- a/keyboards/chocopad/keymaps/khord/config.h +++ b/keyboards/keebio/chocopad/keymaps/khord/config.h diff --git a/keyboards/chocopad/keymaps/khord/keymap.c b/keyboards/keebio/chocopad/keymaps/khord/keymap.c index ea36c6f64..2c871c4e8 100644 --- a/keyboards/chocopad/keymaps/khord/keymap.c +++ b/keyboards/keebio/chocopad/keymaps/khord/keymap.c @@ -35,7 +35,7 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = LAYOUT_kc( //,----+----+----+----. P7 , P8 , P9 ,BSPC, //|----+----+----+----| @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----' ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( //,----+----+----+----. ESC ,MAC1,MAC2,DEL , //|----+----+----+----| @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----' ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( //,----+----+----+----. RST , XX , XX , XX , //|----+----+----+----| diff --git a/keyboards/chocopad/keymaps/khord/rules.mk b/keyboards/keebio/chocopad/keymaps/khord/rules.mk index a81250cdf..a81250cdf 100644 --- a/keyboards/chocopad/keymaps/khord/rules.mk +++ b/keyboards/keebio/chocopad/keymaps/khord/rules.mk diff --git a/keyboards/chocopad/rules.mk b/keyboards/keebio/chocopad/rules.mk index 39ce38e10..39ce38e10 100644 --- a/keyboards/chocopad/rules.mk +++ b/keyboards/keebio/chocopad/rules.mk diff --git a/keyboards/dilly/README.md b/keyboards/keebio/dilly/README.md index a676313f3..74139eaea 100644 --- a/keyboards/dilly/README.md +++ b/keyboards/keebio/dilly/README.md @@ -9,6 +9,6 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make dilly:default + make keebio/dilly:default See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/dilly/config.h b/keyboards/keebio/dilly/config.h index 084186fc6..1489ec302 100644 --- a/keyboards/dilly/config.h +++ b/keyboards/keebio/dilly/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 8 diff --git a/keyboards/dilly/dilly.c b/keyboards/keebio/dilly/dilly.c index 89affe850..89affe850 100644 --- a/keyboards/dilly/dilly.c +++ b/keyboards/keebio/dilly/dilly.c diff --git a/keyboards/dilly/dilly.h b/keyboards/keebio/dilly/dilly.h index c7cc4aa72..c7cc4aa72 100644 --- a/keyboards/dilly/dilly.h +++ b/keyboards/keebio/dilly/dilly.h diff --git a/keyboards/dilly/info.json b/keyboards/keebio/dilly/info.json index 6b67d45b9..6b67d45b9 100644 --- a/keyboards/dilly/info.json +++ b/keyboards/keebio/dilly/info.json diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/config.h b/keyboards/keebio/dilly/keymaps/bakingpy/config.h new file mode 100644 index 000000000..d141283ea --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/bakingpy/config.h @@ -0,0 +1,3 @@ +#pragma once + +#define TAPPING_TERM 150 diff --git a/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c b/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c new file mode 100644 index 000000000..7b52d5ff7 --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/bakingpy/keymap.c @@ -0,0 +1,106 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 +#define _FN3 3 +#define _FN4 4 +#define _FN5 5 + +#define KC_ KC_TRNS + +// Tap-Hold keys +#define KC_ASFT MT(MOD_LSFT, KC_A) +#define KC_F_L3 LT(_FN3, KC_F) +#define KC_ZCTL MT(MOD_LCTL, KC_Z) +#define KC_XALT MT(MOD_LALT, KC_X) +#define KC_CGUI MT(MOD_LGUI, KC_C) +#define KC_V_L4 LT(_FN4, KC_V) +#define KC_SPL2 LT(_FN2, KC_SPC) +#define KC_B_L1 LT(_FN1, KC_B) +#define KC_N_L5 LT(_FN5, KC_N) +#define KC_MALT MT(MOD_RALT, KC_M) +#define KC_BSCT MT(MOD_RCTL, KC_BSPC) +#define KC_ENTS MT(MOD_RSFT, KC_ENT) +#define KC_ESCS MT(MOD_RSFT, KC_ESC) +#define KC_SCNS MT(MOD_RSFT, KC_SCLN) + +#define KC_GUIC LGUI(KC_C) + +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_RMOD RGB_MOD +#define KC_RHUI RGB_HUI +#define KC_RHUD RGB_HUD +#define KC_RSAI RGB_SAI +#define KC_RSAD RGB_SAD +#define KC_RVAI RGB_VAI +#define KC_RVAD RGB_VAD + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + Q , W , E , R , T , Y , U , I , O , P , + //|----+----+----+----+----+----+----+----+----+----| + ASFT, S , D ,F_L3, G , H , J , K , L ,ESCS, + //|----+----+----+----+----+----+----+----+----+----| + ZCTL,XALT,CGUI,V_L4,SPL2,B_L1,N_L5,MALT,BSCT,ENTS + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, + //|----+----+----+----+----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, , , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN2] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , + //|----+----+----+----+----+----+----+----+----+----| + F11 ,F12 , , , ,LEFT,DOWN, UP ,RGHT,GRV , + //|----+----+----+----+----+----+----+----+----+----| + , , , , ,DEL , , , , + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN3] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,MINS,EQL ,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT, + //|----+----+----+----+----+----+----+----+----+----| + , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN4] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE, + //|----+----+----+----+----+----+----+----+----+----| + TAB , , , , , LT , GT ,QUES,COLN,DQUO, + //|----+----+----+----+----+----+----+----+----+----| + , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END + //`----+----+----+----+----+----+----+----+----+----' + ), + + [_FN5] = LAYOUT_kc( + //,----+----+----+----+----+----+----+----+----+----. + RTOG,RMOD, ,RST ,RHUI,RSAI,RVAI, , , , + //|----+----+----+----+----+----+----+----+----+----| + , ,DBUG, ,RHUD,RSAD,RVAD, , , , + //|----+----+----+----+----+----+----+----+----+----| + BL_S, ,GUIC, , , , , , , + //`----+----+----+----+----+----+----+----+----+----' + ) + +}; diff --git a/keyboards/dilly/keymaps/default/rules.mk b/keyboards/keebio/dilly/keymaps/bakingpy/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/dilly/keymaps/default/rules.mk +++ b/keyboards/keebio/dilly/keymaps/bakingpy/rules.mk diff --git a/keyboards/keebio/dilly/keymaps/default/config.h b/keyboards/keebio/dilly/keymaps/default/config.h new file mode 100644 index 000000000..6f70f09be --- /dev/null +++ b/keyboards/keebio/dilly/keymaps/default/config.h @@ -0,0 +1 @@ +#pragma once diff --git a/keyboards/dilly/keymaps/default/keymap.c b/keyboards/keebio/dilly/keymaps/default/keymap.c index 03b539e3d..dc92afbd0 100644 --- a/keyboards/dilly/keymaps/default/keymap.c +++ b/keyboards/keebio/dilly/keymaps/default/keymap.c @@ -9,8 +9,6 @@ extern keymap_config_t keymap_config; #define _FN4 4 #define _FN5 5 -#define _______ KC_TRNS - // Tap-Hold keys #define KC_ASFT MT(MOD_LSFT, KC_A) #define KC_F_L3 LT(_FN3, KC_F) diff --git a/keyboards/dilly/keymaps/delmo/rules.mk b/keyboards/keebio/dilly/keymaps/default/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/dilly/keymaps/delmo/rules.mk +++ b/keyboards/keebio/dilly/keymaps/default/rules.mk diff --git a/keyboards/dilly/keymaps/delmo/config.h b/keyboards/keebio/dilly/keymaps/delmo/config.h index 4d704c17e..4d704c17e 100644 --- a/keyboards/dilly/keymaps/delmo/config.h +++ b/keyboards/keebio/dilly/keymaps/delmo/config.h diff --git a/keyboards/dilly/keymaps/delmo/keymap.c b/keyboards/keebio/dilly/keymaps/delmo/keymap.c index d3e8c5daf..9d6c900ff 100644 --- a/keyboards/dilly/keymaps/delmo/keymap.c +++ b/keyboards/keebio/dilly/keymaps/delmo/keymap.c @@ -10,7 +10,6 @@ extern keymap_config_t keymap_config; #define _FN5 5 #define KC_ KC_TRNS -#define _______ KC_TRNS // Tap-Hold keys //#define KC_ASFT MT(MOD_LSFT, KC_A) @@ -103,4 +102,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ) -};
\ No newline at end of file +}; diff --git a/keyboards/nyquist/keymaps/default/rules.mk b/keyboards/keebio/dilly/keymaps/delmo/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/nyquist/keymaps/default/rules.mk +++ b/keyboards/keebio/dilly/keymaps/delmo/rules.mk diff --git a/keyboards/dilly/keymaps/pletcher/config.h b/keyboards/keebio/dilly/keymaps/pletcher/config.h index 805bef418..805bef418 100644 --- a/keyboards/dilly/keymaps/pletcher/config.h +++ b/keyboards/keebio/dilly/keymaps/pletcher/config.h diff --git a/keyboards/dilly/keymaps/pletcher/keymap.c b/keyboards/keebio/dilly/keymaps/pletcher/keymap.c index 4e7a5c89d..8bad575d6 100644 --- a/keyboards/dilly/keymaps/pletcher/keymap.c +++ b/keyboards/keebio/dilly/keymaps/pletcher/keymap.c @@ -10,7 +10,6 @@ extern keymap_config_t keymap_config; #define _FN5 5 #define KC_ KC_TRNS -#define _______ KC_TRNS // Tap-Hold keys #define KC_F_L3 LT(_FN3, KC_F) diff --git a/keyboards/dilly/keymaps/pletcher/rules.mk b/keyboards/keebio/dilly/keymaps/pletcher/rules.mk index 9b9dd8341..9b9dd8341 100644 --- a/keyboards/dilly/keymaps/pletcher/rules.mk +++ b/keyboards/keebio/dilly/keymaps/pletcher/rules.mk diff --git a/keyboards/dilly/rules.mk b/keyboards/keebio/dilly/rules.mk index 812362567..812362567 100644 --- a/keyboards/dilly/rules.mk +++ b/keyboards/keebio/dilly/rules.mk diff --git a/keyboards/fourier/rev1/config.h b/keyboards/keebio/fourier/config.h index d9913d7de..70967a13f 100644 --- a/keyboards/fourier/rev1/config.h +++ b/keyboards/keebio/fourier/config.h @@ -18,6 +18,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once +#include "config_common.h" + /* USB Device descriptor parameter */ #define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1247 @@ -35,11 +37,17 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROW_PINS { F4, D7, E6, B4 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define QMK_ESC_OUTPUT F5 +#define QMK_ESC_INPUT F4 +#define QMK_LED B0 +#define QMK_SPEAKER C6 + /* Split Defines */ #define SPLIT_HAND_PIN D2 /* serial.c configuration for split keyboard */ #define SOFT_SERIAL_PIN D0 + /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST @@ -51,11 +59,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/fourier/fourier.c b/keyboards/keebio/fourier/fourier.c index 1bd47f98b..1bd47f98b 100644 --- a/keyboards/fourier/fourier.c +++ b/keyboards/keebio/fourier/fourier.c diff --git a/keyboards/fourier/fourier.h b/keyboards/keebio/fourier/fourier.h index 1b4585c82..7505ad8b3 100644 --- a/keyboards/fourier/fourier.h +++ b/keyboards/keebio/fourier/fourier.h @@ -6,6 +6,23 @@ #include "quantum.h" +#define LAYOUT( \ + LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ + LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB7, \ + LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC3, RC4, RC5, RC6, RC7, \ + LD1, LD2, LD3, LD4, LD5, RD1, RD4, RD5, RD6, RD7 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, KC_NO}, \ + { LB1, LB2, LB3, LB4, LB5, LB6, KC_NO}, \ + { LC1, LC2, LC3, LC4, LC5, LC6, KC_NO}, \ + { LD1, LD2, LD3, LD4, LD5, KC_NO, KC_NO}, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7}, \ + { RB1, RB2, RB3, RB4, RB5, KC_NO, RB7}, \ + { RC1, KC_NO, RC3, RC4, RC5, RC6, RC7}, \ + { RD1, KC_NO, KC_NO, RD4, RD5, RD6, RD7} \ + } + // Used to create a keymap using only KC_ prefixed keys #define LAYOUT_kc( \ LA1, LA2, LA3, LA4, LA5, LA6, RA1, RA2, RA3, RA4, RA5, RA6, RA7, \ diff --git a/keyboards/fourier/info.json b/keyboards/keebio/fourier/info.json index b16476c4b..b16476c4b 100644 --- a/keyboards/fourier/info.json +++ b/keyboards/keebio/fourier/info.json diff --git a/keyboards/fourier/keymaps/default/config.h b/keyboards/keebio/fourier/keymaps/default/config.h index 18f4c1f7a..8cea39218 100644 --- a/keyboards/fourier/keymaps/default/config.h +++ b/keyboards/keebio/fourier/keymaps/default/config.h @@ -21,5 +21,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Use I2C or Serial, not both */ -#define USE_SERIAL // #define USE_I2C diff --git a/keyboards/fourier/keymaps/default/keymap.c b/keyboards/keebio/fourier/keymaps/default/keymap.c index a08f27b7c..341bc99a7 100644 --- a/keyboards/fourier/keymaps/default/keymap.c +++ b/keyboards/keebio/fourier/keymaps/default/keymap.c @@ -14,15 +14,15 @@ enum custom_keycodes { #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) -#define KC_SPFN1 LT(_FN1, KC_SPACE) -#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define SPFN1 LT(_FN1, KC_SPACE) +#define BSFN2 LT(_FN2, KC_BSPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LGUI, KC_FN1, KC_SPFN1, KC_BSFN2, KC_RGUI, KC_RALT, KC_FN2, KC_RCTL + KC_LCTL, KC_LALT, KC_LGUI, KC_FN1, SPFN1, BSFN2, KC_RGUI, KC_RALT, KC_FN2, KC_RCTL ), [_FN1] = LAYOUT( diff --git a/keyboards/fourier/keymaps/valgrahf/rules.mk b/keyboards/keebio/fourier/keymaps/default/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/fourier/keymaps/valgrahf/rules.mk +++ b/keyboards/keebio/fourier/keymaps/default/rules.mk diff --git a/keyboards/fourier/keymaps/jennetters/config.h b/keyboards/keebio/fourier/keymaps/jennetters/config.h index 5f99c65ad..5f99c65ad 100644 --- a/keyboards/fourier/keymaps/jennetters/config.h +++ b/keyboards/keebio/fourier/keymaps/jennetters/config.h diff --git a/keyboards/fourier/keymaps/jennetters/keymap.c b/keyboards/keebio/fourier/keymaps/jennetters/keymap.c index 5037d3ddf..a6ec95e1e 100644 --- a/keyboards/fourier/keymaps/jennetters/keymap.c +++ b/keyboards/keebio/fourier/keymaps/jennetters/keymap.c @@ -15,8 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_SPFN1 LT(_FN1, KC_SPACE) @@ -53,7 +51,7 @@ enum { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BASE] = LAYOUT( +[_BASE] = LAYOUT( // ,----+----+----+----+----+----|----+----+----+----+----+----+----. // |ESC | Q1 | W2 | E3 | R4 | T5 | Y6 | U7 | I8 | O9 | P0 | -[ | =] | // |----`----`----`----`----`----|----`----`----`----`----`----`----| @@ -63,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |-------`----`----`----`----`----|----`----`----`----`----`------| // | CTL | SYS| ALT | SP SPACE | SPACE | FN1 | CTL | \ | ENT | // `-----+----+-----+----+--------|--------+-----+------+----+------' - + TD(ESC_GR), TD(Q_1), TD(W_2), TD(E_3), TD(R_4), TD(T_5), TD(Y_6), TD(U_7), TD(I_8), TD(O_9), TD(P_0),TD(MIN_LB),TD(EQL_RB), \ KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, TD(SCL_QUO), KC_BSPC, \ KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ @@ -80,11 +78,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |-------`----`----`----`----`----|----`----`----`----`----`------| // | | | | | | | | | | | // `-----+----+-----+----+--------|--------+-----+------+----+------' - + , , UP, , , , , , , , , , , \ , LEFT, DOWN, RIGHT, , , , , , , QUOT, DEL, \ , , , , , , , , , , NUBS, , \ - , , , , , , , , , + , , , , , , , , , ), [_FN2] = LAYOUT_kc( @@ -101,7 +99,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , , , , , , , , , \ , , , , , , , , , , , , \ , , , , , , , , , , , , \ - , , , , , , , , , + , , , , , , , , , ) }; @@ -145,4 +143,4 @@ qk_tap_dance_action_t tap_dance_actions[] = { [EQL_RB] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_RBRC), //Tap once for =, twice for ]/} [SCL_QUO] = ACTION_TAP_DANCE_DOUBLE(KC_SCLN, KC_QUOT) //Tap once for ;, '/" // Other declarations would go here, separated by commas, if you have them -};
\ No newline at end of file +}; diff --git a/keyboards/fourier/keymaps/jennetters/rules.mk b/keyboards/keebio/fourier/keymaps/jennetters/rules.mk index 1ba2fa8fb..1ba2fa8fb 100644 --- a/keyboards/fourier/keymaps/jennetters/rules.mk +++ b/keyboards/keebio/fourier/keymaps/jennetters/rules.mk diff --git a/keyboards/bfo9000/keymaps/default/config.h b/keyboards/keebio/fourier/keymaps/maxim/config.h index 6b31e8d14..fb13b56cd 100644 --- a/keyboards/bfo9000/keymaps/default/config.h +++ b/keyboards/keebio/fourier/keymaps/maxim/config.h @@ -18,8 +18,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once #include "config_common.h" @@ -28,10 +27,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define USE_SERIAL // #define USE_I2C -/* Select hand configuration */ - -#define MASTER_LEFT -// #define MASTER_RIGHT -// #define EE_HANDS - -#endif diff --git a/keyboards/keebio/fourier/keymaps/maxim/keymap.c b/keyboards/keebio/fourier/keymaps/maxim/keymap.c new file mode 100644 index 000000000..68bd649ec --- /dev/null +++ b/keyboards/keebio/fourier/keymaps/maxim/keymap.c @@ -0,0 +1,45 @@ +#include QMK_KEYBOARD_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 _BASE 0 +#define _FN1 1 +#define _FN2 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + + +#define FN1 MO(_FN1) +#define FN2 MO(_FN2) +#define SPFN1 LT(_FN1, KC_SPACE) +#define BSFN2 LT(_FN2, KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, KC_BSPC, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_QUOT, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + XXXXXXX, KC_LCTL, KC_LALT, XXXXXXX, KC_SPC, FN1, KC_RCTL, KC_RGUI, FN2, XXXXXXX + ), + + [_FN1] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, + RESET, RGB_HUI, RGB_SAI, RGB_VAI, KC_VOLU, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_SCLN, _______, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_VOLD, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, KC_UP, _______, + RGB_TOG, _______, _______, _______, _______, KC_DEL, KC_0, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN2] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, + _______, _______, _______, KC_INS, KC_PGUP, KC_HOME, _______, _______, _______, _______, KC_COLN, _______, + _______, _______, _______, KC_DEL, KC_PGDN, KC_END, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______, _______ + ) + +}; diff --git a/keyboards/fourier/keymaps/valgrahf/config.h b/keyboards/keebio/fourier/keymaps/valgrahf/config.h index 20e49c421..20e49c421 100644 --- a/keyboards/fourier/keymaps/valgrahf/config.h +++ b/keyboards/keebio/fourier/keymaps/valgrahf/config.h diff --git a/keyboards/fourier/keymaps/valgrahf/keymap.c b/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c index 4679d165c..a31c88475 100644 --- a/keyboards/fourier/keymaps/valgrahf/keymap.c +++ b/keyboards/keebio/fourier/keymaps/valgrahf/keymap.c @@ -15,8 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 LT(_FN1, KC_NO) #define KC_FN2 LT(_FN2, KC_NO) #define KC_SPFN LT(_FN1, KC_SPACE) diff --git a/keyboards/fourier/rev1/rules.mk b/keyboards/keebio/fourier/keymaps/valgrahf/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/fourier/rev1/rules.mk +++ b/keyboards/keebio/fourier/keymaps/valgrahf/rules.mk diff --git a/keyboards/fourier/keymaps/xyverz/config.h b/keyboards/keebio/fourier/keymaps/xyverz/config.h index 9b46a61cc..9b46a61cc 100644 --- a/keyboards/fourier/keymaps/xyverz/config.h +++ b/keyboards/keebio/fourier/keymaps/xyverz/config.h diff --git a/keyboards/fourier/keymaps/xyverz/keymap.c b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c index 09aaa97f7..4e864cdef 100644 --- a/keyboards/fourier/keymaps/xyverz/keymap.c +++ b/keyboards/keebio/fourier/keymaps/xyverz/keymap.c @@ -17,8 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_ESFN1 LT(_FN1, KC_ESC) @@ -46,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT , //|-------`----`----`----`----`----|----`----`----`----`----`------| - LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL + LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ), @@ -58,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , , //|-------`----`----`----`----`----|----`----`----`----`----`------| - RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT + RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ), @@ -70,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----|----`----`----`----`----`--------| , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 , //|-------`----`----`----`----`----|----`----`----`----`----`------| - , , , , DEL , INS , , , , + , , , , DEL , INS , , , , //`-----+----+-----+----+--------|--------+-----+-----+-----+------' ) diff --git a/keyboards/fourier/readme.md b/keyboards/keebio/fourier/readme.md index ca29c7aba..c18d1a748 100644 --- a/keyboards/fourier/readme.md +++ b/keyboards/keebio/fourier/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io/collections/frontpage/products/f Make example for this keyboard (after setting up your build environment): - make fourier/rev1:default + make keebio/fourier:default Example of flashing this keyboard: - make fourier/rev1:default:avrdude + make keebio/fourier:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/fourier/rules.mk b/keyboards/keebio/fourier/rules.mk index 93935e02e..9512c0f64 100644 --- a/keyboards/fourier/rules.mk +++ b/keyboards/keebio/fourier/rules.mk @@ -58,11 +58,8 @@ 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 = yes # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes - -DEFAULT_FOLDER = fourier/rev1 diff --git a/keyboards/iris/config.h b/keyboards/keebio/iris/config.h index 863722d7d..863722d7d 100644 --- a/keyboards/iris/config.h +++ b/keyboards/keebio/iris/config.h diff --git a/keyboards/iris/info.json b/keyboards/keebio/iris/info.json index f7b017b97..f7b017b97 100644 --- a/keyboards/iris/info.json +++ b/keyboards/keebio/iris/info.json diff --git a/keyboards/iris/iris.c b/keyboards/keebio/iris/iris.c index fb28b3a6d..fb28b3a6d 100644 --- a/keyboards/iris/iris.c +++ b/keyboards/keebio/iris/iris.c diff --git a/keyboards/iris/iris.h b/keyboards/keebio/iris/iris.h index 4212462c1..ec78efc22 100644 --- a/keyboards/iris/iris.h +++ b/keyboards/keebio/iris/iris.h @@ -1,10 +1,10 @@ #pragma once -#ifdef KEYBOARD_iris_rev1 +#ifdef KEYBOARD_keebio_iris_rev1 #include "rev1.h" -#elif KEYBOARD_iris_rev1_led +#elif KEYBOARD_keebio_iris_rev1_led #include "rev1_led.h" -#elif KEYBOARD_iris_rev2 +#elif KEYBOARD_keebio_iris_rev2 #include "rev2.h" #else #include "rev3.h" diff --git a/keyboards/iris/keymaps/ave-63/config.h b/keyboards/keebio/iris/keymaps/ave-63/config.h index 381a494b7..381a494b7 100644 --- a/keyboards/iris/keymaps/ave-63/config.h +++ b/keyboards/keebio/iris/keymaps/ave-63/config.h diff --git a/keyboards/iris/keymaps/ave-63/keymap.c b/keyboards/keebio/iris/keymaps/ave-63/keymap.c index 3d393a71c..3d393a71c 100644 --- a/keyboards/iris/keymaps/ave-63/keymap.c +++ b/keyboards/keebio/iris/keymaps/ave-63/keymap.c diff --git a/keyboards/iris/keymaps/bmoorey/config.h b/keyboards/keebio/iris/keymaps/bmoorey/config.h index 9f8a9afab..9f8a9afab 100644 --- a/keyboards/iris/keymaps/bmoorey/config.h +++ b/keyboards/keebio/iris/keymaps/bmoorey/config.h diff --git a/keyboards/iris/keymaps/bmoorey/keymap.c b/keyboards/keebio/iris/keymaps/bmoorey/keymap.c index 9484ccb3f..9484ccb3f 100644 --- a/keyboards/iris/keymaps/bmoorey/keymap.c +++ b/keyboards/keebio/iris/keymaps/bmoorey/keymap.c diff --git a/keyboards/iris/keymaps/bmoorey/readme.md b/keyboards/keebio/iris/keymaps/bmoorey/readme.md index 353f59449..353f59449 100644 --- a/keyboards/iris/keymaps/bmoorey/readme.md +++ b/keyboards/keebio/iris/keymaps/bmoorey/readme.md diff --git a/keyboards/iris/keymaps/bmoorey/rules.mk b/keyboards/keebio/iris/keymaps/bmoorey/rules.mk index c9465948e..c9465948e 100644 --- a/keyboards/iris/keymaps/bmoorey/rules.mk +++ b/keyboards/keebio/iris/keymaps/bmoorey/rules.mk diff --git a/keyboards/iris/keymaps/broswen/config.h b/keyboards/keebio/iris/keymaps/broswen/config.h index 19c47780d..19c47780d 100644 --- a/keyboards/iris/keymaps/broswen/config.h +++ b/keyboards/keebio/iris/keymaps/broswen/config.h diff --git a/keyboards/iris/keymaps/broswen/keymap.c b/keyboards/keebio/iris/keymaps/broswen/keymap.c index 6d783142e..a64b03f57 100644 --- a/keyboards/iris/keymaps/broswen/keymap.c +++ b/keyboards/keebio/iris/keymaps/broswen/keymap.c @@ -16,7 +16,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -51,7 +50,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| , GRV,BSLS,UNDS, EQL, , , , , , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - , , , , , + , , , , , // `----+----+----' `----+----+----' ), diff --git a/keyboards/iris/keymaps/broswen/rules.mk b/keyboards/keebio/iris/keymaps/broswen/rules.mk index 14fa11289..14fa11289 100644 --- a/keyboards/iris/keymaps/broswen/rules.mk +++ b/keyboards/keebio/iris/keymaps/broswen/rules.mk diff --git a/keyboards/iris/keymaps/davidrambo/config.h b/keyboards/keebio/iris/keymaps/davidrambo/config.h index 2cdff4213..2cdff4213 100644 --- a/keyboards/iris/keymaps/davidrambo/config.h +++ b/keyboards/keebio/iris/keymaps/davidrambo/config.h diff --git a/keyboards/iris/keymaps/davidrambo/keymap.c b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c index 40f0d0145..40f0d0145 100644 --- a/keyboards/iris/keymaps/davidrambo/keymap.c +++ b/keyboards/keebio/iris/keymaps/davidrambo/keymap.c diff --git a/keyboards/iris/keymaps/davidrambo/readme.md b/keyboards/keebio/iris/keymaps/davidrambo/readme.md index 4d21f37c0..4d21f37c0 100644 --- a/keyboards/iris/keymaps/davidrambo/readme.md +++ b/keyboards/keebio/iris/keymaps/davidrambo/readme.md diff --git a/keyboards/iris/keymaps/davidrambo/rules.mk b/keyboards/keebio/iris/keymaps/davidrambo/rules.mk index 1e3473a1a..1e3473a1a 100644 --- a/keyboards/iris/keymaps/davidrambo/rules.mk +++ b/keyboards/keebio/iris/keymaps/davidrambo/rules.mk diff --git a/keyboards/iris/keymaps/dbroqua/config.h b/keyboards/keebio/iris/keymaps/dbroqua/config.h index 130b52c28..130b52c28 100644 --- a/keyboards/iris/keymaps/dbroqua/config.h +++ b/keyboards/keebio/iris/keymaps/dbroqua/config.h diff --git a/keyboards/iris/keymaps/dbroqua/keymap.c b/keyboards/keebio/iris/keymaps/dbroqua/keymap.c index 4cbb8af54..fe19696e1 100644 --- a/keyboards/iris/keymaps/dbroqua/keymap.c +++ b/keyboards/keebio/iris/keymaps/dbroqua/keymap.c @@ -14,7 +14,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/dbroqua/rules.mk b/keyboards/keebio/iris/keymaps/dbroqua/rules.mk index 1d2d9e5a9..1d2d9e5a9 100644 --- a/keyboards/iris/keymaps/dbroqua/rules.mk +++ b/keyboards/keebio/iris/keymaps/dbroqua/rules.mk diff --git a/keyboards/iris/keymaps/default/config.h b/keyboards/keebio/iris/keymaps/default/config.h index 7986b5041..7986b5041 100644 --- a/keyboards/iris/keymaps/default/config.h +++ b/keyboards/keebio/iris/keymaps/default/config.h diff --git a/keyboards/keebio/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/default/keymap.c new file mode 100644 index 000000000..4644c3d9b --- /dev/null +++ b/keyboards/keebio/iris/keymaps/default/keymap.c @@ -0,0 +1,114 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_ESC, 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_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_LOWER] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + KC_DEL, _______, KC_LEFT, KC_RGHT, KC_UP, KC_LBRC, KC_RBRC, KC_P4, KC_P5, KC_P6, KC_PLUS, KC_PIPE, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + BL_STEP, _______, _______, _______, KC_DOWN, KC_LCBR, KC_LPRN, KC_RPRN, KC_RCBR, KC_P1, KC_P2, KC_P3, KC_MINS, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, KC_DEL, KC_DEL, _______, KC_P0 + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_RAISE] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_TOG, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + RGB_MOD, KC_MPRV, KC_MNXT, KC_VOLU, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_BSLS, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + KC_MUTE, KC_MSTP, KC_MPLY, KC_VOLD, KC_PGDN, KC_MINS, KC_LPRN, _______, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_ADJUST] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + 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; +} diff --git a/keyboards/iris/keymaps/default/rules.mk b/keyboards/keebio/iris/keymaps/default/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/iris/keymaps/default/rules.mk +++ b/keyboards/keebio/iris/keymaps/default/rules.mk diff --git a/keyboards/iris/keymaps/drashna/config.h b/keyboards/keebio/iris/keymaps/drashna/config.h index dd247a42a..dd247a42a 100644 --- a/keyboards/iris/keymaps/drashna/config.h +++ b/keyboards/keebio/iris/keymaps/drashna/config.h diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/keebio/iris/keymaps/drashna/keymap.c index d89656b7e..0c3b0d6d4 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna/keymap.c @@ -44,6 +44,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ ), + [_NORMAN] = LAYOUT_iris_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_iris_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_iris_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_iris_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + [_MODS] = LAYOUT_wrapper( _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, _______, ___________________BLANK___________________, ___________________BLANK___________________, _______, diff --git a/keyboards/iris/keymaps/drashna/rules.mk b/keyboards/keebio/iris/keymaps/drashna/rules.mk index ccc33c06f..e8035176e 100644 --- a/keyboards/iris/keymaps/drashna/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna/rules.mk @@ -12,6 +12,6 @@ SWAP_HANDS_ENABLE = no INDICATOR_LIGHTS = yes MACROS_ENABLED = no -RGBLIGHT_TWINKLE = yes +RGBLIGHT_TWINKLE = no BOOTLOADER = qmk-dfu diff --git a/keyboards/iris/keymaps/drashna_old/config.h b/keyboards/keebio/iris/keymaps/drashna_old/config.h index b985c4dfc..b985c4dfc 100644 --- a/keyboards/iris/keymaps/drashna_old/config.h +++ b/keyboards/keebio/iris/keymaps/drashna_old/config.h diff --git a/keyboards/iris/keymaps/drashna_old/keymap.c b/keyboards/keebio/iris/keymaps/drashna_old/keymap.c index ff7bd09c0..ff7bd09c0 100644 --- a/keyboards/iris/keymaps/drashna_old/keymap.c +++ b/keyboards/keebio/iris/keymaps/drashna_old/keymap.c diff --git a/keyboards/iris/keymaps/drashna_old/rules.mk b/keyboards/keebio/iris/keymaps/drashna_old/rules.mk index 73f37c6c5..73f37c6c5 100644 --- a/keyboards/iris/keymaps/drashna_old/rules.mk +++ b/keyboards/keebio/iris/keymaps/drashna_old/rules.mk diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/config.h b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h index 72e35c472..72e35c472 100644 --- a/keyboards/iris/keymaps/dvp-zjpxshade/config.h +++ b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/config.h diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c index 48402e964..12ac00cd7 100644 --- a/keyboards/iris/keymaps/dvp-zjpxshade/keymap.c +++ b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk index 73142a168..73142a168 100644 --- a/keyboards/iris/keymaps/dvp-zjpxshade/rules.mk +++ b/keyboards/keebio/iris/keymaps/dvp-zjpxshade/rules.mk diff --git a/keyboards/iris/keymaps/edvorakjp/config.h b/keyboards/keebio/iris/keymaps/edvorakjp/config.h index 1610c4b12..1610c4b12 100644 --- a/keyboards/iris/keymaps/edvorakjp/config.h +++ b/keyboards/keebio/iris/keymaps/edvorakjp/config.h diff --git a/keyboards/iris/keymaps/edvorakjp/keymap.c b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c index f5d305f7f..f5d305f7f 100644 --- a/keyboards/iris/keymaps/edvorakjp/keymap.c +++ b/keyboards/keebio/iris/keymaps/edvorakjp/keymap.c diff --git a/keyboards/iris/keymaps/edvorakjp/readme.md b/keyboards/keebio/iris/keymaps/edvorakjp/readme.md index dd406523d..dd406523d 100644 --- a/keyboards/iris/keymaps/edvorakjp/readme.md +++ b/keyboards/keebio/iris/keymaps/edvorakjp/readme.md diff --git a/keyboards/iris/keymaps/edvorakjp/rules.mk b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk index 58d244c38..58d244c38 100644 --- a/keyboards/iris/keymaps/edvorakjp/rules.mk +++ b/keyboards/keebio/iris/keymaps/edvorakjp/rules.mk diff --git a/keyboards/iris/keymaps/fabian/config.h b/keyboards/keebio/iris/keymaps/fabian/config.h index faae942a8..faae942a8 100644 --- a/keyboards/iris/keymaps/fabian/config.h +++ b/keyboards/keebio/iris/keymaps/fabian/config.h diff --git a/keyboards/iris/keymaps/fabian/keymap.c b/keyboards/keebio/iris/keymaps/fabian/keymap.c index 383bacfa4..d7d98fdc0 100644 --- a/keyboards/iris/keymaps/fabian/keymap.c +++ b/keyboards/keebio/iris/keymaps/fabian/keymap.c @@ -24,7 +24,6 @@ enum custom_keycodes { #include "dynamic_macro.h" #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_COLE COLEMAK #define KC_LOWR LOWER diff --git a/keyboards/iris/keymaps/fate/config.h b/keyboards/keebio/iris/keymaps/fate/config.h index 5f16bffb7..5f16bffb7 100644 --- a/keyboards/iris/keymaps/fate/config.h +++ b/keyboards/keebio/iris/keymaps/fate/config.h diff --git a/keyboards/iris/keymaps/fate/keymap.c b/keyboards/keebio/iris/keymaps/fate/keymap.c index ca92b5978..0e21944c7 100644 --- a/keyboards/iris/keymaps/fate/keymap.c +++ b/keyboards/keebio/iris/keymaps/fate/keymap.c @@ -17,7 +17,6 @@ enum { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR MO(_LOWER) #define KC_RASE MO(_RAISE) diff --git a/keyboards/iris/keymaps/fate/readme.md b/keyboards/keebio/iris/keymaps/fate/readme.md index 70f464b0d..70f464b0d 100644 --- a/keyboards/iris/keymaps/fate/readme.md +++ b/keyboards/keebio/iris/keymaps/fate/readme.md diff --git a/keyboards/iris/keymaps/fate/rules.mk b/keyboards/keebio/iris/keymaps/fate/rules.mk index 378a653d9..378a653d9 100644 --- a/keyboards/iris/keymaps/fate/rules.mk +++ b/keyboards/keebio/iris/keymaps/fate/rules.mk diff --git a/keyboards/iris/keymaps/gsigler/config.h b/keyboards/keebio/iris/keymaps/gsigler/config.h index e1793fb1b..e1793fb1b 100644 --- a/keyboards/iris/keymaps/gsigler/config.h +++ b/keyboards/keebio/iris/keymaps/gsigler/config.h diff --git a/keyboards/iris/keymaps/gsigler/keymap.c b/keyboards/keebio/iris/keymaps/gsigler/keymap.c index f8753cbdc..f8753cbdc 100644 --- a/keyboards/iris/keymaps/gsigler/keymap.c +++ b/keyboards/keebio/iris/keymaps/gsigler/keymap.c diff --git a/keyboards/iris/keymaps/gsigler/rules.mk b/keyboards/keebio/iris/keymaps/gsigler/rules.mk index 0abc28fc5..0abc28fc5 100644 --- a/keyboards/iris/keymaps/gsigler/rules.mk +++ b/keyboards/keebio/iris/keymaps/gsigler/rules.mk diff --git a/keyboards/iris/keymaps/hag/config.h b/keyboards/keebio/iris/keymaps/hag/config.h index c4604af43..c4604af43 100644 --- a/keyboards/iris/keymaps/hag/config.h +++ b/keyboards/keebio/iris/keymaps/hag/config.h diff --git a/keyboards/iris/keymaps/hag/keymap.c b/keyboards/keebio/iris/keymaps/hag/keymap.c index a690f8761..222b68208 100644 --- a/keyboards/iris/keymaps/hag/keymap.c +++ b/keyboards/keebio/iris/keymaps/hag/keymap.c @@ -36,8 +36,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS -#define KC_XXXX KC_NO #define KC_Sw2 RALT(KC_2) // Nordic @ #define KC_Sw3 RALT(KC_3) // Nordic something diff --git a/keyboards/iris/keymaps/hag/rules.mk b/keyboards/keebio/iris/keymaps/hag/rules.mk index 73142a168..73142a168 100644 --- a/keyboards/iris/keymaps/hag/rules.mk +++ b/keyboards/keebio/iris/keymaps/hag/rules.mk diff --git a/keyboards/iris/keymaps/hexwire/config.h b/keyboards/keebio/iris/keymaps/hexwire/config.h index 53b00d24f..53b00d24f 100644 --- a/keyboards/iris/keymaps/hexwire/config.h +++ b/keyboards/keebio/iris/keymaps/hexwire/config.h diff --git a/keyboards/iris/keymaps/hexwire/keymap.c b/keyboards/keebio/iris/keymaps/hexwire/keymap.c index e9ab58bcd..33105c1c8 100644 --- a/keyboards/iris/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/iris/keymaps/hexwire/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/iris/keymaps/hexwire/rules.mk b/keyboards/keebio/iris/keymaps/hexwire/rules.mk index 73142a168..73142a168 100644 --- a/keyboards/iris/keymaps/hexwire/rules.mk +++ b/keyboards/keebio/iris/keymaps/hexwire/rules.mk diff --git a/keyboards/iris/keymaps/impstyle/README.md b/keyboards/keebio/iris/keymaps/impstyle/README.md index b341f2d86..b341f2d86 100644 --- a/keyboards/iris/keymaps/impstyle/README.md +++ b/keyboards/keebio/iris/keymaps/impstyle/README.md diff --git a/keyboards/iris/keymaps/impstyle/config.h b/keyboards/keebio/iris/keymaps/impstyle/config.h index 6fc14133f..6fc14133f 100644 --- a/keyboards/iris/keymaps/impstyle/config.h +++ b/keyboards/keebio/iris/keymaps/impstyle/config.h diff --git a/keyboards/iris/keymaps/impstyle/keymap.c b/keyboards/keebio/iris/keymaps/impstyle/keymap.c index 30b4bf2d9..c1964f5e1 100644 --- a/keyboards/iris/keymaps/impstyle/keymap.c +++ b/keyboards/keebio/iris/keymaps/impstyle/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR MO(_LOWER) // Lower layer #define KC_RASE MO(_RAISE) // Raise layer #define KC_TGLW TG(_LOWER) // toggle lower @@ -47,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_PLUS, KC_MOUS,KC_N , KC_M ,KC_COMM,KC_DOT ,KC_SLSH,KC_BSLASH, KC_LGUI,KC_RASE,KC_SPC , KC_ENT ,KC_LOWR,KC_LALT ), - + // LOWER Layer //,----+----+----+----+----+----. ,----+----+----+----+----+----. // TILD,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, @@ -59,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // , , , , , , , , , P1 , P2 , P3 ,EQL ,UNDS , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' // , ,DEL , BSPC , , P0 - // `----+----+----' `----+----+----' + // `----+----+----' `----+----+----' [_LOWER] = LAYOUT( KC_TILD,KC_EXLM, KC_AT ,KC_HASH,KC_DLR ,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN,KC_DEL, @@ -108,4 +107,4 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______,_______,_______, _______,_______,_______ ), -};
\ No newline at end of file +}; diff --git a/keyboards/iris/keymaps/impstyle/rules.mk b/keyboards/keebio/iris/keymaps/impstyle/rules.mk index ef4a383d3..ef4a383d3 100644 --- a/keyboards/iris/keymaps/impstyle/rules.mk +++ b/keyboards/keebio/iris/keymaps/impstyle/rules.mk diff --git a/keyboards/iris/keymaps/jennetters/config.h b/keyboards/keebio/iris/keymaps/jennetters/config.h index 42f91bd02..42f91bd02 100644 --- a/keyboards/iris/keymaps/jennetters/config.h +++ b/keyboards/keebio/iris/keymaps/jennetters/config.h diff --git a/keyboards/iris/keymaps/jennetters/keymap.c b/keyboards/keebio/iris/keymaps/jennetters/keymap.c index 287dc9712..c06079c92 100644 --- a/keyboards/iris/keymaps/jennetters/keymap.c +++ b/keyboards/keebio/iris/keymaps/jennetters/keymap.c @@ -18,7 +18,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -45,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | SFT| Z | X | C | V | B | SPC| | SPC| N | M | , | . | / | ENT| // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ GUI| ALT| CTL / \RASE\ CTL | SFT / + // \ GUI| ALT| CTL / \RASE\ CTL | SFT / // `----+----+----' `----+----+----' TD(ESC_GR), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, \ @@ -56,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LOWER] = LAYOUT_kc( - + // ,----+----+----+----+----+----. ,----+----+----+----+----+----. // | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | DEL| // |----+----+----+----+----+----| |----+----+----+----+----+----| @@ -66,14 +65,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | \ | | | | | [ | ( | | ) | ] | | | | - | | // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ | | DEL / \ DEL\ | / + // \ | | DEL / \ DEL\ | / // `----+----+----' `----+----+----' TILD, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL, \ , 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, , \ , , , , , , , , , , ,PIPE, \ BL_S, , , , , LCBR, LPRN, RPRN, RCBR, , , , MINS, , \ - , , DEL, DEL, , + , , DEL, DEL, , ), [_RAISE] = LAYOUT_kc( @@ -86,14 +85,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| // | | | | | | | | | | | | | | \ | | // `----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - // \ | | / \ \ | / + // \ | | / \ \ | / // `----+----+----' `----+----+----' , F1, F2, , , , , , , LBRC, RBRC, EQL, \ , , UP, , , , YUNO, NOVY, , LCBR, RCBR, DEL, \ , LEFT, DOWN, RIGHT, , , SHRG, , , , PIPE, , \ , , , , , , , , , , , , BSLS, , \ - , , , , , + , , , , , ), [_ADJUST] = LAYOUT( @@ -200,8 +199,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { if (record->event.pressed) { SEND_STRING("ლ(ಠ_ಠლ)"); // YUNO?! return false; - } - */ + } + */ } return true; -}
\ No newline at end of file +} diff --git a/keyboards/iris/keymaps/jennetters/readme.md b/keyboards/keebio/iris/keymaps/jennetters/readme.md index 272a4ed74..272a4ed74 100644 --- a/keyboards/iris/keymaps/jennetters/readme.md +++ b/keyboards/keebio/iris/keymaps/jennetters/readme.md diff --git a/keyboards/iris/keymaps/jennetters/rules.mk b/keyboards/keebio/iris/keymaps/jennetters/rules.mk index 1ba2fa8fb..1ba2fa8fb 100644 --- a/keyboards/iris/keymaps/jennetters/rules.mk +++ b/keyboards/keebio/iris/keymaps/jennetters/rules.mk diff --git a/keyboards/iris/keymaps/khord/config.h b/keyboards/keebio/iris/keymaps/khord/config.h index 9b44bca79..9b44bca79 100644 --- a/keyboards/iris/keymaps/khord/config.h +++ b/keyboards/keebio/iris/keymaps/khord/config.h diff --git a/keyboards/iris/keymaps/khord/keymap.c b/keyboards/keebio/iris/keymaps/khord/keymap.c index 379617a8b..379617a8b 100644 --- a/keyboards/iris/keymaps/khord/keymap.c +++ b/keyboards/keebio/iris/keymaps/khord/keymap.c diff --git a/keyboards/iris/keymaps/khord/rules.mk b/keyboards/keebio/iris/keymaps/khord/rules.mk index c46edbd12..c46edbd12 100644 --- a/keyboards/iris/keymaps/khord/rules.mk +++ b/keyboards/keebio/iris/keymaps/khord/rules.mk diff --git a/keyboards/iris/keymaps/krusli/README.md b/keyboards/keebio/iris/keymaps/krusli/README.md index fc02aa01c..fc02aa01c 100644 --- a/keyboards/iris/keymaps/krusli/README.md +++ b/keyboards/keebio/iris/keymaps/krusli/README.md diff --git a/keyboards/iris/keymaps/krusli/config.h b/keyboards/keebio/iris/keymaps/krusli/config.h index 72e35c472..72e35c472 100644 --- a/keyboards/iris/keymaps/krusli/config.h +++ b/keyboards/keebio/iris/keymaps/krusli/config.h diff --git a/keyboards/iris/keymaps/krusli/keymap.c b/keyboards/keebio/iris/keymaps/krusli/keymap.c index 4aa076ab1..095716621 100644 --- a/keyboards/iris/keymaps/krusli/keymap.c +++ b/keyboards/keebio/iris/keymaps/krusli/keymap.c @@ -16,8 +16,6 @@ enum custom_keycodes { ADJUST, }; -#define _______ KC_TRNS - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, diff --git a/keyboards/iris/keymaps/krusli/rules.mk b/keyboards/keebio/iris/keymaps/krusli/rules.mk index b0e37ec2f..b0e37ec2f 100644 --- a/keyboards/iris/keymaps/krusli/rules.mk +++ b/keyboards/keebio/iris/keymaps/krusli/rules.mk diff --git a/keyboards/iris/keymaps/lewisridden/config.h b/keyboards/keebio/iris/keymaps/lewisridden/config.h index 6d96b31bd..6d96b31bd 100644 --- a/keyboards/iris/keymaps/lewisridden/config.h +++ b/keyboards/keebio/iris/keymaps/lewisridden/config.h diff --git a/keyboards/iris/keymaps/lewisridden/keymap.c b/keyboards/keebio/iris/keymaps/lewisridden/keymap.c index 331c0632a..e5d12ebd1 100644 --- a/keyboards/iris/keymaps/lewisridden/keymap.c +++ b/keyboards/keebio/iris/keymaps/lewisridden/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/lewisridden/rules.mk b/keyboards/keebio/iris/keymaps/lewisridden/rules.mk index 73142a168..73142a168 100644 --- a/keyboards/iris/keymaps/lewisridden/rules.mk +++ b/keyboards/keebio/iris/keymaps/lewisridden/rules.mk diff --git a/keyboards/iris/keymaps/mtdjr/config.h b/keyboards/keebio/iris/keymaps/mtdjr/config.h index 93dc4c211..93dc4c211 100644 --- a/keyboards/iris/keymaps/mtdjr/config.h +++ b/keyboards/keebio/iris/keymaps/mtdjr/config.h diff --git a/keyboards/iris/keymaps/mtdjr/keymap.c b/keyboards/keebio/iris/keymaps/mtdjr/keymap.c index d6e3ec05e..d6e3ec05e 100644 --- a/keyboards/iris/keymaps/mtdjr/keymap.c +++ b/keyboards/keebio/iris/keymaps/mtdjr/keymap.c diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/keebio/iris/keymaps/mtdjr/rules.mk index 7f8c630d8..7f8c630d8 100644 --- a/keyboards/iris/keymaps/mtdjr/rules.mk +++ b/keyboards/keebio/iris/keymaps/mtdjr/rules.mk diff --git a/keyboards/iris/keymaps/olligranlund_nordic/config.h b/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h index 259f2a742..259f2a742 100644 --- a/keyboards/iris/keymaps/olligranlund_nordic/config.h +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/config.h diff --git a/keyboards/iris/keymaps/olligranlund_nordic/keymap.c b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c index 65ed6d289..65ed6d289 100644 --- a/keyboards/iris/keymaps/olligranlund_nordic/keymap.c +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/keymap.c diff --git a/keyboards/iris/keymaps/olligranlund_nordic/readme.md b/keyboards/keebio/iris/keymaps/olligranlund_nordic/readme.md index 72eccde10..72eccde10 100644 --- a/keyboards/iris/keymaps/olligranlund_nordic/readme.md +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/readme.md diff --git a/keyboards/iris/keymaps/olligranlund_nordic/rules.mk b/keyboards/keebio/iris/keymaps/olligranlund_nordic/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/iris/keymaps/olligranlund_nordic/rules.mk +++ b/keyboards/keebio/iris/keymaps/olligranlund_nordic/rules.mk diff --git a/keyboards/iris/keymaps/omgvee/config.h b/keyboards/keebio/iris/keymaps/omgvee/config.h index c29201fe1..c5899f45f 100644 --- a/keyboards/iris/keymaps/omgvee/config.h +++ b/keyboards/keebio/iris/keymaps/omgvee/config.h @@ -46,4 +46,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MOUSEKEY_DELAY 0 #define MOUSEKEY_TIME_TO_MAX 60 #define MOUSEKEY_MAX_SPEED 7 -#define MOUSEKEY_WHEEL_DELAY 0
\ No newline at end of file +#define MOUSEKEY_WHEEL_DELAY 0 + +////Leader key timeout +//#define LEADER_TIMEOUT 500 +//#define LEADER_PER_KEY_TIMING 200 + +#undef PRODUCT +#define PRODUCT "Vee's Home IRIS choc keeb" diff --git a/keyboards/iris/keymaps/omgvee/keymap.c b/keyboards/keebio/iris/keymaps/omgvee/keymap.c index da76b593b..6f29ccecd 100644 --- a/keyboards/iris/keymaps/omgvee/keymap.c +++ b/keyboards/keebio/iris/keymaps/omgvee/keymap.c @@ -8,6 +8,7 @@ extern keymap_config_t keymap_config; #define _RAISE 2 #define _MOUSE 3 #define _ADJUST 4 +#define _HWCT 5 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -15,9 +16,11 @@ enum custom_keycodes { RAISE, MOUSE, ADJUST, + HWCT, }; #define KC_MOUS TT(_MOUSE) // double tab toggle mouse layer +#define KC_HWCT TT(_HWCT) // double tab toggle hardware control layer #define MS_L KC_MS_LEFT #define MS_R KC_MS_RIGHT #define MS_U KC_MS_UP @@ -27,7 +30,10 @@ enum custom_keycodes { #define MW_U KC_MS_WH_UP #define MW_D KC_MS_WH_DOWN #define MW_L KC_MS_WH_LEFT -#define MW_R KC_MS_WH_RIGHT +#define MW_R KC_MS_WH_RIGHT + +//// only uncomment the below line when you enable leader key in rules.mk +//LEADER_EXTERNS(); //Tap Dance Declarations enum { @@ -36,13 +42,12 @@ enum { //Tap Dance Definitions qk_tap_dance_action_t tap_dance_actions[] = { //Tap once for Shift, twice for Caps Lock - [TD_SCL] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS) + [TD_SCL] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS), }; enum { TD_EBT = 0 }; - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( @@ -51,37 +56,37 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - TD(TD_SCL), 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_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MOUS, KC_MOUS, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MOUS, KC_HWCT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH,TD(TD_SCL), //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - KC_LALT, LOWER, KC_ENT, KC_SPC, RAISE, KC_LGUI + KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LALT // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_LOWER] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL, KC_BSPC, + KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, KC_PIPE, + _______, KC_HOME, KC_UP, KC_END, KC_PGUP, _______, _______, KC_HOME, KC_END, KC_LBRC, KC_RBRC, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, KC_ENT, + _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,_______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - KC_LCTL, _______, _______, _______, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, _______, _______, _______, _______, + KC_LCTL, _______, _______, KC_LT, KC_LCBR, KC_LBRC, KC_LPRN, KC_RPRN, KC_RBRC, KC_RCBR, KC_GT, _______, _______, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ - _______, _______, KC_DEL, KC_DEL, _______, _______ + _______, _______, _______, KC_DEL, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ), [_RAISE] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - KC_TILD, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_GESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, KC_INS, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - RGB_MOD, KC_MPRV, KC_MNXT, _______, KC_PGUP, KC_UNDS, KC_EQL, KC_HOME, RGB_HUI, RGB_SAI, RGB_VAI, KC_ENT, + _______, _______, _______, _______, KC_PGDN, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_MENU, KC_PENT, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, KC_MSTP, KC_MPLY, _______, KC_PGDN, KC_MINS, KC_LPRN, KC_RPRN, KC_PLUS, KC_END, RGB_HUD, RGB_SAD, RGB_VAD, _______, + _______, _______, _______, _______, _______, KC_MINS, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_VOLD, KC_VOLU, KC_PSCR, KC_EJCT, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -89,13 +94,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_MOUSE] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - BL_BRTG, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - BL_TOGG, MS_B1, MS_U, MS_B2, MW_U, _______, _______, MS_B1, MS_B2, _______, _______, _______, + _______, MS_B1, MS_U, MS_B2, MW_U, _______, _______, MS_B1, MS_B2, _______, _______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ _______, MS_L, MS_D, MS_R, MW_D, _______, MS_L, MS_D , MS_U, MS_R ,_______, _______, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - BL_STEP, _______, _______, MW_L, MW_R, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______, + _______, _______, _______, MW_L, MW_R, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ @@ -103,17 +108,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT( //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ - _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, RESET, + BL_BRTG, _______, _______, _______, DEBUG, RESET, RESET, DEBUG, _______, RGB_HUI, RGB_SAI, RGB_VAI, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_INC, _______, _______, _______, _______, EEP_RST, EEP_RST, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + BL_DEC, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, RGB_MOD, //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ - _______, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, + //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ + _______, _______, _______, _______, _______, _______ + // └────────┴────────┴────────┘ └────────┴────────┴────────┘ + ), + + [_HWCT] = LAYOUT( + //┌────────┬────────┬────────┬────────┬────────┬────────┐ ┌────────┬────────┬────────┬────────┬────────┬────────┐ + BL_BRTG, _______, _______, _______, _______, RESET, RESET, _______, _______, RGB_HUI, RGB_SAI, RGB_VAI, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_VAD, + //├────────┼────────┼────────┼────────┼────────┼────────┤ ├────────┼────────┼────────┼────────┼────────┼────────┤ + BL_DEC, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, KC_MPRV, KC_MNXT, KC_MFFD, KC_MRWD, KC_MPLY, RGB_MOD, + //├────────┼────────┼────────┼────────┼────────┼────────┼────────┐ ┌────────┼────────┼────────┼────────┼────────┼────────┼────────┤ + BL_TOGG, _______, _______, _______, _______, _______, KC_EJCT, _______, KC_BRID, KC_BRIU, KC_VOLD, KC_VOLU, KC_MUTE, RGB_TOG, //└────────┴────────┴────────┴───┬────┴───┬────┴───┬────┴───┬────┘ └───┬────┴───┬────┴───┬────┴───┬────┴────────┴────────┴────────┘ _______, _______, _______, _______, _______, _______ // └────────┴────────┴────────┘ └────────┴────────┴────────┘ ) + }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -160,6 +180,19 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case HWCT: + if (record->event.pressed) { + layer_on(_HWCT); + dprintf("Got on layer %s ", HWCT); + update_tri_layer(_LOWER, _RAISE, _MOUSE); + } else { + layer_off(_HWCT); + dprintf("Got off layer %s ", HWCT); + update_tri_layer(_LOWER, _RAISE, _MOUSE); + } + return false; + break; + case ADJUST: if (record->event.pressed) { layer_on(_ADJUST); diff --git a/keyboards/iris/keymaps/omgvee/readme.md b/keyboards/keebio/iris/keymaps/omgvee/readme.md index 82a6cd2cf..275d270fa 100644 --- a/keyboards/iris/keymaps/omgvee/readme.md +++ b/keyboards/keebio/iris/keymaps/omgvee/readme.md @@ -4,7 +4,7 @@ ![My beloved IRIS keeb](https://i.imgur.com/wgsb37e.jpg) -![My beloved choc IRIS keeb](https://imgur.com/a/NDXqLGb) +![My beloved choc IRIS keeb](https://i.imgur.com/BgbxViq.jpg) ======= diff --git a/keyboards/iris/keymaps/omgvee/rules.mk b/keyboards/keebio/iris/keymaps/omgvee/rules.mk index 281f64c7e..897c6069c 100644 --- a/keyboards/iris/keymaps/omgvee/rules.mk +++ b/keyboards/keebio/iris/keymaps/omgvee/rules.mk @@ -2,6 +2,8 @@ RGBLIGHT_ENABLE = yes BACKLIGHT_ENABLE = yes MOUSEKEY_ENABLE = yes CONSOLE_ENABLE = no -COMMAND_ENABLE = yes +COMMAND_ENABLE = no TAP_DANCE_ENABLE = yes NKRO_ENABLE = yes +LEADER_ENABLE = no +UNICODE_ENABLE = no diff --git a/keyboards/iris/keymaps/rdhaene/config.h b/keyboards/keebio/iris/keymaps/rdhaene/config.h index 3c4b6cfd2..3c4b6cfd2 100644 --- a/keyboards/iris/keymaps/rdhaene/config.h +++ b/keyboards/keebio/iris/keymaps/rdhaene/config.h diff --git a/keyboards/iris/keymaps/rdhaene/keymap.c b/keyboards/keebio/iris/keymaps/rdhaene/keymap.c index 68b187aaf..7a153346c 100644 --- a/keyboards/iris/keymaps/rdhaene/keymap.c +++ b/keyboards/keebio/iris/keymaps/rdhaene/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/rdhaene/rules.mk b/keyboards/keebio/iris/keymaps/rdhaene/rules.mk index 4bfbfb2ae..4bfbfb2ae 100644 --- a/keyboards/iris/keymaps/rdhaene/rules.mk +++ b/keyboards/keebio/iris/keymaps/rdhaene/rules.mk diff --git a/keyboards/iris/keymaps/rs/config.h b/keyboards/keebio/iris/keymaps/rs/config.h index 7c5b5ca43..7c5b5ca43 100644 --- a/keyboards/iris/keymaps/rs/config.h +++ b/keyboards/keebio/iris/keymaps/rs/config.h diff --git a/keyboards/iris/keymaps/rs/karabiner.json b/keyboards/keebio/iris/keymaps/rs/karabiner.json index f5214650a..f5214650a 100644 --- a/keyboards/iris/keymaps/rs/karabiner.json +++ b/keyboards/keebio/iris/keymaps/rs/karabiner.json diff --git a/keyboards/iris/keymaps/rs/keymap.c b/keyboards/keebio/iris/keymaps/rs/keymap.c index 43374e59f..43374e59f 100644 --- a/keyboards/iris/keymaps/rs/keymap.c +++ b/keyboards/keebio/iris/keymaps/rs/keymap.c diff --git a/keyboards/iris/keymaps/rs/readme.md b/keyboards/keebio/iris/keymaps/rs/readme.md index bdf44121e..bdf44121e 100644 --- a/keyboards/iris/keymaps/rs/readme.md +++ b/keyboards/keebio/iris/keymaps/rs/readme.md diff --git a/keyboards/iris/keymaps/rs/rules.mk b/keyboards/keebio/iris/keymaps/rs/rules.mk index bd518d8f2..bd518d8f2 100644 --- a/keyboards/iris/keymaps/rs/rules.mk +++ b/keyboards/keebio/iris/keymaps/rs/rules.mk diff --git a/keyboards/iris/keymaps/s1carii/config.h b/keyboards/keebio/iris/keymaps/s1carii/config.h index 117f82523..117f82523 100644 --- a/keyboards/iris/keymaps/s1carii/config.h +++ b/keyboards/keebio/iris/keymaps/s1carii/config.h diff --git a/keyboards/iris/keymaps/s1carii/keymap.c b/keyboards/keebio/iris/keymaps/s1carii/keymap.c index dd993a9bc..4655bb1ad 100644 --- a/keyboards/iris/keymaps/s1carii/keymap.c +++ b/keyboards/keebio/iris/keymaps/s1carii/keymap.c @@ -15,7 +15,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE @@ -80,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , // `----+----+----' `----+----+----' ) - + /* [_DEVLAYER] = LAYOUT_kc( //,----+----+----+--+-+----+----. ,----+----+-+--+----+----+----. @@ -95,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { , , , , , // `----+----+----' `----+----+----' ) -*/ +*/ }; diff --git a/keyboards/iris/keymaps/s1carii/readme.md b/keyboards/keebio/iris/keymaps/s1carii/readme.md index 6d94b6c87..6d94b6c87 100644 --- a/keyboards/iris/keymaps/s1carii/readme.md +++ b/keyboards/keebio/iris/keymaps/s1carii/readme.md diff --git a/keyboards/iris/keymaps/s1carii/rules.mk b/keyboards/keebio/iris/keymaps/s1carii/rules.mk index 5cf55d3d7..5cf55d3d7 100644 --- a/keyboards/iris/keymaps/s1carii/rules.mk +++ b/keyboards/keebio/iris/keymaps/s1carii/rules.mk diff --git a/keyboards/iris/keymaps/saviof/config.h b/keyboards/keebio/iris/keymaps/saviof/config.h index eb4c7328e..eb4c7328e 100644 --- a/keyboards/iris/keymaps/saviof/config.h +++ b/keyboards/keebio/iris/keymaps/saviof/config.h diff --git a/keyboards/iris/keymaps/saviof/keymap.c b/keyboards/keebio/iris/keymaps/saviof/keymap.c index a63e60682..a63e60682 100644 --- a/keyboards/iris/keymaps/saviof/keymap.c +++ b/keyboards/keebio/iris/keymaps/saviof/keymap.c diff --git a/keyboards/iris/keymaps/saviof/rules.mk b/keyboards/keebio/iris/keymaps/saviof/rules.mk index 0e1023be1..0e1023be1 100644 --- a/keyboards/iris/keymaps/saviof/rules.mk +++ b/keyboards/keebio/iris/keymaps/saviof/rules.mk diff --git a/keyboards/iris/keymaps/swedish/config.h b/keyboards/keebio/iris/keymaps/swedish/config.h index 4e3e55861..4e3e55861 100644 --- a/keyboards/iris/keymaps/swedish/config.h +++ b/keyboards/keebio/iris/keymaps/swedish/config.h diff --git a/keyboards/iris/keymaps/swedish/keymap.c b/keyboards/keebio/iris/keymaps/swedish/keymap.c index 015e26aec..26e28479e 100644 --- a/keyboards/iris/keymaps/swedish/keymap.c +++ b/keyboards/keebio/iris/keymaps/swedish/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_LOWR LOWER #define KC_RASE RAISE diff --git a/keyboards/iris/keymaps/swedish/rules.mk b/keyboards/keebio/iris/keymaps/swedish/rules.mk index 73142a168..73142a168 100644 --- a/keyboards/iris/keymaps/swedish/rules.mk +++ b/keyboards/keebio/iris/keymaps/swedish/rules.mk diff --git a/keyboards/iris/keymaps/transmogrified/Readme.md b/keyboards/keebio/iris/keymaps/transmogrified/Readme.md index 96e27411d..96e27411d 100644 --- a/keyboards/iris/keymaps/transmogrified/Readme.md +++ b/keyboards/keebio/iris/keymaps/transmogrified/Readme.md diff --git a/keyboards/iris/keymaps/transmogrified/config.h b/keyboards/keebio/iris/keymaps/transmogrified/config.h index 12f2d7d6d..12f2d7d6d 100644 --- a/keyboards/iris/keymaps/transmogrified/config.h +++ b/keyboards/keebio/iris/keymaps/transmogrified/config.h diff --git a/keyboards/iris/keymaps/transmogrified/keymap.c b/keyboards/keebio/iris/keymaps/transmogrified/keymap.c index 67545f08e..67545f08e 100644 --- a/keyboards/iris/keymaps/transmogrified/keymap.c +++ b/keyboards/keebio/iris/keymaps/transmogrified/keymap.c diff --git a/keyboards/iris/keymaps/transmogrified/rules.mk b/keyboards/keebio/iris/keymaps/transmogrified/rules.mk index 444fa38a9..444fa38a9 100644 --- a/keyboards/iris/keymaps/transmogrified/rules.mk +++ b/keyboards/keebio/iris/keymaps/transmogrified/rules.mk diff --git a/keyboards/keebio/iris/keymaps/via/config.h b/keyboards/keebio/iris/keymaps/via/config.h new file mode 100644 index 000000000..f2498e592 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/via/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2017 Danny Nguyen <danny@keeb.io> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#define RGBLIGHT_ANIMATIONS diff --git a/keyboards/iris/keymaps/default/keymap.c b/keyboards/keebio/iris/keymaps/via/keymap.c index f67b71fc1..f67b71fc1 100644 --- a/keyboards/iris/keymaps/default/keymap.c +++ b/keyboards/keebio/iris/keymaps/via/keymap.c diff --git a/keyboards/keebio/iris/keymaps/via/rules.mk b/keyboards/keebio/iris/keymaps/via/rules.mk new file mode 100644 index 000000000..ca2680325 --- /dev/null +++ b/keyboards/keebio/iris/keymaps/via/rules.mk @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +# VIA Support - Comment these 3 lines out to disable +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c diff --git a/keyboards/iris/keymaps/vyolle/config.h b/keyboards/keebio/iris/keymaps/vyolle/config.h index 1adbd65b5..1adbd65b5 100644 --- a/keyboards/iris/keymaps/vyolle/config.h +++ b/keyboards/keebio/iris/keymaps/vyolle/config.h diff --git a/keyboards/iris/keymaps/vyolle/keymap.c b/keyboards/keebio/iris/keymaps/vyolle/keymap.c index 33e171821..33e171821 100644 --- a/keyboards/iris/keymaps/vyolle/keymap.c +++ b/keyboards/keebio/iris/keymaps/vyolle/keymap.c diff --git a/keyboards/iris/keymaps/vyolle/rules.mk b/keyboards/keebio/iris/keymaps/vyolle/rules.mk index e7cbfb83d..e7cbfb83d 100644 --- a/keyboards/iris/keymaps/vyolle/rules.mk +++ b/keyboards/keebio/iris/keymaps/vyolle/rules.mk diff --git a/keyboards/iris/keymaps/wanleg/config.h b/keyboards/keebio/iris/keymaps/wanleg/config.h index 9b9000768..9b9000768 100644 --- a/keyboards/iris/keymaps/wanleg/config.h +++ b/keyboards/keebio/iris/keymaps/wanleg/config.h diff --git a/keyboards/iris/keymaps/wanleg/keymap.c b/keyboards/keebio/iris/keymaps/wanleg/keymap.c index 6f8ff9066..6f8ff9066 100644 --- a/keyboards/iris/keymaps/wanleg/keymap.c +++ b/keyboards/keebio/iris/keymaps/wanleg/keymap.c diff --git a/keyboards/iris/keymaps/wanleg/rules.mk b/keyboards/keebio/iris/keymaps/wanleg/rules.mk index bbb05a5b4..bbb05a5b4 100644 --- a/keyboards/iris/keymaps/wanleg/rules.mk +++ b/keyboards/keebio/iris/keymaps/wanleg/rules.mk diff --git a/keyboards/iris/keymaps/xyverz/config.h b/keyboards/keebio/iris/keymaps/xyverz/config.h index b820a0753..b820a0753 100644 --- a/keyboards/iris/keymaps/xyverz/config.h +++ b/keyboards/keebio/iris/keymaps/xyverz/config.h diff --git a/keyboards/iris/keymaps/xyverz/keymap.c b/keyboards/keebio/iris/keymaps/xyverz/keymap.c index 53bf32ac3..53bf32ac3 100644 --- a/keyboards/iris/keymaps/xyverz/keymap.c +++ b/keyboards/keebio/iris/keymaps/xyverz/keymap.c diff --git a/keyboards/iris/keymaps/xyverz/rules.mk b/keyboards/keebio/iris/keymaps/xyverz/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/iris/keymaps/xyverz/rules.mk +++ b/keyboards/keebio/iris/keymaps/xyverz/rules.mk diff --git a/keyboards/iris/keymaps/yanfali/config.h b/keyboards/keebio/iris/keymaps/yanfali/config.h index 81df2e916..81df2e916 100644 --- a/keyboards/iris/keymaps/yanfali/config.h +++ b/keyboards/keebio/iris/keymaps/yanfali/config.h diff --git a/keyboards/iris/keymaps/yanfali/keymap.c b/keyboards/keebio/iris/keymaps/yanfali/keymap.c index bae09a62e..92117bd6d 100644 --- a/keyboards/iris/keymaps/yanfali/keymap.c +++ b/keyboards/keebio/iris/keymaps/yanfali/keymap.c @@ -17,7 +17,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/iris/keymaps/yanfali/readme.md b/keyboards/keebio/iris/keymaps/yanfali/readme.md index f72e88e51..f72e88e51 100644 --- a/keyboards/iris/keymaps/yanfali/readme.md +++ b/keyboards/keebio/iris/keymaps/yanfali/readme.md diff --git a/keyboards/iris/keymaps/yanfali/rules.mk b/keyboards/keebio/iris/keymaps/yanfali/rules.mk index 73142a168..73142a168 100644 --- a/keyboards/iris/keymaps/yanfali/rules.mk +++ b/keyboards/keebio/iris/keymaps/yanfali/rules.mk diff --git a/keyboards/iris/readme.md b/keyboards/keebio/iris/readme.md index 0a1eb1e17..6d166e756 100644 --- a/keyboards/iris/readme.md +++ b/keyboards/keebio/iris/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make iris/rev2:default + make keebio/iris/rev2:default Example of flashing this keyboard: - make iris/rev2:default:avrdude + make keebio/iris/rev2:default:avrdude See [build environment setup](https://docs.qmk.fm/#/newbs_getting_started) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/iris/rev1/config.h b/keyboards/keebio/iris/rev1/config.h index 1eddb54b4..13302c60c 100644 --- a/keyboards/iris/rev1/config.h +++ b/keyboards/keebio/iris/rev1/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN D2 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/iris/rev1/rev1.c b/keyboards/keebio/iris/rev1/rev1.c index 9694d122d..9694d122d 100644 --- a/keyboards/iris/rev1/rev1.c +++ b/keyboards/keebio/iris/rev1/rev1.c diff --git a/keyboards/iris/rev1/rev1.h b/keyboards/keebio/iris/rev1/rev1.h index da5c9cdc0..da5c9cdc0 100644 --- a/keyboards/iris/rev1/rev1.h +++ b/keyboards/keebio/iris/rev1/rev1.h diff --git a/keyboards/iris/rev1/rules.mk b/keyboards/keebio/iris/rev1/rules.mk index 7b30c0bef..7b30c0bef 100644 --- a/keyboards/iris/rev1/rules.mk +++ b/keyboards/keebio/iris/rev1/rules.mk diff --git a/keyboards/iris/rev1_led/config.h b/keyboards/keebio/iris/rev1_led/config.h index 4505c2229..5fb8be674 100644 --- a/keyboards/iris/rev1_led/config.h +++ b/keyboards/keebio/iris/rev1_led/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/iris/rev1_led/rev1_led.c b/keyboards/keebio/iris/rev1_led/rev1_led.c index af5fc9440..af5fc9440 100644 --- a/keyboards/iris/rev1_led/rev1_led.c +++ b/keyboards/keebio/iris/rev1_led/rev1_led.c diff --git a/keyboards/iris/rev1_led/rev1_led.h b/keyboards/keebio/iris/rev1_led/rev1_led.h index da5c9cdc0..da5c9cdc0 100644 --- a/keyboards/iris/rev1_led/rev1_led.h +++ b/keyboards/keebio/iris/rev1_led/rev1_led.h diff --git a/keyboards/iris/rev1_led/rules.mk b/keyboards/keebio/iris/rev1_led/rules.mk index 7b30c0bef..7b30c0bef 100644 --- a/keyboards/iris/rev1_led/rules.mk +++ b/keyboards/keebio/iris/rev1_led/rules.mk diff --git a/keyboards/iris/rev2/config.h b/keyboards/keebio/iris/rev2/config.h index e0465ca8a..235c5710f 100644 --- a/keyboards/iris/rev2/config.h +++ b/keyboards/keebio/iris/rev2/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/iris/rev2/rev2.c b/keyboards/keebio/iris/rev2/rev2.c index 8575243f0..8575243f0 100644 --- a/keyboards/iris/rev2/rev2.c +++ b/keyboards/keebio/iris/rev2/rev2.c diff --git a/keyboards/iris/rev2/rev2.h b/keyboards/keebio/iris/rev2/rev2.h index da5c9cdc0..da5c9cdc0 100644 --- a/keyboards/iris/rev2/rev2.h +++ b/keyboards/keebio/iris/rev2/rev2.h diff --git a/keyboards/iris/rev2/rules.mk b/keyboards/keebio/iris/rev2/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/iris/rev2/rules.mk +++ b/keyboards/keebio/iris/rev2/rules.mk diff --git a/keyboards/iris/rev3/config.h b/keyboards/keebio/iris/rev3/config.h index ad5937dc1..70e5d6e2a 100644 --- a/keyboards/iris/rev3/config.h +++ b/keyboards/keebio/iris/rev3/config.h @@ -65,11 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN B6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/iris/rev3/rev3.c b/keyboards/keebio/iris/rev3/rev3.c index 7e49330c1..7e49330c1 100644 --- a/keyboards/iris/rev3/rev3.c +++ b/keyboards/keebio/iris/rev3/rev3.c diff --git a/keyboards/iris/rev3/rev3.h b/keyboards/keebio/iris/rev3/rev3.h index da9da8440..da9da8440 100644 --- a/keyboards/iris/rev3/rev3.h +++ b/keyboards/keebio/iris/rev3/rev3.h diff --git a/keyboards/iris/rev3/rules.mk b/keyboards/keebio/iris/rev3/rules.mk index d7e0da936..d7e0da936 100644 --- a/keyboards/iris/rev3/rules.mk +++ b/keyboards/keebio/iris/rev3/rules.mk diff --git a/keyboards/iris/rules.mk b/keyboards/keebio/iris/rules.mk index 69bc62f87..9745d5e3c 100644 --- a/keyboards/iris/rules.mk +++ b/keyboards/keebio/iris/rules.mk @@ -38,9 +38,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = iris/rev2 - -# VIA Support - Comment these 3 lines out to disable -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes -SRC += keyboards/wilba_tech/wt_main.c +DEFAULT_FOLDER = keebio/iris/rev2 diff --git a/keyboards/laplace/config.h b/keyboards/keebio/laplace/config.h index b4a524368..cce642526 100644 --- a/keyboards/laplace/config.h +++ b/keyboards/keebio/laplace/config.h @@ -15,8 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -45,10 +44,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define TAPPING_TERM 200 - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboards/laplace/info.json b/keyboards/keebio/laplace/info.json index e783a1f49..e783a1f49 100644 --- a/keyboards/laplace/info.json +++ b/keyboards/keebio/laplace/info.json diff --git a/keyboards/laplace/keymaps/bakingpy/keymap.c b/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c index 2cad24fa0..97fb70af5 100644 --- a/keyboards/laplace/keymaps/bakingpy/keymap.c +++ b/keyboards/keebio/laplace/keymaps/bakingpy/keymap.c @@ -5,8 +5,6 @@ #define _FN2 2 #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 MO(_FN1) #define KC_FN2 MO(_FN2) #define KC_SPFN1 LT(_FN1, KC_SPACE) @@ -33,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ LSFT , Z , X , C , V , B , N , M ,COMM,DOT ,SLSH, RSFT , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1 + GRV ,LCTL,LALT ,LGUI, SPFN1 , BSFN2 , FN2 ,RALT ,RCTL , FN1 //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ), @@ -45,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, 1 , 2 , 3 , UP , , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT + RTOG , , , , , DEL , 0 ,LEFT ,DOWN , RGHT //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ), @@ -57,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|-----`----`----`----`----`----`----`----`----`----`----`--------+ , , ,DEL ,PGDN,END , , , , , , , //|-------`----`----`----`----`----`----`----`----`----`----`------+ - , , , , DEL , , , , , + , , , , DEL , , , , , //`-----+----+-----+----+--------+--------+-----+-----+-----+------' ) }; diff --git a/keyboards/laplace/keymaps/bakingpy/rules.mk b/keyboards/keebio/laplace/keymaps/bakingpy/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/laplace/keymaps/bakingpy/rules.mk +++ b/keyboards/keebio/laplace/keymaps/bakingpy/rules.mk diff --git a/keyboards/laplace/keymaps/default/keymap.c b/keyboards/keebio/laplace/keymaps/default/keymap.c index 03b7c9b15..053bfb7ad 100644 --- a/keyboards/laplace/keymaps/default/keymap.c +++ b/keyboards/keebio/laplace/keymaps/default/keymap.c @@ -4,9 +4,6 @@ #define _FN1 1 #define _FN2 2 -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define FN1 MO(_FN1) #define FN2 MO(_FN2) #define SP_FN1 LT(_FN1, KC_SPACE) diff --git a/keyboards/laplace/keymaps/default/rules.mk b/keyboards/keebio/laplace/keymaps/default/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/laplace/keymaps/default/rules.mk +++ b/keyboards/keebio/laplace/keymaps/default/rules.mk diff --git a/keyboards/laplace/laplace.c b/keyboards/keebio/laplace/laplace.c index dcf32aee6..dcf32aee6 100644 --- a/keyboards/laplace/laplace.c +++ b/keyboards/keebio/laplace/laplace.c diff --git a/keyboards/laplace/laplace.h b/keyboards/keebio/laplace/laplace.h index 17f928f34..fc0510fe5 100644 --- a/keyboards/laplace/laplace.h +++ b/keyboards/keebio/laplace/laplace.h @@ -1,5 +1,4 @@ -#ifndef LAPLACE_H -#define LAPLACE_H +#pragma once #include "quantum.h" @@ -32,4 +31,3 @@ KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C9, KC_##C10, KC_##C11, KC_##C12, KC_##C13, \ KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D7, KC_##D10, KC_##D11, KC_##D12, KC_##D13 \ ) -#endif diff --git a/keyboards/laplace/readme.md b/keyboards/keebio/laplace/readme.md index 7871992f7..4292483bc 100644 --- a/keyboards/laplace/readme.md +++ b/keyboards/keebio/laplace/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make laplace:default + make keebio/laplace:default Example of flashing this keyboard: - make laplace:default:avrdude + make keebio/laplace:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/laplace/rules.mk b/keyboards/keebio/laplace/rules.mk index fe22161cb..fe22161cb 100644 --- a/keyboards/laplace/rules.mk +++ b/keyboards/keebio/laplace/rules.mk diff --git a/keyboards/levinson/config.h b/keyboards/keebio/levinson/config.h index ca0c79e55..ca0c79e55 100644 --- a/keyboards/levinson/config.h +++ b/keyboards/keebio/levinson/config.h diff --git a/keyboards/levinson/info.json b/keyboards/keebio/levinson/info.json index 2fb8fa9e3..2fb8fa9e3 100644 --- a/keyboards/levinson/info.json +++ b/keyboards/keebio/levinson/info.json diff --git a/keyboards/levinson/keymaps/atreus/config.h b/keyboards/keebio/levinson/keymaps/atreus/config.h index a82c15238..a82c15238 100644 --- a/keyboards/levinson/keymaps/atreus/config.h +++ b/keyboards/keebio/levinson/keymaps/atreus/config.h diff --git a/keyboards/levinson/keymaps/atreus/keymap.c b/keyboards/keebio/levinson/keymaps/atreus/keymap.c index 61ad04ef7..61ad04ef7 100644 --- a/keyboards/levinson/keymaps/atreus/keymap.c +++ b/keyboards/keebio/levinson/keymaps/atreus/keymap.c diff --git a/keyboards/levinson/keymaps/atreus/readme.md b/keyboards/keebio/levinson/keymaps/atreus/readme.md index 0b548ace1..0b548ace1 100644 --- a/keyboards/levinson/keymaps/atreus/readme.md +++ b/keyboards/keebio/levinson/keymaps/atreus/readme.md diff --git a/keyboards/levinson/keymaps/bakingpy2u/config.h b/keyboards/keebio/levinson/keymaps/bakingpy2u/config.h index 1db6ea433..1db6ea433 100644 --- a/keyboards/levinson/keymaps/bakingpy2u/config.h +++ b/keyboards/keebio/levinson/keymaps/bakingpy2u/config.h diff --git a/keyboards/levinson/keymaps/bakingpy2u/keymap.c b/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c index 219e3468f..6a6ab496a 100644 --- a/keyboards/levinson/keymaps/bakingpy2u/keymap.c +++ b/keyboards/keebio/levinson/keymaps/bakingpy2u/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/levinson/keymaps/bakingpy2u/rules.mk b/keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/levinson/keymaps/bakingpy2u/rules.mk +++ b/keyboards/keebio/levinson/keymaps/bakingpy2u/rules.mk diff --git a/keyboards/levinson/keymaps/default/config.h b/keyboards/keebio/levinson/keymaps/default/config.h index e710d6e4a..be2d71e8f 100644 --- a/keyboards/levinson/keymaps/default/config.h +++ b/keyboards/keebio/levinson/keymaps/default/config.h @@ -21,13 +21,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/levinson/keymaps/default/keymap.c b/keyboards/keebio/levinson/keymaps/default/keymap.c index dac8068a4..abf253380 100644 --- a/keyboards/levinson/keymaps/default/keymap.c +++ b/keyboards/keebio/levinson/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/levinson/keymaps/default/rules.mk b/keyboards/keebio/levinson/keymaps/default/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/levinson/keymaps/default/rules.mk +++ b/keyboards/keebio/levinson/keymaps/default/rules.mk diff --git a/keyboards/levinson/keymaps/drogglbecher/config.h b/keyboards/keebio/levinson/keymaps/drogglbecher/config.h index ef96ff00b..ef96ff00b 100644 --- a/keyboards/levinson/keymaps/drogglbecher/config.h +++ b/keyboards/keebio/levinson/keymaps/drogglbecher/config.h diff --git a/keyboards/levinson/keymaps/drogglbecher/keymap.c b/keyboards/keebio/levinson/keymaps/drogglbecher/keymap.c index b8d2dc594..b8d2dc594 100644 --- a/keyboards/levinson/keymaps/drogglbecher/keymap.c +++ b/keyboards/keebio/levinson/keymaps/drogglbecher/keymap.c diff --git a/keyboards/levinson/keymaps/drogglbecher/rules.mk b/keyboards/keebio/levinson/keymaps/drogglbecher/rules.mk index b2a5451c8..b2a5451c8 100644 --- a/keyboards/levinson/keymaps/drogglbecher/rules.mk +++ b/keyboards/keebio/levinson/keymaps/drogglbecher/rules.mk diff --git a/keyboards/levinson/keymaps/jyh/config.h b/keyboards/keebio/levinson/keymaps/jyh/config.h index d3e598bd0..d3e598bd0 100644 --- a/keyboards/levinson/keymaps/jyh/config.h +++ b/keyboards/keebio/levinson/keymaps/jyh/config.h diff --git a/keyboards/levinson/keymaps/jyh/keymap.c b/keyboards/keebio/levinson/keymaps/jyh/keymap.c index d8cfa7e06..d8cfa7e06 100644 --- a/keyboards/levinson/keymaps/jyh/keymap.c +++ b/keyboards/keebio/levinson/keymaps/jyh/keymap.c diff --git a/keyboards/levinson/keymaps/jyh/readme.md b/keyboards/keebio/levinson/keymaps/jyh/readme.md index e20424e51..e20424e51 100644 --- a/keyboards/levinson/keymaps/jyh/readme.md +++ b/keyboards/keebio/levinson/keymaps/jyh/readme.md diff --git a/keyboards/levinson/keymaps/jyh/rules.mk b/keyboards/keebio/levinson/keymaps/jyh/rules.mk index 66110cfcc..66110cfcc 100644 --- a/keyboards/levinson/keymaps/jyh/rules.mk +++ b/keyboards/keebio/levinson/keymaps/jyh/rules.mk diff --git a/keyboards/levinson/keymaps/jyh2/config.h b/keyboards/keebio/levinson/keymaps/jyh2/config.h index f50674bb8..f50674bb8 100644 --- a/keyboards/levinson/keymaps/jyh2/config.h +++ b/keyboards/keebio/levinson/keymaps/jyh2/config.h diff --git a/keyboards/levinson/keymaps/jyh2/keymap.c b/keyboards/keebio/levinson/keymaps/jyh2/keymap.c index 4b7442928..4b7442928 100644 --- a/keyboards/levinson/keymaps/jyh2/keymap.c +++ b/keyboards/keebio/levinson/keymaps/jyh2/keymap.c diff --git a/keyboards/levinson/keymaps/jyh2/readme.md b/keyboards/keebio/levinson/keymaps/jyh2/readme.md index 45ca95692..45ca95692 100644 --- a/keyboards/levinson/keymaps/jyh2/readme.md +++ b/keyboards/keebio/levinson/keymaps/jyh2/readme.md diff --git a/keyboards/levinson/keymaps/jyh2/rules.mk b/keyboards/keebio/levinson/keymaps/jyh2/rules.mk index fbb3b49d6..fbb3b49d6 100644 --- a/keyboards/levinson/keymaps/jyh2/rules.mk +++ b/keyboards/keebio/levinson/keymaps/jyh2/rules.mk diff --git a/keyboards/levinson/keymaps/losinggeneration/README.md b/keyboards/keebio/levinson/keymaps/losinggeneration/README.md index 44c904508..44c904508 100644 --- a/keyboards/levinson/keymaps/losinggeneration/README.md +++ b/keyboards/keebio/levinson/keymaps/losinggeneration/README.md diff --git a/keyboards/levinson/keymaps/losinggeneration/config.h b/keyboards/keebio/levinson/keymaps/losinggeneration/config.h index 917c6a98b..917c6a98b 100644 --- a/keyboards/levinson/keymaps/losinggeneration/config.h +++ b/keyboards/keebio/levinson/keymaps/losinggeneration/config.h diff --git a/keyboards/levinson/keymaps/losinggeneration/keymap.c b/keyboards/keebio/levinson/keymaps/losinggeneration/keymap.c index aea6aed78..aea6aed78 100644 --- a/keyboards/levinson/keymaps/losinggeneration/keymap.c +++ b/keyboards/keebio/levinson/keymaps/losinggeneration/keymap.c diff --git a/keyboards/levinson/keymaps/losinggeneration/rules.mk b/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk index ee3ea67f7..ee3ea67f7 100644 --- a/keyboards/levinson/keymaps/losinggeneration/rules.mk +++ b/keyboards/keebio/levinson/keymaps/losinggeneration/rules.mk diff --git a/keyboards/levinson/keymaps/mmacdougall/README.md b/keyboards/keebio/levinson/keymaps/mmacdougall/README.md index bae8c8a4b..bae8c8a4b 100644 --- a/keyboards/levinson/keymaps/mmacdougall/README.md +++ b/keyboards/keebio/levinson/keymaps/mmacdougall/README.md diff --git a/keyboards/levinson/keymaps/mmacdougall/config.h b/keyboards/keebio/levinson/keymaps/mmacdougall/config.h index 63dd5bc88..63dd5bc88 100644 --- a/keyboards/levinson/keymaps/mmacdougall/config.h +++ b/keyboards/keebio/levinson/keymaps/mmacdougall/config.h diff --git a/keyboards/levinson/keymaps/mmacdougall/keymap.c b/keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c index dec47a761..76d9c7299 100644 --- a/keyboards/levinson/keymaps/mmacdougall/keymap.c +++ b/keyboards/keebio/levinson/keymaps/mmacdougall/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/levinson/keymaps/mmacdougall/rules.mk b/keyboards/keebio/levinson/keymaps/mmacdougall/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/levinson/keymaps/mmacdougall/rules.mk +++ b/keyboards/keebio/levinson/keymaps/mmacdougall/rules.mk diff --git a/keyboards/levinson/keymaps/steno/config.h b/keyboards/keebio/levinson/keymaps/steno/config.h index 9cbc148e4..9cbc148e4 100644 --- a/keyboards/levinson/keymaps/steno/config.h +++ b/keyboards/keebio/levinson/keymaps/steno/config.h diff --git a/keyboards/levinson/keymaps/steno/keymap.c b/keyboards/keebio/levinson/keymaps/steno/keymap.c index cd7493467..cd7493467 100644 --- a/keyboards/levinson/keymaps/steno/keymap.c +++ b/keyboards/keebio/levinson/keymaps/steno/keymap.c diff --git a/keyboards/levinson/keymaps/steno/rules.mk b/keyboards/keebio/levinson/keymaps/steno/rules.mk index 9c31e590e..9c31e590e 100644 --- a/keyboards/levinson/keymaps/steno/rules.mk +++ b/keyboards/keebio/levinson/keymaps/steno/rules.mk diff --git a/keyboards/levinson/keymaps/treadwell/config.h b/keyboards/keebio/levinson/keymaps/treadwell/config.h index 69783937b..69783937b 100644 --- a/keyboards/levinson/keymaps/treadwell/config.h +++ b/keyboards/keebio/levinson/keymaps/treadwell/config.h diff --git a/keyboards/levinson/keymaps/treadwell/keymap.c b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c index bcc744a6d..2f0da0f52 100644 --- a/keyboards/levinson/keymaps/treadwell/keymap.c +++ b/keyboards/keebio/levinson/keymaps/treadwell/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_X1 CODE #define KC_X2 NUMB diff --git a/keyboards/levinson/keymaps/treadwell/rules.mk b/keyboards/keebio/levinson/keymaps/treadwell/rules.mk index 1d2d9e5a9..1d2d9e5a9 100644 --- a/keyboards/levinson/keymaps/treadwell/rules.mk +++ b/keyboards/keebio/levinson/keymaps/treadwell/rules.mk diff --git a/keyboards/levinson/keymaps/valgrahf/config.h b/keyboards/keebio/levinson/keymaps/valgrahf/config.h index b7c6b0a7f..b7c6b0a7f 100644 --- a/keyboards/levinson/keymaps/valgrahf/config.h +++ b/keyboards/keebio/levinson/keymaps/valgrahf/config.h diff --git a/keyboards/levinson/keymaps/valgrahf/keymap.c b/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c index 7b3df539d..cbe86db37 100644 --- a/keyboards/levinson/keymaps/valgrahf/keymap.c +++ b/keyboards/keebio/levinson/keymaps/valgrahf/keymap.c @@ -7,8 +7,6 @@ extern keymap_config_t keymap_config; #define _FN2 2 #define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO #define KC_FN1 LT(_FN1, KC_NO) #define KC_FN2 LT(_FN2, KC_NO) #define KC_SPFN LT(_FN1, KC_SPACE) diff --git a/keyboards/levinson/keymaps/valgrahf/rules.mk b/keyboards/keebio/levinson/keymaps/valgrahf/rules.mk index 1f54b32c4..1f54b32c4 100644 --- a/keyboards/levinson/keymaps/valgrahf/rules.mk +++ b/keyboards/keebio/levinson/keymaps/valgrahf/rules.mk diff --git a/keyboards/levinson/keymaps/xtonhasvim/config.h b/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h index bcd2220ce..bcd2220ce 100644 --- a/keyboards/levinson/keymaps/xtonhasvim/config.h +++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/config.h diff --git a/keyboards/levinson/keymaps/xtonhasvim/keymap.c b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c index b9341ff35..b9341ff35 100644 --- a/keyboards/levinson/keymaps/xtonhasvim/keymap.c +++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/keymap.c diff --git a/keyboards/levinson/keymaps/xtonhasvim/readme.md b/keyboards/keebio/levinson/keymaps/xtonhasvim/readme.md index 9ff4ce1f1..9ff4ce1f1 100644 --- a/keyboards/levinson/keymaps/xtonhasvim/readme.md +++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/readme.md diff --git a/keyboards/levinson/keymaps/xtonhasvim/rules.mk b/keyboards/keebio/levinson/keymaps/xtonhasvim/rules.mk index ad5466991..ad5466991 100644 --- a/keyboards/levinson/keymaps/xtonhasvim/rules.mk +++ b/keyboards/keebio/levinson/keymaps/xtonhasvim/rules.mk diff --git a/keyboards/levinson/levinson.c b/keyboards/keebio/levinson/levinson.c index 95f3fe9ef..95f3fe9ef 100644 --- a/keyboards/levinson/levinson.c +++ b/keyboards/keebio/levinson/levinson.c diff --git a/keyboards/levinson/levinson.h b/keyboards/keebio/levinson/levinson.h index 2106bc0e3..88c2361ad 100644 --- a/keyboards/levinson/levinson.h +++ b/keyboards/keebio/levinson/levinson.h @@ -2,7 +2,7 @@ #include "quantum.h" -#ifdef KEYBOARD_levinson_rev1 +#ifdef KEYBOARD_keebio_levinson_rev1 #include "rev1.h" #else #include "rev2.h" diff --git a/keyboards/levinson/readme.md b/keyboards/keebio/levinson/readme.md index 8cb4ff1cf..8cb4ff1cf 100644 --- a/keyboards/levinson/readme.md +++ b/keyboards/keebio/levinson/readme.md diff --git a/keyboards/levinson/rev1/config.h b/keyboards/keebio/levinson/rev1/config.h index 07ba1e221..0359796fe 100644 --- a/keyboards/levinson/rev1/config.h +++ b/keyboards/keebio/levinson/rev1/config.h @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -49,11 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/levinson/rev1/rev1.c b/keyboards/keebio/levinson/rev1/rev1.c index 573fa787b..573fa787b 100644 --- a/keyboards/levinson/rev1/rev1.c +++ b/keyboards/keebio/levinson/rev1/rev1.c diff --git a/keyboards/levinson/rev1/rev1.h b/keyboards/keebio/levinson/rev1/rev1.h index 2120bb0fa..2120bb0fa 100644 --- a/keyboards/levinson/rev1/rev1.h +++ b/keyboards/keebio/levinson/rev1/rev1.h diff --git a/keyboards/levinson/rev1/rules.mk b/keyboards/keebio/levinson/rev1/rules.mk index bd518d8f2..bd518d8f2 100644 --- a/keyboards/levinson/rev1/rules.mk +++ b/keyboards/keebio/levinson/rev1/rules.mk diff --git a/keyboards/levinson/rev2/config.h b/keyboards/keebio/levinson/rev2/config.h index a731c7195..a9fe89586 100644 --- a/keyboards/levinson/rev2/config.h +++ b/keyboards/keebio/levinson/rev2/config.h @@ -22,7 +22,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1146 #define DEVICE_VER 0x0200 #define MANUFACTURER Keebio @@ -49,11 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/levinson/rev2/rev2.c b/keyboards/keebio/levinson/rev2/rev2.c index 573fa787b..573fa787b 100644 --- a/keyboards/levinson/rev2/rev2.c +++ b/keyboards/keebio/levinson/rev2/rev2.c diff --git a/keyboards/levinson/rev2/rev2.h b/keyboards/keebio/levinson/rev2/rev2.h index 2120bb0fa..2120bb0fa 100644 --- a/keyboards/levinson/rev2/rev2.h +++ b/keyboards/keebio/levinson/rev2/rev2.h diff --git a/keyboards/levinson/rev2/rules.mk b/keyboards/keebio/levinson/rev2/rules.mk index bd518d8f2..bd518d8f2 100644 --- a/keyboards/levinson/rev2/rules.mk +++ b/keyboards/keebio/levinson/rev2/rules.mk diff --git a/keyboards/levinson/rules.mk b/keyboards/keebio/levinson/rules.mk index 8f1fa130f..cdaef4889 100644 --- a/keyboards/levinson/rules.mk +++ b/keyboards/keebio/levinson/rules.mk @@ -22,7 +22,7 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend @@ -30,4 +30,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes LAYOUTS = ortho_4x12 -DEFAULT_FOLDER = levinson/rev2 +DEFAULT_FOLDER = keebio/levinson/rev2 diff --git a/keyboards/nyquist/config.h b/keyboards/keebio/nyquist/config.h index 863722d7d..6868dc135 100644 --- a/keyboards/nyquist/config.h +++ b/keyboards/keebio/nyquist/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/nyquist/info.json b/keyboards/keebio/nyquist/info.json index 295864cfc..295864cfc 100644 --- a/keyboards/nyquist/info.json +++ b/keyboards/keebio/nyquist/info.json diff --git a/keyboards/nyquist/keymaps/DivergeJM/README.md b/keyboards/keebio/nyquist/keymaps/DivergeJM/README.md index 198e3ef88..198e3ef88 100644 --- a/keyboards/nyquist/keymaps/DivergeJM/README.md +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/README.md diff --git a/keyboards/nyquist/keymaps/DivergeJM/config.h b/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h index 776834111..776834111 100644 --- a/keyboards/nyquist/keymaps/DivergeJM/config.h +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/config.h diff --git a/keyboards/nyquist/keymaps/DivergeJM/keymap.c b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c index db8022806..585fa6347 100644 --- a/keyboards/nyquist/keymaps/DivergeJM/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/keymap.c @@ -57,10 +57,6 @@ enum { #define PIPE M(R_PIPE) #define POINT M(R_POINT) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Colemak diff --git a/keyboards/nyquist/keymaps/DivergeJM/rules.mk b/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk index 2c26b47ea..2c26b47ea 100644 --- a/keyboards/nyquist/keymaps/DivergeJM/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/DivergeJM/rules.mk diff --git a/keyboards/nyquist/keymaps/hexwire/README.md b/keyboards/keebio/nyquist/keymaps/bakingpy/README.md index 3ce3f6af3..3ce3f6af3 100644 --- a/keyboards/nyquist/keymaps/hexwire/README.md +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/README.md diff --git a/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md b/keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md index 9a7633a52..9a7633a52 100644 --- a/keyboards/nyquist/keymaps/hexwire/Underglow Pinouts.md +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/Underglow Pinouts.md diff --git a/keyboards/nyquist/keymaps/hexwire/config.h b/keyboards/keebio/nyquist/keymaps/bakingpy/config.h index 4f1901b5d..eecff3dd5 100644 --- a/keyboards/nyquist/keymaps/hexwire/config.h +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/config.h @@ -18,13 +18,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once /* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c index c030cd3b6..38c13f3ba 100644 --- a/keyboards/nyquist/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_converter.py b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py index 683f64da4..683f64da4 100755 --- a/keyboards/nyquist/keymaps/hexwire/keymap_converter.py +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_converter.py diff --git a/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb index 7285b008a..7285b008a 100755 --- a/keyboards/nyquist/keymaps/hexwire/keymap_to_readme.rb +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/keymap_to_readme.rb diff --git a/keyboards/nyquist/keymaps/hexwire/rules.mk b/keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk index a81250cdf..a81250cdf 100644 --- a/keyboards/nyquist/keymaps/hexwire/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/bakingpy/rules.mk diff --git a/keyboards/nyquist/keymaps/bramver/README.md b/keyboards/keebio/nyquist/keymaps/bramver/README.md index 2768acdf7..2768acdf7 100644 --- a/keyboards/nyquist/keymaps/bramver/README.md +++ b/keyboards/keebio/nyquist/keymaps/bramver/README.md diff --git a/keyboards/nyquist/keymaps/bramver/config.h b/keyboards/keebio/nyquist/keymaps/bramver/config.h index c908386e2..c908386e2 100644 --- a/keyboards/nyquist/keymaps/bramver/config.h +++ b/keyboards/keebio/nyquist/keymaps/bramver/config.h diff --git a/keyboards/nyquist/keymaps/bramver/keymap.c b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c index f15625467..c671b7798 100644 --- a/keyboards/nyquist/keymaps/bramver/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/bramver/keymap.c @@ -15,10 +15,6 @@ */ #include QMK_KEYBOARD_H -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // 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 diff --git a/keyboards/nyquist/keymaps/bramver/rules.mk b/keyboards/keebio/nyquist/keymaps/bramver/rules.mk index d211d7b4c..d211d7b4c 100644 --- a/keyboards/nyquist/keymaps/bramver/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/bramver/rules.mk diff --git a/keyboards/nyquist/keymaps/danielhklein/config.h b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h index 09abbccb7..09abbccb7 100644 --- a/keyboards/nyquist/keymaps/danielhklein/config.h +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/config.h diff --git a/keyboards/nyquist/keymaps/danielhklein/keymap.c b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c index e072527b1..496b1afa3 100644 --- a/keyboards/nyquist/keymaps/danielhklein/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/keymap.c @@ -41,10 +41,6 @@ enum custom_keycodes { #define BSP_RSE FUNC(1) #define ARW FUNC(2) -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - // Underglow setup #define RGBLIGHT_SLEEP #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/nyquist/keymaps/danielhklein/rules.mk b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk index 12ad2fec5..12ad2fec5 100644 --- a/keyboards/nyquist/keymaps/danielhklein/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/danielhklein/rules.mk diff --git a/keyboards/viterbi/keymaps/hexwire/config.h b/keyboards/keebio/nyquist/keymaps/default/config.h index 7acf84510..ef1c4a51a 100644 --- a/keyboards/viterbi/keymaps/hexwire/config.h +++ b/keyboards/keebio/nyquist/keymaps/default/config.h @@ -15,29 +15,17 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS -#define TAPPING_TERM 150 - #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/nyquist/keymaps/default/keymap.c b/keyboards/keebio/nyquist/keymaps/default/keymap.c index 0e3a1b9ab..ecaad49bb 100644 --- a/keyboards/nyquist/keymaps/default/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/viterbi/keymaps/default/rules.mk b/keyboards/keebio/nyquist/keymaps/default/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/viterbi/keymaps/default/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/default/rules.mk diff --git a/keyboards/nyquist/keymaps/jojiichan/config.h b/keyboards/keebio/nyquist/keymaps/jojiichan/config.h index 39a3df26b..39a3df26b 100644 --- a/keyboards/nyquist/keymaps/jojiichan/config.h +++ b/keyboards/keebio/nyquist/keymaps/jojiichan/config.h diff --git a/keyboards/nyquist/keymaps/jojiichan/keymap.c b/keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c index e8f92f37d..a0d8c4647 100644 --- a/keyboards/nyquist/keymaps/jojiichan/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/jojiichan/keymap.c @@ -2,11 +2,6 @@ extern keymap_config_t keymap_config; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LAYOUT( diff --git a/keyboards/nyquist/keymaps/jojiichan/rules.mk b/keyboards/keebio/nyquist/keymaps/jojiichan/rules.mk index a81250cdf..a81250cdf 100644 --- a/keyboards/nyquist/keymaps/jojiichan/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/jojiichan/rules.mk diff --git a/keyboards/nyquist/keymaps/kim-kim/config.h b/keyboards/keebio/nyquist/keymaps/kim-kim/config.h index a6246262e..a6246262e 100644 --- a/keyboards/nyquist/keymaps/kim-kim/config.h +++ b/keyboards/keebio/nyquist/keymaps/kim-kim/config.h diff --git a/keyboards/nyquist/keymaps/kim-kim/keymap.c b/keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c index 4051f296e..79e485f00 100644 --- a/keyboards/nyquist/keymaps/kim-kim/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/kim-kim/keymap.c @@ -10,10 +10,6 @@ extern keymap_config_t keymap_config; #define _LW 1 #define _RS 2 -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SPLIT QWERTY diff --git a/keyboards/nyquist/keymaps/kim-kim/rules.mk b/keyboards/keebio/nyquist/keymaps/kim-kim/rules.mk index a81250cdf..a81250cdf 100644 --- a/keyboards/nyquist/keymaps/kim-kim/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/kim-kim/rules.mk diff --git a/keyboards/nyquist/keymaps/losinggeneration/README.md b/keyboards/keebio/nyquist/keymaps/losinggeneration/README.md index a51b94e40..a51b94e40 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/README.md +++ b/keyboards/keebio/nyquist/keymaps/losinggeneration/README.md diff --git a/keyboards/nyquist/keymaps/losinggeneration/config.h b/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h index 330379447..330379447 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/config.h +++ b/keyboards/keebio/nyquist/keymaps/losinggeneration/config.h diff --git a/keyboards/nyquist/keymaps/losinggeneration/keymap.c b/keyboards/keebio/nyquist/keymaps/losinggeneration/keymap.c index 3e2c6edb7..3e2c6edb7 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/losinggeneration/keymap.c diff --git a/keyboards/nyquist/keymaps/losinggeneration/rules.mk b/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk index 17ef68483..17ef68483 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/losinggeneration/rules.mk diff --git a/keyboards/nyquist/keymaps/default/config.h b/keyboards/keebio/nyquist/keymaps/mtdjr/config.h index 0fa606f29..0fa606f29 100644 --- a/keyboards/nyquist/keymaps/default/config.h +++ b/keyboards/keebio/nyquist/keymaps/mtdjr/config.h diff --git a/keyboards/nyquist/keymaps/mtdjr/keymap.c b/keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c index 668e7964b..668e7964b 100644 --- a/keyboards/nyquist/keymaps/mtdjr/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/mtdjr/keymap.c diff --git a/keyboards/nyquist/keymaps/mtdjr/rules.mk b/keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/nyquist/keymaps/mtdjr/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/mtdjr/rules.mk diff --git a/keyboards/nyquist/keymaps/pitty/README.md b/keyboards/keebio/nyquist/keymaps/pitty/README.md index af933a6a5..af933a6a5 100644 --- a/keyboards/nyquist/keymaps/pitty/README.md +++ b/keyboards/keebio/nyquist/keymaps/pitty/README.md diff --git a/keyboards/nyquist/keymaps/pitty/config.h b/keyboards/keebio/nyquist/keymaps/pitty/config.h index efc75b22c..efc75b22c 100644 --- a/keyboards/nyquist/keymaps/pitty/config.h +++ b/keyboards/keebio/nyquist/keymaps/pitty/config.h diff --git a/keyboards/nyquist/keymaps/pitty/keymap.c b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c index dea317d2a..4dec42b85 100644 --- a/keyboards/nyquist/keymaps/pitty/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/pitty/keymap.c @@ -13,11 +13,6 @@ enum custom_macros { DRIGHT, }; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/nyquist/keymaps/pitty/rules.mk b/keyboards/keebio/nyquist/keymaps/pitty/rules.mk index 53a426157..53a426157 100644 --- a/keyboards/nyquist/keymaps/pitty/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/pitty/rules.mk diff --git a/keyboards/nyquist/keymaps/shovelpaw/config.h b/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h index d0adbfe0c..d0adbfe0c 100644 --- a/keyboards/nyquist/keymaps/shovelpaw/config.h +++ b/keyboards/keebio/nyquist/keymaps/shovelpaw/config.h diff --git a/keyboards/nyquist/keymaps/shovelpaw/keymap.c b/keyboards/keebio/nyquist/keymaps/shovelpaw/keymap.c index 87e44ff04..87e44ff04 100644 --- a/keyboards/nyquist/keymaps/shovelpaw/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/shovelpaw/keymap.c diff --git a/keyboards/nyquist/keymaps/shovelpaw/rules.mk b/keyboards/keebio/nyquist/keymaps/shovelpaw/rules.mk index 44ca075c3..44ca075c3 100644 --- a/keyboards/nyquist/keymaps/shovelpaw/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/shovelpaw/rules.mk diff --git a/keyboards/nyquist/keymaps/skug/config.h b/keyboards/keebio/nyquist/keymaps/skug/config.h index c36686329..c36686329 100644 --- a/keyboards/nyquist/keymaps/skug/config.h +++ b/keyboards/keebio/nyquist/keymaps/skug/config.h diff --git a/keyboards/nyquist/keymaps/skug/keymap.c b/keyboards/keebio/nyquist/keymaps/skug/keymap.c index fe3229966..fe3229966 100644 --- a/keyboards/nyquist/keymaps/skug/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/skug/keymap.c diff --git a/keyboards/nyquist/keymaps/skug/rules.mk b/keyboards/keebio/nyquist/keymaps/skug/rules.mk index e0ed6f0c2..e0ed6f0c2 100644 --- a/keyboards/nyquist/keymaps/skug/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/skug/rules.mk diff --git a/keyboards/viterbi/config.h b/keyboards/keebio/nyquist/keymaps/tester/config.h index 863722d7d..4f5f10ceb 100644 --- a/keyboards/viterbi/config.h +++ b/keyboards/keebio/nyquist/keymaps/tester/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once -#include "config_common.h" - -#endif // CONFIG_H +#define USE_I2C diff --git a/keyboards/keebio/nyquist/keymaps/tester/keymap.c b/keyboards/keebio/nyquist/keymaps/tester/keymap.c new file mode 100644 index 000000000..f1e193271 --- /dev/null +++ b/keyboards/keebio/nyquist/keymaps/tester/keymap.c @@ -0,0 +1,226 @@ +#include QMK_KEYBOARD_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, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT( \ + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + BL_STEP, KC_Q, KC_W, KC_E, KC_R, KC_T, BL_STEP, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + RGB_MOD, KC_A, KC_S, KC_D, KC_F, KC_G, RGB_MOD, 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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] = LAYOUT( \ + 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_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ + 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 + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | " | , | . | P | Y | F | G | C | R | L | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | 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] = LAYOUT( \ + 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_DEL, \ + 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 \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT( \ + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT( \ + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset|RGB Tg|RGB Md|Hue Up|Hue Dn|Sat Up|Sat Dn|Val Up|Val Dn| | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT( \ + 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 , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#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 persistent_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_SONG(tone_qwerty); + #endif + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_colemak); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_dvorak); + #endif + persistent_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; +} diff --git a/keyboards/viterbi/keymaps/dwallace/rules.mk b/keyboards/keebio/nyquist/keymaps/tester/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/viterbi/keymaps/dwallace/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/tester/rules.mk diff --git a/keyboards/nyquist/keymaps/yshrsmz/config.h b/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h index 5cbe3b701..5cbe3b701 100644 --- a/keyboards/nyquist/keymaps/yshrsmz/config.h +++ b/keyboards/keebio/nyquist/keymaps/yshrsmz/config.h diff --git a/keyboards/nyquist/keymaps/yshrsmz/keymap.c b/keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c index 78070279d..d4c2d4ba2 100644 --- a/keyboards/nyquist/keymaps/yshrsmz/keymap.c +++ b/keyboards/keebio/nyquist/keymaps/yshrsmz/keymap.c @@ -20,10 +20,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/nyquist/keymaps/yshrsmz/rules.mk b/keyboards/keebio/nyquist/keymaps/yshrsmz/rules.mk index c9383ab8d..c9383ab8d 100644 --- a/keyboards/nyquist/keymaps/yshrsmz/rules.mk +++ b/keyboards/keebio/nyquist/keymaps/yshrsmz/rules.mk diff --git a/keyboards/nyquist/nyquist.c b/keyboards/keebio/nyquist/nyquist.c index 2face09d4..2face09d4 100644 --- a/keyboards/nyquist/nyquist.c +++ b/keyboards/keebio/nyquist/nyquist.c diff --git a/keyboards/nyquist/nyquist.h b/keyboards/keebio/nyquist/nyquist.h index 9a3e99647..7b0ecf542 100644 --- a/keyboards/nyquist/nyquist.h +++ b/keyboards/keebio/nyquist/nyquist.h @@ -1,12 +1,12 @@ #pragma once -#ifdef KEYBOARD_nyquist_rev1 +#ifdef KEYBOARD_keebio_nyquist_rev1 #include "rev1.h" #endif -#ifdef KEYBOARD_nyquist_rev2 +#ifdef KEYBOARD_keebio_nyquist_rev2 #include "rev2.h" #endif -#ifdef KEYBOARD_nyquist_rev3 +#ifdef KEYBOARD_keebio_nyquist_rev3 #include "rev3.h" #endif diff --git a/keyboards/nyquist/readme.md b/keyboards/keebio/nyquist/readme.md index e3d75b448..9fa7259d8 100644 --- a/keyboards/nyquist/readme.md +++ b/keyboards/keebio/nyquist/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make nyquist/rev1:default + make keebio/nyquist/rev2:default Example of flashing this keyboard: - make nyquist/rev1:default:avrdude + make keebio/nyquist/rev2:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/nyquist/rev1/config.h b/keyboards/keebio/nyquist/rev1/config.h index 892054b73..98381aca7 100644 --- a/keyboards/nyquist/rev1/config.h +++ b/keyboards/keebio/nyquist/rev1/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/nyquist/rev1/rev1.c b/keyboards/keebio/nyquist/rev1/rev1.c index 5f4cd32f6..5f4cd32f6 100644 --- a/keyboards/nyquist/rev1/rev1.c +++ b/keyboards/keebio/nyquist/rev1/rev1.c diff --git a/keyboards/nyquist/rev1/rev1.h b/keyboards/keebio/nyquist/rev1/rev1.h index 6d3a23383..6d3a23383 100644 --- a/keyboards/nyquist/rev1/rev1.h +++ b/keyboards/keebio/nyquist/rev1/rev1.h diff --git a/keyboards/nyquist/rev1/rules.mk b/keyboards/keebio/nyquist/rev1/rules.mk index 7b30c0bef..7b30c0bef 100644 --- a/keyboards/nyquist/rev1/rules.mk +++ b/keyboards/keebio/nyquist/rev1/rules.mk diff --git a/keyboards/nyquist/rev2/config.h b/keyboards/keebio/nyquist/rev2/config.h index 21aea0aad..52c50694b 100644 --- a/keyboards/nyquist/rev2/config.h +++ b/keyboards/keebio/nyquist/rev2/config.h @@ -51,11 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/nyquist/rev2/rev2.c b/keyboards/keebio/nyquist/rev2/rev2.c index 9922b8995..9922b8995 100644 --- a/keyboards/nyquist/rev2/rev2.c +++ b/keyboards/keebio/nyquist/rev2/rev2.c diff --git a/keyboards/nyquist/rev2/rev2.h b/keyboards/keebio/nyquist/rev2/rev2.h index 6d3a23383..6d3a23383 100644 --- a/keyboards/nyquist/rev2/rev2.h +++ b/keyboards/keebio/nyquist/rev2/rev2.h diff --git a/keyboards/nyquist/rev2/rules.mk b/keyboards/keebio/nyquist/rev2/rules.mk index bd518d8f2..bd518d8f2 100644 --- a/keyboards/nyquist/rev2/rules.mk +++ b/keyboards/keebio/nyquist/rev2/rules.mk diff --git a/keyboards/nyquist/rev3/config.h b/keyboards/keebio/nyquist/rev3/config.h index 0caf8c423..18b40ecec 100644 --- a/keyboards/nyquist/rev3/config.h +++ b/keyboards/keebio/nyquist/rev3/config.h @@ -52,11 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 B4 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/nyquist/rev3/rev3.c b/keyboards/keebio/nyquist/rev3/rev3.c index 34500fb10..34500fb10 100644 --- a/keyboards/nyquist/rev3/rev3.c +++ b/keyboards/keebio/nyquist/rev3/rev3.c diff --git a/keyboards/nyquist/rev3/rev3.h b/keyboards/keebio/nyquist/rev3/rev3.h index 274b83926..274b83926 100644 --- a/keyboards/nyquist/rev3/rev3.h +++ b/keyboards/keebio/nyquist/rev3/rev3.h diff --git a/keyboards/nyquist/rev3/rules.mk b/keyboards/keebio/nyquist/rev3/rules.mk index 31077066a..31077066a 100644 --- a/keyboards/nyquist/rev3/rules.mk +++ b/keyboards/keebio/nyquist/rev3/rules.mk diff --git a/keyboards/nyquist/rules.mk b/keyboards/keebio/nyquist/rules.mk index 5313b8502..51821a482 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/keebio/nyquist/rules.mk @@ -68,4 +68,4 @@ SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes LAYOUTS = ortho_5x12 -DEFAULT_FOLDER = nyquist/rev2 +DEFAULT_FOLDER = keebio/nyquist/rev2 diff --git a/keyboards/fourier/config.h b/keyboards/keebio/quefrency/config.h index cfb6bf4ff..cfb6bf4ff 100644 --- a/keyboards/fourier/config.h +++ b/keyboards/keebio/quefrency/config.h diff --git a/keyboards/quefrency/info.json b/keyboards/keebio/quefrency/info.json index 160e7896b..160e7896b 100644 --- a/keyboards/quefrency/info.json +++ b/keyboards/keebio/quefrency/info.json diff --git a/keyboards/quefrency/keymaps/bjohnson/config.h b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h index 37c6d6672..37c6d6672 100644 --- a/keyboards/quefrency/keymaps/bjohnson/config.h +++ b/keyboards/keebio/quefrency/keymaps/bjohnson/config.h diff --git a/keyboards/quefrency/keymaps/bjohnson/keymap.c b/keyboards/keebio/quefrency/keymaps/bjohnson/keymap.c index 434a0a305..434a0a305 100644 --- a/keyboards/quefrency/keymaps/bjohnson/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bjohnson/keymap.c diff --git a/keyboards/quefrency/keymaps/bjohnson/rules.mk b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk index 70fa71100..70fa71100 100644 --- a/keyboards/quefrency/keymaps/bjohnson/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/bjohnson/rules.mk diff --git a/keyboards/quefrency/keymaps/bramver/README.md b/keyboards/keebio/quefrency/keymaps/bramver/README.md index 76310ed73..76310ed73 100644 --- a/keyboards/quefrency/keymaps/bramver/README.md +++ b/keyboards/keebio/quefrency/keymaps/bramver/README.md diff --git a/keyboards/quefrency/keymaps/bramver/config.h b/keyboards/keebio/quefrency/keymaps/bramver/config.h index c908386e2..c908386e2 100644 --- a/keyboards/quefrency/keymaps/bramver/config.h +++ b/keyboards/keebio/quefrency/keymaps/bramver/config.h diff --git a/keyboards/quefrency/keymaps/bramver/keymap.c b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c index 527f5de04..f995f9bfa 100644 --- a/keyboards/quefrency/keymaps/bramver/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/bramver/keymap.c @@ -4,9 +4,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define _BASE 0 #define _LMSE 1 #define _RMSE 2 @@ -100,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , KC_WH_L , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_U , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ _______ , KC_WH_R , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_D , _______ , _______ , _______ , _______ , _______ , _______ , _______ ,\ _______ , _______ , KC_PGDN , KC_PGUP , KC_END , KC_HOME , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_RMSE] = LAYOUT( @@ -108,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , _______ , _______ , _______ , _______ , _______ , KC_WH_U , KC_BTN1 , KC_MS_U , KC_BTN2 , KC_WH_L , _______ , _______ , _______ , \ _______ , _______ , _______ , _______ , _______ , _______ , KC_WH_D , KC_MS_L , KC_MS_D , KC_MS_R , KC_WH_R , _______ , _______ ,\ _______ , _______ , _______ , _______ , _______ , _______ , KC_HOME , KC_END , KC_PGUP , KC_PGDN , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_SYMB] = LAYOUT( @@ -116,7 +113,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ _______ , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , KC_LPRN , KC_RPRN , _______ , _______ ,\ _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), [_EMOJ] = LAYOUT( @@ -124,7 +121,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______ , X(CLAP) , X(CUM) , X(BNIS) , X(BUTT) , X(CAR) , X(FIRE) , X(REDB) , X(MONY) , X(HNDR) , X(SOS) , _______ , _______ , _______ , \ _______ , X(CELE) , X(PRAY) , X(NAIL) , X(OK) , X(THNK) , X(UNAM) , X(HEYE) , X(COOL) , X(EYES) , X(SMIR) , _______ , _______ ,\ _______ , X(TRIU) , X(SCRM) , X(VOMI) , X(DTIV) , X(EXPL) , X(HAIR) , X(DANC) , X(STRN) , X(LEFT) , X(RGHT) , _______ , _______ , \ - _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), }; diff --git a/keyboards/quefrency/keymaps/bramver/rules.mk b/keyboards/keebio/quefrency/keymaps/bramver/rules.mk index d211d7b4c..d211d7b4c 100644 --- a/keyboards/quefrency/keymaps/bramver/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/bramver/rules.mk diff --git a/keyboards/quefrency/keymaps/default/config.h b/keyboards/keebio/quefrency/keymaps/default/config.h index f9efe78c5..f9efe78c5 100644 --- a/keyboards/quefrency/keymaps/default/config.h +++ b/keyboards/keebio/quefrency/keymaps/default/config.h diff --git a/keyboards/quefrency/keymaps/default/keymap.c b/keyboards/keebio/quefrency/keymaps/default/keymap.c index 964a997dd..744a8d32a 100644 --- a/keyboards/quefrency/keymaps/default/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT( KC_GESC, 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_DEL, KC_BSPC, \ diff --git a/keyboards/quefrency/keymaps/default/rules.mk b/keyboards/keebio/quefrency/keymaps/default/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/quefrency/keymaps/default/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/default/rules.mk diff --git a/keyboards/quefrency/keymaps/default65/config.h b/keyboards/keebio/quefrency/keymaps/default65/config.h index f9efe78c5..f9efe78c5 100644 --- a/keyboards/quefrency/keymaps/default65/config.h +++ b/keyboards/keebio/quefrency/keymaps/default65/config.h diff --git a/keyboards/quefrency/keymaps/default65/keymap.c b/keyboards/keebio/quefrency/keymaps/default65/keymap.c index 4b07949b0..3e7773167 100644 --- a/keyboards/quefrency/keymaps/default65/keymap.c +++ b/keyboards/keebio/quefrency/keymaps/default65/keymap.c @@ -13,9 +13,6 @@ enum custom_keycodes { QWERTY = SAFE_RANGE, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BASE] = LAYOUT_65( KC_GESC, 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_DEL, KC_BSPC, KC_HOME, \ diff --git a/keyboards/quefrency/keymaps/default65/rules.mk b/keyboards/keebio/quefrency/keymaps/default65/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/quefrency/keymaps/default65/rules.mk +++ b/keyboards/keebio/quefrency/keymaps/default65/rules.mk diff --git a/keyboards/quefrency/config.h b/keyboards/keebio/quefrency/keymaps/default65macro/config.h index 8f0524f97..53bf8fb93 100644 --- a/keyboards/quefrency/config.h +++ b/keyboards/keebio/quefrency/keymaps/default65macro/config.h @@ -1,6 +1,9 @@ /* +This is the c configuration file for the keymap + Copyright 2012 Jun Wako <wakojun@gmail.com> Copyright 2015 Jack Humbert +Copyright 2018 Danny Nguyen <danny@keeb.io> 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 @@ -16,13 +19,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -#ifdef SUBPROJECT_rev1 - #include "rev1/config.h" -#endif +#pragma once -#endif +// #define USE_I2C diff --git a/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c new file mode 100644 index 000000000..4503291d2 --- /dev/null +++ b/keyboards/keebio/quefrency/keymaps/default65macro/keymap.c @@ -0,0 +1,32 @@ +#include QMK_KEYBOARD_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 _BASE 0 +#define _FN1 1 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BASE] = LAYOUT_65_with_macro( + KC_F1, KC_F2, KC_GESC, 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_DEL, KC_BSPC, KC_HOME, \ + KC_F3, KC_F4, 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_BSLS, KC_END, \ + KC_F5, KC_F6, 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_ENT, KC_PGUP, \ + KC_F7, KC_F8, KC_LSFT, 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_F9, KC_F10, KC_LCTL, KC_LALT, KC_LGUI, MO(_FN1),KC_SPC, MO(_FN1),KC_SPC, KC_RALT, KC_RCTL, KC_RGUI, KC_LEFT, KC_DOWN, KC_RGHT + ), + + [_FN1] = LAYOUT_65_with_macro( + _______, _______, KC_GESC, 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_DEL, KC_BSPC, _______, \ + _______, _______, RGB_TOG, RGB_MOD, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) +}; diff --git a/keyboards/quefrency/quefrency.c b/keyboards/keebio/quefrency/quefrency.c index d713a0ff3..d713a0ff3 100644 --- a/keyboards/quefrency/quefrency.c +++ b/keyboards/keebio/quefrency/quefrency.c diff --git a/keyboards/quefrency/quefrency.h b/keyboards/keebio/quefrency/quefrency.h index 7a791230d..0c387a6d5 100644 --- a/keyboards/quefrency/quefrency.h +++ b/keyboards/keebio/quefrency/quefrency.h @@ -1,9 +1,8 @@ -#ifndef QUEFRENCY_H -#define QUEFRENCY_H +#pragma once #include "quantum.h" -#ifdef KEYBOARD_quefrency_rev1 +#ifdef KEYBOARD_keebio_quefrency_rev1 #include "rev1.h" #endif @@ -20,4 +19,3 @@ KC_##LC1, KC_##LC2, KC_##LC3, KC_##LC4, KC_##LC5, KC_##LC6, KC_##RC1, KC_##RC3, KC_##RC4, KC_##RC5, KC_##RC6, KC_##RC7, \ KC_##LD1, KC_##LD2, KC_##LD3, KC_##LD4, KC_##LD5, KC_##RD1, KC_##RD4, KC_##RD5, KC_##RD6, KC_##RD7 \ ) -#endif diff --git a/keyboards/quefrency/readme.md b/keyboards/keebio/quefrency/readme.md index 66d033b6b..3f0e7d98e 100644 --- a/keyboards/quefrency/readme.md +++ b/keyboards/keebio/quefrency/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io/) Make example for this keyboard (after setting up your build environment): - make quefrency/rev1:default + make keebio/quefrency/rev1:default Example of flashing this keyboard: - make quefrency/rev1:default:avrdude + make keebio/quefrency/rev1:default:avrdude Handedness detection is already hardwired onto the PCB, so no need to deal with `EE_HANDS` or flashing .eep files. diff --git a/keyboards/quefrency/rev1/config.h b/keyboards/keebio/quefrency/rev1/config.h index 88d704486..4b95eea50 100644 --- a/keyboards/quefrency/rev1/config.h +++ b/keyboards/keebio/quefrency/rev1/config.h @@ -49,11 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/quefrency/rev1/rev1.c b/keyboards/keebio/quefrency/rev1/rev1.c index a690a7eff..a690a7eff 100644 --- a/keyboards/quefrency/rev1/rev1.c +++ b/keyboards/keebio/quefrency/rev1/rev1.c diff --git a/keyboards/quefrency/rev1/rev1.h b/keyboards/keebio/quefrency/rev1/rev1.h index c7dcaa9fe..137aa41c2 100644 --- a/keyboards/quefrency/rev1/rev1.h +++ b/keyboards/keebio/quefrency/rev1/rev1.h @@ -56,3 +56,48 @@ { RE1, RE2, RE9, RE4, RE5, RE6, RE7, RE8 }, \ { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RA9, RB9 } \ } + +#define LAYOUT_60_with_macro( \ + LA9, LA8, LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, \ + LB9, LB8, LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, \ + LC9, LC8, LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC2, RC3, RC4, RC5, RC6, RC8, \ + LD9, LD8, LD1, LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD6, RD7, RD8, \ + LE9, LE8, LE1, LE2, LE3, LE5, LE7, RE1, RE2, RE4, RE5, RE6, RE7, RE8 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB9, LB8 }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC9, LC8 }, \ + { LD1, LD9, LD3, LD4, LD5, LD6, LD7, LD8 }, \ + { LE1, LE2, LE3, LA9, LE5, LE9, LE7, LE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, KC_NO, RC8 }, \ + { RD1, RD2, RD3, RD4, KC_NO, RD6, RD7, RD8 }, \ + { RE1, RE2, KC_NO, RE4, RE5, RE6, RE7, RE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO } \ + } + + +#define LAYOUT_65_with_macro( \ + LA9, LA8, LA1, LA2, LA3, LA4, LA5, LA6, LA7, RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8, RA9, \ + LB9, LB8, LB1, LB2, LB3, LB4, LB5, LB6, RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8, RB9, \ + LC9, LC8, LC1, LC2, LC3, LC4, LC5, LC6, RC1, RC2, RC3, RC4, RC5, RC6, RC8, RC9, \ + LD9, LD8, LD1, LD3, LD4, LD5, LD6, LD7, RD1, RD2, RD3, RD4, RD6, RD7, RD8, RD9, \ + LE9, LE8, LE1, LE2, LE3, LE5, LE7, RE1, RE2, RE4, RE5, RE6, RE7, RE8, RE9 \ + ) \ + { \ + { LA1, LA2, LA3, LA4, LA5, LA6, LA7, LA8 }, \ + { LB1, LB2, LB3, LB4, LB5, LB6, LB9, LB8 }, \ + { LC1, LC2, LC3, LC4, LC5, LC6, LC9, LC8 }, \ + { LD1, LD9, LD3, LD4, LD5, LD6, LD7, LD8 }, \ + { LE1, LE2, LE3, LA9, LE5, LE9, LE7, LE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { RA1, RA2, RA3, RA4, RA5, RA6, RA7, RA8 }, \ + { RB1, RB2, RB3, RB4, RB5, RB6, RB7, RB8 }, \ + { RC1, RC2, RC3, RC4, RC5, RC6, RC9, RC8 }, \ + { RD1, RD2, RD3, RD4, RD9, RD6, RD7, RD8 }, \ + { RE1, RE2, RE9, RE4, RE5, RE6, RE7, RE8 }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, RA9, RB9 } \ + } diff --git a/keyboards/quefrency/rev1/rules.mk b/keyboards/keebio/quefrency/rev1/rules.mk index e69de29bb..e69de29bb 100644 --- a/keyboards/quefrency/rev1/rules.mk +++ b/keyboards/keebio/quefrency/rev1/rules.mk diff --git a/keyboards/quefrency/rules.mk b/keyboards/keebio/quefrency/rules.mk index 3ec04fbf1..c28696c08 100644 --- a/keyboards/quefrency/rules.mk +++ b/keyboards/keebio/quefrency/rules.mk @@ -22,12 +22,10 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = quefrency/rev1 +DEFAULT_FOLDER = keebio/quefrency/rev1 diff --git a/keyboards/rorschach/config.h b/keyboards/keebio/rorschach/config.h index 03fde5399..769330e39 100644 --- a/keyboards/rorschach/config.h +++ b/keyboards/keebio/rorschach/config.h @@ -15,9 +15,6 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" - -#endif // CONFIG_H diff --git a/keyboards/rorschach/info.json b/keyboards/keebio/rorschach/info.json index a5856fa59..a5856fa59 100644 --- a/keyboards/rorschach/info.json +++ b/keyboards/keebio/rorschach/info.json diff --git a/keyboards/rorschach/keymaps/default/config.h b/keyboards/keebio/rorschach/keymaps/default/config.h index b6a943632..da32daebb 100644 --- a/keyboards/rorschach/keymaps/default/config.h +++ b/keyboards/keebio/rorschach/keymaps/default/config.h @@ -17,11 +17,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/rorschach/keymaps/default/keymap.c b/keyboards/keebio/rorschach/keymaps/default/keymap.c index 736d4d353..736d4d353 100644 --- a/keyboards/rorschach/keymaps/default/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/default/keymap.c diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/config.h b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h index 2048232c9..2048232c9 100644 --- a/keyboards/rorschach/keymaps/insertsnideremarks/config.h +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/config.h diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/keymap.c b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c index 5d93e2f05..81c163a02 100644 --- a/keyboards/rorschach/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/keymap.c @@ -28,9 +28,6 @@ enum rorschach_keycodes { NKROTG = MAGIC_TOGGLE_NKRO, }; -#define _______ KC_TRNS -#define XXXXXXX KC_NO - //Tap Dance Declarations enum { ADJ = 0, @@ -60,7 +57,7 @@ void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { } qk_tap_dance_action_t tap_dance_actions[] = { -[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer +[ADJ] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, dance_LAYER_finished, dance_LAYER_reset), // Double-tap to activate Adjust layer via oneshot layer [LBCB] = ACTION_TAP_DANCE_DOUBLE(KC_LBRC, KC_LCBR), // Left bracket on a single-tap, left brace on a double-tap [RBCB] = ACTION_TAP_DANCE_DOUBLE(KC_RBRC, KC_RCBR), // Right bracket on a single-tap, right brace on a double-tap [EQPL] = ACTION_TAP_DANCE_DOUBLE(KC_EQL, KC_PLUS), // Plus sign on a single-tap, equal sign on a double-tap @@ -86,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ins | ` | [ | ] |App/Alt| Spc/FN| |Bsp/Fn2| RGUI | Left | Down | Up | Right | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | Ent/NS| Bspc | | Enter |Del/NS2| -* `---------------' `---------------' +* `---------------' `---------------' */ [_COLEMAK] = LAYOUT( KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, @@ -95,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_INS, KC_GRV, KC_LBRC, KC_RBRC, ALTAPP, SPCFN, BSPCFN, KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ENTNS, KC_BSPC, KC_ENT, DELNS ), - + /* QWERTY * (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) * ,-----------------------------------------------. ,-----------------------------------------------. @@ -108,7 +105,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ins | ` | [ | ] |App/Alt| Spc/FN| |Bsp/Fn2| RGUI | Left | Down | Up | Right | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | Ent/NS| Bspc | | Enter |Del/NS2| -* `---------------' `---------------' +* `---------------' `---------------' */ [_QWERTY] = LAYOUT( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, @@ -130,15 +127,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMBERS] = LAYOUT( - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), /* Number/Function Key layer * (Multiple characters: single-tap for first, double-tap for second) @@ -152,15 +149,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMBERS2] = LAYOUT( - _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + _______, KC_6, KC_7, KC_8, KC_9, KC_0, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_DOT, TD(SLAS), TD(MNUN), TD(PLEQ), TD(GVTL), TD(LBCB), TD(RBCB), _______, _______, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), /* Function layer * ,-----------------------------------------------. ,-----------------------------------------------. @@ -173,23 +170,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | Prev | Play | Next | Stop | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_FUNCTION] = LAYOUT( - _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _______, _______, _______, _______ -), +), [_FUNCTION2] = LAYOUT( - _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, KC_UP, LCTL(KC_Y), _______, _______, _______, LCTL(KC_A), KC_LEFT, KC_DOWN, KC_RGHT, LCA(KC_TAB), KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, _______, _______, LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V), KC_BSPC, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _______, _______, _______, _______ -), +), /* Numpad layer * (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) @@ -203,11 +200,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ( | ) | [ { | ] } | | | | | KP 0 | = | KP . | KP + | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | KP Ent| | -* `---------------' `---------------' +* `---------------' `---------------' */ [_NUMPAD] = LAYOUT( - _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, - _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PAST, _______, + _______, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, + _______, KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_TAB, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, KC_NLCK, KC_PDOT, TD(PSLPAS), TD(PMNUN), TD(PPLEQ), _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, KC_LPRN, KC_RPRN, TD(LBCB), TD(RBCB), _______, _______, _______, KC_P0, KC_EQL, KC_PDOT, KC_PPLS, _______, _______, _______, KC_PENT, _______ @@ -225,24 +222,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | * `---------------------------------------+-------+-------. ,-------+-------+---------------------------------------' * | | | | | | -* `---------------' `---------------' +* `---------------' `---------------' */ [_ADJUST] = LAYOUT( - _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), +), [_ADJUST2] = LAYOUT( - _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, + _______, COLEMAK, QWERTY, _______, _______, _______, NUMPAD, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, NKROTG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) - + }; uint32_t layer_state_set_user(uint32_t state) { @@ -286,4 +283,4 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { break; } return true; -}
\ No newline at end of file +} diff --git a/keyboards/rorschach/keymaps/insertsnideremarks/rules.mk b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk index b9e39c053..b9e39c053 100644 --- a/keyboards/rorschach/keymaps/insertsnideremarks/rules.mk +++ b/keyboards/keebio/rorschach/keymaps/insertsnideremarks/rules.mk diff --git a/keyboards/rorschach/readme.md b/keyboards/keebio/rorschach/readme.md index 8858b7214..1a623a535 100644 --- a/keyboards/rorschach/readme.md +++ b/keyboards/keebio/rorschach/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make rorschach/rev1:default + make keebio/rorschach/rev1:default Example of flashing this keyboard: - make rorschach/rev1:default:avrdude + make keebio/rorschach/rev1:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/rorschach/rev1/config.h b/keyboards/keebio/rorschach/rev1/config.h index 1ea6dde98..13402544f 100644 --- a/keyboards/rorschach/rev1/config.h +++ b/keyboards/keebio/rorschach/rev1/config.h @@ -20,7 +20,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include QMK_KEYBOARD_CONFIG_H /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1246 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -50,11 +50,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/rorschach/rev1/rev1.c b/keyboards/keebio/rorschach/rev1/rev1.c index cd7f935ca..cd7f935ca 100644 --- a/keyboards/rorschach/rev1/rev1.c +++ b/keyboards/keebio/rorschach/rev1/rev1.c diff --git a/keyboards/rorschach/rev1/rev1.h b/keyboards/keebio/rorschach/rev1/rev1.h index 583f0efc4..583f0efc4 100644 --- a/keyboards/rorschach/rev1/rev1.h +++ b/keyboards/keebio/rorschach/rev1/rev1.h diff --git a/keyboards/rorschach/rev1/rules.mk b/keyboards/keebio/rorschach/rev1/rules.mk index bd518d8f2..bd518d8f2 100644 --- a/keyboards/rorschach/rev1/rules.mk +++ b/keyboards/keebio/rorschach/rev1/rules.mk diff --git a/keyboards/rorschach/rorschach.c b/keyboards/keebio/rorschach/rorschach.c index 49e291789..49e291789 100644 --- a/keyboards/rorschach/rorschach.c +++ b/keyboards/keebio/rorschach/rorschach.c diff --git a/keyboards/rorschach/rorschach.h b/keyboards/keebio/rorschach/rorschach.h index 5c320b6a1..45e64587f 100644 --- a/keyboards/rorschach/rorschach.h +++ b/keyboards/keebio/rorschach/rorschach.h @@ -1,6 +1,6 @@ #pragma once -#ifdef KEYBOARD_rorschach_rev1 +#ifdef KEYBOARD_keebio_rorschach_rev1 #include "rev1.h" #endif diff --git a/keyboards/rorschach/rules.mk b/keyboards/keebio/rorschach/rules.mk index 320125348..b50074052 100644 --- a/keyboards/rorschach/rules.mk +++ b/keyboards/keebio/rorschach/rules.mk @@ -17,10 +17,10 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend SPLIT_KEYBOARD = yes -DEFAULT_FOLDER = rorschach/rev1 +DEFAULT_FOLDER = keebio/rorschach/rev1 diff --git a/keyboards/tragicforce68/README.md b/keyboards/keebio/tragicforce68/README.md index 7cca1b505..c3ea92d7a 100644 --- a/keyboards/tragicforce68/README.md +++ b/keyboards/keebio/tragicforce68/README.md @@ -9,10 +9,10 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make tragicforce68:default + make keebio/tragicforce68:default Example of flashing this keyboard: - make tragicforce68:default:avrdude + make keebio/tragicforce68:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/tragicforce68/config.h b/keyboards/keebio/tragicforce68/config.h index 9afdca614..b415b5d71 100644 --- a/keyboards/tragicforce68/config.h +++ b/keyboards/keebio/tragicforce68/config.h @@ -15,13 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x0510 #define DEVICE_VER 0x0101 #define MANUFACTURER Keebio @@ -60,10 +59,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif diff --git a/keyboards/tragicforce68/info.json b/keyboards/keebio/tragicforce68/info.json index 550040a3a..550040a3a 100644 --- a/keyboards/tragicforce68/info.json +++ b/keyboards/keebio/tragicforce68/info.json diff --git a/keyboards/tragicforce68/keymaps/buswerks/keymap.c b/keyboards/keebio/tragicforce68/keymaps/buswerks/keymap.c index d74c0186d..d74c0186d 100644 --- a/keyboards/tragicforce68/keymaps/buswerks/keymap.c +++ b/keyboards/keebio/tragicforce68/keymaps/buswerks/keymap.c diff --git a/keyboards/tragicforce68/keymaps/default/keymap.c b/keyboards/keebio/tragicforce68/keymaps/default/keymap.c index 69255e080..69255e080 100644 --- a/keyboards/tragicforce68/keymaps/default/keymap.c +++ b/keyboards/keebio/tragicforce68/keymaps/default/keymap.c diff --git a/keyboards/tragicforce68/rules.mk b/keyboards/keebio/tragicforce68/rules.mk index a652f1fac..a652f1fac 100644 --- a/keyboards/tragicforce68/rules.mk +++ b/keyboards/keebio/tragicforce68/rules.mk diff --git a/keyboards/tragicforce68/tragicforce68.c b/keyboards/keebio/tragicforce68/tragicforce68.c index 327197d25..327197d25 100644 --- a/keyboards/tragicforce68/tragicforce68.c +++ b/keyboards/keebio/tragicforce68/tragicforce68.c diff --git a/keyboards/tragicforce68/tragicforce68.h b/keyboards/keebio/tragicforce68/tragicforce68.h index a63ce50a5..a63ce50a5 100644 --- a/keyboards/tragicforce68/tragicforce68.h +++ b/keyboards/keebio/tragicforce68/tragicforce68.h diff --git a/keyboards/keebio/viterbi/config.h b/keyboards/keebio/viterbi/config.h new file mode 100644 index 000000000..b628c83c8 --- /dev/null +++ b/keyboards/keebio/viterbi/config.h @@ -0,0 +1,20 @@ +/* +Copyright 2019 Danny Nguyen <danny@keeb.io> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" diff --git a/keyboards/viterbi/keymaps/hexwire/README.md b/keyboards/keebio/viterbi/keymaps/bakingpy/README.md index 3ce3f6af3..3ce3f6af3 100644 --- a/keyboards/viterbi/keymaps/hexwire/README.md +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/README.md diff --git a/keyboards/nyquist/keymaps/mtdjr/config.h b/keyboards/keebio/viterbi/keymaps/bakingpy/config.h index 0fa606f29..7d01468e8 100644 --- a/keyboards/nyquist/keymaps/mtdjr/config.h +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/config.h @@ -17,17 +17,14 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ - -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS +#define TAPPING_TERM 150 + #undef RGBLED_NUM #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 12 diff --git a/keyboards/viterbi/keymaps/hexwire/keymap.c b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c index 2050c0379..f0122bef0 100644 --- a/keyboards/viterbi/keymaps/hexwire/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/keymap.c @@ -1,6 +1,4 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -25,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen diff --git a/keyboards/viterbi/keymaps/fido/rules.mk b/keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/viterbi/keymaps/fido/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/bakingpy/rules.mk diff --git a/keyboards/viterbi/keymaps/default/config.h b/keyboards/keebio/viterbi/keymaps/default/config.h index dabff8f96..a841066f4 100644 --- a/keyboards/viterbi/keymaps/default/config.h +++ b/keyboards/keebio/viterbi/keymaps/default/config.h @@ -15,19 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H +#pragma once -#include "../../config.h" - -/* Use I2C or Serial, not both */ - -#define USE_SERIAL // #define USE_I2C /* Select hand configuration */ -#define MASTER_LEFT // #define MASTER_RIGHT // #define EE_HANDS @@ -37,5 +30,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - -#endif diff --git a/keyboards/viterbi/keymaps/default/keymap.c b/keyboards/keebio/viterbi/keymaps/default/keymap.c index eee207c94..c4ae0a598 100644 --- a/keyboards/viterbi/keymaps/default/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "viterbi.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -20,13 +18,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define KC_ KC_TRNS -#define _______ KC_TRNS -#define XXXXXXX KC_NO -#define KC_AJST ADJUST -#define KC_LOWR LOWER -#define KC_RASE RAISE const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -43,18 +34,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Pg Dn|Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Down | Up | Right| \ | * `------------------------------------------------' `------------------------------------------------' */ - [_QWERTY] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - INS, GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC,DEL , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - MINS,TAB , Q , W , E , R , T , Y , U , I , O , P ,LBRC,RBRC, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - EQL, ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT,ENT , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PGUP,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,HOME,END , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PGDN,AJST,LCTL,LALT,LGUI,LOWR,SPC , SPC ,RASE,LEFT,DOWN, UP ,RGHT,BSLS - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_QWERTY] = LAYOUT_ortho_5x14( + KC_INS, 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_DEL , + KC_MINS, 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_EQL, KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_QUOT, KC_ENT , + KC_PGUP, KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, KC_HOME, KC_END , + KC_PGDN, ADJUST , KC_LCTL, KC_LALT, KC_LGUI, LOWER , KC_SPC , KC_SPC , RAISE , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_BSLS ), /* Lower @@ -70,18 +55,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | * `------------------------------------------------' `------------------------------------------------' */ - [_LOWER] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ,TILD, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - UNDS, ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,LCBR,RCBR, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,UNDS,PLUS,LCBR,RCBR, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , F7 , F8 , F9 ,F10 ,F11 , F12 , , , , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,MNXT,VOLD,VOLU,MPLY,MUTE - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_LOWER] = LAYOUT_ortho_5x14( + _______, KC_TILD, 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_UNDS, _______, KC_EXLM, KC_AT , KC_HASH, KC_DLR , KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE ), /* Raise @@ -97,47 +76,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | Next | Vol- | Vol+ | Play | | * `------------------------------------------------' `------------------------------------------------' */ - [_RAISE] = LAYOUT_kc( - //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. - ,TILD, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 ,F12 , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - UNDS, , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,LCBR,RCBR, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - PLUS, , F1 , F2 , F3 , F4 , F5 , F6 ,MINS,EQL ,LBRC,RBRC, , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , F7 , F8 , F9 ,F10 ,F11 , F12 ,NUHS,NUBS, , , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,MNXT,VOLD,VOLU,MPLY,MUTE - //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + [_RAISE] = LAYOUT_ortho_5x14( + _______, KC_TILD, 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_UNDS, _______, KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_LCBR, KC_RCBR, + KC_PLUS, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_MINS, KC_EQL , KC_LBRC, KC_RBRC, _______, _______, + _______, _______, KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_NUHS, KC_NUBS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY, KC_MUTE ), - [_ADJUST] = LAYOUT( - _______, 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 , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, \ - _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + [_ADJUST] = LAYOUT_ortho_5x14( + _______, 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 , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, KC_DEL, _______, + _______, _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) }; -#ifdef AUDIO_ENABLE -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -#endif - -void persistent_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 - persistent_default_layer_set(1UL<<_QWERTY); + set_single_persistent_default_layer(_QWERTY); } return false; break; diff --git a/keyboards/viterbi/keymaps/hexwire/rules.mk b/keyboards/keebio/viterbi/keymaps/default/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/viterbi/keymaps/hexwire/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/default/rules.mk diff --git a/keyboards/viterbi/keymaps/drashna/config.h b/keyboards/keebio/viterbi/keymaps/drashna/config.h index 6eb871a50..c0a50cc04 100644 --- a/keyboards/viterbi/keymaps/drashna/config.h +++ b/keyboards/keebio/viterbi/keymaps/drashna/config.h @@ -17,6 +17,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once +#undef MATRIX_ROWS +#define MATRIX_ROWS 5 + #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM #define RGBLED_NUM 16 @@ -44,15 +47,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #undef PRODUCT #define PRODUCT Drashnas Viterbi Macro Pad -#define USE_I2C - #ifdef AUDIO_ENABLE #define C6_AUDIO #define NO_MUSIC_MODE #endif -#define STRICT_LAYER_RELEASE - #define LAYOUT_ortho_5x7( \ L00, L01, L02, L03, L04, L05, L06, \ L10, L11, L12, L13, L14, L15, L16, \ @@ -60,13 +59,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. L30, L31, L32, L33, L34, L35, L36, \ L40, L41, L42, L43, L44, L45, L46 \ ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + } #define QMK_ESC_OUTPUT F5 // usually COL #define QMK_ESC_INPUT D4 // usually ROW diff --git a/keyboards/viterbi/keymaps/drashna/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c index 9ca14961b..1afc59fb9 100644 --- a/keyboards/viterbi/keymaps/drashna/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna/keymap.c @@ -10,9 +10,6 @@ extern keymap_config_t keymap_config; // Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - #define LMACRO OSL(_MACROS) #define DIABLO TG(_DIABLO) #define GAMEPAD TG(_GAMEPAD) diff --git a/keyboards/viterbi/keymaps/drashna/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk index ec3befc0b..f28ecc533 100644 --- a/keyboards/viterbi/keymaps/drashna/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/drashna/rules.mk @@ -7,12 +7,12 @@ TAP_DANCE_ENABLE = no RGBLIGHT_ENABLE = yes AUDIO_ENABLE = yes NKRO_ENABLE = yes +SPLIT_KEYBOARD = no NO_SECRETS = yes MACROS_ENABLED = yes INDICATOR_LIGHTS = no RGBLIGHT_TWINKLE = no - LAYOUTS = ortho_5x7 # SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/config.h b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h new file mode 100644 index 000000000..b36a4edd4 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/drashna_old/config.h @@ -0,0 +1,25 @@ +/* +Copyright 2017 Danny Nguyen <danny@hexwire.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "../drashna/config.h" + +#ifdef RGBLIGHT_ENABLE +#undef RGBLED_NUM +#define RGBLED_NUM 12 +#endif diff --git a/keyboards/viterbi/keymaps/drashna_old/keymap.c b/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c index 2d361da9a..2d361da9a 100644 --- a/keyboards/viterbi/keymaps/drashna_old/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/drashna_old/keymap.c diff --git a/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk new file mode 100644 index 000000000..73f37c6c5 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/drashna_old/rules.mk @@ -0,0 +1,4 @@ +USER_NAME := drashna +SRC += ../drashna/keymap.c + +include $(KEYBOARD_PATH_2)/keymaps/drashna/rules.mk diff --git a/keyboards/viterbi/keymaps/dwallace/config.h b/keyboards/keebio/viterbi/keymaps/dwallace/config.h index 585b41dbc..585b41dbc 100644 --- a/keyboards/viterbi/keymaps/dwallace/config.h +++ b/keyboards/keebio/viterbi/keymaps/dwallace/config.h diff --git a/keyboards/viterbi/keymaps/dwallace/keymap.c b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c index 241024482..5a797cb0b 100644 --- a/keyboards/viterbi/keymaps/dwallace/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/dwallace/keymap.c @@ -23,7 +23,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_SWIN LGUI(KC_TILD) // Switch between windows #define KC_SAPP LGUI(KC_TAB) // Switch between applications diff --git a/keyboards/viterbi/keymaps/mike808/rules.mk b/keyboards/keebio/viterbi/keymaps/dwallace/rules.mk index 1e3cebb14..1e3cebb14 100644 --- a/keyboards/viterbi/keymaps/mike808/rules.mk +++ b/keyboards/keebio/viterbi/keymaps/dwallace/rules.mk diff --git a/keyboards/viterbi/keymaps/fido/config.h b/keyboards/keebio/viterbi/keymaps/fido/config.h index 5cb108365..5cb108365 100644 --- a/keyboards/viterbi/keymaps/fido/config.h +++ b/keyboards/keebio/viterbi/keymaps/fido/config.h diff --git a/keyboards/viterbi/keymaps/fido/keymap.c b/keyboards/keebio/viterbi/keymaps/fido/keymap.c index b8ef46008..cd6c8d087 100644 --- a/keyboards/viterbi/keymaps/fido/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/fido/keymap.c @@ -11,7 +11,6 @@ extern keymap_config_t keymap_config; #define _FN 1 #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_FN1 MO(_FN) #define KC_WD_L LCTL(KC_LEFT) diff --git a/keyboards/keebio/viterbi/keymaps/fido/rules.mk b/keyboards/keebio/viterbi/keymaps/fido/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/fido/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/keymaps/mike808/config.h b/keyboards/keebio/viterbi/keymaps/mike808/config.h index bfca915f2..bfca915f2 100644 --- a/keyboards/viterbi/keymaps/mike808/config.h +++ b/keyboards/keebio/viterbi/keymaps/mike808/config.h diff --git a/keyboards/viterbi/keymaps/mike808/keymap.c b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c index c7e48b135..e1dc91d2b 100644 --- a/keyboards/viterbi/keymaps/mike808/keymap.c +++ b/keyboards/keebio/viterbi/keymaps/mike808/keymap.c @@ -11,7 +11,6 @@ enum custom_keycodes { }; #define KC_ KC_TRNS -#define _______ KC_TRNS #define KC_DVOR DVORAK #define KC_QWER QWERTY @@ -84,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , , , , , , ,PDOT, P0 ,EQL , , + , , , , , , , , ,PDOT, P0 ,EQL , , //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' ), @@ -98,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| , , , , , , , , , , , , , , //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , , ,BTN1,BTN2, , , , , , , , + , , , ,BTN1,BTN2, , , , , , , , //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' ) }; diff --git a/keyboards/keebio/viterbi/keymaps/mike808/rules.mk b/keyboards/keebio/viterbi/keymaps/mike808/rules.mk new file mode 100644 index 000000000..1e3cebb14 --- /dev/null +++ b/keyboards/keebio/viterbi/keymaps/mike808/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes diff --git a/keyboards/viterbi/readme.md b/keyboards/keebio/viterbi/readme.md index 9aad7896b..2e475100b 100644 --- a/keyboards/viterbi/readme.md +++ b/keyboards/keebio/viterbi/readme.md @@ -9,12 +9,12 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make viterbi/rev1:default + make keebio/viterbi/rev1:default Example of flashing this keyboard: - make viterbi/rev1:default:avrdude + make keebio/viterbi/rev1:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/viterbi/rev1/config.h b/keyboards/keebio/viterbi/rev1/config.h index d6a66408e..e6fc13abd 100644 --- a/keyboards/viterbi/rev1/config.h +++ b/keyboards/keebio/viterbi/rev1/config.h @@ -15,13 +15,12 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H +#pragma once #include "config_common.h" /* USB Device descriptor parameter */ -#define VENDOR_ID 0xCEEB +#define VENDOR_ID 0xCB10 #define PRODUCT_ID 0x1157 #define DEVICE_VER 0x0100 #define MANUFACTURER Keebio @@ -36,16 +35,11 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // wiring of each half #define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } #define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +#define SOFT_SERIAL_PIN D0 /* 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 @@ -54,32 +48,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 - -#define RGBLED_NUM 16 // Number of LEDs - -/* - * 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 +#define RGBLED_NUM 14 diff --git a/keyboards/viterbi/viterbi.c b/keyboards/keebio/viterbi/rev1/rev1.c index 509e42dc5..509e42dc5 100644 --- a/keyboards/viterbi/viterbi.c +++ b/keyboards/keebio/viterbi/rev1/rev1.c diff --git a/keyboards/viterbi/rev1/rev1.h b/keyboards/keebio/viterbi/rev1/rev1.h index 9c03e495a..f31373f02 100644 --- a/keyboards/viterbi/rev1/rev1.h +++ b/keyboards/keebio/viterbi/rev1/rev1.h @@ -1,9 +1,6 @@ -#ifndef REV1_H -#define REV1_H +#pragma once -#include "../viterbi.h" - -//void promicro_bootloader_jmp(bool program); +#include "viterbi.h" #include "quantum.h" @@ -64,5 +61,3 @@ #endif #define LAYOUT_ortho_5x14 LAYOUT - -#endif diff --git a/keyboards/viterbi/rev1/rules.mk b/keyboards/keebio/viterbi/rev1/rules.mk index 2bf03237c..2bf03237c 100644 --- a/keyboards/viterbi/rev1/rules.mk +++ b/keyboards/keebio/viterbi/rev1/rules.mk diff --git a/keyboards/keebio/viterbi/rev2/config.h b/keyboards/keebio/viterbi/rev2/config.h new file mode 100644 index 000000000..b2970610e --- /dev/null +++ b/keyboards/keebio/viterbi/rev2/config.h @@ -0,0 +1,56 @@ +/* +Copyright 2017 Danny Nguyen <danny@hexwire.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1157 +#define DEVICE_VER 0x0200 +#define MANUFACTURER Keebio +#define PRODUCT The Viterbi Keyboard +#define DESCRIPTION Split 5x14 ortholinear keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D4, D7, E6, B4, B5 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +#define SPLIT_HAND_PIN D2 +#define SOFT_SERIAL_PIN D0 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* 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 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLED_NUM 14 + +/* Backlight LEDs */ +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_LEVELS 7 diff --git a/keyboards/keebio/viterbi/rev2/rev2.c b/keyboards/keebio/viterbi/rev2/rev2.c new file mode 100644 index 000000000..509e42dc5 --- /dev/null +++ b/keyboards/keebio/viterbi/rev2/rev2.c @@ -0,0 +1 @@ +#include "viterbi.h" diff --git a/keyboards/keebio/viterbi/rev2/rev2.h b/keyboards/keebio/viterbi/rev2/rev2.h new file mode 100644 index 000000000..599e6415a --- /dev/null +++ b/keyboards/keebio/viterbi/rev2/rev2.h @@ -0,0 +1,35 @@ +#pragma once + +#include "viterbi.h" +#include "quantum.h" + + +#ifdef USE_I2C +#include <stddef.h> +#ifdef __AVR__ + #include <avr/io.h> + #include <avr/interrupt.h> +#endif +#endif + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, L06, R00, R01, R02, R03, R04, R05, R06, \ + L10, L11, L12, L13, L14, L15, L16, R10, R11, R12, R13, R14, R15, R16, \ + L20, L21, L22, L23, L24, L25, L26, R20, R21, R22, R23, R24, R25, R26, \ + L30, L31, L32, L33, L34, L35, L36, R30, R31, R32, R33, R34, R35, R36, \ + L40, L41, L42, L43, L44, L45, L46, R40, R41, R42, R43, R44, R45, R46 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05, L06 }, \ + { L10, L11, L12, L13, L14, L15, L16 }, \ + { L20, L21, L22, L23, L24, L25, L26 }, \ + { L30, L31, L32, L33, L34, L35, L36 }, \ + { L40, L41, L42, L43, L44, L45, L46 }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R36, R35, R34, R33, R32, R31, R30 }, \ + { R46, R45, R44, R43, R42, R41, R40 } \ + } + +#define LAYOUT_ortho_5x14 LAYOUT diff --git a/keyboards/keebio/viterbi/rev2/rules.mk b/keyboards/keebio/viterbi/rev2/rules.mk new file mode 100644 index 000000000..f95e7ae6a --- /dev/null +++ b/keyboards/keebio/viterbi/rev2/rules.mk @@ -0,0 +1,3 @@ +BACKLIGHT_ENABLE = yes + +LAYOUTS = ortho_5x14 diff --git a/keyboards/keebio/viterbi/rules.mk b/keyboards/keebio/viterbi/rules.mk new file mode 100644 index 000000000..811f57fdb --- /dev/null +++ b/keyboards/keebio/viterbi/rules.mk @@ -0,0 +1,32 @@ +MCU = atmega32u4 +F_CPU = 16000000 +ARCH = AVR8 +F_USB = $(F_CPU) +BOOTLOADER = caterina + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +SPLIT_KEYBOARD = yes + +DEFAULT_FOLDER = keebio/viterbi/rev2 +LAYOUTS = ortho_5x14 diff --git a/keyboards/keebio/viterbi/viterbi.c b/keyboards/keebio/viterbi/viterbi.c new file mode 100644 index 000000000..509e42dc5 --- /dev/null +++ b/keyboards/keebio/viterbi/viterbi.c @@ -0,0 +1 @@ +#include "viterbi.h" diff --git a/keyboards/viterbi/viterbi.h b/keyboards/keebio/viterbi/viterbi.h index 80d2a8f25..186892d57 100644 --- a/keyboards/viterbi/viterbi.h +++ b/keyboards/keebio/viterbi/viterbi.h @@ -1,8 +1,11 @@ -#ifndef VITERBI_H -#define VITERBI_H +#pragma once -#ifdef KEYBOARD_viterbi_rev1 +#include "quantum.h" + +#ifdef KEYBOARD_keebio_viterbi_rev1 #include "rev1.h" +#elif KEYBOARD_keebio_viterbi_rev2 + #include "rev2.h" #endif // Used to create a keymap using only KC_ prefixed keys @@ -23,6 +26,3 @@ #define LAYOUT_ortho_5x14 LAYOUT -#include "quantum.h" - -#endif diff --git a/keyboards/wavelet/config.h b/keyboards/keebio/wavelet/config.h index ac6c96696..5610bba17 100644 --- a/keyboards/wavelet/config.h +++ b/keyboards/keebio/wavelet/config.h @@ -17,8 +17,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ -#ifndef CONFIG_H -#define CONFIG_H +#pragma once #include "config_common.h" @@ -46,18 +45,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 - #define RGBLED_NUM 12 // Number of LEDs /* Backlight LEDs */ #define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 7 - -#endif diff --git a/keyboards/wavelet/info.json b/keyboards/keebio/wavelet/info.json index a71058b95..a71058b95 100644 --- a/keyboards/wavelet/info.json +++ b/keyboards/keebio/wavelet/info.json diff --git a/keyboards/wavelet/keymaps/default/keymap.c b/keyboards/keebio/wavelet/keymaps/default/keymap.c index dac8068a4..abf253380 100644 --- a/keyboards/wavelet/keymaps/default/keymap.c +++ b/keyboards/keebio/wavelet/keymaps/default/keymap.c @@ -22,10 +22,6 @@ enum custom_keycodes { ADJUST, }; -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty diff --git a/keyboards/wavelet/keymaps/default/rules.mk b/keyboards/keebio/wavelet/keymaps/default/rules.mk index d7463419b..d7463419b 100644 --- a/keyboards/wavelet/keymaps/default/rules.mk +++ b/keyboards/keebio/wavelet/keymaps/default/rules.mk diff --git a/keyboards/wavelet/readme.md b/keyboards/keebio/wavelet/readme.md index 90c5ac808..a107289bb 100644 --- a/keyboards/wavelet/readme.md +++ b/keyboards/keebio/wavelet/readme.md @@ -9,11 +9,11 @@ Hardware Availability: [Keebio](https://keeb.io) Make example for this keyboard (after setting up your build environment): - make wavelet:default + make keebio/wavelet:default Example of flashing this keyboard: - make wavelet:default:avrdude + make keebio/wavelet:default:avrdude See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. diff --git a/keyboards/wavelet/rules.mk b/keyboards/keebio/wavelet/rules.mk index cfff50a41..cfff50a41 100644 --- a/keyboards/wavelet/rules.mk +++ b/keyboards/keebio/wavelet/rules.mk diff --git a/keyboards/wavelet/wavelet.c b/keyboards/keebio/wavelet/wavelet.c index 2bc9c65a5..2bc9c65a5 100644 --- a/keyboards/wavelet/wavelet.c +++ b/keyboards/keebio/wavelet/wavelet.c diff --git a/keyboards/wavelet/wavelet.h b/keyboards/keebio/wavelet/wavelet.h index 69a87a70c..69a87a70c 100644 --- a/keyboards/wavelet/wavelet.h +++ b/keyboards/keebio/wavelet/wavelet.h diff --git a/keyboards/kinesis/config.h b/keyboards/kinesis/config.h index a4e06b6eb..74e85f6f1 100644 --- a/keyboards/kinesis/config.h +++ b/keyboards/kinesis/config.h @@ -76,11 +76,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -135,8 +130,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - - #ifdef SUBPROJECT_alvicstep #include "alvicstep/config.h" #endif diff --git a/keyboards/kinesis/stapelberg/config.h b/keyboards/kinesis/stapelberg/config.h index 0677e0ade..321aec5eb 100644 --- a/keyboards/kinesis/stapelberg/config.h +++ b/keyboards/kinesis/stapelberg/config.h @@ -41,10 +41,4 @@ #define IGNORE_MOD_TAP_INTERRUPT -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - - #endif diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h index e75ac342c..f4b1c7a5c 100644 --- a/keyboards/kira75/config.h +++ b/keyboards/kira75/config.h @@ -60,7 +60,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -112,11 +111,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kmac/config.h b/keyboards/kmac/config.h index 5c164bfc1..18eb1de1f 100644 --- a/keyboards/kmac/config.h +++ b/keyboards/kmac/config.h @@ -93,11 +93,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kmac/matrix.c b/keyboards/kmac/matrix.c index cfafa90e6..82f0621f2 100644 --- a/keyboards/kmac/matrix.c +++ b/keyboards/kmac/matrix.c @@ -97,7 +97,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/kmini/config.h b/keyboards/kmini/config.h index 567a75442..b2ee7185e 100755 --- a/keyboards/kmini/config.h +++ b/keyboards/kmini/config.h @@ -50,9 +50,4 @@ /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/kmini/matrix.c b/keyboards/kmini/matrix.c index 5f9bfe3d7..69135909a 100755 --- a/keyboards/kmini/matrix.c +++ b/keyboards/kmini/matrix.c @@ -112,7 +112,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/knops/mini/config.h b/keyboards/knops/mini/config.h index 154fbf01f..a12ed2720 100644 --- a/keyboards/knops/mini/config.h +++ b/keyboards/knops/mini/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kona_classic/config.h b/keyboards/kona_classic/config.h index fecf64c04..819a7475a 100644 --- a/keyboards/kona_classic/config.h +++ b/keyboards/kona_classic/config.h @@ -101,11 +101,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/kona_classic/keymaps/ansi/keymap.c b/keyboards/kona_classic/keymaps/ansi/keymap.c index 3d2061e80..3eba76d63 100644 --- a/keyboards/kona_classic/keymaps/ansi/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_BSLS, \ KC_F5, KC_F6, 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_ENT, \ KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c index 6e281f951..43c27c503 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_arrows( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_BSLS, \ KC_F5, KC_F6, 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_ENT, \ KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c index b74a6c3d7..47f8d625b 100644 --- a/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_arrows_lcap/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_arrows( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_BSLS, \ KC_F5, KC_F6, KC_LCAP, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_split/keymap.c b/keyboards/kona_classic/keymaps/ansi_split/keymap.c index d60e162f6..f3c0dd707 100644 --- a/keyboards/kona_classic/keymaps/ansi_split/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_split( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_BSLS, \ KC_F5, KC_F6, 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_ENT, \ KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c index 181f2f14c..9a6f7421c 100644 --- a/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/ansi_split_arrows/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_ansi_split_arrows( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_BSLS, \ KC_F5, KC_F6, 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_ENT, \ KC_F7, KC_F8, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/default/keymap.c b/keyboards/kona_classic/keymaps/default/keymap.c index 84a2f9cbd..74f138d2c 100644 --- a/keyboards/kona_classic/keymaps/default/keymap.c +++ b/keyboards/kona_classic/keymaps/default/keymap.c @@ -15,9 +15,13 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + // Helpful defines #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_all( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_BSLS, \ KC_F5, KC_F6, MO(_FN), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_F7, KC_F8, KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, MO(_FN), \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso/keymap.c b/keyboards/kona_classic/keymaps/iso/keymap.c index ff9d3dcb8..3ce8255e8 100644 --- a/keyboards/kona_classic/keymaps/iso/keymap.c +++ b/keyboards/kona_classic/keymaps/iso/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, 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_F7, KC_F8, 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, \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c index 79e52360c..44fb94fd9 100644 --- a/keyboards/kona_classic/keymaps/iso_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_arrows/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_arrows( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, 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_F7, KC_F8, 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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_split/keymap.c b/keyboards/kona_classic/keymaps/iso_split/keymap.c index 51d329773..425a4c980 100644 --- a/keyboards/kona_classic/keymaps/iso_split/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_split( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, 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_F7, KC_F8, 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, \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c index ea81de4bc..ba74a2512 100644 --- a/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c +++ b/keyboards/kona_classic/keymaps/iso_split_arrows/keymap.c @@ -15,7 +15,7 @@ */ #include QMK_KEYBOARD_H -#define MODS_SHFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) +#define MODS_SHIFT_GUI_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)|MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) #define MODS_GUI_MASK (MOD_BIT(KC_LGUI)|MOD_BIT(KC_RGUI)) // Helpful defines @@ -25,11 +25,15 @@ #define _DEFAULT 0 #define _FN 1 +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + //RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DEFAULT] = LAYOUT_iso_split_arrows( - KC_F1, KC_F2, F(0), 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_BSPC, \ + KC_F1, KC_F2, SFT_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_BSPC, \ KC_F3, KC_F4, 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_ENT, \ KC_F5, KC_F6, 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_F7, KC_F8, 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_UP, MO(_FN), \ @@ -55,29 +59,15 @@ void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { } -enum function_id { - ESCAPE, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(ESCAPE), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case ESCAPE: - shift_esc_shift_mask = get_mods()&MODS_SHFT_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -85,7 +75,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_GUI_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -93,6 +83,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/laptreus/config.h b/keyboards/laptreus/config.h new file mode 100644 index 000000000..de6b7ce94 --- /dev/null +++ b/keyboards/laptreus/config.h @@ -0,0 +1,72 @@ +/* +Copyright 2019 Chuck "@vosechu" Lauer Vose <vosechu@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0x1209 // pid.codes Vendor ID +#define PRODUCT_ID 0xA1F1 // FIXME: Need to send PR to pid.codes to make this official +#define DEVICE_VER 0x0001 +#define MANUFACTURER Vosechu +#define PRODUCT Laptreus +#define DESCRIPTION keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 10 + +#define MATRIX_ROW_PINS { F7, F6, F5, F1, F4 } +#define MATRIX_COL_PINS { D6, B7, B6, D7, C6, D1, D0, D3, D2, F0 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* 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 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +// #define NO_ACTION_LAYER +// #define NO_ACTION_TAPPING +// #define NO_ACTION_ONESHOT +// #define NO_ACTION_MACRO +// #define NO_ACTION_FUNCTION diff --git a/keyboards/laptreus/keymaps/debug/keymap.c b/keyboards/laptreus/keymaps/debug/keymap.c new file mode 100644 index 000000000..8ffb06fa2 --- /dev/null +++ b/keyboards/laptreus/keymaps/debug/keymap.c @@ -0,0 +1,11 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* ============================= DEBUG LAYER ============================= */ + [0] = LAYOUT( + KC_A, KC_1, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, + KC_A, KC_2, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, + KC_A, KC_3, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, + KC_A, KC_4, KC_B, KC_C, KC_D, KC_E, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L + ) +}; diff --git a/keyboards/laptreus/keymaps/debug/readme.md b/keyboards/laptreus/keymaps/debug/readme.md new file mode 100644 index 000000000..fa4a27eda --- /dev/null +++ b/keyboards/laptreus/keymaps/debug/readme.md @@ -0,0 +1,81 @@ +# Debug layout + +This layout is expressly for debugging to see if your keys are working. + +## Flashing + +**NOTE**: Make sure you don't have a second QMK keyboard plugged in when you do this! + +To compile and flash to the board: + + make laptreus:debug:avrdude + +To just compile: + + make laptreus:debug + +Then use QMK toolbox to write the file + +# Testing + +Now that you've got the image flashed, do the following: + +* Open a new text document +* Click each key in order and hit enter (with the other keyboard) between each line +* For any keys that don't register, hit space (with the other keyboard) and continue on +* You'll end up with something looking like this: + + a1bcdefghijkl + a2bcdefghijkl + a3bcdefghijkl + a4bcdefghijkl + +But almost certainly it won't be perfect, so lets go through some scenarios: + +## Step 1: Get all the letters to output _something_ + +For lines that look like this: + + a1bc efg ijkl + +* Option 1: Bent pin - Pull out the switch in those spots, probably the pin got bent when you inserted it into the hotswap socket. Gently bend the pin straight and re-insert. +* Option 2: Broken joint on hotswap - If the pin looks okay, try connecting the two metal plated holes underneath the hotswap holes to see if the letter comes out. If it does, reflow (aka, apply some flux to both pads and reheat) the solder joint. +* Option 3: Diode is backwards - If connecting the two metal pins didn't work, double check that the diode is the right direction. This may also need to be reflowed. +* Option 4: ??? - Hop in [the discord]() and let's chat! + +## Step 2: Correct double letters + +Once you have all the keys outputting _anything_, flash the default layout and do the same thing. If everything is working, your layout will look something like this: + + qwertyuiop + asdfghjkl;' + zxcvbnm,./ + +**Note**: Don't worry about hitting the backspace or command keys + +### Duplicate letters + +For lines that look like this: + + qwertyyuiop (double y) + +* Option 1: Bent pin - Pull out the switch in those spots, probably the pin got bent when you inserted it into the hotswap socket. Gently bend the pin straight and re-insert. +* Option 2: Switch is broken - Try connecting the two metal plated holes underneath the hotswap holes to see if the letter comes out just once. If it does, the switch is broken and should be replaced. If you don't have another switch, you _may_ be able to unbend the leaf inside the switch, but it's really tricky. + +### Second letter sent (same row) + +For lines that look like this: + + qwertyyuiop (t sent t AND y) + +* Option 1: ??? - I can't imagine how this would happen with this layout, but let me know if it does! + +### Second letter sent (same column) + +For lines that look like this: + + qwertgyuiop (t sent t AND g) + qwertgbyuiop (t sent t AND g AND b) + +* Option 1: Diodes are backwards - Some of the diodes on this column are backwards, you can use a diode tester to confirm the direction, or just check them with a magnifying glass and switch them if needed. +* Option 2: ??? diff --git a/keyboards/laptreus/keymaps/default/keymap.c b/keyboards/laptreus/keymaps/default/keymap.c new file mode 100644 index 000000000..b0e1c9f02 --- /dev/null +++ b/keyboards/laptreus/keymaps/default/keymap.c @@ -0,0 +1,74 @@ +#include QMK_KEYBOARD_H + +enum layer_names { + _QWERTY = 0, + _DVORAK, + _LOWER, + _RAISE, + _LIFT +}; + +// Fillers to make layering more clear +#define _LAYER_ KC_TRNS + +// Adding macros to make the keymaps below much easier to read. +#define CTL_ESC CTL_T(KC_ESC) +#define CTL_GRV CTL_T(KC_GRV) +#define ALT_TAB ALT_T(KC_TAB) +#define SFT_SPC SFT_T(KC_SPC) + +// Extended alpha key layers +#define RSE_J LT(_RAISE, KC_J) +#define LWR_F LT(_LOWER, KC_F) +#define RSE_H LT(_RAISE, KC_H) +#define LWR_U LT(_LOWER, KC_U) +#define LFT_BK LT(_LIFT, KC_BSPC) +#define LFT_ENT LT(_LIFT, KC_ENT) + +// Macro keys for some apps +#define SLACKUP LALT(LSFT(KC_UP)) +#define SLACKDN LALT(LSFT(KC_DOWN)) +#define TAB_LFT LGUI(LSFT(KC_LBRC)) +#define TAB_RGT LGUI(LSFT(KC_RBRC)) +#define BWSR_BK LGUI(KC_LBRC) +#define BWSR_FW LGUI(KC_RBRC) +#define SCR_LFT HYPR(KC_LEFT) +#define SCR_RGT HYPR(KC_RGHT) +#define SCR_FUL HYPR(KC_F) + +// Layer toggles +#define TO_QW TO(_QWERTY) +#define TO_DV TO(_DVORAK) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT( + 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_ESC , KC_A , KC_S , KC_D , LWR_F , KC_G , KC_H , RSE_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_HYPR , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT + ), + [_DVORAK] = LAYOUT( + 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 , LWR_U , KC_I , KC_D , RSE_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 , + KC_HYPR , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT + ), + [_LOWER] = LAYOUT( + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_7 , KC_8 , KC_9 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , KC_4 , KC_5 , KC_6 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_1 , KC_2 , KC_3 , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_DOT , _______ , _______ + ), + [_RAISE] = LAYOUT( + _______ , KC_LABK , KC_RABK , KC_LCBR , KC_RCBR , KC_EQL , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , KC_MINS , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , KC_BSLS , KC_SLSH , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + ), + [_LIFT] = LAYOUT( + _______ , BWSR_BK , TAB_LFT , KC_UP , TAB_RGT , BWSR_FW , KC_MUTE , XXXXXXX , SCR_LFT , SCR_FUL , SCR_RGT , _______ , + _______ , XXXXXXX , KC_LEFT , KC_DOWN , KC_RGHT , KC_PGUP , KC_VOLU , SLACKUP , XXXXXXX , XXXXXXX , TO_QW , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_PGDN , KC_VOLD , SLACKDN , XXXXXXX , XXXXXXX , TO_DV , _______ , + _______ , RESET , _______ , _______ , _LAYER_ , KC_BSPC , _______ , KC_LSFT , KC_LGUI , KC_LALT , KC_LCTL , _______ + ) +}; diff --git a/keyboards/laptreus/keymaps/default/readme.md b/keyboards/laptreus/keymaps/default/readme.md new file mode 100644 index 000000000..0124ab9a9 --- /dev/null +++ b/keyboards/laptreus/keymaps/default/readme.md @@ -0,0 +1,79 @@ +# Default layout + +This is the default layout for the Laptreus + +## Layout + +Some special things: + +* Lower/Raise are on the F/J keys. Tap to type the character, hold to activate the layer +* Enter and Backspace also activate the Lift layer. +* -- To get repeated backspace, hold BkLft and then press Shift + +### Qwerty + + ,-----------------------------------------------------------------------------------. + | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | S | D | Lwr/F| G | H | Rse/J| K | L | ; | " | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| Z | X | C | V | B | N | M | , | . | / | Enter| + |------+------+------+------+------+------+------+------+------+------+------+------| + | Hyper|Ctrl/~|AltTab| Cmd | BkLft| Shift| Space|EntLft| Left | Down | Up | Right| + `-----------------------------------------------------------------------------------' + +### Dvorak + + ,-----------------------------------------------------------------------------------. + | Tab | ' | , | . | P | Y | F | G | C | R | L | Bksp | + |------+------+------+------+------+-------------+------+------+------+------+------| + | Esc | A | O | E | Lwr/U| I | D | Rse/H| T | N | S | / | + |------+------+------+------+------+------|------+------+------+------+------+------| + | Shift| ; | Q | J | K | X | B | M | W | V | Z | Enter| + |------+------+------+------+------+------+------+------+------+------+------+------| + | Hyper|Ctrl/~|AltTab| Cmd | BkLft| Shift| Space|EntLft| Left | Down | Up | Right| + `-----------------------------------------------------------------------------------' + +### Raise + + ,-----------------------------------------------------------------------------------. + | | < | > | { | } | | | | | | | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | ( | ) | [ | ] | | | | | | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | | | | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | BkLft| Shift| Space|EntLft| | | | | + `-----------------------------------------------------------------------------------' + +### Lower + + ,-----------------------------------------------------------------------------------. + | | | | | | | | 7 | 8 | 9 | | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | | | | | | 4 | 5 | 6 | | | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | | | 1 | 2 | 3 | | | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | | | | BkLft| Shift| Space| 0 | 0 | . | | | + `-----------------------------------------------------------------------------------' + +### Lift + + ,-----------------------------------------------------------------------------------. + | |Hist ←| Tab ←| ↑ | Tab →|Hist →| Mute | |ScrLft|ScrFul|ScrRgt| | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | ← | ↓ | → | Pg Up|Vol up|Slk up| | |Qwerty| | + |------+------+------+------+------+------|------+------+------+------+------+------| + | | | | | | Pg Dn|Vol dn|Slk dn| | |Dvorak| | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | Reset| | | | Bksp | | Shift| Cmd | Opt | Ctrl | | + `-----------------------------------------------------------------------------------' + +Special things: + +* Hist: Back button in your browser +* Tab: Move one tab left/right in most mac apps +* Slk: Go to the previous/next unread conversation in Slack +* Scr: Make this app fill the left/right side of your monitor (or full screen) +* Since arrows are on this layer, the command keys are moved to the right side diff --git a/keyboards/laptreus/keymaps/vosechu/keymap.c b/keyboards/laptreus/keymaps/vosechu/keymap.c new file mode 100644 index 000000000..8bb08a873 --- /dev/null +++ b/keyboards/laptreus/keymaps/vosechu/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +#include "vosechu.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [DV] = LAYOUT( + PAWFIVE , KC_QUOT , KC_COMM , KC_DOT , KC_P , KC_Y , KC_F , KC_G , KC_C , KC_R , KC_L , RESET , + KC_ESC , KC_A , KC_O , KC_E , LWR_U , KC_I , KC_D , RSE_H , KC_T , KC_N , KC_S , XXXXXXX , + XXXXXXX , KC_SCLN , KC_Q , KC_J , KC_K , KC_X , KC_B , KC_M , KC_W , KC_V , KC_Z , KC_ENT , + XXXXXXX , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , KC_MINS , KC_EQL , KC_SLSH , KC_BSLS + ), + [QW] = LAYOUT( + 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_ESC , KC_A , KC_S , KC_D , LWR_F , KC_G , KC_H , RSE_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_HYPR , CTL_GRV , ALT_TAB , KC_LGUI , LFT_BK , SFT_SPC , KC_SPC , LFT_ENT , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT + ), + [LWR] = LAYOUT( + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_7 , KC_8 , KC_9 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , KC_4 , KC_5 , KC_6 , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_1 , KC_2 , KC_3 , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , KC_0 , KC_0 , KC_DOT , _______ , _______ + ), + [RSE] = LAYOUT( + _______ , KC_LABK , KC_RABK , KC_LCBR , KC_RCBR , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , KC_LPRN , KC_RPRN , KC_LBRC , KC_RBRC , XXXXXXX , XXXXXXX , _LAYER_ , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , _______ , + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ + ), + [LFT] = LAYOUT( + _______ , BWSR_BK , TAB_LFT , KC_UP , TAB_RGT , BWSR_FW , KC_MUTE , XXXXXXX , SCR_LFT , SCR_FUL , SCR_RGT , _______ , + _______ , XXXXXXX , KC_LEFT , KC_DOWN , KC_RGHT , KC_PGUP , KC_VOLU , SLACKUP , XXXXXXX , XXXXXXX , TO(QW) , _______ , + _______ , XXXXXXX , XXXXXXX , XXXXXXX , XXXXXXX , KC_PGDN , KC_VOLD , SLACKDN , XXXXXXX , XXXXXXX , TO(DV) , _______ , + _______ , RESET , _______ , _______ , _LAYER_ , KC_BSPC , _______ , KC_LSFT , KC_LGUI , KC_LALT , KC_LCTL , _______ + ) +}; diff --git a/keyboards/laptreus/keymaps/vosechu/readme.md b/keyboards/laptreus/keymaps/vosechu/readme.md new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/keyboards/laptreus/keymaps/vosechu/readme.md diff --git a/keyboards/laptreus/laptreus.c b/keyboards/laptreus/laptreus.c new file mode 100644 index 000000000..2e59ffd62 --- /dev/null +++ b/keyboards/laptreus/laptreus.c @@ -0,0 +1,6 @@ +#include "laptreus.h" + +void matrix_init_kb() { + // auto detect output on init + set_output(OUTPUT_AUTO); +} diff --git a/keyboards/laptreus/laptreus.h b/keyboards/laptreus/laptreus.h new file mode 100644 index 000000000..305d41274 --- /dev/null +++ b/keyboards/laptreus/laptreus.h @@ -0,0 +1,41 @@ +#ifndef LAPTREUS_H +#define LAPTREUS_H + +#include "quantum.h" +#include "outputselect.h" + +/* +// This a shortcut to help you visually see your layout. +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +*/ +#define LAYOUT( \ + A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, \ + B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, \ + C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, \ + D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12 \ +) \ +{ \ + {A2, A3, A4, A5, A6, A7, A8, A9, A10, A11}, \ + {B2, B3, B4, B5, B6, B7, B8, B9, B10, B11}, \ + {C2, C3, C4, C5, C6, C7, C8, C9, C10, C11}, \ + {D2, D3, D4, D5, D6, D7, D8, D9, D10, D11}, \ + {A1, B1, C1, D1, KC_NO, KC_NO, D12, C12, B12, A12} \ +} + +#define LAYOUT_kc( \ + A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, A11, A12, \ + B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, B11, B12, \ + C1, C2, C3, C4, C5, C6, C7, C8, C9, C10, C11, C12, \ + D1, D2, D3, D4, D5, D6, D7, D8, D9, D10, D11, D12 \ +) \ +{ \ + LAYOUT( \ + KC_##A1, KC_##A2, KC_##A3, KC_##A4, KC_##A5, KC_##A6, KC_##A7, KC_##A8, KC_##A9, KC_##A10, KC_##A11, KC_##A12, \ + KC_##B1, KC_##B2, KC_##B3, KC_##B4, KC_##B5, KC_##B6, KC_##B7, KC_##B8, KC_##B9, KC_##B10, KC_##B11, KC_##B12, \ + KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C8, KC_##C9, KC_##C10, KC_##C11, KC_##C12, \ + KC_##D1, KC_##D2, KC_##D3, KC_##D4, KC_##D5, KC_##D6, KC_##D7, KC_##D8, KC_##D9, KC_##D10, KC_##D11, KC_##D12 \ + ) \ +} + +#endif diff --git a/keyboards/laptreus/readme.md b/keyboards/laptreus/readme.md new file mode 100644 index 000000000..e27c20604 --- /dev/null +++ b/keyboards/laptreus/readme.md @@ -0,0 +1,35 @@ +# Laptreus + +TODO: Insert cool photo + +Laptreus is a 40% bluetooth keyboard in the style of the Atreus, which is specifically designed to sit atop your laptop keyboard. + +Maintainer: [Chuck Lauer Vose](https://github.com/vosechu) +MCU: Adafruit Feather 32u4 BLE +Purchase link: GB coming soon +Case link: GB coming soon +Case design files: TODO + +## Flashing + +**NOTE**: Make sure you don't have a second QMK keyboard plugged in when you do this! + +[Default layout documentation](https://github.com/qmk/qmk_firmware/tree/master/keyboards/laptreus/keymaps/default) + +To compile and flash to the board: + + make laptreus:default:avrdude + +To just compile: + + make laptreus:default + +Then use QMK toolbox to write the file + +## Changelog + +v1.2: Mostly working, but JST connector is a little too tight and the reset switch is not connected. + +## Build log + +TODO diff --git a/keyboards/viterbi/rules.mk b/keyboards/laptreus/rules.mk index ee043cca3..d17034507 100644 --- a/keyboards/viterbi/rules.mk +++ b/keyboards/laptreus/rules.mk @@ -1,7 +1,3 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c # MCU name #MCU = at90usb1287 @@ -18,7 +14,7 @@ MCU = atmega32u4 # does not *change* the processor frequency - it should merely be updated to # reflect the processor speed set externally so that the code can use accurate # software delays. -F_CPU = 16000000 +F_CPU = 8000000 # # LUFA specific @@ -43,7 +39,7 @@ F_USB = $(F_CPU) # This definition is optional, and if your keyboard supports multiple bootloaders of # different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -BOOTLOADER = caterina +BOOTLOADER = catarina # Interrupt driven control endpoint task(+60) OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT @@ -53,24 +49,19 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 +#BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +#MIDI_ENABLE = no # MIDI controls UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. -SUBPROJECT_rev1 = yes -USE_I2C = yes -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes +KEY_LOCK_ENABLE = no +TAP_DANCE_ENABLE = no -DEFAULT_FOLDER = viterbi/rev1 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend -LAYOUTS = ortho_5x14 +BLUETOOTH_ENABLE = no # Legacy bluetooth support +BLUETOOTH = AdafruitBLE diff --git a/keyboards/launchpad/config.h b/keyboards/launchpad/config.h index 9d1e310d3..4023a2201 100644 --- a/keyboards/launchpad/config.h +++ b/keyboards/launchpad/config.h @@ -45,11 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/lazydesigners/the50/config.h b/keyboards/lazydesigners/the50/config.h index e4f91f5ee..d1ddbfea4 100644 --- a/keyboards/lazydesigners/the50/config.h +++ b/keyboards/lazydesigners/the50/config.h @@ -37,11 +37,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLED_NUM 1 diff --git a/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c new file mode 100644 index 000000000..a792d34fb --- /dev/null +++ b/keyboards/lazydesigners/the50/keymaps/mikethetiger/keymap.c @@ -0,0 +1,79 @@ +#include QMK_KEYBOARD_H + +enum custom_layers { + _QWERTY, + _L1, + _L2 +}; + +// Act as Shift on hold and as CapsLock on tap +#define SFT_CPS LSFT_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------. ,--------------. + * |Esc | Q | W | E | R | T | Y | U | I | O | P |Bspc| | 7 | 8 | 9 | + * |-----------------------------------------------------------| |--------------| + * | Tab | A | S | D | F | G | H | J | K | L | Enter | | 4 | 5 | 6 | + * |-----------------------------------------------------------| |--------------| + * | Shift | Z | X | C | V | B | N | M | , | . | L2 | | 1 | 2 | 3 | + * |-----------------------------------------------------------| |--------------| + * | Ctrl |Gui | Alt | Space | Space | RAlt |RCtrl| L1 | | 0 | . |Entr| + * `-----------------------------------------------------------' `--------------' + */ + +[_QWERTY] = LAYOUT( +KC_GESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_P7, KC_P8, KC_P9, +KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_P4, KC_P5, KC_P6, +SFT_CPS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MO(_L2), KC_P1, KC_P2, KC_P3, +KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(_L1), KC_0, KC_PDOT, KC_PENT +), + +/* L1 + * ,-----------------------------------------------------------. ,--------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 |Del | |NMLK| | / | + * |-----------------------------------------------------------| |--------------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | [ | ] | \ | | - | = | * | + * |-----------------------------------------------------------| |--------------| + * | | F7 | F8 | F9 |F10 |F11 |F12 | , | . | / | | | | | - | + * |-----------------------------------------------------------| |--------------| + * | | | | | | ; | ' | | | | | + | + * `-----------------------------------------------------------' `--------------' + */ + +[_L1] = LAYOUT( +KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_NUMLOCK, _______, KC_PSLS, +_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_LBRC, KC_RBRC, KC_BSLASH, KC_MINS, KC_EQL, KC_PAST, +_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_COMM, KC_DOT , KC_SLSH, _______, _______, _______, KC_PMNS, +_______, _______, _______, _______, _______, KC_SCLN, KC_QUOT, _______, _______, _______, KC_PPLS +), + +/* L2 + * ,-----------------------------------------------------------. ,--------------. + * |RST | | | | | | | | | |Ins |Del | |Home|PgUp| | + * |-----------------------------------------------------------| |--------------| + * | |Prev|Play|Next| | | |VolD|Mute|VolU| | |End |PgDn| | + * |-----------------------------------------------------------| |--------------| + * | | | | | | | | | | | | | | up | | + * |-----------------------------------------------------------| |--------------| + * |EEPRST| | | | | | | | |left|down| rt | + * `-----------------------------------------------------------' `--------------' + */ + +[_L2] = LAYOUT( +RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_DEL, KC_HOME, KC_PGUP, _______, +_______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_VOLD, KC_MUTE, KC_VOLU, _______, KC_END, KC_PGDN, _______, +_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, +EEP_RST, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT +) +}; + +void led_set_user(uint8_t usb_led) { + // Turn LED On/Off for Caps Lock + if (host_keyboard_leds() & (1 << USB_LED_CAPS_LOCK)) { + the50_led_on(); + } else { + the50_led_off(); + } +} diff --git a/keyboards/lets_split/rev1/config.h b/keyboards/lets_split/rev1/config.h index 18b7cce5a..e9dc0a534 100644 --- a/keyboards/lets_split/rev1/config.h +++ b/keyboards/lets_split/rev1/config.h @@ -53,11 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/lets_split/rev2/config.h b/keyboards/lets_split/rev2/config.h index 1c0871cd1..e31026965 100644 --- a/keyboards/lets_split/rev2/config.h +++ b/keyboards/lets_split/rev2/config.h @@ -53,11 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/lets_split/sockets/config.h b/keyboards/lets_split/sockets/config.h index e73c45722..9c6367f53 100644 --- a/keyboards/lets_split/sockets/config.h +++ b/keyboards/lets_split/sockets/config.h @@ -53,11 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 diff --git a/keyboards/lets_split_eh/config.h b/keyboards/lets_split_eh/config.h index abfee0eac..c227326c0 100644 --- a/keyboards/lets_split_eh/config.h +++ b/keyboards/lets_split_eh/config.h @@ -39,9 +39,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* serial.c configuration for split keyboard */ //#define SOFT_SERIAL_PIN D0 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/lfkeyboards/lfk65_hs/config.h b/keyboards/lfkeyboards/lfk65_hs/config.h index ffbd1de9b..73e906c3b 100644 --- a/keyboards/lfkeyboards/lfk65_hs/config.h +++ b/keyboards/lfkeyboards/lfk65_hs/config.h @@ -79,11 +79,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/lfkeyboards/lfk78/config.h b/keyboards/lfkeyboards/lfk78/config.h index 32f4455da..30919894c 100644 --- a/keyboards/lfkeyboards/lfk78/config.h +++ b/keyboards/lfkeyboards/lfk78/config.h @@ -110,11 +110,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/lfkeyboards/lfk87/config.h b/keyboards/lfkeyboards/lfk87/config.h index 84357450b..00df42977 100644 --- a/keyboards/lfkeyboards/lfk87/config.h +++ b/keyboards/lfkeyboards/lfk87/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW - #ifdef LFK_TKL_REV_A /* RevB Matrix config */ #define MATRIX_ROWS 6 @@ -111,11 +110,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/lfkeyboards/lfkpad/config.h b/keyboards/lfkeyboards/lfkpad/config.h index ea85f670c..ea29e84a4 100644 --- a/keyboards/lfkeyboards/lfkpad/config.h +++ b/keyboards/lfkeyboards/lfkpad/config.h @@ -89,11 +89,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/lfkeyboards/mini1800/config.h b/keyboards/lfkeyboards/mini1800/config.h index 8389e8b3f..e4d197aa2 100644 --- a/keyboards/lfkeyboards/mini1800/config.h +++ b/keyboards/lfkeyboards/mini1800/config.h @@ -97,11 +97,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/lfkeyboards/smk65/config.h b/keyboards/lfkeyboards/smk65/config.h index 78626416c..ddc7c5165 100644 --- a/keyboards/lfkeyboards/smk65/config.h +++ b/keyboards/lfkeyboards/smk65/config.h @@ -106,11 +106,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/lily58/rev1/config.h b/keyboards/lily58/rev1/config.h index 0dee6a694..7a4386e70 100644 --- a/keyboards/lily58/rev1/config.h +++ b/keyboards/lily58/rev1/config.h @@ -52,11 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 #define RGBLED_NUM 12 // Number of LEDs diff --git a/keyboards/m0lly/README.md b/keyboards/m0lly/README.md new file mode 100644 index 000000000..e0c8b45d9 --- /dev/null +++ b/keyboards/m0lly/README.md @@ -0,0 +1,17 @@ +The Key Company M0LLY + +[TKC M0LLY](https://cdn.shopify.com/s/files/1/1679/2319/files/Molly_Terminal_1024x1024.jpg?v=1529067702) + + +The Key Company's M0LLY keyboard is inspired by the Apple Macintosh M0110A, and utilizes the AT90USB1286 microcontroller. + +Keyboard Maintainer: [Terry Mathews](https://github.com/TerryMathews/) +Hardware Supported: TKC M0LLY +Hardware Availability: [TheKey.Company](https://thekey.company) + + +Make example for this keyboard (after setting up your build environment): + + make m0lly:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/m0lly/config.h b/keyboards/m0lly/config.h new file mode 100644 index 000000000..21f5fd3fb --- /dev/null +++ b/keyboards/m0lly/config.h @@ -0,0 +1,178 @@ +/* +Copyright 2012 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER The Key Company +#define PRODUCT M0lly +#define DESCRIPTION QMK keyboard firmware for M0lly + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 19 + +// ROWS: Top to bottom, COLS: Left to right +/* Row pin configuration +*/ +#define MATRIX_ROW_PINS { F2, F1, F0, E1, E0 } +/* Column pin configuration + */ +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1, C0, F5, F6, F7 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B6 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +/* Underlight configuration + */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 5 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 diff --git a/keyboards/viterbi/i2c.c b/keyboards/m0lly/i2c.c index 084c890c4..cd2b835d5 100644 --- a/keyboards/viterbi/i2c.c +++ b/keyboards/m0lly/i2c.c @@ -48,7 +48,7 @@ void i2c_master_init(void) { // returns: 0 => success // 1 => error uint8_t i2c_master_start(uint8_t address) { - TWCR = (1<<TWINT) | (1<<TWEN) | (1<<TWSTA); + TWCR = (1<<TWINT) | (1<<TWSTA) | (1<<TWEN); i2c_delay(); @@ -56,6 +56,7 @@ uint8_t i2c_master_start(uint8_t address) { if ( (TW_STATUS != TW_START) && (TW_STATUS != TW_REP_START)) return 1; + // send device address TWDR = address; TWCR = (1<<TWINT) | (1<<TWEN); @@ -159,4 +160,7 @@ ISR(TWI_vect) { // Reset everything, so we are ready for the next TWI interrupt TWCR |= (1<<TWIE) | (1<<TWINT) | (ack<<TWEA) | (1<<TWEN); } + + + #endif diff --git a/keyboards/viterbi/i2c.h b/keyboards/m0lly/i2c.h index 43e596988..2bd7f4096 100644 --- a/keyboards/viterbi/i2c.h +++ b/keyboards/m0lly/i2c.h @@ -16,7 +16,7 @@ #define SLAVE_BUFFER_SIZE 0x10 // i2c SCL clock frequency -#define SCL_CLOCK 100000L +#define SCL_CLOCK 800000L extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; diff --git a/keyboards/m0lly/info.json b/keyboards/m0lly/info.json new file mode 100644 index 000000000..f2ac456b1 --- /dev/null +++ b/keyboards/m0lly/info.json @@ -0,0 +1,97 @@ +{ + "keyboard_name": "TKC M0LLY", + "url": "", + "maintainer": "qmk", + "width": 19.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [ + {"label":"~", "x":0, "y":0}, + {"label":"!", "x":1, "y":0}, + {"label":"@", "x":2, "y":0}, + {"label":"#", "x":3, "y":0}, + {"label":"$", "x":4, "y":0}, + {"label":"%", "x":5, "y":0}, + {"label":"^", "x":6, "y":0}, + {"label":"&", "x":7, "y":0}, + {"label":"*", "x":8, "y":0}, + {"label":"(", "x":9, "y":0}, + {"label":")", "x":10, "y":0}, + {"label":"_", "x":11, "y":0}, + {"label":"+", "x":12, "y":0}, + {"label":"Bksp", "x":13, "y":0}, + {"x":14, "y":0}, + {"label":"Num", "x":15.5, "y":0}, + {"label":"/", "x":16.5, "y":0}, + {"label":"*", "x":17.5, "y":0}, + {"label":"-", "x":18.5, "y":0}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"Y", "x":6.5, "y":1}, + {"label":"U", "x":7.5, "y":1}, + {"label":"I", "x":8.5, "y":1}, + {"label":"O", "x":9.5, "y":1}, + {"label":"P", "x":10.5, "y":1}, + {"label":"{", "x":11.5, "y":1}, + {"label":"}", "x":12.5, "y":1}, + {"label":"|", "x":13.5, "y":1, "w":1.5}, + {"label":"7", "x":15.5, "y":1}, + {"label":"8", "x":16.5, "y":1}, + {"label":"9", "x":17.5, "y":1}, + {"x":18.5, "y":1}, + {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, + {"label":"A", "x":1.75, "y":2}, + {"label":"S", "x":2.75, "y":2}, + {"label":"D", "x":3.75, "y":2}, + {"label":"F", "x":4.75, "y":2}, + {"label":"G", "x":5.75, "y":2}, + {"label":"H", "x":6.75, "y":2}, + {"label":"J", "x":7.75, "y":2}, + {"label":"K", "x":8.75, "y":2}, + {"label":"L", "x":9.75, "y":2}, + {"label":":", "x":10.75, "y":2}, + {"label":"\"", "x":11.75, "y":2}, + {"label":"ISO ~", "x":12.75, "y":2}, + {"label":"Enter", "x":13.75, "y":2, "w":1.25}, + {"label":"4", "x":15.5, "y":2}, + {"label":"5", "x":16.5, "y":2}, + {"label":"6", "x":17.5, "y":2}, + {"label":"+", "x":18.5, "y":2}, + {"label":"Shift", "x":0, "y":3, "w":1.25}, + {"x":1.25, "y":3}, + {"label":"Z", "x":2.25, "y":3}, + {"label":"X", "x":3.25, "y":3}, + {"label":"C", "x":4.25, "y":3}, + {"label":"V", "x":5.25, "y":3}, + {"label":"B", "x":6.25, "y":3}, + {"label":"N", "x":7.25, "y":3}, + {"label":"M", "x":8.25, "y":3}, + {"label":"<", "x":9.25, "y":3}, + {"label":">", "x":10.25, "y":3}, + {"label":"?", "x":11.25, "y":3}, + {"label":"Shift", "x":12.25, "y":3, "w":1.75}, + {"x":14, "y":3}, + {"label":"1", "x":15.5, "y":3}, + {"label":"2", "x":16.5, "y":3}, + {"label":"3", "x":17.5, "y":3}, + {"x":18.5, "y":3}, + {"label":"Ctrl", "x":0, "y":4, "w":1.25}, + {"label":"Win", "x":1.25, "y":4, "w":1.25}, + {"label":"Alt", "x":2.5, "y":4, "w":1.25}, + {"x":3.75, "y":4, "w":6.25}, + {"label":"Alt", "x":10, "y":4, "w":1.25}, + {"label":"Win", "x":11.25, "y":4, "w":1.25}, + {"label":"FN", "x":12.5, "y":4, "w":1.25}, + {"label":"Ctrl", "x":13.75, "y":4, "w":1.25}, + {"label":"0", "x":15.5, "y":4}, + {"x":16.5, "y":4}, + {"label":".", "x":17.5, "y":4}, + {"label":"Ent", "x":18.5, "y":4}] + } + } +} diff --git a/keyboards/m0lly/keymaps/default/config.h b/keyboards/m0lly/keymaps/default/config.h new file mode 100644 index 000000000..ee142927f --- /dev/null +++ b/keyboards/m0lly/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#define USE_I2C +#define SSD1306OLED +//#define OLED_ROTATE180 +#define SSD1306_ADDRESS 0x3C + +// place overrides here diff --git a/keyboards/m0lly/keymaps/default/keymap.c b/keyboards/m0lly/keymaps/default/keymap.c new file mode 100644 index 000000000..784deb04a --- /dev/null +++ b/keyboards/m0lly/keymaps/default/keymap.c @@ -0,0 +1,149 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H +#include "LUFA/Drivers/Peripheral/TWI.h" +#include "i2c.h" +#include "ssd1306.h" + + +//Layers + +enum { + BASE = 0, + FUNCTION, +}; + +bool screenWorks = 0; + +//13 characters max without re-writing the "Layer: " format in iota_gfx_task_user() +static char layer_lookup[][14] = {"Base","Function"}; + + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap BASE: (Base Layer) Default Layer + * + * ,-----------------------------------------------------------. .-------------------. + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * | - | + * |-----------------------------------------------------------| |-------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | | 7 | 8 | 9 | | + * |-----------------------------------------------------------| |--------------| + | + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | | 4 | 5 | 6 | | + * |-----------------------------------------------------------| |-------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | | 1 | 2 | 3 | Ent| + * |-----------------------------------------------------------| |--------------| | + * |Ctrl|Gui |Alt | Space | Alt | Win |FN |Ctr | | 0 | . | | + * `-----------------------------------------------------------' '-------------------' + */ + [BASE] = LAYOUT_all( + KC_GRV, 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_BSPC, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + 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_BSLS, KC_P7, KC_P8, KC_P9, XXXXXXX, \ + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, XXXXXXX, KC_P1, KC_P2, KC_P3, XXXXXXX, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RWIN, MO(FUNCTION), KC_RCTL, KC_P0, XXXXXXX, KC_PDOT, KC_PENT \ + ), + /* Keymap FUNCTION: (Function Layer) + * + * ,-----------------------------------------------------------. .-------------------. + * | | | | | | | | | | | | | | RESET | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | | | | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| |-------------------| + * | |Tog|Mod|Hu+|Hu-|Sa+|Sa-|Va+|Va-|Stp| | | | | | | | + * |-----------------------------------------------------------| |--------------| | + * | | | | | | | | | | | | | + * `-----------------------------------------------------------' '-------------------' + */ + [FUNCTION] = LAYOUT_all( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, \ + _______, XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, BL_STEP, _______, _______, XXXXXXX, _______, _______, _______, XXXXXXX, \ + _______, _______, _______, _______, _______, _______, MO(FUNCTION), _______, _______, XXXXXXX, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} + +void matrix_init_user(void) { + #ifdef USE_I2C + i2c_master_init(); + #ifdef SSD1306OLED + // calls code for the SSD1306 OLED + _delay_ms(400); + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + if ( iota_gfx_init() ) { // turns on the display + screenWorks = 1; + } + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + if ( screenWorks ) { + iota_gfx_task(); // this is what updates the display continuously + }; + #endif +} + +void matrix_update(struct CharacterMatrix *dest, + const struct CharacterMatrix *source) { + if (memcmp(dest->display, source->display, sizeof(dest->display))) { + memcpy(dest->display, source->display, sizeof(dest->display)); + dest->dirty = true; + } +} + +void iota_gfx_task_user(void) { + #if DEBUG_TO_SCREEN + if (debug_enable) { + return; + } + #endif + + struct CharacterMatrix matrix; + + matrix_clear(&matrix); + matrix_write_P(&matrix, PSTR("TKC M0LLY")); + + uint8_t layer = biton32(layer_state); + + char buf[40]; + snprintf(buf,sizeof(buf), "Undef-%d", layer); + matrix_write_P(&matrix, PSTR("\nLayer: ")); + matrix_write(&matrix, layer_lookup[layer]); + + // Host Keyboard LED Status + char led[40]; + snprintf(led, sizeof(led), "\n\n%s %s %s", + (host_keyboard_leds() & (1<<USB_LED_NUM_LOCK)) ? "NUMLOCK" : " ", + (host_keyboard_leds() & (1<<USB_LED_CAPS_LOCK)) ? "CAPS" : " ", + (host_keyboard_leds() & (1<<USB_LED_SCROLL_LOCK)) ? "SCLK" : " "); + matrix_write(&matrix, led); + matrix_update(&display, &matrix); +} diff --git a/keyboards/m0lly/m0lly.c b/keyboards/m0lly/m0lly.c new file mode 100644 index 000000000..5e1b5371a --- /dev/null +++ b/keyboards/m0lly/m0lly.c @@ -0,0 +1,69 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "m0lly.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + led_init_ports(); + matrix_init_user(); +} + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + + matrix_scan_user(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_init_ports(void) { + DDRD |= (1<<2) | (1<<3) | (1<<4); // OUT + DDRB |= (1<<7); // OUT + PORTB |= (1<<7); +} + +void led_set_kb(uint8_t usb_led) { +// led_set_user(usb_led); + if (usb_led & (1<<USB_LED_NUM_LOCK)) { + // Turn numlock on + PORTD |= (1<<2); + } else { + // Turn numlock off + PORTD &= ~(1<<2); + } + if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + // Turn capslock on + PORTD |= (1<<3); + } else { + // Turn capslock off + PORTD &= ~(1<<3); + } + if (usb_led & (1<<USB_LED_SCROLL_LOCK)) { + // Turn scrolllock on + PORTD |= (1<<4); + } else { + // Turn scrolllock off + PORTD &= ~(1<<4); + } +}
\ No newline at end of file diff --git a/keyboards/m0lly/m0lly.h b/keyboards/m0lly/m0lly.h new file mode 100644 index 000000000..0c62876ef --- /dev/null +++ b/keyboards/m0lly/m0lly.h @@ -0,0 +1,32 @@ +/* Copyright 2017 Mathias Andersson <wraul@dbox.se> + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +#define LAYOUT_all( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1F, K1G, K1H, K1I, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2F, K2G, K2H, K2I, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, K3G, K3H, K3I, \ + K40, K41, K42, K45, K49, K4B, K4C, K4D, K4F, K4G, K4H, K4I \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, K0H, K0I }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1F, K1G, K1H, K1I }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, KC_NO, K2F, K2G, K2H, K2I }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F, K3G, K3H, K3I }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, K49, KC_NO, K4B, K4C, K4D, KC_NO, K4F, K4G, K4H, K4I } \ +} diff --git a/keyboards/m0lly/rules.mk b/keyboards/m0lly/rules.mk new file mode 100644 index 000000000..ae6cdcb53 --- /dev/null +++ b/keyboards/m0lly/rules.mk @@ -0,0 +1,72 @@ + +# MCU name +MCU = at90usb1286 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +MIDI_ENABLE = no # MIDI controls +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 + +SRC = i2c.c \ + ssd1306.c diff --git a/keyboards/m10a/config.h b/keyboards/m10a/config.h index f052ab629..ec425dfbd 100644 --- a/keyboards/m10a/config.h +++ b/keyboards/m10a/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/massdrop/alt/config.h b/keyboards/massdrop/alt/config.h index 660d44421..d2f73a6a8 100644 --- a/keyboards/massdrop/alt/config.h +++ b/keyboards/massdrop/alt/config.h @@ -99,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Force boot in NKRO mode */ //#define FORCE_NKRO diff --git a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c index 7ffa53dca..10bc62c1f 100644 --- a/keyboards/massdrop/alt/keymaps/abishalom/keymap.c +++ b/keyboards/massdrop/alt/keymaps/abishalom/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; diff --git a/keyboards/massdrop/alt/keymaps/default/keymap.c b/keyboards/massdrop/alt/keymaps/default/keymap.c index 7ffa53dca..10bc62c1f 100644 --- a/keyboards/massdrop/alt/keymaps/default/keymap.c +++ b/keyboards/massdrop/alt/keymaps/default/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; diff --git a/keyboards/massdrop/alt/keymaps/mac/keymap.c b/keyboards/massdrop/alt/keymaps/mac/keymap.c index 9fd4816cc..639eb2da7 100644 --- a/keyboards/massdrop/alt/keymaps/mac/keymap.c +++ b/keyboards/massdrop/alt/keymaps/mac/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; diff --git a/keyboards/massdrop/alt/keymaps/reywood/keymap.c b/keyboards/massdrop/alt/keymaps/reywood/keymap.c index 48b804efe..cf60acfe6 100644 --- a/keyboards/massdrop/alt/keymaps/reywood/keymap.c +++ b/keyboards/massdrop/alt/keymaps/reywood/keymap.c @@ -60,9 +60,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; diff --git a/keyboards/massdrop/ctrl/config.h b/keyboards/massdrop/ctrl/config.h index 31eccda87..71ccac0f3 100644 --- a/keyboards/massdrop/ctrl/config.h +++ b/keyboards/massdrop/ctrl/config.h @@ -99,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Force boot in NKRO mode */ //#define FORCE_NKRO diff --git a/keyboards/massdrop/ctrl/keymaps/default/keymap.c b/keyboards/massdrop/ctrl/keymaps/default/keymap.c index 11597f987..cdb627f9c 100644 --- a/keyboards/massdrop/ctrl/keymaps/default/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/default/keymap.c @@ -63,9 +63,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; diff --git a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c index badb566b3..e41b5eba2 100644 --- a/keyboards/massdrop/ctrl/keymaps/mac/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/mac/keymap.c @@ -63,9 +63,9 @@ void matrix_init_user(void) { void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; diff --git a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c index eabd8d23a..0bdc15214 100644 --- a/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c +++ b/keyboards/massdrop/ctrl/keymaps/responsive_pattern/keymap.c @@ -37,7 +37,7 @@ enum ctrl_keycodes { DBG_KBD, //DEBUG Toggle Keyboard Prints DBG_MOU, //DEBUG Toggle Mouse Prints MD_BOOT, //Restart into bootloader after hold timeout - + L_SP_PR, //LED Splash Pattern Select Previous L_SP_NE, //LED Splash Pattern Select Next @@ -178,7 +178,7 @@ static void init_distance_map(void){ uint8_t id2 = ktli(KEY_POSITION_MAP[j][i]); if(id1 == id2) continue; - + uint8_t dx = abs(i - x); uint8_t dy = abs(j - y); uint8_t dis = dx + dy; @@ -277,15 +277,15 @@ void led_matrix_run(void) bo = 0; uint8_t led_index = led_cur - led_map; // only this part differs from the original function. - if(led_index < KEY_LED_COUNT){ // + if(led_index < KEY_LED_COUNT){ // user_led_cur = USER_LED[led_index]; // `struct user_led_t USER_LED[]` is stored globally. - } // - // + } // + // if(led_index < KEY_LED_COUNT && user_led_cur.state){ // `user_led_cur` is just for convenience - ro = user_led_cur.r; // - go = user_led_cur.g; // - bo = user_led_cur.b; // - } // + ro = user_led_cur.r; // + go = user_led_cur.g; // + bo = user_led_cur.b; // + } // else if (led_lighting_mode == LED_MODE_KEYS_ONLY && led_cur->scan == 255) { //Do not act on this LED @@ -513,7 +513,7 @@ static uint8_t COLOR_PATTERNS[][COLOR_PATTERN_RGB_COUNT][3] = { {181, 181, 181}, {164, 164, 164}, {147, 147, 147}, {128, 128, 128}, {108, 108, 108}, { 88, 88, 88}, { 66, 66, 66}, { 45, 45, 45}, { 23, 23, 23}, - }, + }, }; static const uint8_t COLOR_PATTERNS_COUNT = ( sizeof(COLOR_PATTERNS) / sizeof(COLOR_PATTERNS[0])); @@ -561,7 +561,7 @@ void refresh_color_pattern_indicators(void){ static uint8_t ZXCVBNM_COMM_DOT[] = { KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, }; - + if(layer_state >= 0x04){ uint8_t (*c)[3] = &COLOR_PATTERNS[USER_CONFIG.COLOR_PATTERN_INDEX][0]; for(uint8_t i = 0; i < 9; ++i){ @@ -589,7 +589,7 @@ void matrix_scan_user(void) { calculate_keystroke_distance(); - + #define USE_PATTERN 0 #define BLACK_RGB 1 #define COLOR_RGB 2 @@ -599,7 +599,7 @@ void matrix_scan_user(void) { uint8_t distance; for(uint8_t i = 1; i <= KEY_LED_COUNT; ++i){ if(USER_LED[i-1].state >= 2) continue; - + handle_type = USE_PATTERN; distance = DISTANCE_FROM_LAST_KEYSTROKE[i]; @@ -695,9 +695,9 @@ void matrix_scan_user(void) { }; -#define MODS_SHIFT (keyboard_report->mods & MOD_BIT(KC_LSHIFT) || keyboard_report->mods & MOD_BIT(KC_RSHIFT)) -#define MODS_CTRL (keyboard_report->mods & MOD_BIT(KC_LCTL) || keyboard_report->mods & MOD_BIT(KC_RCTRL)) -#define MODS_ALT (keyboard_report->mods & MOD_BIT(KC_LALT) || keyboard_report->mods & MOD_BIT(KC_RALT)) +#define MODS_SHIFT (get_mods() & MOD_BIT(KC_LSHIFT) || get_mods() & MOD_BIT(KC_RSHIFT)) +#define MODS_CTRL (get_mods() & MOD_BIT(KC_LCTL) || get_mods() & MOD_BIT(KC_RCTRL)) +#define MODS_ALT (get_mods() & MOD_BIT(KC_LALT) || get_mods() & MOD_BIT(KC_RALT)) bool process_record_user(uint16_t keycode, keyrecord_t *record) { static uint32_t key_timer; @@ -835,7 +835,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { - + case L_SP_PR: // previous dripple pattern case L_SP_NE: // next dripple pattern if (record->event.pressed) { @@ -880,7 +880,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { USER_CONFIG.WAVE_PERIOD = 10; break; } - + // remove effect after changing pattern for(int i = 0; i < KEY_STROKES_LENGTH; ++i){ KEY_STROKES[i].alive = 0; @@ -903,7 +903,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case L_SP_SL: if(record->event.pressed){ short incre = keycode == L_SP_FA ? -1 : 1; - + USER_CONFIG.WAVE_PERIOD += 10 * incre; if(USER_CONFIG.WAVE_PERIOD < 10){ USER_CONFIG.WAVE_PERIOD = 10; diff --git a/keyboards/maxipad/config.h b/keyboards/maxipad/config.h index d7a5ef564..1acd232c9 100644 --- a/keyboards/maxipad/config.h +++ b/keyboards/maxipad/config.h @@ -51,7 +51,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define MATRIX_COL_PINS { F6, C6, D7, F5, B4, B5 } //#define UNUSED_PINS - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -69,11 +68,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/mechmini/v1/config.h b/keyboards/mechmini/v1/config.h index 1f46451f9..9355a6dc3 100644 --- a/keyboards/mechmini/v1/config.h +++ b/keyboards/mechmini/v1/config.h @@ -42,7 +42,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_ANIMATIONS #define RGB_DI_PIN E2 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/mechmini/v2/config.h b/keyboards/mechmini/v2/config.h index e0922bb7e..edca6a5c4 100755 --- a/keyboards/mechmini/v2/config.h +++ b/keyboards/mechmini/v2/config.h @@ -17,7 +17,6 @@ #include "config_common.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0xCA40 @@ -57,11 +56,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mechmini/v2/keymaps/default/keymap.c b/keyboards/mechmini/v2/keymaps/default/keymap.c index e35f25ee4..23f61f918 100755 --- a/keyboards/mechmini/v2/keymaps/default/keymap.c +++ b/keyboards/mechmini/v2/keymaps/default/keymap.c @@ -4,11 +4,15 @@ #define _FN1 1 #define _FN2 2 -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +enum custom_keycodes { + SFT_ESC +}; + +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = LAYOUT_split_space( - F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + SFT_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_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_RSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_RCTL, MO(1), MO(2)), @@ -42,10 +46,6 @@ void matrix_init_user(void) { void matrix_scan_user(void) { } -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; -} - void led_set_user(uint8_t usb_led) { if (usb_led & (1 << USB_LED_NUM_LOCK)) { @@ -80,21 +80,11 @@ void led_set_user(uint8_t usb_led) { } -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -102,7 +92,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -110,6 +100,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/mehkee96/config.h b/keyboards/mehkee96/config.h index 70ca273c3..334358aad 100644 --- a/keyboards/mehkee96/config.h +++ b/keyboards/mehkee96/config.h @@ -15,4 +15,3 @@ #define RGBLED_NUM 16 #define RGBLIGHT_ANIMATIONS /* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/meira/featherble/config.h b/keyboards/meira/featherble/config.h index b7cdfe8bd..d8f86fe02 100644 --- a/keyboards/meira/featherble/config.h +++ b/keyboards/meira/featherble/config.h @@ -47,7 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING //#define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -94,11 +93,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/meira/promicro/config.h b/keyboards/meira/promicro/config.h index 0c4e8f17f..3c2113a20 100644 --- a/keyboards/meira/promicro/config.h +++ b/keyboards/meira/promicro/config.h @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" - /* * Keyboard Matrix Assignments * @@ -83,11 +82,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/meishi/config.h b/keyboards/meishi/config.h new file mode 100644 index 000000000..6c712e2ad --- /dev/null +++ b/keyboards/meishi/config.h @@ -0,0 +1,183 @@ +/* +Copyright 2019 Biacco42 + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xBC42 +#define PRODUCT_ID 0x0002 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Biacco42 +#define PRODUCT meishi +#define DESCRIPTION The micro macro keyboard + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B5 } +#define MATRIX_COL_PINS { B1, B3, B2, B6 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + diff --git a/keyboards/meishi/keymaps/default/keymap.c b/keyboards/meishi/keymaps/default/keymap.c new file mode 100644 index 000000000..88f08ee56 --- /dev/null +++ b/keyboards/meishi/keymaps/default/keymap.c @@ -0,0 +1,42 @@ +/* Copyright 2017 Biacco42 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "meishi.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + LCTL(KC_Z), LCTL(KC_X), LCTL(KC_C), LCTL(KC_V) \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/meishi/keymaps/default/readme.md b/keyboards/meishi/keymaps/default/readme.md new file mode 100644 index 000000000..a9eb4e9cd --- /dev/null +++ b/keyboards/meishi/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for meishi
\ No newline at end of file diff --git a/keyboards/meishi/meishi.c b/keyboards/meishi/meishi.c new file mode 100644 index 000000000..92c5194d5 --- /dev/null +++ b/keyboards/meishi/meishi.c @@ -0,0 +1,43 @@ +/* Copyright 2019 Biacco42 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "meishi.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(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/meishi/meishi.h b/keyboards/meishi/meishi.h new file mode 100644 index 000000000..61b9f628d --- /dev/null +++ b/keyboards/meishi/meishi.h @@ -0,0 +1,31 @@ +/* Copyright 2019 Biacco42 + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT( \ + k00, k01, k02, k03\ +) \ +{ \ + { k00, k01, k02, k03 }\ +} + diff --git a/keyboards/meishi/readme.md b/keyboards/meishi/readme.md new file mode 100644 index 000000000..99421ed8d --- /dev/null +++ b/keyboards/meishi/readme.md @@ -0,0 +1,19 @@ +# Meishi - The micro macro keyboard + +_Meishi_ means name cards. + +![meishi](https://raw.githubusercontent.com/Biacco42/meishi/readme/readme_image/P1210037.JPG) + +Only four keys keyboard for self made keyboard beginners. + +Keyboard Maintainer: [Biacco42](https://github.com/biacco42) +Hardware Supported: [Meishi keyboard PCB](https://github.com/Biacco42/meishi), Pro Micro supported +Hardware Availability: [Tanoshi life - Booth](https://biacco42.booth.pm/) + +Make example for this keyboard (after setting up your build environment): + +``` +$ make meishi:default:avrdude +``` + +See [build environment setup](https://docs.qmk.fm/build_environment_setup.html) then the [make instructions](https://docs.qmk.fm/make_instructions.html) for more information. diff --git a/keyboards/kbd66/rules.mk b/keyboards/meishi/rules.mk index 45eb6ee37..45eb6ee37 100644 --- a/keyboards/kbd66/rules.mk +++ b/keyboards/meishi/rules.mk diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h index 67123a7e5..db814d013 100644 --- a/keyboards/melody96/config.h +++ b/keyboards/melody96/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/meme/config.h b/keyboards/meme/config.h index d1e3d27a1..58b53b674 100644 --- a/keyboards/meme/config.h +++ b/keyboards/meme/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_BREATHING #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -105,11 +104,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/miniaxe/config.h b/keyboards/miniaxe/config.h index 7a68476a5..ae1fd448a 100644 --- a/keyboards/miniaxe/config.h +++ b/keyboards/miniaxe/config.h @@ -120,11 +120,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -244,4 +239,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define I2C_MASTER_RIGHT #define DISABLE_JTAG - diff --git a/keyboards/minidox/config.h b/keyboards/minidox/config.h index 306a486cb..b99180eb1 100644 --- a/keyboards/minidox/config.h +++ b/keyboards/minidox/config.h @@ -49,11 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 diff --git a/keyboards/minidox/keymaps/dustypomerleau/README.md b/keyboards/minidox/keymaps/dustypomerleau/README.md new file mode 100644 index 000000000..b2ec77125 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/README.md @@ -0,0 +1,28 @@ +## dustypomerleau, Minidox layout + +The rationale behind my layout can be summarized as follows: + +- Symmetry is important because use-cases are hard to predict. Whenever possible, modifiers and layer keys should be available from either hand. +- Inward rolls should be leveraged not just for alphas (Colemak DHm), but also for coding/symbols. +- Number order—like alpha order—should be designed to favor use of the strongest fingers. +- One-shot keys can greatly reduce the strain of typing, and should be leveraged. + +Some aspects of my layout are optimized for macOS (order of modifiers, manner of producing en and em dashes, coding of micro-volume adjustments, etc.), but can be easily tweaked for the OS of your choice. + +Shift can be a tricky modifier when used in `MT()` combinations, particularly for fast typists on split boards using serial. This can be partially mitigated with options in `config.h`, but still requires a relatively strict typing style/accuracy from the fast typist. The tendency is for faster typists to combat mod/tap mistakes by using very short intervals for `TAPPING_TERM`, but this can introduce its own set of complications. Shift is also one of the highest-yield opportunities to use `OSM()`. For these reasons, I pulled Shift onto dedicated keys in the thumbs for use during regular typing (the home row Shifts have been left in place for use during selection and keycuts). + +The tapdance code that I used to create mod/tap keys inside my symbol layer allows up to 2 consecutive symbols within `TAPPING_TERM`. If you think you will need to quickly nest more than that, feel free to add more `case`s. + +### Special thanks + +- Everyone on the QMK Discord, for helping me work out the code for mod/tap keys using shifted symbols. +- Everyone on the Colemak Discord, for their initial feedback on the layout. +- @stevep and @DreymaR, for their work on Colemak DH(m), a truly awesome typing experience (and of course Shai Coleman, for starting it all off!). +- @ckofy, for offering a dramatic improvement on Dvorak's original number order. +- u/That-Canadian, for designing this awesome keyboard. + +### Questions or comments? + +- GitHub @dustypomerleau +- Twitter @duspom +- Discord @dusty#8897 diff --git a/keyboards/minidox/keymaps/dustypomerleau/config.h b/keyboards/minidox/keymaps/dustypomerleau/config.h new file mode 100644 index 000000000..5166e06d8 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/config.h @@ -0,0 +1,26 @@ +// dustypomerleau, Minidox config + +#pragma once + + +#define EE_HANDS +#define IGNORE_MOD_TAP_INTERRUPT +#define ONESHOT_TIMEOUT 1000 +#define TAPPING_TERM 200 +#define USE_SERIAL + +// optional configuration: + +// #define CONVERT_TO_PROTON_C +// #define ONESHOT_TAP_TOGGLE 2 // not compatible with TAPPING_FORCE_HOLD +// #define PERMISSIVE_HOLD +// #define TAPPING_FORCE_HOLD // allows rapid mod use after tap event, but sacrifices double-tap to repeat + +// #define MOUSEKEY_DELAY 0 // delay before cursor movement (high feels sluggish, low makes fine movement difficult) +// #define MOUSEKEY_INTERVAL 20 // time between movement reports - low settings feel like high mouse speed +// #define MOUSEKEY_MAX_SPEED 10 +// #define MOUSEKEY_TIME_TO_MAX 60 +// #define MOUSEKEY_WHEEL_DELAY 0 +// #define MOUSEKEY_WHEEL_MAX_SPEED 8 +// #define MOUSEKEY_WHEEL_TIME_TO_MAX 4 + diff --git a/keyboards/minidox/keymaps/dustypomerleau/keymap.c b/keyboards/minidox/keymaps/dustypomerleau/keymap.c new file mode 100644 index 000000000..13b84d64d --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/keymap.c @@ -0,0 +1,489 @@ +// Minidox keymap by dustypomerleau +// Thanks for checking out my keymap. The rationale behind the layout is described in the README. + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum custom_layers { + _CMK_DHM, + _QWERTY, + _SYS, + _NAV, + _NUM_E, + _NUM_N, + _SYM +}; + +enum custom_keycodes { + CMK_DHM = SAFE_RANGE, + QWERTY, + SYS, + NAV, + NUM_E, + NUM_N, + SYM +}; + +typedef struct { + bool is_press_action; + int state; +} tap; + +enum { + SINGLE_TAP = 1, + SINGLE_HOLD = 2, + DOUBLE_SINGLE_TAP = 3 +}; + +enum { + ALT_OP = 0, + CTL_CCB, + GUI_CP, + SFT_OCB, + SFT_PLS +}; + +int cur_dance (qk_tap_dance_state_t *state); +void altop_finished (qk_tap_dance_state_t *state, void *user_data); +void altop_reset (qk_tap_dance_state_t *state, void *user_data); +void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data); +void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data); +void guicp_finished (qk_tap_dance_state_t *state, void *user_data); +void guicp_reset (qk_tap_dance_state_t *state, void *user_data); +void sftocb_finished (qk_tap_dance_state_t *state, void *user_data); +void sftocb_reset (qk_tap_dance_state_t *state, void *user_data); +void sftpls_finished (qk_tap_dance_state_t *state, void *user_data); +void sftpls_reset (qk_tap_dance_state_t *state, void *user_data); + +#define _______ KC_TRNS +#define ALT_2 LALT_T(KC_2) +#define ALT_3 LALT_T(KC_3) +#define ALT_8 LALT_T(KC_8) +#define ALT_D LALT_T(KC_D) +#define ALT_E LALT_T(KC_E) +#define ALT_K LALT_T(KC_K) +#define ALT_OB LALT_T(KC_LBRC) +#define ALT_S LALT_T(KC_S) +#define CTRL_2 LCTL_T(KC_2) +#define CTRL_4 LCTL_T(KC_4) +#define CTRL_5 LCTL_T(KC_5) +#define CTRL_9 LCTL_T(KC_9) +#define CTRL_EQ LCTL_T(KC_EQL) +#define CTRL_I LCTL_T(KC_I) +#define CTRL_L LCTL_T(KC_L) +#define CTRL_R LCTL_T(KC_R) +#define CTRL_S LCTL_T(KC_S) +#define GUI_0 LGUI_T(KC_0) +#define GUI_1 LGUI_T(KC_1) +#define GUI_4 LGUI_T(KC_4) +#define GUI_7 LGUI_T(KC_7) +#define GUI_CB LGUI_T(KC_RBRC) +#define GUI_F LGUI_T(KC_F) +#define GUI_J LGUI_T(KC_J) +#define GUI_N LGUI_T(KC_N) +#define GUI_TEA LGUI_T(KC_T) +#define MAC_EM S(LALT(KC_MINS)) +#define MAC_EN LALT(KC_MINS) +#define NAV_BK LT(_NAV, KC_BSPC) +#define NAV_LK TG(_NAV) +#define NUME_SPC LT(_NUM_E, KC_SPC) +#define NUMLK_E TG(_NUM_E) +#define NUMLK_N TG(_NUM_N) +#define NUMN_SPC LT(_NUM_N, KC_SPC) +#define SFT_0 LSFT_T(KC_0) +#define SFT_1 LSFT_T(KC_1) +#define SFT_6 LSFT_T(KC_6) +#define SFT_7 LSFT_T(KC_7) +#define SFT_A LSFT_T(KC_A) +#define SFT_O LSFT_T(KC_O) +#define SFT_OS OSM(MOD_LSFT) +#define SFT_QOT LSFT_T(KC_QUOT) +#define SYM_OS OSL(_SYM) +#define SYS_Z LT(_SYS, KC_Z) +#define VOL_DN S(LALT(KC__VOLDOWN)) +#define VOL_UP S(LALT(KC__VOLUP)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak DHm + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | B | | J | L | U | Y | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/A| CTL/R| ALT/S| GUI/T| G | | M | GUI/N| ALT/E| CTL/I| SFT/O| + * |------+------+------+------+------| |------+------+------+------+------| + * | SYS/Z| X | C | D | V | | K | H | , | . | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * |SFT/OS|NAV/BK| | | |NUM/SP|SFT/OS| + * `------+------|SYM/OS| |SYM/OS|------+------' + * | | | | + * `------' `------' + */ +[_CMK_DHM] = LAYOUT( \ + KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_QUOT, \ + SFT_A, CTRL_R, ALT_S, GUI_TEA, KC_G, KC_M, GUI_N, ALT_E, CTRL_I, SFT_O, \ + SYS_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SCLN, \ + SFT_OS, NAV_BK, SYM_OS, SYM_OS, NUME_SPC, SFT_OS \ +), + +/* QWERTY + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/A| CTL/S| ALT/D| GUI/F| G | | H | GUI/J| ALT/K| CTL/L| SFT/'| + * |------+------+------+------+------| |------+------+------+------+------| + * | SYS/Z| X | C | V | B | | N | M | , | . | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * |SFT/OS|NAV/BK| | | |NUM/SP|SFT/OS| + * `------+------|SYM/OS| |SYM/OS|------+------' + * | | | | + * `------' `------' + */ +[_QWERTY] = LAYOUT( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + SFT_A, CTRL_S, ALT_D, GUI_F, KC_G, KC_H, GUI_J, ALT_K, CTRL_L, SFT_QOT, \ + SYS_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SCLN, \ + SFT_OS, NAV_BK, SYM_OS, SYM_OS, NUMN_SPC, SFT_OS \ +), + +/* System, media, and layer lock keys + * If you use QWERTY + the Vanilla numbers primarily, change NUMLK_E to NUMLK_N here. + * + * ,----------------------------------. ,----------------------------------. + * | RESET|DEBUG |QWERTY|CMKDHM| | | | VOL--| VOL++| | | + * |------+------+------+------+------| |------+------+------+------+------| + * | SHIFT| CTRL | ALT | GUI |NAV LK| | POWER| VOL- | VOL+ | MUTE | MPLY | + * |------+------+------+------+------| |------+------+------+------+------| + * | | |AU OFF| AU ON| | | |NUM LK| MRWD | MFFD | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | | | | | | | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_SYS] = LAYOUT( \ + RESET, DEBUG, QWERTY, CMK_DHM, _______, _______, KC__VOLDOWN, KC__VOLUP, _______, _______, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_POWER, VOL_DN, VOL_UP, KC__MUTE, KC_MPLY, \ + _______, _______, AU_OFF, AU_ON, _______, _______, NUMLK_E, KC_MRWD, KC_MFFD, _______, \ + _______, _______, _______, _______, _______, _______ \ +), + +/* Navigation + mouse keys + * + * ,----------------------------------. ,----------------------------------. + * | PSCR | | WH U | WH D | | | BSPC | PGDN | PGUP | HOME | END | + * |------+------+------+------+------| |------+------+------+------+------| + * | SHIFT| CTRL | ALT | GUI |NAV LK| | CAPS | LEFT | DOWN | UP | RIGHT| + * |------+------+------+------+------| |------+------+------+------+------| + * | | ACL0 | ACL1 | ACL2 | BTN2 | | BTN1 | MS L | MS D | MS U | MS R | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | | | | | ENTER| | + * `------+------| ESC | | DEL |------+------' + * | | | | + * `------' `------' + */ +[_NAV] = LAYOUT( \ + KC_PSCR, _______, KC_WH_U, KC_WH_D, _______, KC_BSPC, KC_PGDN, KC_PGUP, KC_HOME, KC_END, \ + KC_LSFT, KC_LCTL, KC_LALT, KC_LGUI, NAV_LK, KC_CAPS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \ + _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN2, KC_BTN1, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, \ + _______, _______, KC_ESC, KC_DEL, KC_ENT, _______ \ +), + +/* Number + function keys (ergonomic number order - default pairing with Colemak) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/7| CTL/5| ALT/3| GUI/1| 9 | | 8 | GUI/0| ALT/2| CTL/4| SFT/6| + * |------+------+------+------+------| |------+------+------+------+------| + * | | | F11 | F12 | BSPC | | DEL |NUM LK| | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | TAB | | | | | | + * `------+------| ESC | | |------+------' + * | | | | + * `------' `------' + */ +[_NUM_E] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + SFT_7, CTRL_5, ALT_3, GUI_1, KC_9, KC_8, GUI_0, ALT_2, CTRL_4, SFT_6, \ + _______, _______, KC_F11, KC_F12, KC_BSPC, KC_DEL, NUMLK_E, _______, _______, _______, \ + _______, KC_TAB, KC_ESC, _______, _______, _______ \ +), + +/* Number + function keys (numeric number order - default pairing with QWERTY) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/1| CTL/2| ALT/3| GUI/4| 5 | | 6 | GUI/7| ALT/8| CTL/9| SFT/0| + * |------+------+------+------+------| |------+------+------+------+------| + * | | | F11 | F12 | BSPC | | DEL |NUM LK| | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | | TAB | | | | | | + * `------+------| ESC | | |------+------' + * | | | | + * `------' `------' + */ +[_NUM_N] = LAYOUT( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, \ + SFT_1, CTRL_2, ALT_3, GUI_4, KC_5, KC_6, GUI_7, ALT_8, CTRL_9, SFT_0, \ + _______, _______, KC_F11, KC_F12, KC_BSPC, KC_DEL, NUMLK_N, _______, _______, _______, \ + _______, KC_TAB, KC_ESC, _______, _______, _______ \ +), + + +/* Symbols + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ? | ' | + * |------+------+------+------+------| |------+------+------+------+------| + * | SFT/+| CTL/=| ALT/(| GUI/)| " | | : | GUI/]| ALT/[| CTL/}| SFT/{| + * |------+------+------+------+------| |------+------+------+------+------| + * | < | | | - | > | \ | | ` | _ | / | ~ | ; | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,--------------------. + * | |ENDASH| | | |EMDASH| | + * `------+------| | | |------+------' + * | | | | + * `------' `------' + */ +[_SYM] = LAYOUT( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_QUES, KC_QUOT, \ + TD(SFT_PLS), CTRL_EQ, TD(ALT_OP), TD(GUI_CP), KC_DQT, KC_COLN, GUI_CB, ALT_OB, TD(CTL_CCB), TD(SFT_OCB), \ + KC_LT, KC_PIPE, KC_MINS, KC_GT, KC_BSLS, KC_GRV, KC_UNDS, KC_SLSH, KC_TILD, KC_SCLN, \ + _______, MAC_EN, _______, _______, MAC_EM, _______ \ +) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CMK_DHM: + if (record->event.pressed) { + set_single_persistent_default_layer(_CMK_DHM); + } + return false; + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + default: + return true; + } +}; + +int cur_dance (qk_tap_dance_state_t *state) { + if (state->count == 1) { + if (state->interrupted || !state->pressed) return SINGLE_TAP; + else return SINGLE_HOLD; + } + if (state->count == 2) return DOUBLE_SINGLE_TAP; + else return 8; +} + +static tap altop_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void altop_finished (qk_tap_dance_state_t *state, void *user_data) { + altop_tap_state.state = cur_dance(state); + switch (altop_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_9); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_9); + register_code(KC_9); + } +} + +void altop_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (altop_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_9); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LALT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_9); + unregister_mods(MOD_BIT(KC_LSFT)); + } + altop_tap_state.state = 0; +} + +static tap ctlccb_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void ctlccb_finished (qk_tap_dance_state_t *state, void *user_data) { + ctlccb_tap_state.state = cur_dance(state); + switch (ctlccb_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_RBRC); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LCTL)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_RBRC); + register_code(KC_RBRC); + } +} + +void ctlccb_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (ctlccb_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_RBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LCTL)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_RBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + } + ctlccb_tap_state.state = 0; +} + +static tap guicp_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void guicp_finished (qk_tap_dance_state_t *state, void *user_data) { + guicp_tap_state.state = cur_dance(state); + switch (guicp_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_0); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LGUI)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_0); + register_code(KC_0); + } +} + +void guicp_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (guicp_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_0); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LGUI)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_0); + unregister_mods(MOD_BIT(KC_LSFT)); + } + guicp_tap_state.state = 0; +} + +static tap sftocb_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void sftocb_finished (qk_tap_dance_state_t *state, void *user_data) { + sftocb_tap_state.state = cur_dance(state); + switch (sftocb_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_LBRC); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_LBRC); + register_code(KC_LBRC); + } +} + +void sftocb_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (sftocb_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_LBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_LBRC); + unregister_mods(MOD_BIT(KC_LSFT)); + } + sftocb_tap_state.state = 0; +} + +static tap sftpls_tap_state = { + .is_press_action = true, + .state = 0 +}; + +void sftpls_finished (qk_tap_dance_state_t *state, void *user_data) { + sftpls_tap_state.state = cur_dance(state); + switch (sftpls_tap_state.state) { + case SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + register_code(KC_EQL); + break; + case SINGLE_HOLD: + register_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + register_mods(MOD_BIT(KC_LSFT)); + tap_code(KC_EQL); + register_code(KC_EQL); + } +} + +void sftpls_reset (qk_tap_dance_state_t *state, void *user_data) { + switch (sftpls_tap_state.state) { + case SINGLE_TAP: + unregister_code(KC_EQL); + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case SINGLE_HOLD: + unregister_mods(MOD_BIT(KC_LSFT)); + break; + case DOUBLE_SINGLE_TAP: + unregister_code(KC_EQL); + unregister_mods(MOD_BIT(KC_LSFT)); + } + sftpls_tap_state.state = 0; +} + +qk_tap_dance_action_t tap_dance_actions[] = { + [ALT_OP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, altop_finished, altop_reset), + [CTL_CCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, ctlccb_finished, ctlccb_reset), + [GUI_CP] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, guicp_finished, guicp_reset), + [SFT_OCB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftocb_finished, sftocb_reset), + [SFT_PLS] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, sftpls_finished, sftpls_reset) +}; diff --git a/keyboards/minidox/keymaps/dustypomerleau/rules.mk b/keyboards/minidox/keymaps/dustypomerleau/rules.mk new file mode 100644 index 000000000..5ed4c5446 --- /dev/null +++ b/keyboards/minidox/keymaps/dustypomerleau/rules.mk @@ -0,0 +1,4 @@ +# dustypomerleau, Minidox rules + +MOUSEKEY_ENABLE = yes +TAP_DANCE_ENABLE = yes diff --git a/keyboards/mint60/config.h b/keyboards/mint60/config.h index a762c5ffe..c3d5d5663 100644 --- a/keyboards/mint60/config.h +++ b/keyboards/mint60/config.h @@ -20,7 +20,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include "config_common.h" #include <serial_config.h> - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x0000 @@ -57,7 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -109,11 +107,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -160,8 +153,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_ANIMATIONS - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/mitosis/config.h b/keyboards/mitosis/config.h index 5cfd2e4b1..f2220278e 100644 --- a/keyboards/mitosis/config.h +++ b/keyboards/mitosis/config.h @@ -41,12 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/mitosis/matrix.c b/keyboards/mitosis/matrix.c index 4b87242b9..e149b68bd 100644 --- a/keyboards/mitosis/matrix.c +++ b/keyboards/mitosis/matrix.c @@ -103,7 +103,7 @@ uint8_t matrix_scan(void) if (timeout > 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -125,7 +125,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/miuni32/config.h b/keyboards/miuni32/config.h index 37e9113f9..d7df83cfe 100644 --- a/keyboards/miuni32/config.h +++ b/keyboards/miuni32/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -159,7 +153,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #define RGB_DI_PIN D0 // The pin your RGB strip is wired to #define RGBLED_NUM 17 // Number of LEDs #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/mt40/config.h b/keyboards/mt40/config.h index cf3326d7b..f0b3b9caa 100644 --- a/keyboards/mt40/config.h +++ b/keyboards/mt40/config.h @@ -35,7 +35,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define MATRIX_ROWS 8 #define MATRIX_COLS 15 - #define NO_UART 1 #define RGB_DI_PIN C0 @@ -74,7 +73,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* define if matrix has ghost (lacks anti-ghosting diodes) */ //#define MATRIX_HAS_GHOST - /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ /* #define LOCKING_SUPPORT_ENABLE */ /* Locking resynchronize hack */ @@ -118,9 +116,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/mxss/config.h b/keyboards/mxss/config.h index 8be64e0b3..74188c943 100644 --- a/keyboards/mxss/config.h +++ b/keyboards/mxss/config.h @@ -94,11 +94,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/namecard2x4/config.h b/keyboards/namecard2x4/rev1/config.h index d0c26193c..fbb5cf445 100644 --- a/keyboards/namecard2x4/config.h +++ b/keyboards/namecard2x4/rev1/config.h @@ -59,7 +59,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define BACKLIGHT_BREATHING //#define BACKLIGHT_LEVELS 1 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -111,11 +110,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -220,4 +214,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/namecard2x4/rules.mk b/keyboards/namecard2x4/rev1/rules.mk index 51d2cbcb2..51d2cbcb2 100644 --- a/keyboards/namecard2x4/rules.mk +++ b/keyboards/namecard2x4/rev1/rules.mk diff --git a/keyboards/namecard2x4/rev2/config.h b/keyboards/namecard2x4/rev2/config.h new file mode 100644 index 000000000..569ba8199 --- /dev/null +++ b/keyboards/namecard2x4/rev2/config.h @@ -0,0 +1,216 @@ +/* +Copyright 2018 takashiski + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER takashiski +#define PRODUCT namecard2x4 +#define DESCRIPTION A custom keyboard + +/* key matrix size */ +#define MATRIX_ROWS 2 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { B2,B6 } +#define MATRIX_COL_PINS { D7,E6,B4,B5 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +//#define DIODE_DIRECTION COL2ROW +#define DIODE_DIRECTION ROW2COL +#define RGB_DI_PIN D4 +#define RGBLED_NUM 8 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 10 +#define RGBLIGHT_VAL_STEP 10 + +//#define BACKLIGHT_PIN F4 +//#define BACKLIGHT_BREATHING +//#define BACKLIGHT_LEVELS 1 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +/* + * HD44780 LCD Display Configuration + */ +/* +#define LCD_LINES 2 //< number of visible lines of the display +#define LCD_DISP_LENGTH 16 //< visibles characters per line of the display + +#define LCD_IO_MODE 1 //< 0: memory mapped mode, 1: IO port mode + +#if LCD_IO_MODE +#define LCD_PORT PORTB //< port for the LCD lines +#define LCD_DATA0_PORT LCD_PORT //< port for 4bit data bit 0 +#define LCD_DATA1_PORT LCD_PORT //< port for 4bit data bit 1 +#define LCD_DATA2_PORT LCD_PORT //< port for 4bit data bit 2 +#define LCD_DATA3_PORT LCD_PORT //< port for 4bit data bit 3 +#define LCD_DATA0_PIN 4 //< pin for 4bit data bit 0 +#define LCD_DATA1_PIN 5 //< pin for 4bit data bit 1 +#define LCD_DATA2_PIN 6 //< pin for 4bit data bit 2 +#define LCD_DATA3_PIN 7 //< pin for 4bit data bit 3 +#define LCD_RS_PORT LCD_PORT //< port for RS line +#define LCD_RS_PIN 3 //< pin for RS line +#define LCD_RW_PORT LCD_PORT //< port for RW line +#define LCD_RW_PIN 2 //< pin for RW line +#define LCD_E_PORT LCD_PORT //< port for Enable line +#define LCD_E_PIN 1 //< pin for Enable line +#endif +*/ diff --git a/keyboards/namecard2x4/rev2/rules.mk b/keyboards/namecard2x4/rev2/rules.mk new file mode 100644 index 000000000..51d2cbcb2 --- /dev/null +++ b/keyboards/namecard2x4/rev2/rules.mk @@ -0,0 +1,81 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +# OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # 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) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) + +#UNICODEMAP_ENABLE = yes # for emoji user +#RGBLIGHT_ENABLE = yes # uncomment if you want addressable led strips diff --git a/keyboards/niu_mini/config.h b/keyboards/niu_mini/config.h index b9d3ed4e9..9a4b43c1e 100644 --- a/keyboards/niu_mini/config.h +++ b/keyboards/niu_mini/config.h @@ -59,11 +59,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/noxary/268/config.h b/keyboards/noxary/268/config.h index 7eec79a1b..d6f5234cb 100644 --- a/keyboards/noxary/268/config.h +++ b/keyboards/noxary/268/config.h @@ -55,11 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* ws2812b options */ #define RGB_DI_PIN B5 #ifdef RGB_DI_PIN diff --git a/keyboards/noxary/268_2/config.h b/keyboards/noxary/268_2/config.h index f5308d8ec..2702f924b 100644 --- a/keyboards/noxary/268_2/config.h +++ b/keyboards/noxary/268_2/config.h @@ -106,11 +106,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/noxary/x268/config.h b/keyboards/noxary/x268/config.h index 5c4f6cdad..ac52d9fc3 100644 --- a/keyboards/noxary/x268/config.h +++ b/keyboards/noxary/x268/config.h @@ -115,11 +115,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/nyquist/keymaps/333fred/README.md b/keyboards/nyquist/keymaps/333fred/README.md deleted file mode 100644 index fa354bb4d..000000000 --- a/keyboards/nyquist/keymaps/333fred/README.md +++ /dev/null @@ -1,75 +0,0 @@ -# 333fred's Nyquist Layout - -This nyquist layout is based on my Ergodox Infinity Layout, which is [here](../../../../layouts/community/ergodox/333fred/README.md). It doesn't have all of my VS extensions, as I have my nyquist at home, not at work. - -## Layers - -### QWERTY -The shift modifiers on this layer all use OSM to allow for quick single capitalization. LwrVIM acts a combo one-shot toggle and momentary layer toggle. Tap once to make the next key be sent on the Lower. Hold to move to the Lower layer until release. Tap and hold (so press, release, press and hold) to move to the VIM layer until release. Game is a regular toggle layer. - -``` -Qwerty -,-----------------------------------------------------------------------------------. -| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Tab | Q | W | E | R | T | Y | U | I | O | P | \ | -|------+------+------+------+------+-------------+------+------+------+------+------| -| Esc | A | S | D | F | G | H | J | K | L | ; | " | -|------+------+------+------+------+------|------+------+------+------+------+------| -| Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| -|------+------+------+------+------+------+------+------+------+------+------+------| -| Ctrl | Alt | F4 | GUI |LwrVIM| Bksp | Spc | Ent | Lock | = | RAlt | Del | -`-----------------------------------------------------------------------------------' -``` - -### Lower -My symbol and numpad layer. APscr is a macro that sends ALT+PRSC, to take a screenshot of the current application. - -``` -Lower -,-----------------------------------------------------------------------------------. -| Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | -|------+------+------+------+------+-------------+------+------+------+------+------| -| | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | -|------+------+------+------+------+-------------+------+------+------+------+------| -| | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | -|------+------+------+------+------+------|------+------+------+------+------+------| -| APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Pscr | | | | | GAME | 0 | . | = | Prev | Next | Play | -`-----------------------------------------------------------------------------------' -``` - -### VIM Movement -Pressing and holding F moves to this layer, which turns hjkl into vim movement keys. a and d are macros which send WIN+Left and WIN+Right, respectively. Shift and CTRL have been remapped for ease of selecting text. -``` -Vim Movement (Hold down F) -,-----------------------------------------------------------------------------------. -| | | | | | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | DLeft|DRight| LCTRL| | | Left | Down | Up | Right| | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | LShft| | | | | | | | -`-----------------------------------------------------------------------------------' - ``` - -### Gaming -This layer is designed for playing games. All one-shot modification has been turned off, and the common game controls keys have been moved around for easier access. -``` -Gaming mode (Raise) -,-----------------------------------------------------------------------------------. -| ESC | | | | | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| CTRL | | | | F | | | | | | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Shift| Z | | | | | | | | | | GUI | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Enter| | Lock | Bksp | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| -`-----------------------------------------------------------------------------------' -``` diff --git a/keyboards/nyquist/keymaps/333fred/config.h b/keyboards/nyquist/keymaps/333fred/config.h deleted file mode 100644 index 575ec9ac5..000000000 --- a/keyboards/nyquist/keymaps/333fred/config.h +++ /dev/null @@ -1,10 +0,0 @@ -#pragma once - -#include "../../config.h" -#include "333fred_config.h" - -#define USE_SERIAL -#define MASTER_LEFT - -#undef TAPPING_TERM -#define TAPPING_TERM 150 diff --git a/keyboards/nyquist/keymaps/333fred/keymap.c b/keyboards/nyquist/keymaps/333fred/keymap.c deleted file mode 100644 index c25bf1c5f..000000000 --- a/keyboards/nyquist/keymaps/333fred/keymap.c +++ /dev/null @@ -1,134 +0,0 @@ -#include QMK_KEYBOARD_H -#include "333fred.h" - -extern keymap_config_t keymap_config; - -enum custom_macros { - DLEFT, - DRIGHT, - PSCREEN_APP -}; - -// Tap dance for layer transitions -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . |/ Ctrl| Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | F4 | GUI |Lwr/VM| Bksp | Spc | Ent | Lock | = | Alt | Del | - * `-----------------------------------------------------------------------------------' - */ -[BASE] = LAYOUT( \ - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, \ - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - OSM(MOD_LSFT), LCTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RCTL_T(KC_SLSH), OSM(MOD_RSFT), \ - KC_LCTL, KC_LALT, KC_F4, KC_LGUI, TD(TD_SYM_VIM), KC_BSPC, KC_SPC, KC_ENT, KC_LOCK, KC_EQL, KC_RALT, KC_DEL \ -), - -/* Symbols - * ,-----------------------------------------------------------------------------------. - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | ! | @ | ( | ) | | | 7 | 8 | 9 | * | ) | F12 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | # | $ | { | } | ` | 4 | 5 | 6 | + | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | APscr| % | ^ | [ | ] | ~ | 1 | 2 | 3 | \ | Vol- | Vol+ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Pscr | | | | | GAME | 0 | . | = | Prev | Next | Play | - * `-----------------------------------------------------------------------------------' - */ -[SYMB] = LAYOUT( \ - KC_CAPS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, \ - _______, KC_EXLM, KC_AT, KC_LPRN, KC_RPRN, KC_PIPE, KC_7, KC_8, KC_9, KC_ASTR, KC_RPRN, KC_F12, \ - _______, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_GRV, KC_4, KC_5, KC_6, KC_PLUS, KC_RCBR, KC_PIPE, \ - M(PSCREEN_APP), KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_1, KC_2, KC_3, KC_BSLS, KC_VOLD, KC_VOLU, \ - KC_PSCR, _______, _______, _______, _______, TG(GAME), KC_0, KC_DOT, KC_EQL, KC_MPRV, KC_MNXT, KC_MPLY \ -), - -/* Vim Movement (Hold down F) - * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | LSHFT| | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | DLeft|DRight| LCTRL| LGUI | | Left | Down | Up | Right| | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[VIM] = LAYOUT( \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, M(DLEFT), M(DRIGHT), KC_LCTL, KC_LGUI, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* Gaming mode (Raise) - * All one-shot mods are disabled on this layer - * ,-----------------------------------------------------------------------------------. - * | ESC | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | CTRL | | | | F | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | | | | | | | | | | GUI | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Enter| | Lock | Bksp | Alt | Spc | Lower| Left | Up | Down | Right|QWERTY| - * `-----------------------------------------------------------------------------------' - */ -[GAME] = LAYOUT( \ - KC_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - KC_LCTL, _______, _______, _______, KC_F, _______, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, KC_Z, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LGUI, \ - KC_ENT, _______, KC_LOCK, KC_BSPC, KC_LALT, KC_SPC, OSL(SYMB), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, TO(BASE) \ -) -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case DLEFT: - if (record->event.pressed) { // Windows move desktop left - return MACRO(D(LCTL), D(LGUI), T(LEFT), U(LGUI), U(LCTL), END); - } - break; - case DRIGHT: - if (record->event.pressed) { // Windows move desktop right - return MACRO(D(LCTL), D(LGUI), T(RIGHT), U(LGUI), U(LCTL), END); - } - break; - case PSCREEN_APP: - if (record->event.pressed) { - return MACRO(D(LALT), T(PSCR), U(LALT), END); - } - break; - } - return MACRO_NONE; -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - tap_dance_process_record(keycode); - return true; -} diff --git a/keyboards/nyquist/keymaps/333fred/rules.mk b/keyboards/nyquist/keymaps/333fred/rules.mk deleted file mode 100644 index 0cfb23466..000000000 --- a/keyboards/nyquist/keymaps/333fred/rules.mk +++ /dev/null @@ -1,4 +0,0 @@ -KEY_LOCK_ENABLE = yes -NKRO_ENABLE = yes -CONSOLE_ENABLE = no -TAP_DANCE_ENABLE = yes diff --git a/keyboards/ok60/config.h b/keyboards/ok60/config.h index db7b74e58..eb75b71c9 100644 --- a/keyboards/ok60/config.h +++ b/keyboards/ok60/config.h @@ -66,11 +66,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define RGB_DI_PIN F6 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 10 diff --git a/keyboards/omnikey_blackheart/config.h b/keyboards/omnikey_blackheart/config.h index 94412cfa6..edfd113de 100644 --- a/keyboards/omnikey_blackheart/config.h +++ b/keyboards/omnikey_blackheart/config.h @@ -37,11 +37,6 @@ /* 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)) \ -) - /* force n-key rollover*/ #define FORCE_NKRO diff --git a/keyboards/org60/config.h b/keyboards/org60/config.h index 62b3b69a0..5f3f4f5de 100644 --- a/keyboards/org60/config.h +++ b/keyboards/org60/config.h @@ -72,11 +72,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define TAPPING_TERM 200 #endif diff --git a/keyboards/org60/keymaps/default/keymap.c b/keyboards/org60/keymaps/default/keymap.c index ebb377d1d..a15800497 100644 --- a/keyboards/org60/keymaps/default/keymap.c +++ b/keyboards/org60/keymaps/default/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, \ 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_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_NO, KC_RSFT ,KC_UP, KC_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO ,KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -43,4 +38,4 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // Loop void matrix_scan_user(void) { // Empty -};
\ No newline at end of file +}; diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 09df12d9e..a2eaf63c3 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -32,16 +32,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define MASTER_RIGHT #define EE_HANDS - -/* key combination for command */ -#ifdef IS_COMMAND +/* key combination for magic key command */ #undef IS_COMMAND -#endif #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LALT)) \ ) - #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN D3 #define RGBLED_NUM 16 // Number of LEDs @@ -77,7 +73,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define QMK_LED B0 #define QMK_SPEAKER C6 - #define SHFT_LED1 5 #define SHFT_LED2 10 @@ -86,4 +81,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define GUI_LED1 8 #define ALT_LED1 7 - diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index 9373d851d..0f23bd9aa 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -47,53 +47,79 @@ uint8_t last_osm; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QWERTY] = LAYOUT_orthodox_base_wrapper( - _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, - _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, - _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ -), - -[_COLEMAK] = LAYOUT_orthodox_base_wrapper( - _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, - _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, - _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ -), - -[_DVORAK] = LAYOUT_orthodox_base_wrapper( - _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, - _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, - _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ -), - -[_WORKMAN] = LAYOUT_orthodox_base_wrapper( - _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, - _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, - _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ -), - -[_MODS] = LAYOUT_wrapper(\ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), - -[_LOWER] = LAYOUT_wrapper(\ - KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, - KC_F11, _________________LOWER_L2__________________, _______, _______, _______, _______, _________________LOWER_R2__________________, KC_PIPE, - KC_F12, _________________LOWER_L3__________________, _______, _______, _______, _______, _______, _______, _________________LOWER_R3__________________, _______ -), - -[_RAISE] = LAYOUT_wrapper(\ - KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, - _______, _________________RAISE_L2__________________, _______, _______, _______, _______, _________________RAISE_R2__________________, KC_BSLS, - _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________, _______ -), - -[_ADJUST] = LAYOUT_wrapper(\ - KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, - VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST, - TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY -) + [_QWERTY] = LAYOUT_orthodox_base_wrapper( + _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, + _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, + _________________QWERTY_L3_________________, _________________QWERTY_R3_________________ + ), + + [_COLEMAK] = LAYOUT_orthodox_base_wrapper( + _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, + _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, + _________________COLEMAK_L3________________, _________________COLEMAK_R3________________ + ), + + [_DVORAK] = LAYOUT_orthodox_base_wrapper( + _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, + _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, + _________________DVORAK_L3_________________, _________________DVORAK_R3_________________ + ), + + [_WORKMAN] = LAYOUT_orthodox_base_wrapper( + _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, + _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, + _________________WORKMAN_L3________________, _________________WORKMAN_R3________________ + ), + + [_NORMAN] = LAYOUT_orthodox_base_wrapper( + _________________NORMAN_L1_________________, _________________NORMAN_L1_________________, + _________________NORMAN_L2_________________, _________________NORMAN_R2_________________, + _________________NORMAN_L3_________________, _________________NORMAN_R3_________________ + ), + + [_MALTRON] = LAYOUT_orthodox_base_wrapper( + _________________MALTRON_L1________________, _________________MALTRON_R1________________, + _________________MALTRON_L2________________, _________________MALTRON_R2________________, + _________________MALTRON_L3________________, _________________MALTRON_R3________________ + ), + + [_EUCALYN] = LAYOUT_orthodox_base_wrapper( + _________________EUCALYN_L1________________, _________________EUCALYN_R1________________, + _________________EUCALYN_L2________________, _________________EUCALYN_R2________________, + _________________EUCALYN_L3________________, _________________EUCALYN_R3________________ + ), + + [_CARPLAX] = LAYOUT_orthodox_base_wrapper( + _____________CARPLAX_QFMLWY_L1_____________, _____________CARPLAX_QFMLWY_R1_____________, + _____________CARPLAX_QFMLWY_L2_____________, _____________CARPLAX_QFMLWY_R2_____________, + _____________CARPLAX_QFMLWY_L3_____________, _____________CARPLAX_QFMLWY_R3_____________ + ), + + + [_MODS] = LAYOUT_wrapper(\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + [_LOWER] = LAYOUT_wrapper(\ + KC_TILD, _________________LOWER_L1__________________, _________________LOWER_R1__________________, KC_BSPC, + KC_F11, _________________LOWER_L2__________________, _______, _______, _______, _______, _________________LOWER_R2__________________, KC_PIPE, + KC_F12, _________________LOWER_L3__________________, _______, _______, _______, _______, _______, _______, _________________LOWER_R3__________________, _______ + ), + + [_RAISE] = LAYOUT_wrapper(\ + KC_GRV, _________________RAISE_L1__________________, _________________RAISE_R1__________________, KC_BSPC, + _______, _________________RAISE_L2__________________, _______, _______, _______, _______, _________________RAISE_R2__________________, KC_BSLS, + _______, _________________RAISE_L3__________________, _______, _______, _______, _______, _______, _______, _________________RAISE_R3__________________, _______ + ), + + [_ADJUST] = LAYOUT_wrapper(\ + KC_MAKE, _________________ADJUST_L1_________________, _________________ADJUST_R1_________________, KC_RESET, + VRSN, _________________ADJUST_L2_________________, _______, _______, _______, KC_NUKE, _________________ADJUST_R2_________________, EEP_RST, + TG_MODS, _________________ADJUST_L3_________________, _______, _______, _______, _______, _______, _______, _________________ADJUST_R3_________________, KC_MPLY + ) + }; void matrix_init_keymap(void) { diff --git a/keyboards/orthodox/keymaps/drashna/rules.mk b/keyboards/orthodox/keymaps/drashna/rules.mk index f870c3a7d..a826c664a 100644 --- a/keyboards/orthodox/keymaps/drashna/rules.mk +++ b/keyboards/orthodox/keymaps/drashna/rules.mk @@ -10,6 +10,6 @@ NKRO_ENABLE = yes INDICATOR_LIGHTS = yes MACROS_ENABLED = no -RGBLIGHT_TWINKLE = yes +RGBLIGHT_TWINKLE = no BOOTLOADER = qmk-dfu diff --git a/keyboards/orthodox/rev1/config.h b/keyboards/orthodox/rev1/config.h index 03936e737..f7497c09c 100644 --- a/keyboards/orthodox/rev1/config.h +++ b/keyboards/orthodox/rev1/config.h @@ -65,7 +65,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/orthodox/rev3/config.h b/keyboards/orthodox/rev3/config.h index 2e4018e91..d727ae674 100644 --- a/keyboards/orthodox/rev3/config.h +++ b/keyboards/orthodox/rev3/config.h @@ -70,7 +70,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/orthodox/rev3_teensy/config.h b/keyboards/orthodox/rev3_teensy/config.h index e2e693079..591827fb9 100644 --- a/keyboards/orthodox/rev3_teensy/config.h +++ b/keyboards/orthodox/rev3_teensy/config.h @@ -62,7 +62,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* key combination for command */ #define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ + get_mods() == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_LGUI)) \ ) /* ws2812 RGB LED */ diff --git a/keyboards/paladin64/config.h b/keyboards/paladin64/config.h index a5280f4d4..0696fefd0 100755 --- a/keyboards/paladin64/config.h +++ b/keyboards/paladin64/config.h @@ -105,11 +105,6 @@ /* 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)) \ -) - #define RGB_DI_PIN D0 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/panc60/config.h b/keyboards/panc60/config.h index 703141beb..00bdbc60f 100644 --- a/keyboards/panc60/config.h +++ b/keyboards/panc60/config.h @@ -41,6 +41,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_ANIMATIONS #define NO_UART 1 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) diff --git a/keyboards/pearl/config.h b/keyboards/pearl/config.h index c0594bf91..6edf170d9 100644 --- a/keyboards/pearl/config.h +++ b/keyboards/pearl/config.h @@ -42,9 +42,5 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DIODE_DIRECTION COL2ROW #define DEBOUNCING_DELAY 5 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION - diff --git a/keyboards/phantom/config.h b/keyboards/phantom/config.h index 5b7fa62ff..3fa462445 100644 --- a/keyboards/phantom/config.h +++ b/keyboards/phantom/config.h @@ -101,11 +101,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/pinky/3/config.h b/keyboards/pinky/3/config.h index 1b120b9cb..6de5a35d0 100644 --- a/keyboards/pinky/3/config.h +++ b/keyboards/pinky/3/config.h @@ -131,11 +131,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/pinky/4/config.h b/keyboards/pinky/4/config.h index 2348d4084..53c6f91b1 100644 --- a/keyboards/pinky/4/config.h +++ b/keyboards/pinky/4/config.h @@ -131,11 +131,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/plain60/config.h b/keyboards/plain60/config.h index 9e838616b..5dd784887 100644 --- a/keyboards/plain60/config.h +++ b/keyboards/plain60/config.h @@ -17,7 +17,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #pragma once -#include QMK_KEYBOARD_CONFIG_H +#include "config_common.h" /* USB Device descriptor parameter */ #define VENDOR_ID 0x4705 @@ -45,11 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define QMK_ESC_OUTPUT D2 // usually COL #define QMK_ESC_INPUT B4 // usually ROW @@ -72,4 +67,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 // 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR -#define DYNAMIC_KEYMAP_MACRO_COUNT 16
\ No newline at end of file +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/plain60/keymaps/RGB/config.h b/keyboards/plain60/keymaps/RGB/config.h new file mode 100644 index 000000000..5fadcf821 --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/config.h @@ -0,0 +1,26 @@ +/* +Copyright 2019 Sebastian Spindler <sebastian.spindler@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +/* RGB Underglow */ +#define RGB_DI_PIN B7 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 30 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/plain60/keymaps/RGB/keymap.c b/keyboards/plain60/keymaps/RGB/keymap.c new file mode 100644 index 000000000..25370823d --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/keymap.c @@ -0,0 +1,57 @@ +/* +Copyright 2019 Sebastian Spindler <sebastian.spindler@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +#include "keymap_extras/keymap_german.h" + +//Layer renaming +#define _DL 0 //default +#define _FUN 1 //function layer +#define _LED 2 //LED configurations + +//Keymapping renaming +#define ______ KC_TRNS //renaming KC_TRNS for readability in keymaps +#define RGB_MI RGB_MODE_FORWARD //increase RGB mode +#define RGB_MD RGB_MODE_REVERSE //decrease RGB mode +#define RGB_ST RGB_M_P //rgb static +#define MONKEY LCTL(LALT(KC_DEL)) //ctrl+alt+del == monkey grip +#define SPECIAL LT(_FUN, DE_CIRC) // + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_DL] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DE_SS, DE_ACUT, ______, KC_BSPC, \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, DE_Z, KC_U, KC_I, KC_O, KC_P, DE_UE, DE_PLUS, ______, \ + SPECIAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, DE_OE, DE_AE, DE_HASH, KC_ENT, \ + KC_LSFT, DE_LESS, DE_Y, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DE_MINS, KC_RSFT, MONKEY, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC , ______, KC_ALGR, TG(_LED), KC_RCTL ), + + [_FUN] = LAYOUT( + ______, 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_DEL, \ + ______, KC_PGUP, KC_UP, KC_PGDN, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, KC_LEFT, KC_DOWN, KC_RIGHT, KC_HOME, ______, ______, KC_END, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, ______, \ + ______, ______, ______, ______ , ______, KC_LEFT, KC_DOWN, KC_RIGHT ), + + [_LED] = LAYOUT( + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ + ______, RGB_TOG, RGB_MI, RGB_MD, RGB_ST, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, RGB_VAI, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______ , ______, ______, TG(_LED), ______ ), +}; diff --git a/keyboards/plain60/keymaps/RGB/rules.mk b/keyboards/plain60/keymaps/RGB/rules.mk new file mode 100644 index 000000000..793bd869a --- /dev/null +++ b/keyboards/plain60/keymaps/RGB/rules.mk @@ -0,0 +1,23 @@ +#Copyright 2019 Sebastian Spindler <sebastian.spindler@gmail.com> + +#This program is free software: you can redistribute it and/or modify +#it under the terms of the GNU General Public License as published by +#the Free Software Foundation, either version 2 of the License, or +#(at your option) any later version. + +#This program is distributed in the hope that it will be useful, +#but WITHOUT ANY WARRANTY; without even the implied warranty of +#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +#GNU General Public License for more details. + +#You should have received a copy of the GNU General Public License +#along with this program. If not, see <http://www.gnu.org/licenses/>. + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +RAW_ENABLE = no +DYNAMIC_KEYMAP_ENABLE = no diff --git a/keyboards/planck/config.h b/keyboards/planck/config.h index 452a99d74..837311c76 100644 --- a/keyboards/planck/config.h +++ b/keyboards/planck/config.h @@ -63,11 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/planck/keymaps/buhearns/config.h b/keyboards/planck/keymaps/buhearns/config.h new file mode 100644 index 000000000..b8f3c1843 --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/config.h @@ -0,0 +1,15 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(MARIO_MUSHROOM) + #define UNICODE_SONG_OSX SONG(COIN_SOUND) + #define UNICODE_SONG_LNX SONG(UNICODE_LINUX) + #define UNICODE_SONG_WIN SONG(UNICODE_WINDOWS) + #define UNICODE_SONG_WINC SONG(UNICODE_WINDOWS) +#endif + +#define ENCODER_RESOLUTION 4 +#define MOUSEKEY_DELAY 300 +#define MOUSEKEY_INTERVAL 50 +#define MOUSEKEY_MAX_SPEED 8 +#define MOUSEKEY_TIME_TO_MAX 20 diff --git a/keyboards/planck/keymaps/buhearns/keymap.c b/keyboards/planck/keymaps/buhearns/keymap.c new file mode 100644 index 000000000..4821ece57 --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/keymap.c @@ -0,0 +1,99 @@ +#include QMK_KEYBOARD_H +#include "muse.h" + +extern keymap_config_t keymap_config; + +enum custom_keycodes { + B_UPD = SAFE_RANGE, + B_SSH, + B_SSHK, + B_USR, + B_X11, + B_X12, + B_X13 +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[0] = LAYOUT_planck_grid( + KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT(5,KC_TAB),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(4,KC_BSLS), + 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_LCTL, KC_LGUI, KC_LALT, MO(3), MO(2), KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +[1] = LAYOUT_planck_grid( + KC_TRNS, B_UPD, B_USR, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_7, KC_8, KC_9, KC_DEL, + KC_TRNS, B_SSH, B_SSHK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_4, KC_5, KC_6, KC_TRNS, + KC_TRNS, B_X11, B_X12, B_X13, KC_NO, KC_NO, KC_NO, KC_NO, KC_1, KC_2, KC_3, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_PDOT, KC_PPLS, KC_PMNS +), + +[2] = LAYOUT_planck_grid( + 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_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_SLSH, KC_QUOT, KC_MINS, KC_LCBR, KC_RCBR, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DQUO, KC_EQL, KC_LBRC, KC_RBRC, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_LT, KC_GT, KC_NO +), + +[3] = LAYOUT_planck_grid( + KC_TRNS, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_PGUP, KC_MS_U, KC_PGDN, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_HOME, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, KC_BTN3, KC_END +), + +[4] = LAYOUT_planck_grid( + KC_TRNS, RESET, DEBUG, KC_NO, KC_NO, KC_NO, KC_NO, MU_MOD, MUV_IN, MU_ON, AU_ON, KC_EJCT, + KC_TRNS, EEP_RST, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, MUV_DE, MU_OFF, AU_OFF, KC_TRNS, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_MPRV, KC_MNXT, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MSTP, KC_VOLD, KC_VOLU, KC_MPLY +), + +[5] = LAYOUT_planck_grid( + UC(0xB0), UC(0xB9), UC(0xB2), UC(0xB3), UC(0xDF), UC(0x20AC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, UC(0xC4), UC(0xD6), UC(0xDC), UC(0xBB), UC(0xAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, UC(0xE4), UC(0xF6), UC(0xFC), UC(0x2022), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, UC_M_OS, UC_M_LN, UC_M_WI, UC_M_WC +)}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case B_UPD: + if (record->event.pressed) { + SEND_STRING("sudo apt update && sudo apt full-upgrade -yyy" SS_TAP(X_ENTER)); + } + break; + case B_SSH: + if (record->event.pressed) { + SEND_STRING("cd /etc/ssh" SS_TAP(X_ENTER) "sudo shasum ssh_host_*" SS_TAP(X_ENTER) "sudo rm ssh_host_*" SS_TAP(X_ENTER) "sudo dpkg-reconfigure openssh-server" SS_TAP(X_ENTER)); + } + break; + case B_SSHK: + if (record->event.pressed) { + SEND_STRING("ssh-keygen -t ed25519" SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_ENTER) SS_TAP(X_ENTER)); + } + break; + case B_USR: + if (record->event.pressed) { + SEND_STRING("useradd -m user" SS_TAP(X_ENTER) "usermod -a -G sudo user" SS_TAP(X_ENTER) "chsh -s /bin/bash user" SS_TAP(X_ENTER) "passwd user" SS_TAP(X_ENTER)); + } + break; + case B_X11: + if (record->event.pressed) { + SEND_STRING("sudo x11vnc -storepasswd /etc/x11vnc.pass" SS_TAP(X_ENTER)); + } + break; + case B_X12: + if (record->event.pressed) { + SEND_STRING("sudo nano /lib/systemd/system/x11vnc.service" SS_TAP(X_ENTER) "[Unit]" SS_TAP(X_ENTER) "Description=Start X11VNC" SS_TAP(X_ENTER) "After=multi-user.target" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "[Service]" SS_TAP(X_ENTER) "Type=simple" SS_TAP(X_ENTER) "ExecStart=/usr/bin/x11vnc -display :0 -auth guess -forever -loop -noxdamage -repeat -rfbauth /etc/x11vnc.pass -rfbport 5900 -shared -localhost -o /var/log/x11vnc.log" SS_TAP(X_ENTER) SS_TAP(X_ENTER) "[Install]" SS_TAP(X_ENTER) "WantedBy=multi-user.target"); + } + break; + case B_X13: + if (record->event.pressed) { + SEND_STRING("sudo systemctl enable x11vnc.service" SS_TAP(X_ENTER)); + } + break; + } + return true; +}; diff --git a/keyboards/planck/keymaps/buhearns/readme.md b/keyboards/planck/keymaps/buhearns/readme.md new file mode 100644 index 000000000..4dcf4f05d --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/readme.md @@ -0,0 +1,20 @@ +Buhearns Keymap (February 12th, 2019) +===================================== + +Simple QWERTY keymap with german Unicode umlauts, special characters and several Linux commands. Intended to be working with ENGLISH layout. + + +## Buhearns base layer +``` + ,-----------------------------------------------------------------------------------. + | GESC | Q | W | E | R | T | Y | U | I | O | P | BKSP | + |------+------+------+------+------+-------------+------+------+------+------+------| + |M5/TAB| A | S | D | F | G | H | J | K | L | ; |M4/BSL| hold: M5, tap: TAB // hold: M4, tap: Backslash + |------+------+------+------+------+------|------+------+------+------+------+------| + |LSHIFT| Z | X | C | V | B | N | M | , | . | / |ST/ENT| hold: RSHIFT, tap: Enter + |------+------+------+------+------+------+------+------+------+------+------+------| + | CTRL | LGUI | LALT | M3 | M2 | SPACE | M1 | LEFT | DOWN | UP | RIGHT| + `-----------------------------------------------------------------------------------' +``` + +## Other layers are a WIP and being tested (DON'T WAIT FOR UPDATES!) diff --git a/keyboards/planck/keymaps/buhearns/rules.mk b/keyboards/planck/keymaps/buhearns/rules.mk new file mode 100644 index 000000000..5c11b51a2 --- /dev/null +++ b/keyboards/planck/keymaps/buhearns/rules.mk @@ -0,0 +1,13 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = yes # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/planck/keymaps/dodger/config.h b/keyboards/planck/keymaps/dodger/config.h index c70acfdc9..4b7931e77 100644 --- a/keyboards/planck/keymaps/dodger/config.h +++ b/keyboards/planck/keymaps/dodger/config.h @@ -63,11 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/planck/keymaps/emiller/config.h b/keyboards/planck/keymaps/emiller/config.h new file mode 100644 index 000000000..5fdfe80b3 --- /dev/null +++ b/keyboards/planck/keymaps/emiller/config.h @@ -0,0 +1,39 @@ +#pragma once + + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 + diff --git a/keyboards/planck/keymaps/emiller/keymap.c b/keyboards/planck/keymaps/emiller/keymap.c new file mode 100644 index 000000000..7dcd99d3b --- /dev/null +++ b/keyboards/planck/keymaps/emiller/keymap.c @@ -0,0 +1,307 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + _VIM, + _NUM +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV, + VIM, + NUM +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | VIM | Lower| Space |Raise | NUM | Vol- | Vol+ | Del | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid ( + 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_ESC, 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, KC_LGUI, KC_LALT, MO(_VIM), LOWER, KC_SPC, KC_SPC, RAISE, TT(NUM), KC_VOLD, KC_VOLU, KC_RSFT +), + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_planck_grid( + 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 , + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Prev | | | | Next | BL- | BL+ |Print | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + 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, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______, + _______, _______, _______, KC_MPRV, _______, _______, _______, _______, KC_MNXT, BL_DEC, BL_INC, KC_PSCREEN +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + 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, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______, + _______, _______, _______, KC_MPRV, _______, _______, _______, _______, KC_MNXT, BL_DEC, BL_INC, KC_MPLY +), + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = LAYOUT_planck_grid( + KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , + XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL , + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* VIM + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | Copy | Undo | | Paste| | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | Cut | | | | Left | Down | Up | Right | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | Del | |Select| | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_VIM] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, KC_COPY, KC_UNDO, _______, KC_PASTE, _______, + _______, _______, _______, KC_CUT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, + _______, _______, KC_DEL, _______, KC_SELECT, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), +/* NUM + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | 7 | 8 | 9 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | 1 | 2 | 3 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | 0 | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUM] = LAYOUT_planck_grid( + _______, _______, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______ +), +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_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 BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_SONG(plover_song); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_SONG(plover_gb_song); + #endif + layer_off(_PLOVER); + } + return false; + break; + case NUM: + if (record->event.pressed) { + layer_on(_NUM); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_NUM); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/emiller/readme.md b/keyboards/planck/keymaps/emiller/readme.md new file mode 100644 index 000000000..de9680b49 --- /dev/null +++ b/keyboards/planck/keymaps/emiller/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/emiller/rules.mk b/keyboards/planck/keymaps/emiller/rules.mk new file mode 100644 index 000000000..509cf9fd5 --- /dev/null +++ b/keyboards/planck/keymaps/emiller/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/planck/keymaps/fsck/config.h b/keyboards/planck/keymaps/fsck/config.h new file mode 100644 index 000000000..bf25da3a6 --- /dev/null +++ b/keyboards/planck/keymaps/fsck/config.h @@ -0,0 +1,28 @@ +#pragma once + +#define USB_MAX_POWER_CONSUMPTION 100 + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC diff --git a/keyboards/planck/keymaps/fsck/keymap.c b/keyboards/planck/keymaps/fsck/keymap.c new file mode 100644 index 000000000..cac5d554e --- /dev/null +++ b/keyboards/planck/keymaps/fsck/keymap.c @@ -0,0 +1,154 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_planck_grid( + 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_ESC, 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, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_planck_grid( + 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_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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_planck_grid( + 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_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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_planck_grid( + _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +) + +}; + +#ifdef AUDIO_ENABLE + float plover_song[][2] = SONG(PLOVER_SOUND); + float plover_gb_song[][2] = SONG(PLOVER_GOODBYE_SOUND); +#endif + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + print("mode just switched to qwerty and this is a huge string\n"); + set_single_persistent_default_layer(_QWERTY); + } + return false; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + } + return true; +} diff --git a/keyboards/planck/keymaps/fsck/readme.md b/keyboards/planck/keymaps/fsck/readme.md new file mode 100644 index 000000000..755da3e21 --- /dev/null +++ b/keyboards/planck/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![preonic:fsck Layout Image](https://i.imgur.com/GOLyPGP.png) + +# fsck's Planck Layout + +This is largely based on the default planck layout.
\ No newline at end of file diff --git a/keyboards/planck/keymaps/fsck/rules.mk b/keyboards/planck/keymaps/fsck/rules.mk new file mode 100644 index 000000000..bd0181d62 --- /dev/null +++ b/keyboards/planck/keymaps/fsck/rules.mk @@ -0,0 +1,3 @@ +#pragma once +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
\ No newline at end of file diff --git a/keyboards/planck/keymaps/muzfuz/keymap.c b/keyboards/planck/keymaps/muzfuz/keymap.c index 16994a576..84452a3f1 100644 --- a/keyboards/planck/keymaps/muzfuz/keymap.c +++ b/keyboards/planck/keymaps/muzfuz/keymap.c @@ -36,8 +36,8 @@ enum planck_keycodes CLNEQLS }; -#define LOWER MO(_LOWER) -#define RAISE MO(_RAISE) +#define RSE_ENT LT(_RAISE, KC_ENT) +#define LWR_SPC LT(_LOWER, KC_SPC) #define ESC_CTL CTL_T(KC_ESCAPE) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -50,14 +50,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Enter|Space |Raise | Left | Down | Up |Right | + * | Brite| Ctrl | Alt | GUI | Enter | Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ [_QWERTY] = LAYOUT_planck_grid( KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, ESC_CTL, 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_RSFT, - BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_ENT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_NO, RSE_ENT, KC_NO, LWR_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), /* Lower * ,-----------------------------------------------------------------------------------. @@ -67,12 +67,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | => | | [ | ] | | | _ | + | | | Home | End | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_LOWER] = LAYOUT_planck_grid( - 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, ESC_CTL, CLNEQLS, _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_RGUI, _______, HASHRKT, _______, KC_LBRC, KC_RBRC, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), @@ -85,14 +85,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | | | | | | | 1 | 2 | 3 | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | + * | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ [_RAISE] = LAYOUT_planck_grid( - KC_GRV, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - ESC_CTL, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, _______, KC_RGUI, - _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + KC_GRV, _______, _______, KC_UP, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + ESC_CTL, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_4, KC_5, KC_6, _______, KC_RGUI, + _______, _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), /* Adjust (Lower + Raise) * ,-----------------------------------------------------------------------------------. @@ -102,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | + * | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ [_ADJUST] = LAYOUT_planck_grid( diff --git a/keyboards/planck/keymaps/muzfuz/readme.md b/keyboards/planck/keymaps/muzfuz/readme.md index 78153fb32..6f78284d7 100644 --- a/keyboards/planck/keymaps/muzfuz/readme.md +++ b/keyboards/planck/keymaps/muzfuz/readme.md @@ -1,8 +1,5 @@ # The muzfuz Planck Layout ```shell -docker run -e KEYMAP=muzfuz -e KEYBOARD=planck --rm -v $('pwd'):/qmk:rw qmk_firmware -dfu-programmer atmega32u4 erase -dfu-programmer atmega32u4 flash .build/planck_rev6_muzfuz.hex -dfu-programmer atmega32u4 launch +make planck/rev6:muzfuz:dfu-util ``` diff --git a/keyboards/planck/keymaps/zach/config.h b/keyboards/planck/keymaps/zach/config.h index dc79bad06..35b28da23 100644 --- a/keyboards/planck/keymaps/zach/config.h +++ b/keyboards/planck/keymaps/zach/config.h @@ -33,11 +33,6 @@ //#define LOCKING_RESYNC_ENABLE #undef LOCKING_RESYNC_ENABLE -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/planck/rev6/config.h b/keyboards/planck/rev6/config.h index c0fbb412e..4713d9d23 100644 --- a/keyboards/planck/rev6/config.h +++ b/keyboards/planck/rev6/config.h @@ -80,11 +80,6 @@ */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/playkbtw/ca66/config.h b/keyboards/playkbtw/ca66/config.h index 53bbe95e3..958fdd0d4 100644 --- a/keyboards/playkbtw/ca66/config.h +++ b/keyboards/playkbtw/ca66/config.h @@ -37,12 +37,6 @@ /* 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)) \ -) - - #define RGB_DI_PIN B1 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h index 601e3c8a5..77822e0a1 100644 --- a/keyboards/playkbtw/pk60/config.h +++ b/keyboards/playkbtw/pk60/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E2 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/preonic/config.h b/keyboards/preonic/config.h index 739e38555..1887bff5d 100644 --- a/keyboards/preonic/config.h +++ b/keyboards/preonic/config.h @@ -63,11 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/preonic/keymaps/boy314/keymap.c b/keyboards/preonic/keymaps/boy314/keymap.c index 67292bdb3..04404f69f 100644 --- a/keyboards/preonic/keymaps/boy314/keymap.c +++ b/keyboards/preonic/keymaps/boy314/keymap.c @@ -21,7 +21,7 @@ // define layers #define _QWERTY 0 #define _DVORAK 1 -#define _OSU 2 +#define _ARROWS 2 #define _LOWER 10 #define _RAISE 11 #define _ADJUST 12 @@ -29,12 +29,9 @@ // macro shortcuts #define QWERTY TO(_QWERTY) #define DVORAK TO(_DVORAK) -#define OSU TO(_OSU) #define LOWER M(_LOWER) #define RAISE M(_RAISE) - -#define _______ KC_TRNS -#define XXXXXXX KC_NO +#define ARROWS TO(_ARROWS) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -48,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | Del | Alt | GUI |Lower | Raise| Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ @@ -57,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, \ 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_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, \ - KC_LCTL, KC_DEL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ ), /* Dvorak @@ -70,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Del | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * | Ctrl | Del | Alt | GUI |Lower | Raise| Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ @@ -79,7 +76,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, \ KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, \ - KC_LCTL, KC_DEL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ + KC_LCTL, KC_DEL, KC_LGUI, KC_LALT, LOWER, RAISE, KC_SPC, KC_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT \ +), + +/* ARROWS + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Up | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_ARROWS] = LAYOUT_preonic_grid( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT,_______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), /* Lower @@ -117,13 +136,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_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_GRV, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, KC_PGUP, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, [_RAISE] = LAYOUT_preonic_grid( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ @@ -143,7 +155,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff|Dvorak| | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | OSU | | | | | | | | | | + * | |ARROWS| | | | | | | | | | * `-----------------------------------------------------------------------------------' */ @@ -152,7 +164,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, RESET, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, DVORAK, _______, _______, _______, _______, \ - _______, OSU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, ARROWS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ) }; @@ -175,10 +187,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) } return false; break; - case OSU: + case ARROWS: if (record->event.pressed) { - set_single_persistent_default_layer(_OSU); + set_single_persistent_default_layer(_ARROWS); } return false; break; diff --git a/keyboards/preonic/keymaps/default/keymap.c b/keyboards/preonic/keymaps/default/keymap.c index 33ca90f99..d37882eab 100644 --- a/keyboards/preonic/keymaps/default/keymap.c +++ b/keyboards/preonic/keymaps/default/keymap.c @@ -233,7 +233,7 @@ uint16_t muse_counter = 0; uint8_t muse_offset = 70; uint16_t muse_tempo = 50; -void encoder_update(bool clockwise) { +void encoder_update_user(uint8_t index, bool clockwise) { if (muse_mode) { if (IS_LAYER_ON(_RAISE)) { if (clockwise) { diff --git a/keyboards/preonic/keymaps/fsck/config.h b/keyboards/preonic/keymaps/fsck/config.h new file mode 100644 index 000000000..b06980c5b --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/config.h @@ -0,0 +1,26 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC diff --git a/keyboards/preonic/keymaps/fsck/keymap.c b/keyboards/preonic/keymaps/fsck/keymap.c new file mode 100644 index 000000000..97a0ed608 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/keymap.c @@ -0,0 +1,249 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl |Brite | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid( \ + 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_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_DEL, \ + KC_ESC, 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, BACKLIT, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid( \ + 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ + 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_VOLD,KC_VOLU,_______, \ + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | ALTGr| | | | Home |Pg Dn |Pg Up | End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid( \ + 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_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, \ + 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_VOLD, KC_VOLU, _______, + _______, _______, _______, KC_RALT, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|AudOff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|MusOff|MidiOn|MidOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid( \ + 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, DEBUG, _______, _______, _______, _______, TERM_ON, TERM_OFF,_______, _______, KC_DEL, \ + _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, _______, _______, \ + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + set_single_persistent_default_layer(_QWERTY); + } + return false; + 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 + #ifdef __AVR__ + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + PORTE |= (1<<6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update_user(uint8_t index, bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/fsck/readme.md b/keyboards/preonic/keymaps/fsck/readme.md new file mode 100644 index 000000000..e459884eb --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/readme.md @@ -0,0 +1,5 @@ +![preonic:fsck Layout Image](https://i.imgur.com/nI8fBco.png) + +# fsck's Preonic Layout + +This is based on the fsck layout for the Planck keyboard and similar to the Preonic default layout.
\ No newline at end of file diff --git a/keyboards/preonic/keymaps/fsck/rules.mk b/keyboards/preonic/keymaps/fsck/rules.mk new file mode 100644 index 000000000..dcf16bef3 --- /dev/null +++ b/keyboards/preonic/keymaps/fsck/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/keymaps/kinesis/config.h b/keyboards/preonic/keymaps/kinesis/config.h index e6099ceb8..7899408cd 100644 --- a/keyboards/preonic/keymaps/kinesis/config.h +++ b/keyboards/preonic/keymaps/kinesis/config.h @@ -56,11 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D1 #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/preonic/keymaps/muzfuz/config.h b/keyboards/preonic/keymaps/muzfuz/config.h new file mode 100644 index 000000000..40a9524b4 --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/config.h @@ -0,0 +1,37 @@ +#pragma once + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ + } +#endif + +#define MUSIC_MASK (keycode != KC_NO) + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ + +#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 2 diff --git a/keyboards/preonic/keymaps/muzfuz/keymap.c b/keyboards/preonic/keymaps/muzfuz/keymap.c new file mode 100644 index 000000000..a0a4b34fa --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/keymap.c @@ -0,0 +1,271 @@ +/* Copyright 2015-2017 Jack Humbert + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#include QMK_KEYBOARD_H +#include "muse.h" + +enum preonic_layers { + _QWERTY, + _LOWER, + _RAISE, + _ADJUST +}; + +enum preonic_keycodes +{ + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + BACKLIT, + HASHRKT, + CLNEQLS +}; + +#define RSE_ENT LT(_RAISE, KC_ENT) +#define LWR_SPC LT(_LOWER, KC_SPC) +#define ESC_CTL CTL_T(KC_ESCAPE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ESCCTL | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Enter|Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + ESC_CTL, 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_RSFT, + BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, KC_NO, RSE_ENT, KC_NO, LWR_SPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT), + + /* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * ,-----------------------------------------------------------------------------------. + * | | => | | [ | ] | | | _ | + | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |ESCCTL| := | | { | } | ( | ) | - | = | \ | ~ | GUI | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | [ | ] | | | | | | Home | End | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT_preonic_grid( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + _______, HASHRKT, _______, KC_LBRC, KC_RBRC, _______, _______, KC_UNDS, KC_PLUS, KC_PIPE, _______, _______, + ESC_CTL, CLNEQLS, _______, KC_LCBR, KC_RCBR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSLS, KC_TILD, KC_RGUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY), + + /* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | + * ,-----------------------------------------------------------------------------------. + * | | | | Up | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * |ESCCTL| | Left | Down | Right | | | | | | | GUI | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT_preonic_grid( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + _______, _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, + ESC_CTL, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______, _______, _______, _______, KC_RGUI, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, 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|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT_preonic_grid( + 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, DEBUG, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_DEL, + _______, _______, MU_MOD, AU_ON, AU_OFF, _______, _______, QWERTY, _______, _______, _______, _______, + _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, TERM_ON, TERM_OFF, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______) + +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case HASHRKT: + if (record->event.pressed) + { + SEND_STRING("=>"); + } + break; + case CLNEQLS: + if (record->event.pressed) + { + SEND_STRING(":="); + } + break; + case QWERTY: + if (record->event.pressed) + { + set_single_persistent_default_layer(_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 + #ifdef __AVR__ + PORTE &= ~(1<<6); + #endif + } else { + unregister_code(KC_RSFT); + #ifdef __AVR__ + PORTE |= (1<<6); + #endif + } + return false; + break; + } + return true; +}; + +bool muse_mode = false; +uint8_t last_muse_note = 0; +uint16_t muse_counter = 0; +uint8_t muse_offset = 70; +uint16_t muse_tempo = 50; + +void encoder_update(bool clockwise) { + if (muse_mode) { + if (IS_LAYER_ON(_RAISE)) { + if (clockwise) { + muse_offset++; + } else { + muse_offset--; + } + } else { + if (clockwise) { + muse_tempo+=1; + } else { + muse_tempo-=1; + } + } + } else { + if (clockwise) { + register_code(KC_PGDN); + unregister_code(KC_PGDN); + } else { + register_code(KC_PGUP); + unregister_code(KC_PGUP); + } + } +} + +void dip_update(uint8_t index, bool active) { + switch (index) { + case 0: + if (active) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + case 1: + if (active) { + muse_mode = true; + } else { + muse_mode = false; + #ifdef AUDIO_ENABLE + stop_all_notes(); + #endif + } + } +} + +void matrix_scan_user(void) { + #ifdef AUDIO_ENABLE + if (muse_mode) { + if (muse_counter == 0) { + uint8_t muse_note = muse_offset + SCALE[muse_clock_pulse()]; + if (muse_note != last_muse_note) { + stop_note(compute_freq_for_midi_note(last_muse_note)); + play_note(compute_freq_for_midi_note(muse_note), 0xF); + last_muse_note = muse_note; + } + } + muse_counter = (muse_counter + 1) % muse_tempo; + } + #endif +} + +bool music_mask_user(uint16_t keycode) { + switch (keycode) { + case RAISE: + case LOWER: + return false; + default: + return true; + } +} diff --git a/keyboards/preonic/keymaps/muzfuz/readme.md b/keyboards/preonic/keymaps/muzfuz/readme.md new file mode 100644 index 000000000..a709d5c94 --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/readme.md @@ -0,0 +1,5 @@ +# The muzfuz Preonic layout - largely based on the Planck's + +```shell +make preonic/rev3:muzfuz:dfu-util +``` diff --git a/keyboards/preonic/keymaps/muzfuz/rules.mk b/keyboards/preonic/keymaps/muzfuz/rules.mk new file mode 100644 index 000000000..dcf16bef3 --- /dev/null +++ b/keyboards/preonic/keymaps/muzfuz/rules.mk @@ -0,0 +1 @@ +SRC += muse.c diff --git a/keyboards/preonic/keymaps/zach/config.h b/keyboards/preonic/keymaps/zach/config.h index 25f88afdc..58690a4ab 100644 --- a/keyboards/preonic/keymaps/zach/config.h +++ b/keyboards/preonic/keymaps/zach/config.h @@ -45,7 +45,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* define if matrix has ghost */ //#define MATRIX_HAS_GHOST - #define BACKLIGHT_BREATHING // LED breathing /* number of backlight levels */ #define BACKLIGHT_LEVELS 5 @@ -58,11 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D1 @@ -90,5 +84,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define DYNAMIC_MACRO_ENABLE // Enable if you need to use the macro functionality //#define SPACE_CADET // Parenthesis on L/R shift - #endif diff --git a/keyboards/preonic/rev3/config.h b/keyboards/preonic/rev3/config.h index 98899dc6a..c37f263ad 100644 --- a/keyboards/preonic/rev3/config.h +++ b/keyboards/preonic/rev3/config.h @@ -43,6 +43,10 @@ * #define UNUSED_PINS */ +#define NUMBER_OF_ENCODERS 1 +#define ENCODERS_PAD_A { B12 } +#define ENCODERS_PAD_B { B13 } + #define MUSIC_MAP #undef AUDIO_VOICES #undef C6_AUDIO @@ -76,11 +80,6 @@ */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/preonic/rev3/matrix.c b/keyboards/preonic/rev3/matrix.c index 05f6da71b..db7a4f2a3 100644 --- a/keyboards/preonic/rev3/matrix.c +++ b/keyboards/preonic/rev3/matrix.c @@ -21,10 +21,6 @@ static matrix_col_t matrix_debouncing[MATRIX_COLS]; static bool debouncing = false; static uint16_t debouncing_time = 0; -static uint8_t encoder_state = 0; -static int8_t encoder_value = 0; -static int8_t encoder_LUT[] = { 0, -1, 1, 0, 1, 0, 0, -1, -1, 0, 0, 1, 0, 1, -1, 0 }; - static bool dip_switch[4] = {0, 0, 0, 0}; __attribute__ ((weak)) @@ -53,12 +49,6 @@ void matrix_init(void) { palSetPadMode(GPIOA, 10, PAL_MODE_INPUT_PULLUP); palSetPadMode(GPIOB, 9, PAL_MODE_INPUT_PULLUP); - // encoder setup - palSetPadMode(GPIOB, 12, PAL_MODE_INPUT_PULLUP); - palSetPadMode(GPIOB, 13, PAL_MODE_INPUT_PULLUP); - - encoder_state = (palReadPad(GPIOB, 12) << 0) | (palReadPad(GPIOB, 13) << 1); - // actual matrix setup palSetPadMode(GPIOB, 11, PAL_MODE_OUTPUT_PUSHPULL); palSetPadMode(GPIOB, 10, PAL_MODE_OUTPUT_PUSHPULL); @@ -110,18 +100,6 @@ uint8_t matrix_scan(void) { } memcpy(last_dip_switch, dip_switch, sizeof(&dip_switch)); - // encoder on B12 and B13 - encoder_state <<= 2; - encoder_state |= (palReadPad(GPIOB, 12) << 0) | (palReadPad(GPIOB, 13) << 1); - encoder_value += encoder_LUT[encoder_state & 0xF]; - if (encoder_value >= ENCODER_RESOLUTION) { - encoder_update(0); - } - if (encoder_value <= -ENCODER_RESOLUTION) { // direction is arbitrary here, but this clockwise - encoder_update(1); - } - encoder_value %= ENCODER_RESOLUTION; - // actual matrix for (int col = 0; col < MATRIX_COLS; col++) { matrix_col_t data = 0; diff --git a/keyboards/preonic/rev3/rules.mk b/keyboards/preonic/rev3/rules.mk index 7c40d514d..0c171b2fb 100644 --- a/keyboards/preonic/rev3/rules.mk +++ b/keyboards/preonic/rev3/rules.mk @@ -1,56 +1,24 @@ # project specific files -SRC = matrix.c +SRC = matrix.c LAYOUTS += ortho_5x12 -## chip/board settings -# - the next two should match the directories in -# <chibios>/os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F3xx - -# Linker script to use -# - it should exist either in <chibios>/os/common/ports/ARMCMx/compilers/GCC/ld/ -# or <this_dir>/ld/ -MCU_LDSCRIPT = STM32F303xC - -# Startup code to use -# - it should exist in <chibios>/os/common/startup/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f3xx - -# Board: it should exist either in <chibios>/os/hal/boards/ -# or <this_dir>/boards -BOARD = GENERIC_STM32_F303XC - # Cortex version -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 - -USE_FPU = yes - -# 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=0x08005000 -OPT_DEFS = - -# Options to pass to dfu-util when flashing -DFU_ARGS = -d 0483:df11 -a 0 -s 0x08000000:leave +MCU = STM32F303 # Build Options # comment out to disable the options. # BACKLIGHT_ENABLE = no -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +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 +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 +NKRO_ENABLE = yes # USB Nkey Rollover CUSTOM_MATRIX = yes # Custom matrix file AUDIO_ENABLE = yes RGBLIGHT_ENABLE = no # SERIAL_LINK_ENABLE = yes +ENCODER_ENABLE = yes diff --git a/keyboards/primekb/prime_l/config.h b/keyboards/primekb/prime_l/config.h index 8e2457816..354f69c4d 100644 --- a/keyboards/primekb/prime_l/config.h +++ b/keyboards/primekb/prime_l/config.h @@ -50,8 +50,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/primekb/prime_m/config.h b/keyboards/primekb/prime_m/config.h index 366504375..aeddcf25c 100644 --- a/keyboards/primekb/prime_m/config.h +++ b/keyboards/primekb/prime_m/config.h @@ -50,8 +50,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/primekb/prime_o/config.h b/keyboards/primekb/prime_o/config.h index eb897ef8f..511d3d483 100644 --- a/keyboards/primekb/prime_o/config.h +++ b/keyboards/primekb/prime_o/config.h @@ -50,8 +50,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LOCKING_SUPPORT_ENABLE /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/primekb/prime_r/config.h b/keyboards/primekb/prime_r/config.h index ad92199a2..345bf91b8 100644 --- a/keyboards/primekb/prime_r/config.h +++ b/keyboards/primekb/prime_r/config.h @@ -55,11 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/proton_c/config.h b/keyboards/proton_c/config.h index 13a608f9b..5ebd17f99 100644 --- a/keyboards/proton_c/config.h +++ b/keyboards/proton_c/config.h @@ -62,11 +62,6 @@ */ //#define FORCE_NKRO -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -117,4 +112,3 @@ // #define WS2812_DMA_STREAM STM32_DMA1_STREAM2 // DMA stream for TIMx_UP (look up in reference manual under DMA Channel selection) //#define WS2812_DMA_CHANNEL 7 // DMA channel for TIMx_UP //#define WS2812_EXTERNAL_PULLUP - diff --git a/keyboards/ps2avrGB/config.h b/keyboards/ps2avrGB/config.h index fc17b5d5e..c0de5a211 100644 --- a/keyboards/ps2avrGB/config.h +++ b/keyboards/ps2avrGB/config.h @@ -35,7 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/qwertyydox/config.h b/keyboards/qwertyydox/config.h index a68565223..4c651d3c6 100644 --- a/keyboards/qwertyydox/config.h +++ b/keyboards/qwertyydox/config.h @@ -57,11 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN E6 #define BACKLIGHT_LEVELS 5 diff --git a/keyboards/qwertyydox/rev1/config.h b/keyboards/qwertyydox/rev1/config.h index a2557592d..5823beb3d 100644 --- a/keyboards/qwertyydox/rev1/config.h +++ b/keyboards/qwertyydox/rev1/config.h @@ -57,11 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN E6 #define BACKLIGHT_LEVELS 5 @@ -70,7 +65,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLED_NUM 12 // Number of LEDs - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/rama/m10_b/config.h b/keyboards/rama/m10_b/config.h index 144f88d56..1af1f64a5 100644 --- a/keyboards/rama/m10_b/config.h +++ b/keyboards/rama/m10_b/config.h @@ -104,11 +104,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/rama/m60_a/config.h b/keyboards/rama/m60_a/config.h index 01cfe05a5..2b54cda79 100644 --- a/keyboards/rama/m60_a/config.h +++ b/keyboards/rama/m60_a/config.h @@ -25,8 +25,6 @@ #define PRODUCT RAMA M60-A #define DESCRIPTION RAMA M60-A Keyboard - - // key matrix size #define MATRIX_ROWS 5 #define MATRIX_COLS 14 @@ -51,11 +49,6 @@ // 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/rama/m6_a/config.h b/keyboards/rama/m6_a/config.h index 049749bd7..3098a988d 100644 --- a/keyboards/rama/m6_a/config.h +++ b/keyboards/rama/m6_a/config.h @@ -50,7 +50,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -102,11 +101,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_BACKLIGHT_ENABLED 0 #define DYNAMIC_KEYMAP_LAYER_COUNT 4 diff --git a/keyboards/rama/m6_b/config.h b/keyboards/rama/m6_b/config.h index 67034ef8c..5ad648c76 100644 --- a/keyboards/rama/m6_b/config.h +++ b/keyboards/rama/m6_b/config.h @@ -50,7 +50,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -102,11 +101,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define RGB_BACKLIGHT_ENABLED 1 // This conditionally compiles the backlight code for M6-B specifics diff --git a/keyboards/rama/u80_a/config.h b/keyboards/rama/u80_a/config.h index c733601e1..0a8397c0a 100644 --- a/keyboards/rama/u80_a/config.h +++ b/keyboards/rama/u80_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/redox/rev1/config.h b/keyboards/redox/rev1/config.h index 654a84de7..ce205e02e 100644 --- a/keyboards/redox/rev1/config.h +++ b/keyboards/redox/rev1/config.h @@ -57,11 +57,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 diff --git a/keyboards/redox_w/config.h b/keyboards/redox_w/config.h index 810a236d9..349185ed3 100644 --- a/keyboards/redox_w/config.h +++ b/keyboards/redox_w/config.h @@ -39,12 +39,6 @@ #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/redox_w/info.json b/keyboards/redox_w/info.json index 5bc65b5d9..b7694a2bb 100644 --- a/keyboards/redox_w/info.json +++ b/keyboards/redox_w/info.json @@ -6,7 +6,91 @@ "height": 6.25, "layouts": { "LAYOUT": { - "layout": [{"label":"[L2] `", "x":0, "y":0.375, "w":1.25}, {"label":"!", "x":1.25, "y":0.375}, {"label":"@", "x":2.25, "y":0.125}, {"label":"#", "x":3.25, "y":0}, {"label":"$", "x":4.25, "y":0.125}, {"label":"%", "x":5.25, "y":0.25}, {"label":"[L1]", "x":6.25, "y":0.75}, {"label":"[L1]", "x":11.25, "y":0.75}, {"label":"^", "x":12.25, "y":0.25}, {"label":"&", "x":13.25, "y":0.125}, {"label":"*", "x":14.25, "y":0}, {"label":"(", "x":15.25, "y":0.125}, {"label":")", "x":16.25, "y":0.375}, {"label":"[L2] -", "x":17.25, "y":0.375, "w":1.25}, {"label":"Tab", "x":0, "y":1.375, "w":1.25}, {"label":"Q", "x":1.25, "y":1.375}, {"label":"W", "x":2.25, "y":1.125}, {"label":"E", "x":3.25, "y":1}, {"label":"R", "x":4.25, "y":1.125}, {"label":"T", "x":5.25, "y":1.25}, {"label":"[", "x":6.25, "y":1.75, "h":1.5}, {"label":"]", "x":11.25, "y":1.75, "h":1.5}, {"label":"Y", "x":12.25, "y":1.25}, {"label":"U", "x":13.25, "y":1.125}, {"label":"I", "x":14.25, "y":1}, {"label":"O", "x":15.25, "y":1.125}, {"label":"P", "x":16.25, "y":1.375}, {"label":"=", "x":17.25, "y":1.375, "w":1.25}, {"label":"Esc", "x":0, "y":2.375, "w":1.25}, {"label":"A", "x":1.25, "y":2.375}, {"label":"S", "x":2.25, "y":2.125}, {"label":"D", "x":3.25, "y":2}, {"label":"F", "x":4.25, "y":2.125}, {"label":"G", "x":5.25, "y":2.25}, {"label":"PgUp", "x":6.75, "y":3.75}, {"label":"End", "x":10.75, "y":3.75}, {"label":"H", "x":12.25, "y":2.25}, {"label":"J", "x":13.25, "y":2.125}, {"label":"K", "x":14.25, "y":2}, {"label":"L", "x":15.25, "y":2.125}, {"label":":", "x":16.25, "y":2.375}, {"label":"'", "x":17.25, "y":2.375, "w":1.25}, {"label":"Shift", "x":0, "y":3.375, "w":1.25}, {"label":"Z", "x":1.25, "y":3.375}, {"label":"X", "x":2.25, "y":3.125}, {"label":"C", "x":3.25, "y":3}, {"label":"V", "x":4.25, "y":3.125}, {"label":"B", "x":5.25, "y":3.25}, {"label":"PgDn", "x":7.75, "y":3.75}, {"label":"Home", "x":9.75, "y":3.75}, {"label":"N", "x":12.25, "y":3.25}, {"label":"M", "x":13.25, "y":3.125}, {"label":"<", "x":14.25, "y":3}, {"label":">", "x":15.25, "y":3.125}, {"label":"?", "x":16.25, "y":3.375}, {"label":"Shift", "x":17.25, "y":3.375, "w":1.25}, {"label":"GUI", "x":0.25, "y":4.375}, {"label":"+", "x":1.25, "y":4.375}, {"label":"-", "x":2.25, "y":4.125}, {"label":"[Alt] *", "x":3.25, "y":4}, {"label":"[Ctrl] /", "x":5.5, "y":5.25, "w":1.25}, {"label":"Backspace", "x":6.75, "y":4.75, "h":1.5}, {"label":"Del", "x":7.75, "y":4.75, "h":1.5}, {"label":"Enter", "x":9.75, "y":4.75, "h":1.5}, {"label":"Space", "x":10.75, "y":4.75, "h":1.5}, {"label":"Alt", "x":11.75, "y":5.25, "w":1.25}, {"label":"Left", "x":14.25, "y":4}, {"label":"Down", "x":15.25, "y":4.125}, {"label":"Up", "x":16.25, "y":4.375}, {"label":"Right", "x":17.25, "y":4.375}] + "layout": [ + {"label":"_Nav || `", "x":0, "y":0.375, "w":1.25}, + {"label":"1", "x":1.25, "y":0.375}, + {"label":"2", "x":2.25, "y":0.125}, + {"label":"3", "x":3.25, "y":0}, + {"label":"4", "x":4.25, "y":0.125}, + {"label":"5", "x":5.25, "y":0.25}, + + {"label":"6", "x":12.25, "y":0.25}, + {"label":"7", "x":13.25, "y":0.125}, + {"label":"8", "x":14.25, "y":0}, + {"label":"9", "x":15.25, "y":0.125}, + {"label":"0", "x":16.25, "y":0.375}, + {"label":"_Nav || -", "x":17.25, "y":0.375, "w":1.25}, + + {"label":"Tab", "x":0, "y":1.375, "w":1.25}, + {"label":"Q", "x":1.25, "y":1.375}, + {"label":"W", "x":2.25, "y":1.125}, + {"label":"E", "x":3.25, "y":1}, + {"label":"R", "x":4.25, "y":1.125}, + {"label":"T", "x":5.25, "y":1.25}, + {"label":"MO(_SYMB)", "x":6.25, "y":0.75}, + + {"label":"MO(_SYMB)", "x":11.25, "y":0.75}, + {"label":"Y", "x":12.25, "y":1.25}, + {"label":"U", "x":13.25, "y":1.125}, + {"label":"I", "x":14.25, "y":1}, + {"label":"O", "x":15.25, "y":1.125}, + {"label":"P", "x":16.25, "y":1.375}, + {"label":"=", "x":17.25, "y":1.375, "w":1.25}, + + {"label":"Esc", "x":0, "y":2.375, "w":1.25}, + {"label":"A", "x":1.25, "y":2.375}, + {"label":"S", "x":2.25, "y":2.125}, + {"label":"D", "x":3.25, "y":2}, + {"label":"F", "x":4.25, "y":2.125}, + {"label":"G", "x":5.25, "y":2.25}, + {"label":"[", "x":6.25, "y":1.75, "h":1.5}, + + {"label":"]", "x":11.25, "y":1.75, "h":1.5}, + {"label":"H", "x":12.25, "y":2.25}, + {"label":"J", "x":13.25, "y":2.125}, + {"label":"K", "x":14.25, "y":2}, + {"label":"L", "x":15.25, "y":2.125}, + {"label":";", "x":16.25, "y":2.375}, + {"label":"'", "x":17.25, "y":2.375, "w":1.25}, + + {"label":"Shift", "x":0, "y":3.375, "w":1.25}, + {"label":"Z", "x":1.25, "y":3.375}, + {"label":"X", "x":2.25, "y":3.125}, + {"label":"C", "x":3.25, "y":3}, + {"label":"V", "x":4.25, "y":3.125}, + {"label":"B", "x":5.25, "y":3.25}, + + {"label":"_Adjust/Page Up", "x":6.75, "y":3.75}, + {"label":"Page Down", "x":7.75, "y":3.75}, + + {"label":"Home", "x":9.75, "y":3.75}, + {"label":"_Adjust/End", "x":10.75, "y":3.75}, + + {"label":"N", "x":12.25, "y":3.25}, + {"label":"M", "x":13.25, "y":3.125}, + {"label":",", "x":14.25, "y":3}, + {"label":",", "x":15.25, "y":3.125}, + {"label":"\\", "x":16.25, "y":3.375}, + {"label":"Shift", "x":17.25, "y":3.375, "w":1.25}, + + {"label":"LGUI", "x":0.25, "y":4.375}, + {"label":"P+", "x":1.25, "y":4.375}, + {"label":"P-", "x":2.25, "y":4.125}, + {"label":"LAlt || P*", "x":3.25, "y":4}, + + {"label":"LCtrl || P/", "x":5.5, "y":5.25, "w":1.25}, + {"label":"Backspace", "x":6.75, "y":4.75, "h":1.5}, + {"label":"Delete", "x":7.75, "y":4.75, "h":1.5}, + + {"label":"Enter", "x":9.75, "y":4.75, "h":1.5}, + {"label":"Space", "x":10.75, "y":4.75, "h":1.5}, + {"label":"RAlt", "x":11.75, "y":5.25, "w":1.25}, + + {"label":"Left", "x":14.25, "y":4}, + {"label":"Down", "x":15.25, "y":4.125}, + {"label":"Up", "x":16.25, "y":4.375}, + {"label":"Right", "x":17.25, "y":4.375} + ] } } } diff --git a/keyboards/redox_w/matrix.c b/keyboards/redox_w/matrix.c index 5e61103f2..31233af10 100644 --- a/keyboards/redox_w/matrix.c +++ b/keyboards/redox_w/matrix.c @@ -1,15 +1,15 @@ /* Copyright 2017 Mattia Dal Ben - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 2 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ @@ -132,7 +132,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/redox_w/readme.md b/keyboards/redox_w/readme.md index 83544a9fc..a47fc2ead 100644 --- a/keyboards/redox_w/readme.md +++ b/keyboards/redox_w/readme.md @@ -22,7 +22,7 @@ make redox_w:default Example of flashing this keyboard: ```sh -make redox_w/rev1:default:avrdude +make redox_w:default:avrdude ``` See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/config.h b/keyboards/s60_x/keymaps/ansi_qwertz/config.h deleted file mode 100644 index 6c01d579f..000000000 --- a/keyboards/s60_x/keymaps/ansi_qwertz/config.h +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -// keymap needs oneshot functionality -#undef NO_ACTION_ONESHOT - -#undef IS_COMMAND -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -#endif
\ No newline at end of file diff --git a/keyboards/s7_elephant/config.h b/keyboards/s7_elephant/config.h index 55baa4c37..6335fbc9c 100644 --- a/keyboards/s7_elephant/config.h +++ b/keyboards/s7_elephant/config.h @@ -31,11 +31,6 @@ /* 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)) \ -) - #define RGB_DI_PIN E6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/s7_elephant/info.json b/keyboards/s7_elephant/info.json index 972f20ce0..3d45f0b09 100644 --- a/keyboards/s7_elephant/info.json +++ b/keyboards/s7_elephant/info.json @@ -1322,8 +1322,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -1399,8 +1399,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -1476,8 +1476,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -1554,8 +1554,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} @@ -2337,8 +2337,8 @@ {"label":"Ctrl", "x":2, "y":4, "w":1.5}, {"label":"Win", "x":3.5, "y":4}, {"label":"Alt", "x":4.5, "y":4, "w":1.5}, - {"x":6, "y":4, "w":6.75}, - {"label":"Fn", "x":12.75, "y":4, "w":1.5}, + {"label":"Space", "x":6, "y":4, "w":7}, + {"label":"Fn", "x":13, "y":4, "w":1.5}, {"label":"Left", "x":15, "y":4}, {"label":"Down", "x":16, "y":4}, {"label":"Right", "x":17, "y":4} diff --git a/keyboards/satan/config.h b/keyboards/satan/config.h index eb357b39e..dbe98e87e 100644 --- a/keyboards/satan/config.h +++ b/keyboards/satan/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/satan/keymaps/admiralStrokers/config.h b/keyboards/satan/keymaps/admiralStrokers/config.h index d0338fb7e..17e0ea3b7 100644 --- a/keyboards/satan/keymaps/admiralStrokers/config.h +++ b/keyboards/satan/keymaps/admiralStrokers/config.h @@ -55,11 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 @@ -73,8 +68,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define DISABLE_SPACE_CADET_ROLLOVER - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/satan/keymaps/colemak/keymap.c b/keyboards/satan/keymaps/colemak/keymap.c index d81ca0893..a772e92c7 100644 --- a/keyboards/satan/keymaps/colemak/keymap.c +++ b/keyboards/satan/keymaps/colemak/keymap.c @@ -3,7 +3,7 @@ // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -14,6 +14,10 @@ #define _______ KC_TRNS +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -29,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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_BSPC, \ + SFT_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_BSPC, \ KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC,KC_BSLS, \ KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O,KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ @@ -40,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | | | RESET| * |-----------------------------------------------------------| * | | | | | | | | | | | |BL-|BL+|BL | - * |--------------------------------------------ΩΩ---------------| + * |-----------------------------------------------------------| * | | | | | | | | | | | | | * |-----------------------------------------------------------| * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | @@ -64,21 +68,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -86,7 +80,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -94,6 +88,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/satan/keymaps/default/keymap.c b/keyboards/satan/keymaps/default/keymap.c index 76bb8bfcf..ac15dd55a 100644 --- a/keyboards/satan/keymaps/default/keymap.c +++ b/keyboards/satan/keymaps/default/keymap.c @@ -1,9 +1,11 @@ #include QMK_KEYBOARD_H - +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -29,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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_BSPC, \ + SFT_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_BSPC, \ 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_BSLS, \ 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_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ @@ -64,21 +66,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #endif }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -86,7 +78,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -94,6 +86,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/satan/keymaps/fakb/config.h b/keyboards/satan/keymaps/fakb/config.h index a8df7ecef..81598f22e 100644 --- a/keyboards/satan/keymaps/fakb/config.h +++ b/keyboards/satan/keymaps/fakb/config.h @@ -36,11 +36,7 @@ //#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)) \ -) -*/ + /* Backlight configuration */ #define BACKLIGHT_LEVELS 8 @@ -86,7 +82,7 @@ #define MOUSEKEY_WHEEL_TIME_TO_MAX 255 // only change -#undef RGB_DI_PIN +#undef RGB_DI_PIN #define RGB_DI_PIN B2 #endif diff --git a/keyboards/satan/keymaps/iso_split_rshift/keymap.c b/keyboards/satan/keymaps/iso_split_rshift/keymap.c index d73a01aea..156515673 100644 --- a/keyboards/satan/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/satan/keymaps/iso_split_rshift/keymap.c @@ -113,36 +113,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SFX] = LAYOUT_60_iso_split_rshift( RESET, _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, KC_BSPC, \ _______, _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, \ - _______, F(2), F(3), _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ - _______, F(4), F(5), F(6), F(7), F(8), F(9), _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ + _______, RGB_TOG, RGB_MOD, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, XXXXXXX, KC_ENT, \ + _______, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, KC_0, _______, KC_SLSH, KC_UP, _______, \ _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT), }; -enum function_id { - LAUNCH, - RGBLED_TOGGLE, - RGBLED_STEP_MODE, - RGBLED_INCREASE_HUE, - RGBLED_DECREASE_HUE, - RGBLED_INCREASE_SAT, - RGBLED_DECREASE_SAT, - RGBLED_INCREASE_VAL, - RGBLED_DECREASE_VAL, -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_FUNCTION(LAUNCH), - [2] = ACTION_FUNCTION(RGBLED_TOGGLE), - [3] = ACTION_FUNCTION(RGBLED_STEP_MODE), - [4] = ACTION_FUNCTION(RGBLED_INCREASE_HUE), - [5] = ACTION_FUNCTION(RGBLED_DECREASE_HUE), - [6] = ACTION_FUNCTION(RGBLED_INCREASE_SAT), - [7] = ACTION_FUNCTION(RGBLED_DECREASE_SAT), - [8] = ACTION_FUNCTION(RGBLED_INCREASE_VAL), - [9] = ACTION_FUNCTION(RGBLED_DECREASE_VAL), - [10] = ACTION_MODS_TAP_KEY(MOD_LCTL, KC_ENT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -160,49 +135,3 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } return MACRO_NONE; }; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch (id) { - case RGBLED_TOGGLE: - //led operations - if (record->event.pressed) { - rgblight_toggle(); - } - break; - case RGBLED_INCREASE_HUE: - if (record->event.pressed) { - rgblight_increase_hue(); - } - break; - case RGBLED_DECREASE_HUE: - if (record->event.pressed) { - rgblight_decrease_hue(); - } - break; - case RGBLED_INCREASE_SAT: - if (record->event.pressed) { - rgblight_increase_sat(); - } - break; - case RGBLED_DECREASE_SAT: - if (record->event.pressed) { - rgblight_decrease_sat(); - } - break; - case RGBLED_INCREASE_VAL: - if (record->event.pressed) { - rgblight_increase_val(); - } - break; - case RGBLED_DECREASE_VAL: - if (record->event.pressed) { - rgblight_decrease_val(); - } - break; - case RGBLED_STEP_MODE: - if (record->event.pressed) { - rgblight_step(); - } - break; - } -} diff --git a/keyboards/satan/keymaps/poker/keymap.c b/keyboards/satan/keymaps/poker/keymap.c index b908e8c4a..e244aced1 100644 --- a/keyboards/satan/keymaps/poker/keymap.c +++ b/keyboards/satan/keymaps/poker/keymap.c @@ -2,7 +2,7 @@ // Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define MODS_SHIFT_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) // 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. @@ -16,6 +16,10 @@ #define _______ KC_TRNS #define XXXXXXX KC_NO +enum custom_keycodes { + SFT_ESC = SAFE_RANGE +}; + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer * ,-----------------------------------------------------------. @@ -31,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------' */ [_BL] = LAYOUT_60_ansi( - F(0), 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_BSPC, \ + SFT_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_BSPC, \ 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_BSLS, \ 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_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ @@ -89,21 +93,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), }; -enum function_id { - SHIFT_ESC, -}; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_FUNCTION(SHIFT_ESC), -}; - -void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { - static uint8_t shift_esc_shift_mask; - switch (id) { - case SHIFT_ESC: - shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case SFT_ESC: if (record->event.pressed) { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { add_key(KC_GRV); send_keyboard_report(); } else { @@ -111,7 +105,7 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } else { - if (shift_esc_shift_mask) { + if (get_mods() & MODS_SHIFT_MASK) { del_key(KC_GRV); send_keyboard_report(); } else { @@ -119,6 +113,10 @@ void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { send_keyboard_report(); } } - break; + + return false; + + default: + return true; } } diff --git a/keyboards/scarletbandana/config.h b/keyboards/scarletbandana/config.h new file mode 100644 index 000000000..58c5d4a41 --- /dev/null +++ b/keyboards/scarletbandana/config.h @@ -0,0 +1,58 @@ +/* +Copyright 2019 Cole Markham + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6969 +#define DEVICE_VER 0x0001 +#define MANUFACTURER WoodKeys.click +#define PRODUCT Scarlet Bandana Version IV mark.2 +#define DESCRIPTION 65% with macro keys + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 17 + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 8 // Number of LEDs +#endif + +#define MATRIX_ROW_PINS { D4, D6, D7, B4, B5 } +#define MATRIX_COL_PINS { B2, B3, B7, B1, F5, F4, F6, F7, B0, F0, F1, D0, D1, D2, D5, B6, C7 } + +#define QMK_SPEAKER C6 + +#ifdef AUDIO_ENABLE +#define C6_AUDIO +#define STARTUP_SONG SONG(PREONIC_SOUND) +// Disable music mode to keep the firmware size down +#define NO_MUSIC_MODE +#endif + +#define NO_ACTION_MACRO +#define NO_ACTION_FUNCTION + +#define DEBOUNCING_DELAY 5 diff --git a/keyboards/scarletbandana/info.json b/keyboards/scarletbandana/info.json new file mode 100644 index 000000000..9fb7c230a --- /dev/null +++ b/keyboards/scarletbandana/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Scarlet Bandana Version IV Mark 2", + "url": "", + "maintainer": "qmk", + "width": 18.5, + "height": 5, + "layouts": { + "LAYOUT_all": { + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2.5, "y":0}, {"x":3.5, "y":0}, {"x":4.5, "y":0}, {"x":5.5, "y":0}, {"x":6.5, "y":0}, {"x":7.5, "y":0}, {"x":8.5, "y":0}, {"x":9.5, "y":0}, {"x":10.5, "y":0}, {"x":11.5, "y":0}, {"x":12.5, "y":0}, {"x":13.5, "y":0}, {"x":14.5, "y":0}, {"x":15.5, "y":0}, {"x":16.5, "y":0}, {"x":17.5, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2.5, "y":1, "w":1.5}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1, "w":1.5}, {"x":17.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2.5, "y":2, "w":1.75}, {"x":4.25, "y":2}, {"x":5.25, "y":2}, {"x":6.25, "y":2}, {"x":7.25, "y":2}, {"x":8.25, "y":2}, {"x":9.25, "y":2}, {"x":10.25, "y":2}, {"x":11.25, "y":2}, {"x":12.25, "y":2}, {"x":13.25, "y":2}, {"x":14.25, "y":2}, {"x":15.25, "y":2, "w":2.25}, {"x":17.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2.5, "y":3, "w":2.25}, {"x":4.75, "y":3}, {"x":5.75, "y":3}, {"x":6.75, "y":3}, {"x":7.75, "y":3}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3}, {"x":12.75, "y":3}, {"x":13.75, "y":3}, {"x":14.75, "y":3, "w":1.75}, {"x":16.5, "y":3}, {"x":17.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":1.25}, {"x":6.25, "y":4, "w":2.25}, {"x":8.5, "y":4, "w":1.75}, {"x":10.25, "y":4, "w":2.25}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":16.5, "y":4}, {"x":17.5, "y":4}] + } + } +}
\ No newline at end of file diff --git a/keyboards/scarletbandana/keymaps/default/config.h b/keyboards/scarletbandana/keymaps/default/config.h new file mode 100644 index 000000000..36f483c11 --- /dev/null +++ b/keyboards/scarletbandana/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2019 Cole Markham, WoodKeys.click + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/scarletbandana/keymaps/default/keymap.c b/keyboards/scarletbandana/keymaps/default/keymap.c new file mode 100644 index 000000000..3d4c96160 --- /dev/null +++ b/keyboards/scarletbandana/keymaps/default/keymap.c @@ -0,0 +1,188 @@ +/* Copyright 2019 Cole Markham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +#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, +}; + +// define variables for reactive RGB +bool TOG_STATUS = false; +int RGB_current_mode; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_all( + KC_F1, KC_F2, 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_BSPC, KC_DEL, KC_PGUP,\ + KC_F3, KC_F4, 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_BSLS, KC_PGDN,\ + KC_F5, KC_F6, 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_ENT, KC_HOME,\ + KC_F7, KC_F8, KC_LSFT,KC_Z,KC_X,KC_C,KC_V,KC_B,KC_N,KC_M,KC_COMM,KC_DOT,KC_SLASH,KC_RSFT,KC_UP,KC_END,\ + KC_F9, KC_F10, KC_LCTL,KC_LGUI,KC_LALT, RAISE, KC_SPACE, LOWER, KC_RALT,KC_APP,KC_RCTRL,KC_LEFT,KC_DOWN,KC_RIGHT), + + [_RAISE] = LAYOUT_all( + RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______), + + [_LOWER] = LAYOUT_all( + RGB_MOD, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______), + + [_ADJUST] = LAYOUT_all( + RESET, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ + _______, _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,\ + _______, _______, _______,_______,_______, _______, _______, _______, _______,_______,_______,_______,_______,_______) +}; + +// Setting ADJUST layer RGB back to default +void update_tri_layer_RGB(uint8_t layer1, uint8_t layer2, uint8_t layer3) { + if (IS_LAYER_ON(layer1) && IS_LAYER_ON(layer2)) { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); +#endif + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +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) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +#ifdef AUDIO_ENABLE + + float tone_qwerty[][2] = SONG(QWERTY_SOUND); +#endif + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case LOWER: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(16); +#endif + } + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change +#endif + TOG_STATUS = false; + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + //not sure how to have keyboard check mode and set it to a variable, so my work around + //uses another variable that would be set to true after the first time a reactive key is pressed. + if (TOG_STATUS) { //TOG_STATUS checks is another reactive key currently pressed, only changes RGB mode if returns false + } else { + TOG_STATUS = !TOG_STATUS; +#ifdef RGBLIGHT_ENABLE + rgblight_mode(15); +#endif + } + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { +#ifdef RGBLIGHT_ENABLE + rgblight_mode(RGB_current_mode); // revert RGB to initial mode prior to RGB mode change +#endif + layer_off(_RAISE); + TOG_STATUS = false; + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + // FIXME add RGB feedback + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + break; + //led operations - RGB mode change now updates the RGB_current_mode to allow the right RGB mode to be set after reactive keys are released +#ifdef RGBLIGHT_ENABLE + case RGB_MOD: + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + return false; + break; +#endif + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/scarletbandana/keymaps/default/readme.md b/keyboards/scarletbandana/keymaps/default/readme.md new file mode 100644 index 000000000..c2c281fe3 --- /dev/null +++ b/keyboards/scarletbandana/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for scarletbandana diff --git a/keyboards/scarletbandana/readme.md b/keyboards/scarletbandana/readme.md new file mode 100644 index 000000000..83281bae3 --- /dev/null +++ b/keyboards/scarletbandana/readme.md @@ -0,0 +1,11 @@ +# Scarlet Bandana Version IV Mark 2 + +Keyboard Maintainer: [Cole Markham](https://github.com/colemarkham) +Hardware Supported: Scarlet Bandana Version IV Mark 2 +Hardware Availability: [WoodKeys.click](https://woodkeys.click/product/scarlet-bandana-version-iv-mark-2/) + +Make example for this keyboard (after setting up your build environment): + + make scarletbandana:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/scarletbandana/rules.mk b/keyboards/scarletbandana/rules.mk new file mode 100644 index 000000000..2767697c5 --- /dev/null +++ b/keyboards/scarletbandana/rules.mk @@ -0,0 +1,70 @@ +# MCU name +#MCU = at90usb1286 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = lite # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = yes # Audio output on port C6 +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality, also set ISSI_ENABLE below for Miera +EXTRAFLAGS += -flto diff --git a/keyboards/scarletbandana/scarletbandana.c b/keyboards/scarletbandana/scarletbandana.c new file mode 100644 index 000000000..6ef183c2c --- /dev/null +++ b/keyboards/scarletbandana/scarletbandana.c @@ -0,0 +1,22 @@ +/* Copyright 2019 Cole Markham, WoodKeys.click + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "scarletbandana.h" + + + + + + diff --git a/keyboards/scarletbandana/scarletbandana.h b/keyboards/scarletbandana/scarletbandana.h new file mode 100644 index 000000000..8178e8c8d --- /dev/null +++ b/keyboards/scarletbandana/scarletbandana.h @@ -0,0 +1,38 @@ +/* Copyright 2019 Cole Markham + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. +// The following is an example using the Planck MIT layout +// The first section contains all of the arguments +// The second converts the arguments into a two-dimensional array +#define LAYOUT_all( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k2f, k0g, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2g, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, k3e, k3f, k3g, \ + k40, k41, k42, k43, k44, k45, k47, k49, k4a, k4b, k4c, k4e, k4f, k4g \ +) \ +{ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k0e, k0f, k0g }, \ + { k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, k1f, k1g }, \ + { k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, k2e, k2f, k2g }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3c, KC_NO, k3e, k3f, k3g }, \ + { k40, k41, k42, k43, k44, k45, KC_NO, k47, KC_NO, k49, k4a, k4b, k4c, KC_NO, k4e, k4f, k4g } \ +} + diff --git a/keyboards/scrabblepad/config.h b/keyboards/scrabblepad/config.h index dabab7d35..800b9297b 100644 --- a/keyboards/scrabblepad/config.h +++ b/keyboards/scrabblepad/config.h @@ -61,7 +61,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define RGBLIGHT_SAT_STEP 25 // units to step when in/decresing saturation //#define RGBLIGHT_VAL_STEP 12 // units to step when in/decreasing value (brightness) - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -113,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/sentraq/number_pad/config.h b/keyboards/sentraq/number_pad/config.h new file mode 100644 index 000000000..0769f9f3d --- /dev/null +++ b/keyboards/sentraq/number_pad/config.h @@ -0,0 +1,78 @@ +/* +Copyright 2019 QMK Community + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Sentraq +#define PRODUCT Sentraq Number Pad +#define DESCRIPTION RBG backlit number pad kit + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 4 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F5, F0, B5, D6, D4 } +#define MATRIX_COL_PINS { C7, D5, D1, D0 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 + +#define RGB_DI_PIN B0 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 13 + #define RGBLIGHT_HUE_STEP 8 + #define RGBLIGHT_SAT_STEP 8 + #define RGBLIGHT_VAL_STEP 8 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ + #define RGBLIGHT_EFFECT_BREATHING + #define RGBLIGHT_EFFECT_RAINBOW_MOOD + #define RGBLIGHT_EFFECT_RAINBOW_SWIRL + #define RGBLIGHT_EFFECT_SNAKE + #define RGBLIGHT_EFFECT_KNIGHT + #define RGBLIGHT_EFFECT_CHRISTMAS + #define RGBLIGHT_EFFECT_STATIC_GRADIENT + #define RGBLIGHT_EFFECT_RGB_TEST + #define RGBLIGHT_EFFECT_ALTERNATING +#endif + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 diff --git a/keyboards/sentraq/number_pad/info.json b/keyboards/sentraq/number_pad/info.json new file mode 100644 index 000000000..3e17835d5 --- /dev/null +++ b/keyboards/sentraq/number_pad/info.json @@ -0,0 +1,29 @@ +{ + "keyboard_name": "Sentraq Number Pad", + "maintainer": "qmk", + "url": "https://sentraq.com/collections/kits/products/number-pad-rgb-kit", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT_numpad_5x4": { + "key_count": 17, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":1, "h":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, + {"x":0, "y":4, "w":2}, {"x":2, "y":4}, {"x":3, "y":3, "h":2} + ] + }, + "LAYOUT_ortho_5x4": { + "key_count": 20, + "layout": [ + {"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, + {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, + {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4} + ] + } + } +} diff --git a/keyboards/sentraq/number_pad/keymaps/default/keymap.c b/keyboards/sentraq/number_pad/keymaps/default/keymap.c new file mode 100644 index 000000000..90c806a91 --- /dev/null +++ b/keyboards/sentraq/number_pad/keymaps/default/keymap.c @@ -0,0 +1,105 @@ +/* Copyright 2019 QMK Community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FN 1 + +// Defines the keycodes used by our macros in process_record_user. +// Disabled as it isn't used in this keymap, but available for modification. +// enum custom_keycodes { +// QMKBEST = SAFE_RANGE, +// QMKURL +// }; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_BL] = LAYOUT_numpad_5x4( + /* Base Layer: Number Pad + * ,---------------. + * |FN | / | * | - | + * |---+---+---|---| + * | 7 | 8 | 9 | | + * |---+---+---| + | + * | 4 | 5 | 6 | | + * |---+---+---|---| + * | 1 | 2 | 3 | | + * |---+---+---|Ent| + * | 0 | . | | + * `---------------' + */ + MO(_FN), KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, KC_PDOT, KC_PENT + ), + /* Function Layer: RGB Controls and Numlock + * ,---------------. + * |FN |TOG|M+ |M- | Mode + * |---+---+---|---| + * | |H- |H+ | | Hue + * |---+---+---| | + * | |S- |S+ | | Saturation + * |---+---+---|---| + * | |B- |B+ |NUM| Brightness + * |---+---+---| | + * | | |LCK| + * `---------------' + */ + [_FN] = LAYOUT_numpad_5x4( + KC_TRNS, RGB_TOG, RGB_MOD, RGB_RMOD, \ + KC_NO, RGB_HUD, RGB_HUI, \ + KC_NO, RGB_SAD, RGB_SAI, KC_NO, \ + KC_NO, RGB_VAD, RGB_VAI, \ + KC_NO, KC_NO, KC_NLCK + ), +}; + +// Handles macros for keycodes defined above. +// Disabled as it isn't used in this keymap, but available for modification. +// bool process_record_user(uint16_t keycode, keyrecord_t *record) { +// switch (keycode) { +// case QMKBEST: +// if (record->event.pressed) { +// // when keycode QMKBEST is pressed +// SEND_STRING("QMK is the best thing ever!"); +// } else { +// // when keycode QMKBEST is released +// } +// break; +// case QMKURL: +// if (record->event.pressed) { +// // when keycode QMKURL is pressed +// SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER)); +// } else { +// // when keycode QMKURL is released +// } +// break; +// } +// return true; +// } + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sentraq/number_pad/keymaps/default/readme.md b/keyboards/sentraq/number_pad/keymaps/default/readme.md new file mode 100644 index 000000000..a2c0e7567 --- /dev/null +++ b/keyboards/sentraq/number_pad/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for Sentraq Number Pad RGB DIY Kit diff --git a/keyboards/sentraq/number_pad/number_pad.c b/keyboards/sentraq/number_pad/number_pad.c new file mode 100644 index 000000000..8c39efac5 --- /dev/null +++ b/keyboards/sentraq/number_pad/number_pad.c @@ -0,0 +1,43 @@ +/* Copyright 2019 QMK Community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#include "number_pad.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(); +} + +bool process_record_kb(uint16_t keycode, keyrecord_t *record) { + // put your per-action keyboard code here + // runs for every action, just before processing by the firmware + + return process_record_user(keycode, record); +} + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + led_set_user(usb_led); +} diff --git a/keyboards/sentraq/number_pad/number_pad.h b/keyboards/sentraq/number_pad/number_pad.h new file mode 100644 index 000000000..05bcd527c --- /dev/null +++ b/keyboards/sentraq/number_pad/number_pad.h @@ -0,0 +1,56 @@ +/* Copyright 2019 QMK Community + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ +#define LAYOUT_numpad_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, \ + K20, K21, K22, K23, \ + K30, K31, K32, \ + K40, K42, K43 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, KC_NO }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, KC_NO }, \ + { K40, KC_NO, K42, K43 } \ +} + +#define LAYOUT_ortho_5x4( \ + K00, K01, K02, K03, \ + K10, K11, K12, K13, \ + K20, K21, K22, K23, \ + K30, K31, K32, K33, \ + K40, K41, K42, K43 \ +) \ +{ \ + { K00, K01, K02, K03 }, \ + { K10, K11, K12, K13 }, \ + { K20, K21, K22, K23 }, \ + { K30, K31, K32, K33 }, \ + { K40, K41, K42, K43 } \ +} diff --git a/keyboards/sentraq/number_pad/readme.md b/keyboards/sentraq/number_pad/readme.md new file mode 100644 index 000000000..ce9bfe435 --- /dev/null +++ b/keyboards/sentraq/number_pad/readme.md @@ -0,0 +1,13 @@ +# Sentraq Number Pad RGB DIY Kit + +Sentraq Number Pad RGB DIY Kit. + +Keyboard Maintainer: QMK Community\ +Hardware Supported: Sentraq Number Pad PCB\ +Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/number-pad-rgb-kit) + +Make example for this keyboard (after setting up your build environment): + + make sentraq/number_pad:default:dfu + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/sentraq/number_pad/rules.mk b/keyboards/sentraq/number_pad/rules.mk new file mode 100644 index 000000000..8678b7f88 --- /dev/null +++ b/keyboards/sentraq/number_pad/rules.mk @@ -0,0 +1,80 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + + +# If you don't know the bootloader type, then you can specify the +# Boot Section Size in *bytes* by uncommenting out the OPT_DEFS line +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality on B7 by default +RGBLIGHT_ENABLE = yes # Enable keyboard RGB underglow +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches +HD44780_ENABLE = no # Enable support for HD44780 based LCDs (+400) diff --git a/keyboards/s60_x/config.h b/keyboards/sentraq/s60_x/config.h index 8b97b3c81..bb2602dca 100644 --- a/keyboards/s60_x/config.h +++ b/keyboards/sentraq/s60_x/config.h @@ -44,11 +44,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef SUBPROJECT_default #include "default/config.h" #endif diff --git a/keyboards/s60_x/default/config.h b/keyboards/sentraq/s60_x/default/config.h index 25fc4ad2e..f6b7f8d68 100644 --- a/keyboards/s60_x/default/config.h +++ b/keyboards/sentraq/s60_x/default/config.h @@ -13,11 +13,6 @@ #define LOCKING_SUPPORT_ENABLE #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #define NO_ACTION_ONESHOT #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/s60_x/default/default.c b/keyboards/sentraq/s60_x/default/default.c index 253f5495c..253f5495c 100644 --- a/keyboards/s60_x/default/default.c +++ b/keyboards/sentraq/s60_x/default/default.c diff --git a/keyboards/s60_x/default/default.h b/keyboards/sentraq/s60_x/default/default.h index f3646f155..f3646f155 100644 --- a/keyboards/s60_x/default/default.h +++ b/keyboards/sentraq/s60_x/default/default.h diff --git a/keyboards/s60_x/default/info.json b/keyboards/sentraq/s60_x/default/info.json index 1aa2dbf3e..1aa2dbf3e 100644 --- a/keyboards/s60_x/default/info.json +++ b/keyboards/sentraq/s60_x/default/info.json diff --git a/keyboards/s60_x/default/rules.mk b/keyboards/sentraq/s60_x/default/rules.mk index ce4064d1c..ce4064d1c 100644 --- a/keyboards/s60_x/default/rules.mk +++ b/keyboards/sentraq/s60_x/default/rules.mk diff --git a/keyboards/s60_x/keymaps/amnesia0287/keymap.c b/keyboards/sentraq/s60_x/keymaps/amnesia0287/keymap.c index c17c9e744..c17c9e744 100644 --- a/keyboards/s60_x/keymaps/amnesia0287/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/amnesia0287/keymap.c diff --git a/keyboards/s60_x/keymaps/amnesia0287/readme.md b/keyboards/sentraq/s60_x/keymaps/amnesia0287/readme.md index 69cede566..69cede566 100644 --- a/keyboards/s60_x/keymaps/amnesia0287/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/amnesia0287/readme.md diff --git a/keyboards/dilly/keymaps/default/config.h b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h index 7fa3bf328..aee65690f 100644 --- a/keyboards/dilly/keymaps/default/config.h +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/config.h @@ -3,4 +3,7 @@ #include "../../config.h" +// keymap needs oneshot functionality +#undef NO_ACTION_ONESHOT + #endif diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg index f03858993..f03858993 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg index 2304b2a4c..2304b2a4c 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International-Alternative.svg.2016_08_18_09_06_36.0.svg diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg index 1ca6a9c87..1ca6a9c87 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/docs/KB_US-International.svg diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c index e4660e668..e4660e668 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/keymap.c diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/readme.md b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/readme.md index 7fab63b73..7fab63b73 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/readme.md diff --git a/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk index 1bcd7ea7f..1bcd7ea7f 100644 --- a/keyboards/s60_x/keymaps/ansi_qwertz/rules.mk +++ b/keyboards/sentraq/s60_x/keymaps/ansi_qwertz/rules.mk diff --git a/keyboards/s60_x/keymaps/bluebear/config.h b/keyboards/sentraq/s60_x/keymaps/bluebear/config.h index 10bddf0d3..c1db5f64a 100644 --- a/keyboards/s60_x/keymaps/bluebear/config.h +++ b/keyboards/sentraq/s60_x/keymaps/bluebear/config.h @@ -38,11 +38,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 3 diff --git a/keyboards/s60_x/keymaps/bluebear/keymap.c b/keyboards/sentraq/s60_x/keymaps/bluebear/keymap.c index 2ba29b09e..2ba29b09e 100644 --- a/keyboards/s60_x/keymaps/bluebear/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/bluebear/keymap.c diff --git a/keyboards/s60_x/keymaps/bluebear/readme.md b/keyboards/sentraq/s60_x/keymaps/bluebear/readme.md index d2cf6a4c5..d2cf6a4c5 100644 --- a/keyboards/s60_x/keymaps/bluebear/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/bluebear/readme.md diff --git a/keyboards/s60_x/keymaps/bluebear/rules.mk b/keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk index b7c9a0479..b7c9a0479 100644 --- a/keyboards/s60_x/keymaps/bluebear/rules.mk +++ b/keyboards/sentraq/s60_x/keymaps/bluebear/rules.mk diff --git a/keyboards/s60_x/keymaps/custom/keymap.c b/keyboards/sentraq/s60_x/keymaps/custom/keymap.c index c98d14349..c98d14349 100644 --- a/keyboards/s60_x/keymaps/custom/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/custom/keymap.c diff --git a/keyboards/s60_x/keymaps/custom/readme.md b/keyboards/sentraq/s60_x/keymaps/custom/readme.md index fd79d5360..fd79d5360 100644 --- a/keyboards/s60_x/keymaps/custom/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/custom/readme.md diff --git a/keyboards/s60_x/keymaps/dbroqua/keymap.c b/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c index 71cf93f00..71cf93f00 100644 --- a/keyboards/s60_x/keymaps/dbroqua/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/dbroqua/keymap.c diff --git a/keyboards/s60_x/keymaps/default/keymap.c b/keyboards/sentraq/s60_x/keymaps/default/keymap.c index c730505cd..5ea40bf89 100644 --- a/keyboards/s60_x/keymaps/default/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 0: ANSI qwerty */ @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, \ 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_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL \ ), /* 1: Fn layer @@ -49,7 +49,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/s60_x/keymaps/default/readme.md b/keyboards/sentraq/s60_x/keymaps/default/readme.md index 01cda9df9..01cda9df9 100644 --- a/keyboards/s60_x/keymaps/default/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/default/readme.md diff --git a/keyboards/s60_x/keymaps/default_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c index fdaa6065b..8f10ad046 100644 --- a/keyboards/s60_x/keymaps/default_rgb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/default_rgb/keymap.c @@ -16,7 +16,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ * │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ * ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ + * │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ * └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ /* 0: ANSI qwerty */ @@ -25,7 +25,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, \ 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_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL \ ), /* 1: Fn layer @@ -51,7 +51,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______, _______, _______, _______, _______, _______ \ ), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/s60_x/keymaps/default_rgb/readme.md b/keyboards/sentraq/s60_x/keymaps/default_rgb/readme.md index 69cede566..69cede566 100644 --- a/keyboards/s60_x/keymaps/default_rgb/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/default_rgb/readme.md diff --git a/keyboards/s60_x/keymaps/hasu/keymap.c b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c index 76398697c..76398697c 100644 --- a/keyboards/s60_x/keymaps/hasu/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hasu/keymap.c diff --git a/keyboards/s60_x/keymaps/hasu/readme.md b/keyboards/sentraq/s60_x/keymaps/hasu/readme.md index b79d0e97a..b79d0e97a 100644 --- a/keyboards/s60_x/keymaps/hasu/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/hasu/readme.md diff --git a/keyboards/s60_x/keymaps/hhkb/keymap.c b/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c index b572b4484..b572b4484 100644 --- a/keyboards/s60_x/keymaps/hhkb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/hhkb/keymap.c diff --git a/keyboards/s60_x/keymaps/hhkb/readme.md b/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md index c7dcec899..c7dcec899 100644 --- a/keyboards/s60_x/keymaps/hhkb/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/hhkb/readme.md diff --git a/keyboards/s60_x/keymaps/iso/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c index d10bfcc13..aec23f1ae 100644 --- a/keyboards/s60_x/keymaps/iso/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/iso/keymap.c @@ -10,7 +10,7 @@ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ -│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, NO, \ CAPS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, NUHS, ENT , \ LSFT, BSLS, Z, X, C, V, B, N, M, COMM, DOT, SLSH, NO, RSFT, NO, \ - LCTL, LGUI, LALT, SPC, RALT, FN0, APP, RCTL), + LCTL, LGUI, LALT, SPC, RALT, MO(1),APP, RCTL), /* 1: Fn layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -42,7 +42,3 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, \ TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/s60_x/keymaps/iso/readme.md b/keyboards/sentraq/s60_x/keymaps/iso/readme.md index 2c06bf86f..2c06bf86f 100644 --- a/keyboards/s60_x/keymaps/iso/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/iso/readme.md diff --git a/keyboards/s60_x/keymaps/iso_rgb/keymap.c b/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c index d76055a82..22651885d 100644 --- a/keyboards/s60_x/keymaps/iso_rgb/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/iso_rgb/keymap.c @@ -10,7 +10,7 @@ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│▒▒▒▒▒│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ -│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │RCTRL│█████│ +│LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ MO1 │ APP │RCTRL│█████│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ */ @@ -20,7 +20,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, \ 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_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_NO, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_FN0, KC_APP, KC_RCTL), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL), /* 1: Fn layer UG = Underglow = RGB Backlighting @@ -44,7 +44,3 @@ BL = Backlighting = In-Switch LED KC_TRNS, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, BL_DEC, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; - -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; diff --git a/keyboards/s60_x/keymaps/iso_rgb/readme.md b/keyboards/sentraq/s60_x/keymaps/iso_rgb/readme.md index d02498e6a..d02498e6a 100644 --- a/keyboards/s60_x/keymaps/iso_rgb/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/iso_rgb/readme.md diff --git a/keyboards/s60_x/keymaps/jpec/keymap.c b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c index 4d84396e3..4d84396e3 100644 --- a/keyboards/s60_x/keymaps/jpec/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/jpec/keymap.c diff --git a/keyboards/s60_x/keymaps/jpec/readme.md b/keyboards/sentraq/s60_x/keymaps/jpec/readme.md index 73318dad7..73318dad7 100644 --- a/keyboards/s60_x/keymaps/jpec/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/jpec/readme.md diff --git a/keyboards/s60_x/keymaps/plain/keymap.c b/keyboards/sentraq/s60_x/keymaps/plain/keymap.c index 3cdda7562..3cdda7562 100644 --- a/keyboards/s60_x/keymaps/plain/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/plain/keymap.c diff --git a/keyboards/s60_x/keymaps/plain/readme.md b/keyboards/sentraq/s60_x/keymaps/plain/readme.md index 02f524495..02f524495 100644 --- a/keyboards/s60_x/keymaps/plain/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/plain/readme.md diff --git a/keyboards/s60_x/keymaps/poker/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c index 61685b477..61685b477 100644 --- a/keyboards/s60_x/keymaps/poker/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker/keymap.c diff --git a/keyboards/s60_x/keymaps/poker/readme.md b/keyboards/sentraq/s60_x/keymaps/poker/readme.md index 04d2b78be..04d2b78be 100644 --- a/keyboards/s60_x/keymaps/poker/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/poker/readme.md diff --git a/keyboards/s60_x/keymaps/poker_bit/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c index d66cc93c3..d66cc93c3 100644 --- a/keyboards/s60_x/keymaps/poker_bit/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_bit/keymap.c diff --git a/keyboards/s60_x/keymaps/poker_bit/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md index 04d2b78be..04d2b78be 100644 --- a/keyboards/s60_x/keymaps/poker_bit/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/poker_bit/readme.md diff --git a/keyboards/s60_x/keymaps/poker_set/keymap.c b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c index 3f6392467..3f6392467 100644 --- a/keyboards/s60_x/keymaps/poker_set/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/poker_set/keymap.c diff --git a/keyboards/s60_x/keymaps/poker_set/readme.md b/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md index 04d2b78be..04d2b78be 100644 --- a/keyboards/s60_x/keymaps/poker_set/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/poker_set/readme.md diff --git a/keyboards/s60_x/keymaps/spacefn/keymap.c b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c index b0d08202d..b0d08202d 100644 --- a/keyboards/s60_x/keymaps/spacefn/keymap.c +++ b/keyboards/sentraq/s60_x/keymaps/spacefn/keymap.c diff --git a/keyboards/s60_x/keymaps/spacefn/readme.md b/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md index fd657f652..fd657f652 100644 --- a/keyboards/s60_x/keymaps/spacefn/readme.md +++ b/keyboards/sentraq/s60_x/keymaps/spacefn/readme.md diff --git a/keyboards/s60_x/readme.md b/keyboards/sentraq/s60_x/readme.md index 1e4b4cc31..09ad068e7 100644 --- a/keyboards/s60_x/readme.md +++ b/keyboards/sentraq/s60_x/readme.md @@ -6,14 +6,14 @@ Keyboard Maintainer: QMK Community Hardware Supported: S60-x PCB Hardware Availability: https://www.massdrop.com/buy/sentraq-60-diy-keyboard-kit?mode=guest_open -There are two versions of this keyboard, an RGB and a non RGB one. +There are two versions of this keyboard, an RGB and a non RGB one. Make example for this keyboard (after setting up your build environment): - make s60_x:default + make sentraq/s60_x:default Make example for rgb version of this keyboard: - make s60_x/rgb:default + make sentraq/s60_x/rgb:default -See [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) then the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/s60_x/rgb/config.h b/keyboards/sentraq/s60_x/rgb/config.h index d9c26658d..d9c26658d 100644 --- a/keyboards/s60_x/rgb/config.h +++ b/keyboards/sentraq/s60_x/rgb/config.h diff --git a/keyboards/s60_x/rgb/info.json b/keyboards/sentraq/s60_x/rgb/info.json index 1aa2dbf3e..1aa2dbf3e 100644 --- a/keyboards/s60_x/rgb/info.json +++ b/keyboards/sentraq/s60_x/rgb/info.json diff --git a/keyboards/s60_x/rgb/rgb.c b/keyboards/sentraq/s60_x/rgb/rgb.c index 0117e14ae..0117e14ae 100644 --- a/keyboards/s60_x/rgb/rgb.c +++ b/keyboards/sentraq/s60_x/rgb/rgb.c diff --git a/keyboards/s60_x/rgb/rgb.h b/keyboards/sentraq/s60_x/rgb/rgb.h index d70473eea..d70473eea 100644 --- a/keyboards/s60_x/rgb/rgb.h +++ b/keyboards/sentraq/s60_x/rgb/rgb.h diff --git a/keyboards/s60_x/rgb/rules.mk b/keyboards/sentraq/s60_x/rgb/rules.mk index 42d45c332..42d45c332 100644 --- a/keyboards/s60_x/rgb/rules.mk +++ b/keyboards/sentraq/s60_x/rgb/rules.mk diff --git a/keyboards/s60_x/rules.mk b/keyboards/sentraq/s60_x/rules.mk index 9f0ae7cae..31de8ba39 100644 --- a/keyboards/s60_x/rules.mk +++ b/keyboards/sentraq/s60_x/rules.mk @@ -64,6 +64,6 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 -DEFAULT_FOLDER = s60_x/default +DEFAULT_FOLDER = sentraq/s60_x/default LAYOUTS = 60_ansi 60_ansi_split_bs_rshift 60_iso diff --git a/keyboards/s60_x/s60_x.c b/keyboards/sentraq/s60_x/s60_x.c index 595418bfa..595418bfa 100644 --- a/keyboards/s60_x/s60_x.c +++ b/keyboards/sentraq/s60_x/s60_x.c diff --git a/keyboards/s60_x/s60_x.h b/keyboards/sentraq/s60_x/s60_x.h index b70cb5864..59c9741b5 100644 --- a/keyboards/s60_x/s60_x.h +++ b/keyboards/sentraq/s60_x/s60_x.h @@ -1,10 +1,10 @@ #ifndef S60X_H #define S60X_H -#ifdef KEYBOARD_s60_x_default +#ifdef KEYBOARD_sentraq_s60_x_default #include "default.h" #endif -#ifdef KEYBOARD_s60_x_rgb +#ifdef KEYBOARD_sentraq_s60_x_rgb #include "rgb.h" #endif diff --git a/keyboards/s65_plus/config.h b/keyboards/sentraq/s65_plus/config.h index 60512db46..c45fd2412 100644 --- a/keyboards/s65_plus/config.h +++ b/keyboards/sentraq/s65_plus/config.h @@ -44,9 +44,4 @@ /* 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)) \ -) - #endif diff --git a/keyboards/s65_plus/info.json b/keyboards/sentraq/s65_plus/info.json index 1b17ddb53..1b17ddb53 100644 --- a/keyboards/s65_plus/info.json +++ b/keyboards/sentraq/s65_plus/info.json diff --git a/keyboards/s65_plus/keymaps/default/keymap.c b/keyboards/sentraq/s65_plus/keymaps/default/keymap.c index bbeea6a8f..bbeea6a8f 100644 --- a/keyboards/s65_plus/keymaps/default/keymap.c +++ b/keyboards/sentraq/s65_plus/keymaps/default/keymap.c diff --git a/keyboards/s65_plus/keymaps/iso/keymap.c b/keyboards/sentraq/s65_plus/keymaps/iso/keymap.c index 2218d051f..2218d051f 100644 --- a/keyboards/s65_plus/keymaps/iso/keymap.c +++ b/keyboards/sentraq/s65_plus/keymaps/iso/keymap.c diff --git a/keyboards/s65_plus/keymaps/iso/readme.md b/keyboards/sentraq/s65_plus/keymaps/iso/readme.md index de1d9adf8..de1d9adf8 100644 --- a/keyboards/s65_plus/keymaps/iso/readme.md +++ b/keyboards/sentraq/s65_plus/keymaps/iso/readme.md diff --git a/keyboards/s65_plus/readme.md b/keyboards/sentraq/s65_plus/readme.md index b1ee865bf..0940d9a4f 100644 --- a/keyboards/s65_plus/readme.md +++ b/keyboards/sentraq/s65_plus/readme.md @@ -9,6 +9,6 @@ Hardware Availability: [Sentraq](https://sentraq.com/collections/kits/products/s Make example for this keyboard (after setting up your build environment): - make s65_plus:default + make sentraq/s65_plus:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/s65_plus/rules.mk b/keyboards/sentraq/s65_plus/rules.mk index 08dd2d93c..08dd2d93c 100644 --- a/keyboards/s65_plus/rules.mk +++ b/keyboards/sentraq/s65_plus/rules.mk diff --git a/keyboards/s65_plus/s65_plus.c b/keyboards/sentraq/s65_plus/s65_plus.c index 3eaaa3717..3eaaa3717 100644 --- a/keyboards/s65_plus/s65_plus.c +++ b/keyboards/sentraq/s65_plus/s65_plus.c diff --git a/keyboards/s65_plus/s65_plus.h b/keyboards/sentraq/s65_plus/s65_plus.h index 95d06122e..95d06122e 100644 --- a/keyboards/s65_plus/s65_plus.h +++ b/keyboards/sentraq/s65_plus/s65_plus.h diff --git a/keyboards/s65_x/config.h b/keyboards/sentraq/s65_x/config.h index aed55632a..486765273 100644 --- a/keyboards/s65_x/config.h +++ b/keyboards/sentraq/s65_x/config.h @@ -4,7 +4,7 @@ #include "config_common.h" /* USB Device descriptor parameter */ -#define PRODUCT S65-X-RGB +#define PRODUCT S65-X RGB #define DESCRIPTION QMK keyboard firmware for S65-X RGB #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 @@ -22,7 +22,8 @@ /* number of backlight levels */ #define BACKLIGHT_PIN B7 -#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_LEVELS 5 +#define BACKLIGHT_CAPS_LOCK #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS @@ -31,6 +32,7 @@ #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 #define RGBLIGHT_EFFECT_KNIGHT_OFFSET 20 +#define RGBLIGHT_SLEEP /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -44,9 +46,4 @@ /* 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)) \ -) - #endif diff --git a/keyboards/s65_x/info.json b/keyboards/sentraq/s65_x/info.json index 9aeb7eb7d..9aeb7eb7d 100644 --- a/keyboards/s65_x/info.json +++ b/keyboards/sentraq/s65_x/info.json diff --git a/keyboards/s65_x/keymaps/default/keymap.c b/keyboards/sentraq/s65_x/keymaps/default/keymap.c index a2fd12ed6..00ae4d0a2 100644 --- a/keyboards/s65_x/keymaps/default/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/default/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │Shift │ Z │ X │ C │ V │ B │ N │ M │, <│. >│/ ?│Shift │Up │PDn│ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │Ctrl│Alt │GUI │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ + * │Ctrl│GUI │Alt │Space │Alt│Fn │Ctl│Lft│Dwn│Rgt│ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, KC_END, \ FL_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ KC_LSFT, 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_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), @@ -42,7 +42,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ * │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴──┬┴──┬┴──┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ + * │ │Swp │Nrm │ │ │ │ │ │ │ │ * └────┴────┴────┴────────────────────────┴───┴───┴───┴───┴───┴───┘ */ @@ -51,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + _______, AG_SWAP, AG_NORM, _______, _______, _______, _______, _______, _______, _______ \ ), diff --git a/keyboards/s65_x/keymaps/default/readme.md b/keyboards/sentraq/s65_x/keymaps/default/readme.md index 213cbe49e..96fa2ff53 100644 --- a/keyboards/s65_x/keymaps/default/readme.md +++ b/keyboards/sentraq/s65_x/keymaps/default/readme.md @@ -1,5 +1,5 @@ -### 1 ANSI -A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys. +### 1 ANSI +An ANSI layout that assumes standard sized shifts, enter, and backspace keys. #### 1.0 Default layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -11,7 +11,7 @@ A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys. ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │LSHFT│▒▒▒▒▒│ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │▒▒▒▒▒│RSHFT│ UP │PG_DN│ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │LCTRL│L_ALT│L_GUI│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │ APP │LEFT │DOWN │RIGHT│ + │LCTRL│L_GUI│L_ALT│█████│█████│█████│ SPC │█████│█████│█████│R_ALT│ FN0 │RCTRL│LEFT │DOWN │RIGHT│ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ #### 1.1 Fn layer ┌─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┬─────┐ @@ -23,5 +23,10 @@ A Mac ANSI layout that assumes standard sized shifts, enter, and backspace keys. ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ │ │▒▒▒▒▒│_UL │ │ │ │ │ │ │Home │ End │ │▒▒▒▒▒│▒▒▒▒▒│Vol+ │ │ ├─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┼─────┤ - │ │ │ │█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ + │ │AG_SW│AG_NR│█████│█████│█████│ │█████│█████│█████│ │ │ │Mute │Vol- │Play │ └─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┴─────┘ + +#### MacOS + +This keymap supports swapping the GUI and ALT keys using the Fn layer. See the +AG_SWAP and AG_NORM bindings to swap the two keys. diff --git a/keyboards/s65_x/keymaps/iso/keymap.c b/keyboards/sentraq/s65_x/keymaps/iso/keymap.c index f5a0a8630..f5a0a8630 100644 --- a/keyboards/s65_x/keymaps/iso/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/iso/keymap.c diff --git a/keyboards/s65_x/keymaps/iso/readme.md b/keyboards/sentraq/s65_x/keymaps/iso/readme.md index 179b0b908..179b0b908 100644 --- a/keyboards/s65_x/keymaps/iso/readme.md +++ b/keyboards/sentraq/s65_x/keymaps/iso/readme.md diff --git a/keyboards/s65_x/keymaps/kelorean/keymap.c b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c index 7a0de8559..7a0de8559 100644 --- a/keyboards/s65_x/keymaps/kelorean/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/kelorean/keymap.c diff --git a/keyboards/s65_x/keymaps/kelorean/readme.md b/keyboards/sentraq/s65_x/keymaps/kelorean/readme.md index 12e39eae6..12e39eae6 100644 --- a/keyboards/s65_x/keymaps/kelorean/readme.md +++ b/keyboards/sentraq/s65_x/keymaps/kelorean/readme.md diff --git a/keyboards/s65_x/keymaps/nall/keymap.c b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c index a5daed006..a5daed006 100644 --- a/keyboards/s65_x/keymaps/nall/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/nall/keymap.c diff --git a/keyboards/s65_x/keymaps/smt/keymap.c b/keyboards/sentraq/s65_x/keymaps/smt/keymap.c index 8c3984c21..8c3984c21 100644 --- a/keyboards/s65_x/keymaps/smt/keymap.c +++ b/keyboards/sentraq/s65_x/keymaps/smt/keymap.c diff --git a/keyboards/s65_x/readme.md b/keyboards/sentraq/s65_x/readme.md index d1dbdb10b..d6d309c84 100644 --- a/keyboards/s65_x/readme.md +++ b/keyboards/sentraq/s65_x/readme.md @@ -9,6 +9,6 @@ Hardware Availability: [Sentraq](https://sentraq.com/products/s65-x-rgb-diy-keyb Make example for this keyboard (after setting up your build environment): - make s65_x:default + make sentraq/s65_x:default See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/s65_x/rules.mk b/keyboards/sentraq/s65_x/rules.mk index c97f7323e..598e269cb 100644 --- a/keyboards/s65_x/rules.mk +++ b/keyboards/sentraq/s65_x/rules.mk @@ -53,7 +53,7 @@ OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options # change yes to no to disable # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = full # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = no # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE diff --git a/keyboards/s65_x/s65_x.c b/keyboards/sentraq/s65_x/s65_x.c index 29073750c..844f5cf28 100644 --- a/keyboards/s65_x/s65_x.c +++ b/keyboards/sentraq/s65_x/s65_x.c @@ -1,5 +1,4 @@ #include "s65_x.h" -#include "led.h" void matrix_init_kb(void) { // put your keyboard start-up code here @@ -14,11 +13,6 @@ void matrix_scan_kb(void) { }; void led_set_kb(uint8_t usb_led) { - if (usb_led & (1<<USB_LED_CAPS_LOCK)) { - // Turn capslock on - PORTB &= ~(1<<7); - } else { - // Turn capslock off - PORTB |= (1<<7); - } + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + led_set_user(usb_led); } diff --git a/keyboards/s65_x/s65_x.h b/keyboards/sentraq/s65_x/s65_x.h index aef920575..aef920575 100644 --- a/keyboards/s65_x/s65_x.h +++ b/keyboards/sentraq/s65_x/s65_x.h diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h index a76a4b98f..54cacee2e 100644 --- a/keyboards/singa/config.h +++ b/keyboards/singa/config.h @@ -43,7 +43,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/sirius/unigo66/config.h b/keyboards/sirius/unigo66/config.h new file mode 100644 index 000000000..e5e45f905 --- /dev/null +++ b/keyboards/sirius/unigo66/config.h @@ -0,0 +1,53 @@ +/* +Copyright 2017 Balz Guenat <balz.guenat@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#define CUSTOM_MATRIX 2 + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1001 +#define DEVICE_VER 0x1901 +#define MANUFACTURER Sirius +#define PRODUCT UniGo66 +#define DESCRIPTION UniGo66 Wireless Split keyboard + +/* size of virtual matrix */ +#define MATRIX_ROWS 16 +#define MATRIX_COLS 16 + +/* matrix scanning is done in custom_matrix.cpp */ +#define DIODE_DIRECTION CUSTOM_MATRIX + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION diff --git a/keyboards/sirius/unigo66/custom_matrix.cpp b/keyboards/sirius/unigo66/custom_matrix.cpp new file mode 100644 index 000000000..fba107c7c --- /dev/null +++ b/keyboards/sirius/unigo66/custom_matrix.cpp @@ -0,0 +1,242 @@ +/* +Copyright 2016 Jun Wako <wakojun@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include <stdint.h> +#include <stdbool.h> + +// USB HID host +#include "Usb.h" +#include "usbhub.h" +#include "hid.h" +#include "hidboot.h" +#include "parser.h" + +#include "keycode.h" +#include "util.h" +#include "print.h" +#include "debug.h" +#include "timer.h" +#include "matrix.h" +#include "led.h" +#include "host.h" +#include "keyboard.h" + +extern "C" { +#include "quantum.h" +} + +/* KEY CODE to Matrix + * + * HID keycode(1 byte): + * Higher 5 bits indicates ROW and lower 3 bits COL. + * + * 7 6 5 4 3 2 1 0 + * +---------------+ + * | ROW | COL | + * +---------------+ + * + * Matrix space(16 * 16): + * r\c0123456789ABCDEF + * 0 +----------------+ + * : | | + * : | | + * 16 +----------------+ + */ +#define ROW_MASK 0xF0 +#define COL_MASK 0x0F +#define CODE(row, col) (((row) << 4) | (col)) +#define ROW(code) (((code) & ROW_MASK) >> 4) +#define COL(code) ((code) & COL_MASK) +#define ROW_BITS(code) (1 << COL(code)) + + +// Integrated key state of all keyboards +static report_keyboard_t local_keyboard_report; + +static bool matrix_is_mod = false; + +/* + * USB Host Shield HID keyboards + * This supports two cascaded hubs and four keyboards + */ +USB usb_host; +USBHub hub1(&usb_host); +USBHub hub2(&usb_host); +HIDBoot<HID_PROTOCOL_KEYBOARD> kbd1(&usb_host); +HIDBoot<HID_PROTOCOL_KEYBOARD> kbd2(&usb_host); +HIDBoot<HID_PROTOCOL_KEYBOARD> kbd3(&usb_host); +HIDBoot<HID_PROTOCOL_KEYBOARD> kbd4(&usb_host); +KBDReportParser kbd_parser1; +KBDReportParser kbd_parser2; +KBDReportParser kbd_parser3; +KBDReportParser kbd_parser4; + + +extern "C" +{ + uint8_t matrix_rows(void) { return MATRIX_ROWS; } + uint8_t matrix_cols(void) { return MATRIX_COLS; } + bool matrix_has_ghost(void) { return false; } + void matrix_init(void) { + // USB Host Shield setup + usb_host.Init(); + kbd1.SetReportParser(0, (HIDReportParser*)&kbd_parser1); + kbd2.SetReportParser(0, (HIDReportParser*)&kbd_parser2); + kbd3.SetReportParser(0, (HIDReportParser*)&kbd_parser3); + kbd4.SetReportParser(0, (HIDReportParser*)&kbd_parser4); + } + + static void or_report(report_keyboard_t report) { + // integrate reports into local_keyboard_report + local_keyboard_report.mods |= report.mods; + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(report.keys[i])) { + for (uint8_t j = 0; j < KEYBOARD_REPORT_KEYS; j++) { + if (! local_keyboard_report.keys[j]) { + local_keyboard_report.keys[j] = report.keys[i]; + break; + } + } + } + } + } + + uint8_t matrix_scan(void) { + static uint16_t last_time_stamp1 = 0; + static uint16_t last_time_stamp2 = 0; + static uint16_t last_time_stamp3 = 0; + static uint16_t last_time_stamp4 = 0; + + // check report came from keyboards + if (kbd_parser1.time_stamp != last_time_stamp1 || + kbd_parser2.time_stamp != last_time_stamp2 || + kbd_parser3.time_stamp != last_time_stamp3 || + kbd_parser4.time_stamp != last_time_stamp4) { + + last_time_stamp1 = kbd_parser1.time_stamp; + last_time_stamp2 = kbd_parser2.time_stamp; + last_time_stamp3 = kbd_parser3.time_stamp; + last_time_stamp4 = kbd_parser4.time_stamp; + + // clear and integrate all reports + local_keyboard_report = {}; + or_report(kbd_parser1.report); + or_report(kbd_parser2.report); + or_report(kbd_parser3.report); + or_report(kbd_parser4.report); + + matrix_is_mod = true; + + dprintf("state: %02X %02X", local_keyboard_report.mods, local_keyboard_report.reserved); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + dprintf(" %02X", local_keyboard_report.keys[i]); + } + dprint("\r\n"); + } else { + matrix_is_mod = false; + } + + uint16_t timer; + timer = timer_read(); + usb_host.Task(); + timer = timer_elapsed(timer); + if (timer > 100) { + dprintf("host.Task: %d\n", timer); + } + + static uint8_t usb_state = 0; + if (usb_state != usb_host.getUsbTaskState()) { + usb_state = usb_host.getUsbTaskState(); + dprintf("usb_state: %02X\n", usb_state); + + // restore LED state when keyboard comes up + if (usb_state == USB_STATE_RUNNING) { + dprintf("speed: %s\n", usb_host.getVbusState()==FSHOST ? "full" : "low"); + keyboard_set_leds(host_keyboard_leds()); + } + } + return 1; + } + + bool matrix_is_modified(void) { + return matrix_is_mod; + } + + bool matrix_is_on(uint8_t row, uint8_t col) { + uint8_t code = CODE(row, col); + + if (IS_MOD(code)) { + if (local_keyboard_report.mods & ROW_BITS(code)) { + return true; + } + } + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (local_keyboard_report.keys[i] == code) { + return true; + } + } + return false; + } + + matrix_row_t matrix_get_row(uint8_t row) { + uint16_t row_bits = 0; + + if (IS_MOD(CODE(row, 0)) && local_keyboard_report.mods) { + row_bits |= local_keyboard_report.mods; + } + + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(local_keyboard_report.keys[i])) { + if (row == ROW(local_keyboard_report.keys[i])) { + row_bits |= ROW_BITS(local_keyboard_report.keys[i]); + } + } + } + return row_bits; + } + + uint8_t matrix_key_count(void) { + uint8_t count = 0; + + count += bitpop(local_keyboard_report.mods); + for (uint8_t i = 0; i < KEYBOARD_REPORT_KEYS; i++) { + if (IS_ANY(local_keyboard_report.keys[i])) { + count++; + } + } + return count; + } + + void matrix_print(void) { + print("\nr/c 0123456789ABCDEF\n"); + for (uint8_t row = 0; row < matrix_rows(); row++) { + xprintf("%02d: ", row); + print_bin_reverse16(matrix_get_row(row)); + print("\n"); + } + } + + void led_set(uint8_t usb_led) + { + kbd1.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd2.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd3.SetReport(0, 0, 2, 0, 1, &usb_led); + kbd4.SetReport(0, 0, 2, 0, 1, &usb_led); + led_set_kb(usb_led); + } + +}; diff --git a/keyboards/sirius/unigo66/info.json b/keyboards/sirius/unigo66/info.json new file mode 100644 index 000000000..956972de3 --- /dev/null +++ b/keyboards/sirius/unigo66/info.json @@ -0,0 +1,151 @@ +{ + "keyboard_name": "UniGo66", + "url": "https://discord.gg/GJ8bdM", + "maintainer": "qmk", + "width": 17, + "height": 7, + "layouts": { + "LAYOUT": { + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, + {"label":"1", "x":1.5, "y":0}, + {"label":"2", "x":2.5, "y":0}, + {"label":"3", "x":3.5, "y":0}, + {"label":"4", "x":4.5, "y":0}, + {"label":"5", "x":5.5, "y":0}, + {"label":"-", "x":6.5, "y":0}, + {"label":"=", "x":9.5, "y":0}, + {"label":"6", "x":10.5, "y":0}, + {"label":"7", "x":11.5, "y":0}, + {"label":"8", "x":12.5, "y":0}, + {"label":"9", "x":13.5, "y":0}, + {"label":"0", "x":14.5, "y":0}, + {"label":"Bspc", "x":15.5, "y":0, "w":1.5}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"PgUp", "x":6.5, "y":1, "h":1.5}, + {"label":"[", "x":9.5, "y":1, "h":1.5}, + {"label":"Y", "x":10.5, "y":1}, + {"label":"U", "x":11.5, "y":1}, + {"label":"I", "x":12.5, "y":1}, + {"label":"O", "x":13.5, "y":1}, + {"label":"P", "x":14.5, "y":1}, + {"label":"\\", "x":15.5, "y":1, "w":1.5}, + {"label":"Caps", "x":0, "y":2, "w":1.5}, + {"label":"A", "x":1.5, "y":2}, + {"label":"S", "x":2.5, "y":2}, + {"label":"D", "x":3.5, "y":2}, + {"label":"F", "x":4.5, "y":2}, + {"label":"G", "x":5.5, "y":2}, + {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, + {"label":"]", "x":9.5, "y":2.5, "h":1.5}, + {"label":"H", "x":10.5, "y":2}, + {"label":"J", "x":11.5, "y":2}, + {"label":"K", "x":12.5, "y":2}, + {"label":"L", "x":13.5, "y":2}, + {"label":";", "x":14.5, "y":2}, + {"label":"Enter", "x":15.5, "y":2, "w":1.5}, + {"label":"Shift", "x":0, "y":3, "w":1.5}, + {"label":"Z", "x":1.5, "y":3}, + {"label":"X", "x":2.5, "y":3}, + {"label":"C", "x":3.5, "y":3}, + {"label":"V", "x":4.5, "y":3}, + {"label":"B", "x":5.5, "y":3}, + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.5}, + {"label":"Ctrl", "x":0.5, "y":4}, + {"label":"Super", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4}, + {"label":"Space", "x":5.5, "y":5}, + {"label":"Space", "x":5.5, "y":6}, + {"label":"Ins", "x":6.5, "y":5}, + {"label":"Del", "x":6.5, "y":6}, + {"label":"Home", "x":9.5, "y":5}, + {"label":"End", "x":9.5, "y":6}, + {"label":"Space", "x":10.5, "y":5}, + {"label":"Space", "x":10.5, "y":6} + ] + }, + "LAYOUT_beta_pcb": { + "layout": [ + {"label":"Esc", "x":0, "y":0, "w":1.5}, + {"label":"1", "x":1.5, "y":0}, + {"label":"2", "x":2.5, "y":0}, + {"label":"3", "x":3.5, "y":0}, + {"label":"4", "x":4.5, "y":0}, + {"label":"5", "x":5.5, "y":0}, + {"label":"-", "x":6.5, "y":0}, + {"label":"=", "x":9.5, "y":0}, + {"label":"6", "x":10.5, "y":0}, + {"label":"7", "x":11.5, "y":0}, + {"label":"8", "x":12.5, "y":0}, + {"label":"9", "x":13.5, "y":0}, + {"label":"0", "x":14.5, "y":0}, + {"label":"Bspc", "x":15.5, "y":0, "w":1.5}, + {"label":"Tab", "x":0, "y":1, "w":1.5}, + {"label":"Q", "x":1.5, "y":1}, + {"label":"W", "x":2.5, "y":1}, + {"label":"E", "x":3.5, "y":1}, + {"label":"R", "x":4.5, "y":1}, + {"label":"T", "x":5.5, "y":1}, + {"label":"PgUp", "x":6.5, "y":1, "h":1.5}, + {"label":"[", "x":9.5, "y":1, "h":1.5}, + {"label":"Y", "x":10.5, "y":1}, + {"label":"U", "x":11.5, "y":1}, + {"label":"I", "x":12.5, "y":1}, + {"label":"O", "x":13.5, "y":1}, + {"label":"P", "x":14.5, "y":1}, + {"label":"\\", "x":15.5, "y":1, "w":1.5}, + {"label":"Caps", "x":0, "y":2, "w":1.5}, + {"label":"A", "x":1.5, "y":2}, + {"label":"S", "x":2.5, "y":2}, + {"label":"D", "x":3.5, "y":2}, + {"label":"F", "x":4.5, "y":2}, + {"label":"G", "x":5.5, "y":2}, + {"label":"PgDn", "x":6.5, "y":2.5, "h":1.5}, + {"label":"]", "x":9.5, "y":2.5, "h":1.5}, + {"label":"H", "x":10.5, "y":2}, + {"label":"J", "x":11.5, "y":2}, + {"label":"K", "x":12.5, "y":2}, + {"label":"L", "x":13.5, "y":2}, + {"label":";", "x":14.5, "y":2}, + {"label":"Enter", "x":15.5, "y":2, "w":1.5}, + {"label":"Shift", "x":0, "y":3, "w":1.5}, + {"label":"Z", "x":1.5, "y":3}, + {"label":"X", "x":2.5, "y":3}, + {"label":"C", "x":3.5, "y":3}, + {"label":"V", "x":4.5, "y":3}, + {"label":"B", "x":5.5, "y":3}, + {"label":"N", "x":10.5, "y":3}, + {"label":"M", "x":11.5, "y":3}, + {"label":",", "x":12.5, "y":3}, + {"label":".", "x":13.5, "y":3}, + {"label":"Up", "x":14.5, "y":3}, + {"label":"Shift", "x":15.5, "y":3, "w":1.5}, + {"label":"Ctrl", "x":0.5, "y":4}, + {"label":"Super", "x":1.5, "y":4}, + {"label":"Alt", "x":2.5, "y":4}, + {"label":"Left", "x":13.5, "y":4}, + {"label":"Down", "x":14.5, "y":4}, + {"label":"Right", "x":15.5, "y":4}, + {"label":"Space", "x":5.5, "y":5, "H":2}, + {"label":"Ins", "x":6.5, "y":5}, + {"label":"Del", "x":6.5, "y":6}, + {"label":"Home", "x":9.5, "y":5}, + {"label":"End", "x":9.5, "y":6}, + {"label":"Space", "x":10.5, "y":5, "H":2} + ] + } + } +}
\ No newline at end of file diff --git a/keyboards/sirius/unigo66/keymaps/danielhklein/config.h b/keyboards/sirius/unigo66/keymaps/danielhklein/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/danielhklein/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c b/keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c new file mode 100644 index 000000000..2425572bd --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/danielhklein/keymap.c @@ -0,0 +1,177 @@ +#include QMK_KEYBOARD_H + +enum layer_number { + _MAC = 0, + _WINDOWS, + _FN, + _ADJ +}; + +enum custom_keycodes { + MAC = SAFE_RANGE, + WINDOWS, + FN, + ADJ +}; + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +/* Mac + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | Enter | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| ` | | \ |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | Ctrl | Alt | Gui | | Gui | Alt | Ctrl | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | Bspc | FN | | ADJ | Space | + * | | | | | | + * `-------------' `--------------' + */ + [_MAC] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_BSLS, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT,KC_LGUI, KC_RGUI,KC_RALT, KC_RCTL, + KC_BSPC,FN, ADJ, KC_SPC, + KC_BSPC,FN, ADJ, KC_SPC + ), +/* Windows + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | Enter | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | ' | + * |--------+------+------+------+------+------| ` | | \ |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | Gui | Alt | Ctrl | | Ctrl | Alt | Gui | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | Bspc | FN | | ADJ | Space | + * | | | | | | + * `-------------' `--------------' + */ + [_WINDOWS] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT, + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_GRV, KC_BSLS, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, + KC_LGUI, KC_LALT,KC_LCTL, KC_RCTL,KC_RALT, KC_RGUI, + KC_BSPC,FN, ADJ, KC_SPC, + KC_BSPC,FN, ADJ, KC_SPC + ), +/* FN + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | RESET | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | MAC | | | | | | | | | | PgDn | Up | PgUp | Print| Home | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | WINDOWS| | | | | |------| |------| | Left | Down | Right|Insert| End | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Shift | | | | | | | | | Play | Mute | Vol- | Vol+ | Last | Next | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | |GuiCtl| |GuiCtl| | | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | | | | | | + * | | | | | | + * `-------------' `--------------' + */ + [_FN] = LAYOUT( + RESET, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + MAC, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_UP, KC_PGUP, KC_PSCR, KC_HOME, + WINDOWS, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_END, + _______, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MRWD, KC_MFFD, + XXXXXXX, XXXXXXX,_______, _______, XXXXXXX, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX, + XXXXXXX, _______, XXXXXXX, XXXXXXX + ), + +/* ADJ + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | |Nlock | = | / | * | - | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | F7 | F8 | F9 | F10 | F11 | F12 | | | | 7 | 8 | 9 | + | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| 4 | 5 | 6 | Enter| | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | 1 | 2 | 3 | Space| | | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | 0 | . | | + * `--------------------' `--------------------' + * ,-------------. ,--------------. + * | | | | | | + * | | | | | | + * | | | | | | + * `-------------' `--------------' + */ + [_ADJ] = LAYOUT( + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, XXXXXXX, KC_NLCK, KC_PEQL, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_P7, KC_P8, KC_P9, KC_PPLS, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P4, KC_P5, KC_P6, KC_PENT, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX,XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_P1, KC_P2, KC_P3, KC_SPC, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX,XXXXXXX, KC_P0, KC_PDOT, XXXXXXX, + XXXXXXX, XXXXXXX, _______, XXXXXXX, + XXXXXXX, XXXXXXX, _______, XXXXXXX + ) +}; + +void matrix_init_user(void) { + +} + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case MAC: + if (record->event.pressed) { + set_single_persistent_default_layer(_MAC); + } + return false; + break; + case WINDOWS: + if(record->event.pressed) { + set_single_persistent_default_layer(_WINDOWS); + } + return false; + break; + case FN: + if (record->event.pressed) { + layer_on(_FN); + } else { + layer_off(_FN); + } + return false; + break; + case ADJ: + if (record->event.pressed) { + layer_on(_ADJ); + } else { + layer_off(_ADJ); + } + return false; + break; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sirius/unigo66/keymaps/default/config.h b/keyboards/sirius/unigo66/keymaps/default/config.h new file mode 100644 index 000000000..271f48d00 --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/default/config.h @@ -0,0 +1,3 @@ +#pragma once + +// place overrides here diff --git a/keyboards/sirius/unigo66/keymaps/default/keymap.c b/keyboards/sirius/unigo66/keymaps/default/keymap.c new file mode 100644 index 000000000..06982e64b --- /dev/null +++ b/keyboards/sirius/unigo66/keymaps/default/keymap.c @@ -0,0 +1,128 @@ +#include QMK_KEYBOARD_H + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] PROGMEM = { +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | - | | = | 6 | 7 | 8 | 9 | 0 | Bsp | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | PgUp | | [ | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | Caps | A | S | D | F | G |------| |------| H | J | K | L | ; | Enter | + * |--------+------+------+------+------+------| PgDn | | ] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | , | . | Up |M2/Shift| + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | Ctrl | Gui | Alt | | Left | Down| Right | + * `--------------------' `--------------------' + * ,-------------. ,---------------. + * | | Ins | | Home | | + * | Space|------| |------|M1/Space| + * | | Del | | End | | + * `-------------' `---------------' + */ + [0] = LAYOUT( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_EQL, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_PGUP, KC_LBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_PGDN, KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_UP, LM(2,MOD_RSFT), + KC_LCTL, KC_LGUI,KC_LALT, KC_LEFT,KC_DOWN, KC_RGHT, + KC_SPC, KC_INS, KC_HOME, LT(1,KC_SPC), + KC_NO , KC_DEL, KC_END, KC_NO + ), +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ~ | F1 | F2 | F3 | F4 | F5 | F11 | | F12 | F6 | F7 | F8 | F9 | F10 | Del | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | ' | + * |--------+------+------+------+------+------| | | M3 |------+------+------+------+------+--------| + * | | Mute | Vol- | Vol+ | | | | | | | | | | / | | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | | | | + * `--------------------' `--------------------' + * ,-------------. ,---------------. + * | | | | | | + * | |------| |------| | + * | | | | | | + * `-------------' `---------------' + */ + [1] = LAYOUT( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_DEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, + _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, TG(3), _______, _______, _______, _______, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | ' | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | / | | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | | | | + * `--------------------' `--------------------' + * ,-------------. ,---------------. + * | | | | | | + * | |------| |------| | + * | | | | | | + * `-------------' `---------------' + */ + [2] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_QUOT, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_SLSH, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +/* + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | Calc |NumLoc| / | * | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | 7 | 8 | 9 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | 4 | 5 | 6 | = | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | 1 | 2 | 3 | Enter | + * `--------+------+------+---------------------------' `---------------------------+------+------+--------' + * | | | | | 0 | . | Enter| + * `--------------------' `--------------------' + * ,-------------. ,---------------. + * | | | | | | + * | |------| |------| | + * | | | | | | + * `-------------' `---------------' + */ + [3] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CALC, KC_NLCK, KC_PSLS,KC_PAST,KC_PMNS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P7, KC_P8, KC_P9, KC_PPLS, + _______, _______, _______, _______, _______, _______, _______, _______, KC_P4, KC_P5, KC_P6, KC_PEQL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_P1, KC_P2, KC_P3, KC_PENT, + _______, _______, _______, KC_P0, KC_PDOT,KC_PENT, + _______, _______, _______, _______, + _______, _______, _______, _______ + ), +}; + +void matrix_scan_user(void) { + +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} + +void led_set_user(uint8_t usb_led) { + +} diff --git a/keyboards/sirius/unigo66/main.c b/keyboards/sirius/unigo66/main.c new file mode 100644 index 000000000..b4f2a91e4 --- /dev/null +++ b/keyboards/sirius/unigo66/main.c @@ -0,0 +1,100 @@ +#include <avr/io.h> +#include <avr/wdt.h> +#include <avr/power.h> +#include <util/delay.h> + +// LUFA +#include "lufa.h" + +#include "sendchar.h" +#include "debug.h" +#include "keyboard.h" +#include "led.h" + +/* LED ping configuration */ +#define TMK_LED +//#define LEONARDO_LED +#if defined(TMK_LED) +// For TMK converter and Teensy +#define LED_TX_INIT (DDRD |= (1<<6)) +#define LED_TX_ON (PORTD |= (1<<6)) +#define LED_TX_OFF (PORTD &= ~(1<<6)) +#define LED_TX_TOGGLE (PORTD ^= (1<<6)) +#elif defined(LEONARDO_LED) +// For Leonardo(TX LED) +#define LED_TX_INIT (DDRD |= (1<<5)) +#define LED_TX_ON (PORTD &= ~(1<<5)) +#define LED_TX_OFF (PORTD |= (1<<5)) +#define LED_TX_TOGGLE (PORTD ^= (1<<5)) +#else +#define LED_TX_INIT +#define LED_TX_ON +#define LED_TX_OFF +#define LED_TX_TOGGLE +#endif + + +static void LUFA_setup(void) +{ + /* Disable watchdog if enabled by bootloader/fuses */ + MCUSR &= ~(1 << WDRF); + wdt_disable(); + + /* Disable clock division */ +#if (F_CPU == 8000000) + clock_prescale_set(clock_div_2); // 16MHz crystal divided by 2 +#else + clock_prescale_set(clock_div_1); +#endif + + // Leonardo needs. Without this USB device is not recognized. + USB_Disable(); + + USB_Init(); + + // for Console_Task + USB_Device_EnableSOFEvents(); + print_set_sendchar(sendchar); +} + + + +int main(void) +{ + // LED for debug + LED_TX_INIT; + LED_TX_ON; + + debug_enable = true; + debug_keyboard = true; + + host_set_driver(&lufa_driver); + keyboard_init(); + + LUFA_setup(); + + /* NOTE: Don't insert time consuming job here. + * It'll cause unclear initialization failure when DFU reset(worm start). + */ + sei(); + +/* Some keyboards bootup quickly and cannot be initialized with this startup wait.*/ + // wait for startup of sendchar routine + while (USB_DeviceState != DEVICE_STATE_Configured) ; + if (debug_enable) { + _delay_ms(1000); + } + + debug("init: done\n"); + + for (;;) { + keyboard_task(); + +#if !defined(INTERRUPT_CONTROL_ENDPOINT) + // LUFA Task for control request + USB_USBTask(); +#endif + } + + return 0; +} diff --git a/keyboards/sirius/unigo66/matrix.c b/keyboards/sirius/unigo66/matrix.c new file mode 100644 index 000000000..b077febd7 --- /dev/null +++ b/keyboards/sirius/unigo66/matrix.c @@ -0,0 +1 @@ +// Intentionally left empty. This file must exist for this board to build. diff --git a/keyboards/sirius/unigo66/readme.md b/keyboards/sirius/unigo66/readme.md new file mode 100644 index 000000000..1dae0f994 --- /dev/null +++ b/keyboards/sirius/unigo66/readme.md @@ -0,0 +1,17 @@ +# UniGo66 + +![UniGo66](https://i.imgur.com/ZKlcncg.png) + +The UniGo66 is an ergonomic wireless keyboard designed by Sirius and manufactured by ALF Studios. + +Join ALF Studios on [Discord](https://discord.gg/GJ8bdM) + +Make example: + + make sirius/unigo66:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). + +To get the U2U into DFU flashing mode, insert the U2U into the computer and press the button in the red circle shown below + +![U2U](https://i.imgur.com/WKwgDjZ.png) diff --git a/keyboards/sirius/unigo66/rules.mk b/keyboards/sirius/unigo66/rules.mk new file mode 100644 index 000000000..c35487b18 --- /dev/null +++ b/keyboards/sirius/unigo66/rules.mk @@ -0,0 +1,30 @@ +# MCU name +MCU = atmega32u4 + +F_CPU = 16000000 + +ARCH = AVR8 + +F_USB = $(F_CPU) + +BOOTLOADER = atmel-dfu + +# Interrupt driven control endpoint task +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = lite # 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) +# COMMAND_ENABLE = yes # Commands for debug and configuration +# SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA +# BACKLIGHT_ENABLE = yes +USB_HID_ENABLE = yes + +CUSTOM_MATRIX = yes +SRC += custom_matrix.cpp\ + main.c diff --git a/keyboards/sirius/unigo66/unigo66.c b/keyboards/sirius/unigo66/unigo66.c new file mode 100644 index 000000000..6a2d2632b --- /dev/null +++ b/keyboards/sirius/unigo66/unigo66.c @@ -0,0 +1 @@ +#include "unigo66.h" diff --git a/keyboards/sirius/unigo66/unigo66.h b/keyboards/sirius/unigo66/unigo66.h new file mode 100644 index 000000000..186aa2b63 --- /dev/null +++ b/keyboards/sirius/unigo66/unigo66.h @@ -0,0 +1,141 @@ +/* +Copyright 2017 Balz Guenat <balz.guenat@gmail.com> + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#ifndef USB_USB_H +#define USB_USB_H + +#include "quantum.h" + +/* ,---------------. ,---------------. ,---------------. + * |F13|F14|F15|F16| |F17|F18|F19|F20| |F21|F22|F23|F24| + * ,---. |---------------| |---------------| |---------------| ,-----------. ,---------------. ,-------. + * |Esc| |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau| |VDn|VUp|Mut|Pwr| | Help | + * `---' `---------------' `---------------' `---------------' `-----------' `---------------' `-------' + * ,-----------------------------------------------------------. ,-----------. ,---------------. ,-------. + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|JPY|Bsp| |Ins|Hom|PgU| |NmL| /| *| -| |Stp|Agn| + * |-----------------------------------------------------------| |-----------| |---------------| |-------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | |Del|End|PgD| | 7| 8| 9| +| |Mnu|Und| + * |-----------------------------------------------------------| `-----------' |---------------| |-------| + * |CapsL | A| S| D| F| G| H| J| K| L| ;| :| #|Retn| | 4| 5| 6|KP,| |Sel|Cpy| + * |-----------------------------------------------------------| ,---. |---------------| |-------| + * |Shft| <| Z| X| C| V| B| N| M| ,| ,| /| RO|Shift | |Up | | 1| 2| 3|KP=| |Exe|Pst| + * |-----------------------------------------------------------| ,-----------. |---------------| |-------| + * |Ctl|Gui|Alt|MHEN|HNJ| Space |H/E|HENK|KANA|Alt|Gui|App|Ctl| |Lef|Dow|Rig| | 0 | .|Ent| |Fnd|Cut| + * `-----------------------------------------------------------' `-----------' `---------------' `-------' + * + * + * App: Windows Menu key + * Gui: Windows key, Mac ⌘ key or Meta key + * + * Pwr: Power for Unix and Mac + * VDn,Vup,Mut: Volume control for Unix and Mac + * Stp,Agn..: for Unix + * + * KP,: Brazilian Keypad Comma + * KP=: Keypad = for Mac + * <,#: ISO keys(UK legend) + * JPY: Japanese Yen(¥) + * RO: Japanese ろ or Brazilian / + * MHEN: Japanese 無変換 Non Conversion + * HENK: Japanese 変換 Conversion + * KANA: Japanese かな Hiragana/Katakana + * https://en.wikipedia.org/wiki/Keyboard_layout#Japanese + * H/E: Korean 한/영 Hangul/English + * HNJ: Korean 한자 Hanja + * https://en.wikipedia.org/wiki/Keyboard_layout#Hangul_.28for_Korean.29 + * + * TODO: use same keycode to pass through instead of KC_NO? + */ +#define LAYOUT_all( \ + K68,K69,K6A,K6B,K6C,K6D,K6E,K6F,K70,K71,K72,K73, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,K40,K41,K42,K43,K44,K45, K46,K47,K48, K81,K80,K7F,K66, K75, \ + K35,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,K89,K2A, K49,K4A,K4B, K53,K54,K55,K56, K78,K79, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, K5F,K60,K61,K57, K76,K7A, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, K32,K28, K5C,K5D,K5E,K85, K77,K7C, \ + KE1,K64,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,K38, K87,KE5, K52, K59,K5A,K5B,K67, K74,K7D, \ + KE0,KE3,KE2,K8B,K91, K2C, K90,K8A,K88,KE6,KE7,K65,KE4, K50,K51,K4F, K62, K63,K58, K7E,K7B \ +) { \ + { KC_NO, KC_NO, KC_NO, KC_NO, K04, K05, K06, K07, /* 00-07 */ \ + K08, K09, K0A, K0B, K0C, K0D, K0E, K0F }, /* 08-0F */ \ + { K10, K11, K12, K13, K14, K15, K16, K17, /* 10-17 */ \ + K18, K19, K1A, K1B, K1C, K1D, K1E, K1F }, /* 18-1F */ \ + { K20, K21, K22, K23, K24, K25, K26, K27, /* 20-27 */ \ + K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, /* 28-2F */ \ + { K30, K31, K32, K33, K34, K35, K36, K37, /* 30-37 */ \ + K38, K39, K3A, K3B, K3C, K3D, K3E, K3F }, /* 38-3F */ \ + { K40, K41, K42, K43, K44, K45, K46, K47, /* 40-47 */ \ + K48, K49, K4A, K4B, K4C, K4D, K4E, K4F }, /* 48-4F */ \ + { K50, K51, K52, K53, K54, K55, K56, K57, /* 50-57 */ \ + K58, K59, K5A, K5B, K5C, K5D, K5E, K5F }, /* 58-5F */ \ + { K60, K61, K62, K63, K64, K65, K66, K67, /* 60-67 */ \ + K68, K69, K6A, K6B, K6C, K6D, K6E, K6F }, /* 68-6F */ \ + { K70, K71, K72, K73, K74, K75, K76, K77, /* 70-77 */ \ + K78, K79, K7A, K7B, K7C, K7D, K7E, K7F }, /* 78-7F */ \ + { K80, K81, KC_NO, KC_NO, KC_NO, K85, KC_NO, K87, /* 80-87 */ \ + K88, K89, K8A, K8B, KC_NO, KC_NO, KC_NO, KC_NO }, /* 88-8F */ \ + { K90, K91, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* 90-97 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* 98-9F */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* A0-A7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* A8-AF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* B0-B7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* B8-BF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* C0-C7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* C8-CF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* D0-D7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* D8-DF */ \ + { KE0, KE1, KE2, KE3, KE4, KE5, KE6, KE7, /* E0-E7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* E8-EF */ \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, /* F0-F7 */ \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, /* F8-FF */ \ +} + +#define LAYOUT( \ + K29,K1E,K1F,K20,K21,K22,K2D, K2E,K23,K24,K25,K26,K27,K2A,\ + K2B,K14,K1A,K08,K15,K17,K4B, K2F,K1C,K18,K0C,K12,K13,K31,\ + K39,K04,K16,K07,K09,K0A, K0B,K0D,K0E,K0F,K33,K34,\ + KE1,K1D,K1B,K06,K19,K05,K4E, K30,K11,K10,K36,K37,K52,KE5,\ + KE0,KE3,KE2, K50,K51,K4F,\ + K2C,K49, K4A,K28, \ + KE6,K4C, K4D,KE4 \ +) LAYOUT_all( \ + KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, \ + K29, KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO, \ + KC_NO,K1E,K1F,K20,K21,K22,K23,K24,K25,K26,K27,K2D,K2E,KC_NO,K2A, K49,K4A,K4B, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ + K2B,K14,K1A,K08,K15,K17,K1C,K18,K0C,K12,K13,K2F,K30, K31, K4C,K4D,K4E, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ + K39,K04,K16,K07,K09,K0A,K0B,K0D,K0E,K0F,K33,K34, KC_NO,K28, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ + KE1,KC_NO,K1D,K1B,K06,K19,K05,K11,K10,K36,K37,KC_NO, KC_NO,KE5, K52, KC_NO,KC_NO,KC_NO,KC_NO, KC_NO,KC_NO, \ + KE0,KE3,KE2,KC_NO,KC_NO, K2C, KC_NO,KC_NO,KC_NO,KE6,KC_NO,KC_NO,KE4, K50,K51,K4F, KC_NO, KC_NO,KC_NO, KC_NO,KC_NO \ +) + +#define LAYOUT_beta_pcb( \ + K1E, K1F, K30, K2F, K45, K3B, KE6, KE2, K3A, K39, K14, K04, K09, K07, \ + K29, K15, K3C, K3D, K3E, K3F, K58, K50, K2C, K11, K05, K55, K10, K06, \ + K31, K5F, K5E, K61, K2A, K38, K4C, K57, K53, K5B, K5A, K08, \ + K35, K5D, K17, K1B, K1A, K52, K56, K51, K4D, K23, K1C, K13, K2E, K0C, \ + K5C, K0A, K0F, K36, K0E, K37, \ + KE4, K49, K4B, KE0, \ + KE5, KE1\ +) LAYOUT_all( \ + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K29, K3A,K3B,K3C,K3D,K3E,K3F,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,K45, KC_NO,KC_NO,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + K35,K1E,K1F,KC_NO,KC_NO,KC_NO,K23,KC_NO,KC_NO,KC_NO,KC_NO,KC_NO,K2E,KC_NO, K2A, K49,KC_NO,K4B, K53,KC_NO,K55,K56, KC_NO, KC_NO, \ + KC_NO,K14,K1A,K08,K15,K17,K1C,KC_NO,K0C,KC_NO,K13,K2F,K30, K31, K4C,K4D,KC_NO, K5F,KC_NO,K61,K57, KC_NO, KC_NO, \ + K39,K04,KC_NO,K07,K09,K0A,KC_NO,KC_NO,K0E,K0F,KC_NO,KC_NO, KC_NO, KC_NO, K5C,K5D,K5E,KC_NO, KC_NO, KC_NO, \ + KE1,KC_NO, KC_NO,K1B,K06,KC_NO,K05,K11,K10,K36,K37,K38, KC_NO, KE5, K52, KC_NO,K5A,K5B,KC_NO, KC_NO, KC_NO, \ + KE0,KC_NO,KE2,KC_NO,KC_NO,K2C,KC_NO,KC_NO,KC_NO,KE6,KC_NO,KC_NO, KE4, K50,K51,KC_NO, KC_NO, KC_NO,K58, KC_NO, KC_NO \ +) +#endif
\ No newline at end of file diff --git a/keyboards/sixkeyboard/config.h b/keyboards/sixkeyboard/config.h index 4ce25c670..3a672788b 100644 --- a/keyboards/sixkeyboard/config.h +++ b/keyboards/sixkeyboard/config.h @@ -46,7 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE - /* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ #define FORCE_NKRO @@ -56,11 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * if your keyboard/keypad is missing keys and you want magic key support. */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/sixshooter/config.h b/keyboards/sixshooter/config.h index 163a3ab43..3c4fd9699 100644 --- a/keyboards/sixshooter/config.h +++ b/keyboards/sixshooter/config.h @@ -31,7 +31,6 @@ /* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ #define DIODE_DIRECTION COL2ROW - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -68,11 +67,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/skog/config.h b/keyboards/skog/config.h index dea3e28e8..f518da8c9 100644 --- a/keyboards/skog/config.h +++ b/keyboards/skog/config.h @@ -36,7 +36,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/snagpad/config.h b/keyboards/snagpad/config.h index 03906f33f..d0c55cf97 100644 --- a/keyboards/snagpad/config.h +++ b/keyboards/snagpad/config.h @@ -37,15 +37,9 @@ /* 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)) \ -) - /* prevent stuck modifiers */ //#define STRICT_LAYER_RELEASE - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/sol/rev1/config.h b/keyboards/sol/rev1/config.h index fc91b8d49..bfdadf9f6 100644 --- a/keyboards/sol/rev1/config.h +++ b/keyboards/sol/rev1/config.h @@ -19,7 +19,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #ifndef REV1_CONFIG_H #define REV1_CONFIG_H - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x3060 @@ -28,7 +27,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT Sol #define DESCRIPTION "An RGB, split, ortho-esque keyboard" - #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 150 @@ -76,11 +74,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 B3 #define RGBLIGHT_TIMER @@ -151,5 +144,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/wheatfield/blocked65/config.h b/keyboards/southpole/config.h index 36ec18f14..5992a360f 100755..100644 --- a/keyboards/wheatfield/blocked65/config.h +++ b/keyboards/southpole/config.h @@ -1,33 +1,31 @@ #pragma once -#include "config_common.h" +//#include "config_common.h" /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED #define PRODUCT_ID 0x6060 #define DEVICE_VER 0x0001 -#define MANUFACTURER Dou -#define PRODUCT Blocked65 -#define DESCRIPTION 65% keyboard with arrow cluster blocker +#define MANUFACTURER u/waxpoetic +#define PRODUCT southpole +#define DESCRIPTION southpaw keyboard, left hand numpad /* key matrix size */ #define MATRIX_ROWS 5 -#define MATRIX_COLS 15 +#define MATRIX_COLS 20 /* key matrix pins */ -#define MATRIX_ROW_PINS { B0, B1, B2, B3, B7 } -#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4, F7, F6, F5, F4, F1, F0 } +#define MATRIX_ROW_PINS { D2, D3, C6, C7, D5 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, B7, D0, D1, F0, F1, F4, F5, F6, F7, B6, B5, B4, D7, D6, D4, E6 } #define UNUSED_PINS /* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION ROW2COL +#define DIODE_DIRECTION COL2ROW /* number of backlight levels */ -#define BACKLIGHT_PIN B6 - #ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 6 +#define BACKLIGHT_LEVELS 0 #endif /* Set 0 if debouncing isn't needed */ @@ -39,15 +37,10 @@ /* 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)) \ -) - -#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 2 +#define RGBLED_NUM 0 #define RGBLIGHT_HUE_STEP 8 #define RGBLIGHT_SAT_STEP 8 #define RGBLIGHT_VAL_STEP 8 - +#endif
\ No newline at end of file diff --git a/keyboards/southpole/keymaps/default/keymap.c b/keyboards/southpole/keymaps/default/keymap.c new file mode 100644 index 000000000..78cb81f4b --- /dev/null +++ b/keyboards/southpole/keymaps/default/keymap.c @@ -0,0 +1,26 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_NLCK, KC_SLSH, KC_ASTR, KC_MINS, 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_DEL, KC_HOME, \ + KC_7, KC_8, KC_9, KC_PLUS, 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_PGUP, \ + KC_4, KC_5, KC_6, KC_ENT, 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_ENT, KC_PGDN, \ + KC_1, KC_2, KC_3, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_END, \ + KC_0, KC_DOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), \ + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_GRV, 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, RESET, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ + ) + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} diff --git a/keyboards/southpole/keymaps/foobeard/keymap.c b/keyboards/southpole/keymaps/foobeard/keymap.c new file mode 100644 index 000000000..ef2710d0a --- /dev/null +++ b/keyboards/southpole/keymaps/foobeard/keymap.c @@ -0,0 +1,72 @@ +/* +Base Copyright 2017 Luiz Ribeiro <luizribeiro@gmail.com> +Modified 2017 Andrew Novak <ndrw.nvk@gmail.com> +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public LicensezZZ +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#include QMK_KEYBOARD_H + +enum layers { + _QWERTY, + _RAISE +}; + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0, default layer + * ,--------------------------------------------------------------------------------------------------------------------------------------------. + * |NumLck| / | * | - | | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ |Delete| Ins | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | 7 | 8 | 9 | + | | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | BkSpc | Vol+ | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | 4 | 5 | 6 | + | | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Return | Vol- | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | 1 | 2 | 3 | En | | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | Up | Mute | + * |------+------+------+------+-+----------------------------------------------------------------------------------------------+--------+------| + * | 0 | . | En | | Ctrl | Win | Alt | Space | Fn | | Left | Down | Right| + * `------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------' + */ + [_QWERTY] = LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, 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_DELETE, KC_INS, \ + KC_P7, KC_P8, KC_P9, KC_PPLS, 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_VOLU, \ + KC_P4, KC_P5, KC_P6, KC_PENT, 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_ENT, KC_VOLD, \ + KC_P1, KC_P2, KC_P3, KC_LSFT, 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_MUTE, \ + KC_P0, KC_PDOT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + /*layer 1, function layer + * ,--------------------------------------------------------------------------------------------------------------------------------------------. + * |Reset | | | | | ` | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | |Calc | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | | | | | | | | | | | | | | | | | | | | | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | | | | | | | | | | | | | | | | | | | | + * |------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------| + * | | | | | | | | | | | | | | | | | | | | + * |------+------+------+------+-+----------------------------------------------------------------------------------------------+--------+------| + * | | | | | | | | | | | | | | + * `------+------+------+------+-+-------------------------------------------------------------------------------------------------------+------' + */ + + [_RAISE] = LAYOUT( + RESET, _______, _______, _______, KC_GRV, 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_CALC, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +};
\ No newline at end of file diff --git a/keyboards/southpole/readme.md b/keyboards/southpole/readme.md new file mode 100644 index 000000000..4ea99ad34 --- /dev/null +++ b/keyboards/southpole/readme.md @@ -0,0 +1,13 @@ +# Southpole +[Southpole](https://imgur.com/a/MZ2wdYt) + +PCB designed by u/waxpoetic for a southpaw style board with an hhkb style layout. + +Keyboard Maintainer: ericduns +Hardware Supported: Teensy 2.0 + +Make example for this keyboard (after setting up your build environment): + + make southpole:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
\ No newline at end of file diff --git a/keyboards/southpole/rules.mk b/keyboards/southpole/rules.mk new file mode 100644 index 000000000..356b75bb6 --- /dev/null +++ b/keyboards/southpole/rules.mk @@ -0,0 +1,56 @@ +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +#AUDIO_ENABLE = no +RGBLIGHT_ENABLE = no
\ No newline at end of file diff --git a/keyboards/southpole/southpole.c b/keyboards/southpole/southpole.c new file mode 100644 index 000000000..f345893fb --- /dev/null +++ b/keyboards/southpole/southpole.c @@ -0,0 +1 @@ +#include "southpole.h" diff --git a/keyboards/southpole/southpole.h b/keyboards/southpole/southpole.h new file mode 100644 index 000000000..99cf2ce7b --- /dev/null +++ b/keyboards/southpole/southpole.h @@ -0,0 +1,18 @@ +#pragma once + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, K119, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, K219, \ + K300, K301, K302, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, K319, \ + K401, K402, K404, K405, K406, K409, K413, K415, K416, K419 \ +) \ + { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K015, K016, K017, K018, K019 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, K115, K116, K117, KC_NO, K119 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, K215, K216, KC_NO, KC_NO, K219 }, \ + { K300, K301, K302, KC_NO, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, K315, K316, KC_NO, KC_NO, K319 }, \ + { KC_NO, K401, K402, KC_NO, K404, K405, K406, KC_NO, KC_NO, K409, KC_NO, KC_NO, KC_NO, K413, KC_NO, K415, K416, KC_NO, KC_NO, K419 } \ +} diff --git a/keyboards/speedo/config.h b/keyboards/speedo/config.h index 6d6a3f7c8..8670cceca 100644 --- a/keyboards/speedo/config.h +++ b/keyboards/speedo/config.h @@ -54,7 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -106,11 +105,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/subatomic/config.h b/keyboards/subatomic/config.h index 592434aab..d4ace70d8 100644 --- a/keyboards/subatomic/config.h +++ b/keyboards/subatomic/config.h @@ -59,11 +59,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/sx60/config.h b/keyboards/sx60/config.h index 52a1cc7a1..cad8b0ba4 100755 --- a/keyboards/sx60/config.h +++ b/keyboards/sx60/config.h @@ -21,8 +21,6 @@ #define MATRIX_COL_PINS { F6, B5, B4, D7, D6, D5, D3, D2 } #define UNUSED_PINS - - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW @@ -41,11 +39,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c index e91b4f441..634a98a12 100644 --- a/keyboards/sx60/matrix.c +++ b/keyboards/sx60/matrix.c @@ -137,7 +137,7 @@ void matrix_init(void) { uint8_t matrix_scan(void) { - if (mcp23018_status) { + if (mcp23018_status) { /* if there was an error */ if (++mcp23018_reset_loop == 0) { /* since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans @@ -190,7 +190,7 @@ bool matrix_is_modified(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline @@ -246,7 +246,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) select_row(current_row); wait_us(30); - if (mcp23018_status) { + if (mcp23018_status) { /* if there was an error */ return 0; } else { @@ -279,7 +279,7 @@ static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) static void select_row(uint8_t row) { - if (mcp23018_status) { + if (mcp23018_status) { /* if there was an error do nothing */ } else { /* set active row low : 0 diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index 3e011bc75..ab564cd3b 100755 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -54,11 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* Backlight configuration */ #define BACKLIGHT_LEVELS 4 diff --git a/keyboards/tada68/keymaps/rys/keymap.c b/keyboards/tada68/keymaps/rys/keymap.c index a729e4be8..c37f03075 100644 --- a/keyboards/tada68/keymaps/rys/keymap.c +++ b/keyboards/tada68/keymaps/rys/keymap.c @@ -7,6 +7,7 @@ enum rys_keycodes { PSTOKEN = SAFE_RANGE, + QSTOKEN }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { @@ -16,6 +17,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { SEND_STRING(RYS_PSTOKEN); } break; + case QSTOKEN: + if (record->event.pressed) { + SEND_STRING(RYS_QSTOKEN); + } + break; } return true; }; @@ -59,7 +65,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, PSTOKEN, \ _______, KC_BTN1, KC_UP, KC_BTN2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, \ - _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, KC_MS_U, KC_END, \ + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, QSTOKEN, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, KC_MS_U, KC_END, \ _______, _______, _______, RESET, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R ), }; diff --git a/keyboards/tada68/keymaps/rys/rules.mk b/keyboards/tada68/keymaps/rys/rules.mk index db6efeb8f..eb868df07 100644 --- a/keyboards/tada68/keymaps/rys/rules.mk +++ b/keyboards/tada68/keymaps/rys/rules.mk @@ -8,7 +8,6 @@ EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode @@ -17,4 +16,6 @@ RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend RYS_PSTOKEN = $(shell security find-generic-password -a qmk -s tada68 -w) +RYS_QSTOKEN = $(shell security find-generic-password -a qmk -s tada68-2 -w) CFLAGS += -DRYS_PSTOKEN=\"$(RYS_PSTOKEN)\" +CFLAGS += -DRYS_QSTOKEN=\"$(RYS_QSTOKEN)\" diff --git a/keyboards/tanuki/config.h b/keyboards/tanuki/config.h index 1e42f13d4..6d728b595 100644 --- a/keyboards/tanuki/config.h +++ b/keyboards/tanuki/config.h @@ -47,11 +47,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define RGB_DI_PIN D1 #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 5 @@ -59,7 +54,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_SAT_STEP 17 #define RGBLIGHT_VAL_STEP 17 - #define TAPPING_TERM 200 /* * Feature disable options diff --git a/keyboards/telophase/config.h b/keyboards/telophase/config.h index be0a36977..473949ee1 100644 --- a/keyboards/telophase/config.h +++ b/keyboards/telophase/config.h @@ -41,12 +41,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define ONESHOT_TIMEOUT 500 - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/telophase/matrix.c b/keyboards/telophase/matrix.c index b3544453e..c332eba55 100644 --- a/keyboards/telophase/matrix.c +++ b/keyboards/telophase/matrix.c @@ -112,7 +112,7 @@ uint8_t matrix_scan(void) if (timeout > 10000){ break; } - } + } uart_data[i] = SERIAL_UART_DATA; } @@ -134,7 +134,7 @@ uint8_t matrix_scan(void) inline bool matrix_is_on(uint8_t row, uint8_t col) { - return (matrix[row] & ((matrix_row_t)1<col)); + return (matrix[row] & ((matrix_row_t)1<<col)); } inline diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h index c2e552449..20ec2e655 100644 --- a/keyboards/tetris/config.h +++ b/keyboards/tetris/config.h @@ -36,11 +36,6 @@ /* 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)) \ -) - #define NO_ACTION_MACRO #define NO_ACTION_FUNCTION diff --git a/keyboards/the_ruler/config.h b/keyboards/the_ruler/config.h index e72875c76..c340019be 100644 --- a/keyboards/the_ruler/config.h +++ b/keyboards/the_ruler/config.h @@ -49,7 +49,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -96,11 +95,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -155,7 +149,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #define RGB_DI_PIN E6 // The pin your RGB strip is wired to #define RGBLED_NUM 1 // Number of LEDs #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/thevankeyboards/bananasplit/config.h b/keyboards/thevankeyboards/bananasplit/config.h index 5649ab4aa..a96c59dbb 100644 --- a/keyboards/thevankeyboards/bananasplit/config.h +++ b/keyboards/thevankeyboards/bananasplit/config.h @@ -56,13 +56,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - - - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/thevankeyboards/minivan/config.h b/keyboards/thevankeyboards/minivan/config.h index 726768e0e..38207d38d 100644 --- a/keyboards/thevankeyboards/minivan/config.h +++ b/keyboards/thevankeyboards/minivan/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/thevankeyboards/roadkit/config.h b/keyboards/thevankeyboards/roadkit/config.h index 9596f7f3b..3f7178039 100644 --- a/keyboards/thevankeyboards/roadkit/config.h +++ b/keyboards/thevankeyboards/roadkit/config.h @@ -53,7 +53,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -100,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/tkc1800/config.h b/keyboards/tkc1800/config.h index 92a5f1b38..2f45d04de 100644 --- a/keyboards/tkc1800/config.h +++ b/keyboards/tkc1800/config.h @@ -100,11 +100,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/tmo50/config.h b/keyboards/tmo50/config.h index cf6a3fbf3..780a53026 100644 --- a/keyboards/tmo50/config.h +++ b/keyboards/tmo50/config.h @@ -124,11 +124,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -205,4 +200,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 1 - diff --git a/keyboards/tmo50/info.json b/keyboards/tmo50/info.json index e96fa4cea..751e76655 100644 --- a/keyboards/tmo50/info.json +++ b/keyboards/tmo50/info.json @@ -2,12 +2,15 @@ "keyboard_name": "TMO50", "url": "", "maintainer": "funderburker", - "bootloader": "atmel-dfu", "width": 15.25, "height": 4, "layouts": { - "LAYOUT": { + "LAYOUT_all": { "layout": [{"label":"", "x":0, "y":0}, {"label":"", "x":1.25, "y":0}, {"label":"", "x":2.25, "y":0}, {"label":"", "x":3.25, "y":0}, {"label":"", "x":4.25, "y":0}, {"label":"", "x":5.25, "y":0}, {"label":"", "x":6.25, "y":0}, {"label":"", "x":7.25, "y":0}, {"label":"", "x":8.25, "y":0}, {"label":"", "x":9.25, "y":0}, {"label":"", "x":10.25, "y":0}, {"label":"", "x":11.25, "y":0}, {"label":"", "x":12.25, "y":0}, {"label":"", "x":13.25, "y":0}, {"label":"", "x":14.25, "y":0}, {"x":0, "y":1}, {"label":"Ctrl", "x":1.25, "y":1, "w":1.25}, {"label":"", "x":2.5, "y":1}, {"label":"", "x":3.5, "y":1}, {"label":"", "x":4.5, "y":1}, {"label":"", "x":5.5, "y":1}, {"label":"", "x":6.5, "y":1}, {"label":"", "x":7.5, "y":1}, {"label":"", "x":8.5, "y":1}, {"label":"", "x":9.5, "y":1}, {"label":"", "x":10.5, "y":1}, {"label":"", "x":11.5, "y":1}, {"label":"", "x":12.5, "y":1}, {"label":"Enter", "x":13.5, "y":1, "w":1.75}, {"x":0, "y":2}, {"label":"Shift", "x":1.25, "y":2, "w":1.75}, {"label":"", "x":3, "y":2}, {"label":"", "x":4, "y":2}, {"label":"", "x":5, "y":2}, {"label":"", "x":6, "y":2}, {"label":"b", "x":7, "y":2}, {"label":"", "x":8, "y":2}, {"label":"m", "x":9, "y":2}, {"label":"", "x":10, "y":2}, {"label":"", "x":11, "y":2}, {"label":"", "x":12, "y":2}, {"label":"Shift", "x":13, "y":2, "w":1.25}, {"label":"", "x":14.25, "y":2}, {"x":0, "y":3}, {"label":"Alt", "x":2.75, "y":3}, {"label":"Win", "x":3.75, "y":3, "w":1.5}, {"label":"", "x":5.25, "y":3, "w":2.25}, {"label":"", "x":7.5, "y":3, "w":2.75}, {"label":"AltGr", "x":10.25, "y":3, "w":1.5}, {"label":"L3", "x":11.75, "y":3}] + }, + + "LAYOUT_space": { + "layout": [{"x":0, "y":0}, {"x":1.25, "y":0}, {"x":2.25, "y":0}, {"x":3.25, "y":0}, {"x":4.25, "y":0}, {"x":5.25, "y":0}, {"x":6.25, "y":0}, {"x":7.25, "y":0}, {"x":8.25, "y":0}, {"x":9.25, "y":0}, {"x":10.25, "y":0}, {"x":11.25, "y":0}, {"x":12.25, "y":0}, {"x":13.25, "y":0}, {"x":14.25, "y":0}, {"x":0, "y":1}, {"x":1.25, "y":1, "w":1.25}, {"x":2.5, "y":1}, {"x":3.5, "y":1}, {"x":4.5, "y":1}, {"x":5.5, "y":1}, {"x":6.5, "y":1}, {"x":7.5, "y":1}, {"x":8.5, "y":1}, {"x":9.5, "y":1}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1, "w":1.75}, {"x":0, "y":2}, {"x":1.25, "y":2, "w":1.75}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":12, "y":2}, {"x":13, "y":2, "w":1.25}, {"x":14.25, "y":2}, {"x":0, "y":3}, {"x":2.75, "y":3}, {"x":3.75, "y":3, "w":1.5}, {"x":5.25, "y":3, "w":6.25}, {"x":11.5, "y":3, "w":1.25}] } } } diff --git a/keyboards/tmo50/keymaps/default/keymap.c b/keyboards/tmo50/keymaps/default/keymap.c index 419893f1a..a1d896b61 100644 --- a/keyboards/tmo50/keymaps/default/keymap.c +++ b/keyboards/tmo50/keymaps/default/keymap.c @@ -15,37 +15,38 @@ */ #include QMK_KEYBOARD_H +#define LT1_SPC LT(1, KC_SPC) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default layer - [0] = LAYOUT( - KC_TRNS, 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_TRNS, 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_ENT, + [0] = LAYOUT_all( + KC_TRNS, 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_TRNS, 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_ENT, KC_TRNS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), - KC_TRNS, KC_TAB, KC_LGUI, KC_LALT, LT(1, KC_SPC), LT(1, KC_SPC), KC_RALT, MO(3) + KC_TRNS, KC_LALT, KC_LGUI, LT1_SPC, LT1_SPC, KC_RALT, MO(3) ), // Fn1 layer - [1] = LAYOUT( - KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC, - KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + [1] = LAYOUT_all( + KC_TRNS, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, + KC_TRNS, KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_GRV, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_SPC, KC_TRNS, KC_SPC, KC_TRNS, KC_TRNS, KC_TRNS, KC_BSLS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), // Fn2 layer - [2] = LAYOUT( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_DEL, + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), // Fn3 layer - [3] = LAYOUT( - RESET, 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, + [3] = LAYOUT_all( + RESET, 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_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, BL_STEP, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, 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/tmo50/keymaps/default/readme.md b/keyboards/tmo50/keymaps/default/readme.md new file mode 100644 index 000000000..e8f5de830 --- /dev/null +++ b/keyboards/tmo50/keymaps/default/readme.md @@ -0,0 +1,44 @@ +# Additional info + +## Matrix + +You probably tried or will try to configure the keymapping to your liking. To make it easier configuring your layouts, photo of keyboards matrix will help. + +![TMO50 matrix](https://i.imgur.com/ud7RB8d.png) + +## Pinout + +Most of the pinout can be found in *config.h* but there's here's a table of all the used pins for TMO50 (including indicator LED pins) + +| Pin | Assigned to | +|---|---| +| D5 | Row 0 | +| D3 | Row 1 | +| D2 | Row 2 | +| D0 | Row 3 | +| | | +| D1 | Col 0 | +| D4 | Col 1 | +| F0 | Col 2 | +| F1 | Col 3 | +| F4 | Col 4 | +| F5 | Col 5 | +| F6 | Col 6 | +| F7 | Col 7 | +| D6 | Col 8 | +| D7 | Col 9 | +| B4 | Col 10 | +| B5 | Col 11 | +| B6 | Col 12 | +| C6 | Col 13 | +| | | +| B7 | Backlight | +| C7 | RGB LEDs | +| B0 | LED 4 (L4) | +| B1 | LED 3 (L3) | +| B2 | LED 2 (L2) | +| B3 | LED 1 (L1) | + +## Indicator LEDs + +Their size is 2×3×4mm. The THT hole without a circle on the pcb is VCC(+) and the other one is connect to their corresponding pin. diff --git a/keyboards/tmo50/readme.md b/keyboards/tmo50/readme.md index 2af282d15..f4275a978 100644 --- a/keyboards/tmo50/readme.md +++ b/keyboards/tmo50/readme.md @@ -1,6 +1,6 @@ # tmo50 -![tmo50](https://imgur.com/BhRYzl6.jpg) +![TMO50](https://imgur.com/BhRYzl6.jpg) TMO50 is a 50% mechanical keyboard with macro column on the left side. Sub60% board without compromises. diff --git a/keyboards/tmo50/tmo50.c b/keyboards/tmo50/tmo50.c index a42ab4720..4f6288133 100644 --- a/keyboards/tmo50/tmo50.c +++ b/keyboards/tmo50/tmo50.c @@ -19,6 +19,15 @@ void matrix_init_kb(void) { // put your keyboard start-up code here // runs once when the firmware starts up + DDRB |= (1 << PB0); //init B0 + PORTB &= ~(1 << PB0); //turn on B0 + DDRB |= (1 << PB1); + PORTB |= (1<<PB1); //turn off B1 + DDRB |= (1 << PB2); + PORTB |= (1<<PB2); + DDRB |= (1 << PB3); + PORTB |= (1<<PB3); + matrix_init_user(); } @@ -41,3 +50,35 @@ void led_set_kb(uint8_t usb_led) { led_set_user(usb_led); } + +uint32_t layer_state_set_user(uint32_t state) +{ + // if on layer 0, turn on B0 LED, otherwise off. + if (biton32(state) == 0) { + PORTB &= ~(1<<PB0); + } else { + PORTB |= (1<<PB0); + } + + // if on layer 1, turn on B1 LED, otherwise off. + if (biton32(state) == 1) { + PORTB &= ~(1<<PB1); + } else { + PORTB |= (1<<PB1); + } + // if on layer 2, turn on B2 LED, otherwise off. + if (biton32(state) == 2) { + PORTB &= ~(1<<PB2); + } else { + PORTB |= (1<<PB2); + } + + // if on layer 3, turn on B3 LED, otherwise off. + if (biton32(state) == 3) { + PORTB &= ~(1<<PB3); + } else { + PORTB |= (1<<PB3); + } + + return state; +} diff --git a/keyboards/tmo50/tmo50.h b/keyboards/tmo50/tmo50.h index 5723b00ae..df88350f0 100644 --- a/keyboards/tmo50/tmo50.h +++ b/keyboards/tmo50/tmo50.h @@ -25,16 +25,30 @@ * The second converts the arguments into a two-dimensional array which * represents the switch matrix. */ -#define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ - K300, K301, K302, K303, K305, K307, K309, K310 \ + +#define LAYOUT_all( \ + K00, K31, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K32, K33, K35, K37, K39, K3A \ +) \ +{ \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, KC_NO, K35, KC_NO, K37, KC_NO, K39, K3A, KC_NO, KC_NO, KC_NO } \ +} + +#define LAYOUT_space( \ + K00, K31, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K32, K33, K37, K3A \ ) \ { \ - { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013 }, \ - { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113 }, \ - { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213 }, \ - { K300, K301, K302, K303, KC_NO, K305, KC_NO, K307, KC_NO, K309, K310, KC_NO, KC_NO, KC_NO } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, KC_NO, KC_NO, KC_NO, K37, KC_NO, KC_NO, K3A, KC_NO, KC_NO, KC_NO } \ } diff --git a/keyboards/toad/config.h b/keyboards/toad/config.h index f1d32c15b..f750b52bf 100644 --- a/keyboards/toad/config.h +++ b/keyboards/toad/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/tokyo60/config.h b/keyboards/tokyo60/config.h index 16927be17..fddb37d28 100644 --- a/keyboards/tokyo60/config.h +++ b/keyboards/tokyo60/config.h @@ -31,11 +31,6 @@ /* Set power consumption to work with mobile devices */ #define USB_MAX_POWER_CONSUMPTION 100 -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* key matrix pins */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B2, B5, B4, D7, D6, B3 } diff --git a/keyboards/touchpad/config.h b/keyboards/touchpad/config.h index 8d34daae1..8e93c9427 100644 --- a/keyboards/touchpad/config.h +++ b/keyboards/touchpad/config.h @@ -46,11 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/treasure/type9/config.h b/keyboards/treasure/type9/config.h index 367c53cb9..435325f6c 100644 --- a/keyboards/treasure/type9/config.h +++ b/keyboards/treasure/type9/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -221,4 +216,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/uk78/config.h b/keyboards/uk78/config.h index 34d672079..eff8d1d62 100644 --- a/keyboards/uk78/config.h +++ b/keyboards/uk78/config.h @@ -55,11 +55,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - /* ws2812b options */ #define RGB_DI_PIN F6 #ifdef RGB_DI_PIN diff --git a/keyboards/v60_type_r/config.h b/keyboards/v60_type_r/config.h index 1f3ebcd51..34eb12853 100644 --- a/keyboards/v60_type_r/config.h +++ b/keyboards/v60_type_r/config.h @@ -63,7 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN 0 #define RGB_STEP 16 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -115,11 +114,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/vinta/config.h b/keyboards/vinta/config.h index 5f6ea7f06..81a661f16 100644 --- a/keyboards/vinta/config.h +++ b/keyboards/vinta/config.h @@ -63,8 +63,3 @@ * useful if your keyboard/keypad is missing keys and you want magic key support. * */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h index 5798d91ad..c80a011e2 100644 --- a/keyboards/vision_division/config.h +++ b/keyboards/vision_division/config.h @@ -22,7 +22,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. // Due to the configurability of this keyboard, matrix sizes are determined in the keymap's config.h - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL @@ -78,11 +77,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -137,7 +131,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Only print user print statements */ // #define USER_PRINT - /* disable action features */ //#define NO_ACTION_LAYER //#define NO_ACTION_TAPPING diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index 31b107661..314eaff98 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -121,7 +121,7 @@ enum keyboard_macros { #define M_CP_CT M(MACRO_COPY_CUT) -#define M_COPY KC_FN1 +#define M_COPY MACROTAP(MACRO_COPY_CUT) #define SC_UNDO LCTL(KC_Z) #define SC_REDO LCTL(KC_Y) @@ -135,7 +135,7 @@ enum keyboard_macros { #define SC_CCLS LCTL(KC_F4) #define TG_NKRO MAGIC_TOGGLE_NKRO -#define OS_SHFT KC_FN0 +#define OS_SHFT OSM(MOD_LSFT) #define _______ KC_TRNS #define XXXXXXX KC_NO @@ -305,11 +305,6 @@ void persistent_default_layer_set(uint16_t default_layer) default_layer_set(default_layer); } -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), - [1] = ACTION_MACRO_TAP(MACRO_COPY_CUT), -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { @@ -619,4 +614,4 @@ void music_scale_user(void) PLAY_SONG(music_scale); } -#endif /* AUDIO_ENABLE */
\ No newline at end of file +#endif /* AUDIO_ENABLE */ diff --git a/keyboards/vitamins_included/rev1/config.h b/keyboards/vitamins_included/rev1/config.h index 0347477ee..7112c7891 100644 --- a/keyboards/vitamins_included/rev1/config.h +++ b/keyboards/vitamins_included/rev1/config.h @@ -52,11 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 F0 @@ -86,5 +81,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - #endif diff --git a/keyboards/viterbi/keymaps/drashna_old/config.h b/keyboards/viterbi/keymaps/drashna_old/config.h deleted file mode 100644 index ddf9d1a40..000000000 --- a/keyboards/viterbi/keymaps/drashna_old/config.h +++ /dev/null @@ -1,86 +0,0 @@ -/* -Copyright 2017 Danny Nguyen <danny@hexwire.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include QMK_KEYBOARD_CONFIG_H - - -#ifdef RGBLIGHT_ENABLE -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 -#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 -#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 -#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 300 -#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 -#endif // RGBLIGHT_ENABLE - - -#undef LOCKING_SUPPORT_ENABLE -#undef LOCKING_RESYNC_ENABLE - -#ifndef NO_DEBUG -#define NO_DEBUG -#endif // !NO_DEBUG -#ifndef NO_PRINT -#define NO_PRINT -#endif // !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 - -#undef PRODUCT -#define PRODUCT Drashnas Viterbi Macro Pad - -#define USE_I2C - -#ifdef AUDIO_ENABLE -#define C6_AUDIO -#define NO_MUSIC_MODE -#endif - -#define LAYOUT_ortho_5x7( \ - L00, L01, L02, L03, L04, L05, L06, \ - L10, L11, L12, L13, L14, L15, L16, \ - L20, L21, L22, L23, L24, L25, L26, \ - L30, L31, L32, L33, L34, L35, L36, \ - L40, L41, L42, L43, L44, L45, L46 \ - ) \ - LAYOUT( \ - L00, L01, L02, L03, L04, L05, L06, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L10, L11, L12, L13, L14, L15, L16, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L20, L21, L22, L23, L24, L25, L26, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L30, L31, L32, L33, L34, L35, L36, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - L40, L41, L42, L43, L44, L45, L46, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO \ - ) - -#endif - -#define QMK_ESC_OUTPUT F5 // usually COL -#define QMK_ESC_INPUT D4 // usually ROW -#define QMK_LED B0 -#define QMK_SPEAKER C6 diff --git a/keyboards/viterbi/keymaps/drashna_old/rules.mk b/keyboards/viterbi/keymaps/drashna_old/rules.mk deleted file mode 100644 index 14ac6a6b3..000000000 --- a/keyboards/viterbi/keymaps/drashna_old/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) -COMMAND_ENABLE = no # Commands for debug and configuration -TAP_DANCE_ENABLE = no -RGBLIGHT_ENABLE = yes -AUDIO_ENABLE = yes -NKRO_ENABLE = yes - -NO_SECRETS = yes -MACROS_ENABLED = yes -INDICATOR_LIGHTS = no -RGBLIGHT_TWINKLE = no - -LAYOUTS = ortho_5x7 - -# SRC := $(filter-out serial.c matrix.c i2c.c split_util.c,$(SRC)) -# SRC := $(filter-out serial.c,$(SRC)) -# SRC := $(filter-out matrix.c,$(SRC)) -# SRC := $(filter-out i2c.c,$(SRC)) -# SRC := $(filter-out split_util.c,$(SRC)) -# SRC += quantum/matrix.c - -USER_NAME := drashna -SRC += ../drashna/keymap.c - -BOOTLOADER = qmk-dfu diff --git a/keyboards/viterbi/matrix.c b/keyboards/viterbi/matrix.c deleted file mode 100644 index c56b49c5f..000000000 --- a/keyboards/viterbi/matrix.c +++ /dev/null @@ -1,454 +0,0 @@ -/* -Copyright 2017 Danny Nguyen <danny@hexwire.com> - -This program is free software: you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation, either version 2 of the License, or -(at your option) any later version. - -This program is distributed in the hope that it will be useful, -but WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -GNU General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program. If not, see <http://www.gnu.org/licenses/>. -*/ - -/* - * scan matrix - */ -#include <stdint.h> -#include <stdbool.h> -#include <avr/io.h> -#include "wait.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "split_util.h" -#include "pro_micro.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else // USE_SERIAL -# include "serial.h" -#endif - -#ifndef DEBOUNCING_DELAY -# define DEBOUNCING_DELAY 5 -#endif - -#if (DEBOUNCING_DELAY > 0) - static uint16_t debouncing_time; - static bool debouncing = false; -#endif - -#if (MATRIX_COLS <= 8) -# define print_matrix_header() print("\nr/c 01234567\n") -# define print_matrix_row(row) print_bin_reverse8(matrix_get_row(row)) -# define matrix_bitpop(i) bitpop(matrix[i]) -# define ROW_SHIFTER ((uint8_t)1) -#else -# error "Currently only supports 8 COLS" -#endif -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#define ERROR_DISCONNECT_COUNT 5 - -#define ROWS_PER_HAND (MATRIX_ROWS/2) - -static uint8_t error_count = 0; - -static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; -static const uint8_t col_pins[MATRIX_COLS] = MATRIX_COL_PINS; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -#if (DIODE_DIRECTION == COL2ROW) - static void init_cols(void); - static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row); - static void unselect_rows(void); - static void select_row(uint8_t row); - static void unselect_row(uint8_t row); -#elif (DIODE_DIRECTION == ROW2COL) - static void init_rows(void); - static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col); - static void unselect_cols(void); - static void unselect_col(uint8_t col); - static void select_col(uint8_t col); -#endif - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -__attribute__ ((weak)) -void matrix_init_user(void) { -} - -__attribute__ ((weak)) -void matrix_scan_user(void) { -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - debug_enable = true; - debug_matrix = true; - debug_mouse = true; - // initialize row and col - unselect_rows(); - init_cols(); - - TX_RX_LED_INIT; - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - - matrix_init_quantum(); - -} - -uint8_t _matrix_scan(void) -{ - int offset = isLeftHand ? 0 : (ROWS_PER_HAND); -#if (DIODE_DIRECTION == COL2ROW) - // Set row, read cols - for (uint8_t current_row = 0; current_row < ROWS_PER_HAND; current_row++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_cols_on_row(matrix_debouncing+offset, current_row); - - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } - -# else - read_cols_on_row(matrix+offset, current_row); -# endif - - } - -#elif (DIODE_DIRECTION == ROW2COL) - // Set col, read rows - for (uint8_t current_col = 0; current_col < MATRIX_COLS; current_col++) { -# if (DEBOUNCING_DELAY > 0) - bool matrix_changed = read_rows_on_col(matrix_debouncing+offset, current_col); - if (matrix_changed) { - debouncing = true; - debouncing_time = timer_read(); - } -# else - read_rows_on_col(matrix+offset, current_col); -# endif - - } -#endif - -# if (DEBOUNCING_DELAY > 0) - if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { - for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { - matrix[i+offset] = matrix_debouncing[i+offset]; - } - debouncing = false; - } -# endif - - return 1; -} - -#ifdef USE_I2C - -// Get rows from other half over i2c -int i2c_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - int err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_WRITE); - if (err) goto i2c_error; - - // start of matrix stored at 0x00 - err = i2c_master_write(0x00); - if (err) goto i2c_error; - - // Start read - err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); - if (err) goto i2c_error; - - if (!err) { - int i; - for (i = 0; i < ROWS_PER_HAND-1; ++i) { - matrix[slaveOffset+i] = i2c_master_read(I2C_ACK); - } - matrix[slaveOffset+i] = i2c_master_read(I2C_NACK); - i2c_master_stop(); - } else { -i2c_error: // the cable is disconnceted, or something else went wrong - i2c_reset_state(); - return err; - } - - return 0; -} - -#else // USE_SERIAL - -int serial_transaction(void) { - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - - if (serial_update_buffers()) { - return 1; - } - - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = serial_slave_buffer[i]; - } - return 0; -} -#endif - -uint8_t matrix_scan(void) -{ - uint8_t ret = _matrix_scan(); - -#ifdef USE_I2C - if( i2c_transaction() ) { -#else // USE_SERIAL - if( serial_transaction() ) { -#endif - // turn on the indicator led when halves are disconnected - TXLED1; - - error_count++; - - if (error_count > ERROR_DISCONNECT_COUNT) { - // reset other half if disconnected - int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; - for (int i = 0; i < ROWS_PER_HAND; ++i) { - matrix[slaveOffset+i] = 0; - } - } - } else { - // turn off the indicator led on no error - TXLED0; - error_count = 0; - } - matrix_scan_quantum(); - return ret; -} - -void matrix_slave_scan(void) { - _matrix_scan(); - - int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; - -#ifdef USE_I2C - for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; - } -#else // USE_SERIAL - for (int i = 0; i < ROWS_PER_HAND; ++i) { - serial_slave_buffer[i] = matrix[offset+i]; - } -#endif -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1<<col)); -} - -inline -matrix_row_t matrix_get_row(uint8_t row) -{ - return matrix[row]; -} - -void matrix_print(void) -{ - print("\nr/c 0123456789ABCDEF\n"); - for (uint8_t row = 0; row < MATRIX_ROWS; row++) { - phex(row); print(": "); - pbin_reverse16(matrix_get_row(row)); - print("\n"); - } -} - -uint8_t matrix_key_count(void) -{ - uint8_t count = 0; - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - count += bitpop16(matrix[i]); - } - return count; -} - -#if (DIODE_DIRECTION == COL2ROW) - -static void init_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_cols_on_row(matrix_row_t current_matrix[], uint8_t current_row) -{ - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[current_row]; - - // Clear data in matrix row - current_matrix[current_row] = 0; - - // Select row and wait for row selecton to stabilize - select_row(current_row); - wait_us(30); - - // For each col... - for(uint8_t col_index = 0; col_index < MATRIX_COLS; col_index++) { - - // Select the col pin to read (active low) - uint8_t pin = col_pins[col_index]; - uint8_t pin_state = (_SFR_IO8(pin >> 4) & _BV(pin & 0xF)); - - // Populate the matrix row with the state of the col pin - current_matrix[current_row] |= pin_state ? 0 : (ROW_SHIFTER << col_index); - } - - // Unselect row - unselect_row(current_row); - - return (last_row_value != current_matrix[current_row]); -} - -static void select_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_row(uint8_t row) -{ - uint8_t pin = row_pins[row]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#elif (DIODE_DIRECTION == ROW2COL) - -static void init_rows(void) -{ - for(uint8_t x = 0; x < ROWS_PER_HAND; x++) { - uint8_t pin = row_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -static bool read_rows_on_col(matrix_row_t current_matrix[], uint8_t current_col) -{ - bool matrix_changed = false; - - // Select col and wait for col selecton to stabilize - select_col(current_col); - wait_us(30); - - // For each row... - for(uint8_t row_index = 0; row_index < ROWS_PER_HAND; row_index++) - { - - // Store last value of row prior to reading - matrix_row_t last_row_value = current_matrix[row_index]; - - // Check row pin state - if ((_SFR_IO8(row_pins[row_index] >> 4) & _BV(row_pins[row_index] & 0xF)) == 0) - { - // Pin LO, set col bit - current_matrix[row_index] |= (ROW_SHIFTER << current_col); - } - else - { - // Pin HI, clear col bit - current_matrix[row_index] &= ~(ROW_SHIFTER << current_col); - } - - // Determine if the matrix changed state - if ((last_row_value != current_matrix[row_index]) && !(matrix_changed)) - { - matrix_changed = true; - } - } - - // Unselect col - unselect_col(current_col); - - return matrix_changed; -} - -static void select_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) |= _BV(pin & 0xF); // OUT - _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); // LOW -} - -static void unselect_col(uint8_t col) -{ - uint8_t pin = col_pins[col]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI -} - -static void unselect_cols(void) -{ - for(uint8_t x = 0; x < MATRIX_COLS; x++) { - uint8_t pin = col_pins[x]; - _SFR_IO8((pin >> 4) + 1) &= ~_BV(pin & 0xF); // IN - _SFR_IO8((pin >> 4) + 2) |= _BV(pin & 0xF); // HI - } -} - -#endif diff --git a/keyboards/viterbi/rev1/rev1.c b/keyboards/viterbi/rev1/rev1.c deleted file mode 100644 index 584837533..000000000 --- a/keyboards/viterbi/rev1/rev1.c +++ /dev/null @@ -1,22 +0,0 @@ -#include "viterbi.h" - - -#ifdef SSD1306OLED -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - led_set_user(usb_led); -} -#endif - -void matrix_init_kb(void) { - - // // green led on - // DDRD |= (1<<5); - // PORTD &= ~(1<<5); - - // // orange led on - // DDRB |= (1<<0); - // PORTB &= ~(1<<0); - - matrix_init_user(); -}; diff --git a/keyboards/viterbi/serial.c b/keyboards/viterbi/serial.c deleted file mode 100644 index 74bcbb6bf..000000000 --- a/keyboards/viterbi/serial.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * WARNING: be careful changing this code, it is very timing dependent - */ - -#ifndef F_CPU -#define F_CPU 16000000 -#endif - -#include <avr/io.h> -#include <avr/interrupt.h> -#include <util/delay.h> -#include <stdbool.h> -#include "serial.h" - -#ifndef USE_I2C - -// Serial pulse period in microseconds. Its probably a bad idea to lower this -// value. -#define SERIAL_DELAY 24 - -uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; -uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; - -#define SLAVE_DATA_CORRUPT (1<<0) -volatile uint8_t status = 0; - -inline static -void serial_delay(void) { - _delay_us(SERIAL_DELAY); -} - -inline static -void serial_output(void) { - SERIAL_PIN_DDR |= SERIAL_PIN_MASK; -} - -// make the serial pin an input with pull-up resistor -inline static -void serial_input(void) { - SERIAL_PIN_DDR &= ~SERIAL_PIN_MASK; - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -inline static -uint8_t serial_read_pin(void) { - return !!(SERIAL_PIN_INPUT & SERIAL_PIN_MASK); -} - -inline static -void serial_low(void) { - SERIAL_PIN_PORT &= ~SERIAL_PIN_MASK; -} - -inline static -void serial_high(void) { - SERIAL_PIN_PORT |= SERIAL_PIN_MASK; -} - -void serial_master_init(void) { - serial_output(); - serial_high(); -} - -void serial_slave_init(void) { - serial_input(); - - // Enable INT0 - EIMSK |= _BV(INT0); - // Trigger on falling edge of INT0 - EICRA &= ~(_BV(ISC00) | _BV(ISC01)); -} - -// Used by the master to synchronize timing with the slave. -static -void sync_recv(void) { - serial_input(); - // This shouldn't hang if the slave disconnects because the - // serial line will float to high if the slave does disconnect. - while (!serial_read_pin()); - serial_delay(); -} - -// Used by the slave to send a synchronization signal to the master. -static -void sync_send(void) { - serial_output(); - - serial_low(); - serial_delay(); - - serial_high(); -} - -// Reads a byte from the serial line -static -uint8_t serial_read_byte(void) { - uint8_t byte = 0; - serial_input(); - for ( uint8_t i = 0; i < 8; ++i) { - byte = (byte << 1) | serial_read_pin(); - serial_delay(); - _delay_us(1); - } - - return byte; -} - -// Sends a byte with MSB ordering -static -void serial_write_byte(uint8_t data) { - uint8_t b = 8; - serial_output(); - while( b-- ) { - if(data & (1 << b)) { - serial_high(); - } else { - serial_low(); - } - serial_delay(); - } -} - -// interrupt handle to be used by the slave device -ISR(SERIAL_PIN_INTERRUPT) { - sync_send(); - - uint8_t checksum = 0; - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_slave_buffer[i]); - sync_send(); - checksum += serial_slave_buffer[i]; - } - serial_write_byte(checksum); - sync_send(); - - // wait for the sync to finish sending - serial_delay(); - - // read the middle of pulses - _delay_us(SERIAL_DELAY/2); - - uint8_t checksum_computed = 0; - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_master_buffer[i] = serial_read_byte(); - sync_send(); - checksum_computed += serial_master_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_send(); - - serial_input(); // end transaction - - if ( checksum_computed != checksum_received ) { - status |= SLAVE_DATA_CORRUPT; - } else { - status &= ~SLAVE_DATA_CORRUPT; - } -} - -inline -bool serial_slave_DATA_CORRUPT(void) { - return status & SLAVE_DATA_CORRUPT; -} - -// Copies the serial_slave_buffer to the master and sends the -// serial_master_buffer to the slave. -// -// Returns: -// 0 => no error -// 1 => slave did not respond -int serial_update_buffers(void) { - // this code is very time dependent, so we need to disable interrupts - cli(); - - // signal to the slave that we want to start a transaction - serial_output(); - serial_low(); - _delay_us(1); - - // wait for the slaves response - serial_input(); - serial_high(); - _delay_us(SERIAL_DELAY); - - // check if the slave is present - if (serial_read_pin()) { - // slave failed to pull the line low, assume not present - sei(); - return 1; - } - - // if the slave is present syncronize with it - sync_recv(); - - uint8_t checksum_computed = 0; - // receive data from the slave - for (int i = 0; i < SERIAL_SLAVE_BUFFER_LENGTH; ++i) { - serial_slave_buffer[i] = serial_read_byte(); - sync_recv(); - checksum_computed += serial_slave_buffer[i]; - } - uint8_t checksum_received = serial_read_byte(); - sync_recv(); - - if (checksum_computed != checksum_received) { - sei(); - return 1; - } - - uint8_t checksum = 0; - // send data to the slave - for (int i = 0; i < SERIAL_MASTER_BUFFER_LENGTH; ++i) { - serial_write_byte(serial_master_buffer[i]); - sync_recv(); - checksum += serial_master_buffer[i]; - } - serial_write_byte(checksum); - sync_recv(); - - // always, release the line when not in use - serial_output(); - serial_high(); - - sei(); - return 0; -} - -#endif diff --git a/keyboards/viterbi/serial.h b/keyboards/viterbi/serial.h deleted file mode 100644 index 15fe4db7b..000000000 --- a/keyboards/viterbi/serial.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef MY_SERIAL_H -#define MY_SERIAL_H - -#include "config.h" -#include <stdbool.h> - -/* TODO: some defines for interrupt setup */ -#define SERIAL_PIN_DDR DDRD -#define SERIAL_PIN_PORT PORTD -#define SERIAL_PIN_INPUT PIND -#define SERIAL_PIN_MASK _BV(PD0) -#define SERIAL_PIN_INTERRUPT INT0_vect - -#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 -#define SERIAL_MASTER_BUFFER_LENGTH 1 - -// Buffers for master - slave communication -extern volatile uint8_t serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH]; -extern volatile uint8_t serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH]; - -void serial_master_init(void); -void serial_slave_init(void); -int serial_update_buffers(void); -bool serial_slave_data_corrupt(void); - -#endif diff --git a/keyboards/viterbi/split_util.c b/keyboards/viterbi/split_util.c deleted file mode 100644 index 346cbc908..000000000 --- a/keyboards/viterbi/split_util.c +++ /dev/null @@ -1,86 +0,0 @@ -#include <avr/io.h> -#include <avr/wdt.h> -#include <avr/power.h> -#include <avr/interrupt.h> -#include <util/delay.h> -#include <avr/eeprom.h> -#include "split_util.h" -#include "matrix.h" -#include "keyboard.h" -#include "config.h" -#include "timer.h" - -#ifdef USE_I2C -# include "i2c.h" -#else -# include "serial.h" -#endif - -volatile bool isLeftHand = true; - -static void setup_handedness(void) { - #ifdef EE_HANDS - isLeftHand = eeprom_read_byte(EECONFIG_HANDEDNESS); - #else - // I2C_MASTER_RIGHT is deprecated, use MASTER_RIGHT instead, since this works for both serial and i2c - #if defined(I2C_MASTER_RIGHT) || defined(MASTER_RIGHT) - isLeftHand = !has_usb(); - #else - isLeftHand = has_usb(); - #endif - #endif -} - -static void keyboard_master_setup(void) { -#ifdef USE_I2C - i2c_master_init(); -#ifdef SSD1306OLED - matrix_master_OLED_init (); -#endif -#else - serial_master_init(); -#endif -} - -static void keyboard_slave_setup(void) { - timer_init(); -#ifdef USE_I2C - i2c_slave_init(SLAVE_I2C_ADDRESS); -#else - serial_slave_init(); -#endif -} - -bool has_usb(void) { - USBCON |= (1 << OTGPADE); //enables VBUS pad - _delay_us(5); - return (USBSTA & (1<<VBUS)); //checks state of VBUS -} - -void split_keyboard_setup(void) { - setup_handedness(); - - if (has_usb()) { - keyboard_master_setup(); - } else { - keyboard_slave_setup(); - } - sei(); -} - -void keyboard_slave_loop(void) { - matrix_init(); - - while (1) { - matrix_slave_scan(); - } -} - -// this code runs before the usb and keyboard is initialized -void matrix_setup(void) { - split_keyboard_setup(); - - if (!has_usb()) { - keyboard_slave_loop(); - } -} diff --git a/keyboards/viterbi/split_util.h b/keyboards/viterbi/split_util.h deleted file mode 100644 index a0a8dd3bf..000000000 --- a/keyboards/viterbi/split_util.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef SPLIT_KEYBOARD_UTIL_H -#define SPLIT_KEYBOARD_UTIL_H - -#include <stdbool.h> -#include "eeconfig.h" - - -#define SLAVE_I2C_ADDRESS 0x32 - -extern volatile bool isLeftHand; - -// slave version of matix scan, defined in matrix.c -void matrix_slave_scan(void); - -void split_keyboard_setup(void); -bool has_usb(void); -void keyboard_slave_loop(void); - -void matrix_master_OLED_init (void); - -#endif diff --git a/keyboards/westfoxtrot/aanzee/aanzee.c b/keyboards/westfoxtrot/aanzee/aanzee.c new file mode 100644 index 000000000..0dc1199be --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/aanzee.c @@ -0,0 +1,52 @@ +/* Copyright 2019 westfoxtrot + +* + +* This program is free software: you can redistribute it and/or modify + +* it under the terms of the GNU General Public License as published by + +* the Free Software Foundation, either version 2 of the License, or + +* (at your option) any later version. + +* + +* This program is distributed in the hope that it will be useful, + +* but WITHOUT ANY WARRANTY; without even the implied warranty of + +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + +* GNU General Public License for more details. + +* + +* You should have received a copy of the GNU General Public License + +* along with this program. If not, see <http://www.gnu.org/licenses/>. + +*/ + +#include "aanzee.h" + + +void led_set_kb(uint8_t usb_led) { + +if (usb_led & (1<<USB_LED_CAPS_LOCK)) { + +// Turn capslock on + + writePinLow(B2); + +} else { + +// Turn capslock off + + writePinHigh(B2); + +} + +led_set_user(usb_led); + +} diff --git a/keyboards/westfoxtrot/aanzee/aanzee.h b/keyboards/westfoxtrot/aanzee/aanzee.h new file mode 100644 index 000000000..b2a04a9d2 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/aanzee.h @@ -0,0 +1,65 @@ +/* Copyright 2019 westfoxtrot +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#ifndef AANZEE_H +#define AANZEE_H + +#define ___ KC_NO + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. +* +* The first section contains all of the arguments representing the physical +* layout of the board and position of the keys. +* +* The second converts the arguments into a two-dimensional array which +* represents the switch matrix. +*/ +// readability + +#define LAYOUT_ansi( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0F, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2C, K2D, K2E, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) \ +{ \ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F}, \ + {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, ___}, \ + {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, ___, K2C, K2D, K2E, ___}, \ + {K30, ___, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ + {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D, K4E, ___} \ +} +#define LAYOUT_iso( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ + K40, K41, K42, K46, K49, K4A, K4B, K4C, K4D, K4E \ +) \ +{ \ + {K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, ___}, \ + {K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, ___, K1D, K1E, ___}, \ + {K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, ___}, \ + {K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, ___}, \ + {K40, K41, K42, ___, ___, ___, K46, ___, ___, K49, K4A, K4B, K4C, K4D, K4E, ___} \ +} + +void matrix_init_user(void); +void matrix_scan_user(void); + +#endif diff --git a/keyboards/westfoxtrot/aanzee/config.h b/keyboards/westfoxtrot/aanzee/config.h new file mode 100644 index 000000000..3959066b2 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/config.h @@ -0,0 +1,142 @@ +/* +Copyright 2019 westfoxtrot + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x21FF +#define PRODUCT_ID 0xAA01 +#define DEVICE_VER 0x0001 +#define MANUFACTURER westfoxtrot +#define PRODUCT aanzee +#define DESCRIPTION QMK Firmware for the Aanzee PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B4,D7,D6,D4,B3} +#define MATRIX_COL_PINS {D2,D1,D0,D3,D5,C7,C6,B6,B5,F0,F1,F4,F5,F6,F7,B0} +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 5 + +#define RGB_DI_PIN E6 +#ifdef RGB_DI_PIN + #define RGBLED_NUM 9 + #define RGBLIGHT_HUE_STEP 12 + #define RGBLIGHT_SAT_STEP 25 + #define RGBLIGHT_VAL_STEP 12 + #define RGBLIGHT_LIMIT_VAL 255 /* The maximum brightness level */ + #define RGBLIGHT_SLEEP /* If defined, the RGB lighting will be switched off when the host goes to sleep */ +/*== all animations enable ==*/ + #define RGBLIGHT_ANIMATIONS +/*== or choose animations ==*/ +// #define RGBLIGHT_EFFECT_BREATHING +// #define RGBLIGHT_EFFECT_RAINBOW_MOOD +// #define RGBLIGHT_EFFECT_RAINBOW_SWIRL +// #define RGBLIGHT_EFFECT_SNAKE +// #define RGBLIGHT_EFFECT_KNIGHT +// #define RGBLIGHT_EFFECT_CHRISTMAS +// #define RGBLIGHT_EFFECT_STATIC_GRADIENT +// #define RGBLIGHT_EFFECT_RGB_TEST +// #define RGBLIGHT_EFFECT_ALTERNATING +#endif +#define RGBW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +#define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + + +//dynamic keymap and via support + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*10*6*2)) = (35+480) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 675 // **** CHANGE THIS BASED ON MATRIX_ROWS & MATRIX_COLS **** +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 349 // **** CHANGE THIS BASED ON 1024-DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR **** +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/westfoxtrot/aanzee/info.json b/keyboards/westfoxtrot/aanzee/info.json new file mode 100644 index 000000000..d6734d620 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "aanzee", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "key_count": 68, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgDn", "x":15, "y":2}, {"label":"\u21e7 Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"Fn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + "LAYOUT_iso": { + "key_count": 68, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"Home", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"x":13.75, "y":1, "w":1.25, "h":2}, {"label":"PgUp", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"x":12.75, "y":2}, {"label":"PgDn", "x":15, "y":2}, {"x":0, "y":3, "w":1.25}, {"x":1.25, "y":3}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"Fn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Alt", "x":10, "y":4, "w":1.25}, {"label":"Win", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] + }, + } +} +} diff --git a/keyboards/westfoxtrot/aanzee/keymaps/default/config.h b/keyboards/westfoxtrot/aanzee/keymaps/default/config.h new file mode 100644 index 000000000..35ebb6871 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 westfoxtrot +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c new file mode 100644 index 000000000..4b7a9f208 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 westfoxtrot +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MA] = LAYOUT_ansi( + KC_GESC, 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_BSPC, KC_DEL, KC_HOME,\ + 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_BSLS, KC_END, \ + 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_ENT, KC_PGUP, \ + KC_LSFT, 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_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + + [_F1] = LAYOUT_ansi( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,_______,_______, \ + _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______) + }; + + void matrix_init_user(void) { + //user initialization + } + + void matrix_scan_user(void) { + //user matrix + } + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } diff --git a/keyboards/westfoxtrot/aanzee/keymaps/default/readme.md b/keyboards/westfoxtrot/aanzee/keymaps/default/readme.md new file mode 100644 index 000000000..77137f2f0 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for aanzee
\ No newline at end of file diff --git a/keyboards/westfoxtrot/aanzee/keymaps/iso-default/config.h b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/config.h new file mode 100644 index 000000000..386a2fd57 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/config.h @@ -0,0 +1,19 @@ +/* Copyright 2019 westfoxtrot +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c new file mode 100644 index 000000000..79628eb90 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 westfoxtrot +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MA] = LAYOUT_iso( + KC_GESC, 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_BSPC, KC_HOME,\ + 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_END, \ + 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_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + + [_F1] = LAYOUT_iso( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______,_______) + }; + + void matrix_init_user(void) { + //user initialization + } + + void matrix_scan_user(void) { + //user matrix + } + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } diff --git a/keyboards/westfoxtrot/aanzee/keymaps/iso-default/readme.md b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/readme.md new file mode 100644 index 000000000..77137f2f0 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/iso-default/readme.md @@ -0,0 +1 @@ +# The default keymap for aanzee
\ No newline at end of file diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/config.h b/keyboards/westfoxtrot/aanzee/keymaps/via/config.h new file mode 100644 index 000000000..35ebb6871 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/config.h @@ -0,0 +1,19 @@ +/* Copyright 2018 westfoxtrot +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ + +#pragma once + +// place overrides here diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c b/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c new file mode 100644 index 000000000..4b7a9f208 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/keymap.c @@ -0,0 +1,48 @@ +/* Copyright 2019 westfoxtrot +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 2 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see <http://www.gnu.org/licenses/>. +*/ +#include QMK_KEYBOARD_H + +#define _MA 0 +#define _F1 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_MA] = LAYOUT_ansi( + KC_GESC, 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_BSPC, KC_DEL, KC_HOME,\ + 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_BSLS, KC_END, \ + 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_ENT, KC_PGUP, \ + KC_LSFT, 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_LCTRL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_F1),KC_RCTL,KC_LEFT,KC_DOWN, KC_RGHT), + + [_F1] = LAYOUT_ansi( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,_______,_______, \ + _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______) + }; + + void matrix_init_user(void) { + //user initialization + } + + void matrix_scan_user(void) { + //user matrix + } + + bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; + } diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/readme.md b/keyboards/westfoxtrot/aanzee/keymaps/via/readme.md new file mode 100644 index 000000000..d5c8b708d --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/readme.md @@ -0,0 +1 @@ +# The default keymap for aanzee with via support diff --git a/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk new file mode 100644 index 000000000..efd8bd14d --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/keymaps/via/rules.mk @@ -0,0 +1,70 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +#add files needed for via + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes +SRC += keyboards/wilba_tech/wt_main.c diff --git a/keyboards/westfoxtrot/aanzee/readme.md b/keyboards/westfoxtrot/aanzee/readme.md new file mode 100644 index 000000000..b97f45863 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/readme.md @@ -0,0 +1,15 @@ +# aanzee + +![aanzee](https://cablecardesigns.co/portfolio-posts/aanzee) + +custom pcb for the aanzee keyboard + + Keyboard Maintainer: [westfoxtrot](https://github.com/westfoxtrot) + Hardware Supported: aanzee PCB + Hardware Availability: with group buy + +Make example for this keyboard (after setting up your build environment): + + make westfoxtrot/aanzee:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/westfoxtrot/aanzee/rules.mk b/keyboards/westfoxtrot/aanzee/rules.mk new file mode 100644 index 000000000..cdea2a265 --- /dev/null +++ b/keyboards/westfoxtrot/aanzee/rules.mk @@ -0,0 +1,65 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + +# Bootloader selection +# Teensy halfkay +# Pro Micro caterina +# Atmel DFU atmel-dfu +# LUFA DFU lufa-dfu +# QMK DFU qmk-dfu +# atmega32a bootloadHID +BOOTLOADER = atmel-dfu + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + diff --git a/keyboards/westfoxtrot/cyclops/config.h b/keyboards/westfoxtrot/cyclops/config.h index f54f818d5..65107c30a 100644 --- a/keyboards/westfoxtrot/cyclops/config.h +++ b/keyboards/westfoxtrot/cyclops/config.h @@ -99,11 +99,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/wheatfield/blocked65/blocked65.c b/keyboards/wheatfield/blocked65/blocked65.c deleted file mode 100755 index 81da8005b..000000000 --- a/keyboards/wheatfield/blocked65/blocked65.c +++ /dev/null @@ -1 +0,0 @@ -#include "blocked65.h" diff --git a/keyboards/wheatfield/blocked65/blocked65.h b/keyboards/wheatfield/blocked65/blocked65.h deleted file mode 100755 index 54b4485b7..000000000 --- a/keyboards/wheatfield/blocked65/blocked65.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once - -#include "quantum.h" - -#define _x_ KC_NO - -#define LAYOUT( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, K2E, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E, \ - K40, K41, K42, K46, K4A, K4B, K4C, K4D, K4E \ -){ \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, _x_, K2D, K2E }, \ - { K30, _x_, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ - { K40, K41, K42, _x_, _x_, _x_, K46, _x_, _x_, _x_, K4A, K4B, K4C, K4D, K4E }, \ -} - diff --git a/keyboards/wheatfield/blocked65/info.json b/keyboards/wheatfield/blocked65/info.json deleted file mode 100644 index e3f9c360b..000000000 --- a/keyboards/wheatfield/blocked65/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Wheat Field blocked 65% keyboard", - "url": "", - "maintainer": "qmk", - "bootloader": "", - "width": 16, - "height": 5, - "layouts": { - "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"@", "x":2, "y":0}, {"label":"#", "x":3, "y":0}, {"label":"$", "x":4, "y":0}, {"label":"%", "x":5, "y":0}, {"label":"^", "x":6, "y":0}, {"label":"&", "x":7, "y":0}, {"label":"*", "x":8, "y":0}, {"label":"(", "x":9, "y":0}, {"label":")", "x":10, "y":0}, {"label":"_", "x":11, "y":0}, {"label":"+", "x":12, "y":0}, {"label":"Backspace", "x":13, "y":0, "w":2}, {"label":"PrScr", "x":15, "y":0}, {"label":"Tab", "x":0, "y":1, "w":1.5}, {"label":"Q", "x":1.5, "y":1}, {"label":"W", "x":2.5, "y":1}, {"label":"E", "x":3.5, "y":1}, {"label":"R", "x":4.5, "y":1}, {"label":"T", "x":5.5, "y":1}, {"label":"Y", "x":6.5, "y":1}, {"label":"U", "x":7.5, "y":1}, {"label":"I", "x":8.5, "y":1}, {"label":"O", "x":9.5, "y":1}, {"label":"P", "x":10.5, "y":1}, {"label":"{", "x":11.5, "y":1}, {"label":"}", "x":12.5, "y":1}, {"label":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Del", "x":15, "y":1}, {"label":"Caps Lock", "x":0, "y":2, "w":1.75}, {"label":"A", "x":1.75, "y":2}, {"label":"S", "x":2.75, "y":2}, {"label":"D", "x":3.75, "y":2}, {"label":"F", "x":4.75, "y":2}, {"label":"G", "x":5.75, "y":2}, {"label":"H", "x":6.75, "y":2}, {"label":"J", "x":7.75, "y":2}, {"label":"K", "x":8.75, "y":2}, {"label":"L", "x":9.75, "y":2}, {"label":":", "x":10.75, "y":2}, {"label":"\"", "x":11.75, "y":2}, {"label":"Enter", "x":12.75, "y":2, "w":2.25}, {"label":"PgUp", "x":15, "y":2}, {"label":"Shift", "x":0, "y":3, "w":2.25}, {"label":"Z", "x":2.25, "y":3}, {"label":"X", "x":3.25, "y":3}, {"label":"C", "x":4.25, "y":3}, {"label":"V", "x":5.25, "y":3}, {"label":"B", "x":6.25, "y":3}, {"label":"N", "x":7.25, "y":3}, {"label":"M", "x":8.25, "y":3}, {"label":"<", "x":9.25, "y":3}, {"label":">", "x":10.25, "y":3}, {"label":"?", "x":11.25, "y":3}, {"label":"Shift", "x":12.25, "y":3, "w":1.75}, {"label":"\u2191", "x":14, "y":3}, {"label":"PgDn", "x":15, "y":3}, {"label":"Ctrl", "x":0, "y":4, "w":1.25}, {"label":"Win", "x":1.25, "y":4, "w":1.25}, {"label":"Alt", "x":2.5, "y":4, "w":1.25}, {"x":3.75, "y":4, "w":6.25}, {"label":"Fn", "x":10, "y":4, "w":1.25}, {"label":"Alt", "x":11.25, "y":4, "w":1.25}, {"label":"\u2190", "x":13, "y":4}, {"label":"\u2193", "x":14, "y":4}, {"label":"\u2192", "x":15, "y":4}] - } - } -} diff --git a/keyboards/wheatfield/blocked65/keymaps/default/keymap.c b/keyboards/wheatfield/blocked65/keymaps/default/keymap.c deleted file mode 100644 index 9891d2f63..000000000 --- a/keyboards/wheatfield/blocked65/keymaps/default/keymap.c +++ /dev/null @@ -1,25 +0,0 @@ -#include QMK_KEYBOARD_H - -#define RAISE MO(_RAISE) - -enum layers { - _QWERTY, - _RAISE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT( - KC_GESC, 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_BSPC, KC_INSERT, \ - 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_BSLS, 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_ENT, KC_PGUP, \ - KC_LSFT, 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, RAISE, KC_LEFT, KC_DOWN, KC_RIGHT), - - [_RAISE] = LAYOUT( - KC_GRV, 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_DEL, KC_PSCR, \ - KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ - KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, BL_TOGG,KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END) -}; diff --git a/keyboards/wheatfield/blocked65/keymaps/walker/config.h b/keyboards/wheatfield/blocked65/keymaps/walker/config.h deleted file mode 100644 index e7c26d1d0..000000000 --- a/keyboards/wheatfield/blocked65/keymaps/walker/config.h +++ /dev/null @@ -1,9 +0,0 @@ -#pragma once - -#define RGB_DI_PIN E2 -#define RGBLIGHT_ANIMATIONS -#undef RGBLED_NUM -#define RGBLED_NUM 72 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 diff --git a/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c b/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c deleted file mode 100644 index 3dc7a7dbd..000000000 --- a/keyboards/wheatfield/blocked65/keymaps/walker/keymap.c +++ /dev/null @@ -1,27 +0,0 @@ -#include QMK_KEYBOARD_H - -#define RAISE MO(_RAISE) - -enum layers { - _QWERTY, - _RAISE -}; - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = LAYOUT( - KC_GESC, 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_BSPC, KC_INSERT, \ - 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_BSLS, 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_ENT, KC_PGUP, \ - KC_LSFT, 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, RAISE, KC_LEFT, KC_DOWN, KC_RIGHT), - - [_RAISE] = LAYOUT( - KC_GRV, 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_DEL, KC_PSCR, \ - KC_TRNS, KC_NO, KC_UP, KC_NO, RGB_TOG,RGB_VAI,RGB_HUI,RGB_SAI,KC_INS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_BSLS, KC_SLCK, \ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,RGB_MOD,RGB_VAD,RGB_HUD,RGB_SAD,KC_NO, KC_NO, KC_F14, KC_F15, KC_INS, KC_HOME, \ - KC_LSFT, KC_MPRV, KC_MPLY, KC_MNXT,KC_NO, BL_TOGG,KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, RGB_MOD, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, RESET, KC_RALT, KC_TRNS, KC_HOME, BL_STEP, KC_END) - -}; - diff --git a/keyboards/whitefox/config.h b/keyboards/whitefox/config.h index a8047cf54..87af4edcf 100644 --- a/keyboards/whitefox/config.h +++ b/keyboards/whitefox/config.h @@ -46,11 +46,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 diff --git a/keyboards/whitefox/keymaps/billypython/config.h b/keyboards/whitefox/keymaps/billypython/config.h index 275f8effb..4b511eb84 100644 --- a/keyboards/whitefox/keymaps/billypython/config.h +++ b/keyboards/whitefox/keymaps/billypython/config.h @@ -1,17 +1,3 @@ #pragma once -#define FORCE_NKRO - -#define MAGIC_KEY_LAYER0_ALT1 BSLS -#define MAGIC_KEY_BOOTLOADER ESC - -#define MOUSEKEY_DELAY 50 -#define MOUSEKEY_INTERVAL 15 -#define MOUSEKEY_MAX_SPEED 4 -#define MOUSEKEY_TIME_TO_MAX 50 -#define MOUSEKEY_WHEEL_MAX_SPEED 1 -#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 - -#define PERMISSIVE_HOLD -#define TAPPING_TERM 200 -#define TAPPING_TOGGLE 2 +#define LAYER_FN diff --git a/keyboards/whitefox/keymaps/billypython/keymap.c b/keyboards/whitefox/keymaps/billypython/keymap.c index dfc7d6a96..79758de80 100644 --- a/keyboards/whitefox/keymaps/billypython/keymap.c +++ b/keyboards/whitefox/keymaps/billypython/keymap.c @@ -1,95 +1,5 @@ #include QMK_KEYBOARD_H - -#define TOP LCTL(KC_HOME) -#define BOTTOM LCTL(KC_END) - -#define FN MO(L_FN) -#define FN_CAPS LT(L_FN, KC_CAPS) -#define FN_FNLK TT(L_FN) - -#define RSF_RCT TD(TD_RSF_RCT) - -#define COMMA UC(0x002C) -#define L_PAREN UC(0x0028) -#define R_PAREN UC(0x0029) -#define EQUALS UC(0x003D) -#define TIMES UC(0x00D7) -#define DIVIDE UC(0x00F7) -#define MINUS UC(0x2212) - -void eeconfig_init_user(void) { - set_unicode_input_mode(UC_LNX); -} - -enum layers { - L_BASE, - L_FN, - L_NUMPAD, -}; - -enum custom_keycodes { - CLEAR = SAFE_RANGE, - NUMPAD, -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case CLEAR: - if (record->event.pressed) { - SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); - } - return false; - - case NUMPAD: - if (record->event.pressed) { - layer_invert(L_NUMPAD); - bool num_lock = host_keyboard_leds() & 1<<USB_LED_NUM_LOCK; - if (num_lock != (bool)IS_LAYER_ON(L_NUMPAD)) { - tap_code(KC_NLCK); // Toggle Num Lock to match layer state. - } - } - return false; - - default: - return true; - } -} - -#define ACTION_TAP_DANCE_DOUBLE_MODS(mod1, mod2) { \ - .fn = { td_double_mods_each, NULL, td_double_mods_reset }, \ - .user_data = &(qk_tap_dance_pair_t){ mod1, mod2 }, \ - } - -void td_double_mods_each(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; - // Single tap → mod1, double tap → mod2, triple tap etc. → mod1+mod2 - if (state->count == 1 || state->count == 3) { - register_code(mods->kc1); - } else if (state->count == 2) { - unregister_code(mods->kc1); - register_code(mods->kc2); - } - // Prevent tap dance from sending kc1 and kc2 as weak mods - state->weak_mods &= ~(MOD_BIT(mods->kc1) | MOD_BIT(mods->kc2)); -} - -void td_double_mods_reset(qk_tap_dance_state_t *state, void *user_data) { - qk_tap_dance_pair_t *mods = (qk_tap_dance_pair_t *)user_data; - if (state->count == 1 || state->count > 2) { - unregister_code(mods->kc1); - } - if (state->count >= 2) { - unregister_code(mods->kc2); - } -} - -enum tap_dance { - TD_RSF_RCT, -}; - -qk_tap_dance_action_t tap_dance_actions[] = { - [TD_RSF_RCT] = ACTION_TAP_DANCE_DOUBLE_MODS(KC_RSFT, KC_RCTL), -}; +#include "billypython.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Base layer @@ -106,11 +16,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_BASE] = LAYOUT_truefox( \ - 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_PSCR, \ - 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, \ - FN_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, KC_PGUP, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,RSF_RCT, KC_UP, KC_PGDN, \ - KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,FN_FNLK, KC_LEFT,KC_DOWN,KC_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_PSCR, \ + 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, \ + FN_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RSF_RCT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, FN_FNLK, KC_LEFT, KC_DOWN, KC_RGHT \ ), /* Function layer @@ -127,31 +37,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ */ [L_FN] = LAYOUT_truefox( \ - _______,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, NUMPAD, KC_SLCK,KC_PAUS, \ - KC_BTN4,KC_BTN2,KC_MS_U,KC_BTN1,KC_BTN3,KC_BTN5,_______,KC_PGUP,KC_UP, KC_PGDN,KC_MPLY,KC_MPRV,KC_MNXT,CLEAR, KC_INS, \ - _______,KC_MS_L,KC_MS_D,KC_MS_R,KC_WH_U,_______,KC_HOME,KC_LEFT,KC_DOWN,KC_RGHT,KC_END, _______, _______, TOP, \ - _______, KC_ACL0,KC_ACL2,KC_WH_L,KC_WH_R,_______,_______,_______,KC_VOLD,KC_VOLU,KC_MUTE,KC_APP, KC_PGUP,BOTTOM, \ - _______,_______,_______, KC_WH_D, _______,_______, KC_HOME,KC_PGDN,KC_END \ - ), - - /* Numpad layer - * ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┐ - * │Num│ │ │ │ │ │ │P7 │P8 │P9 │P- │ − │ = │Num│ │ │ - * ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┼───┤ - * │ │ │ │ │ │ │ │P4 │P5 │P6 │P+ │ ( │ ) │ │ │ - * ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┼───┤ - * │ │ │ │ │ │ │ │P1 │P2 │P3 │P* │ × │ PEnter │ │ - * ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┼───┤ - * │ │ │ │ │ │ │P0 │P0 │ , │P. │P/ │ ÷ │ │ │ - * ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬─┬───┼───┼───┤ - * │ │ │ │ │ │ │ │ │ │ │ - * └────┴────┴────┴────────────────────────┴────┴────┘ └───┴───┴───┘ - */ - [L_NUMPAD] = LAYOUT_truefox( \ - NUMPAD, _______,_______,_______,_______,_______,_______,KC_P7, KC_P8, KC_P9, KC_PMNS,MINUS, EQUALS, NUMPAD, _______,_______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P4, KC_P5, KC_P6, KC_PPLS,L_PAREN,R_PAREN,_______, _______, \ - _______,_______,_______,_______,_______,_______,_______,KC_P1, KC_P2, KC_P3, KC_PAST,TIMES, KC_PENT, _______, \ - _______, _______,_______,_______,_______,_______,KC_P0, KC_P0, COMMA, KC_PDOT,KC_PSLS,DIVIDE, _______,_______, \ - _______,_______,_______, _______, _______,_______, _______,_______,_______ \ + _______, 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_NLCK, KC_SLCK, KC_PAUS, \ + KC_BTN4, KC_BTN2, KC_MS_U, KC_BTN1, KC_BTN3, KC_BTN5, _______, KC_PGUP, KC_UP, KC_PGDN, KC_MPLY, KC_MPRV, KC_MNXT, CLEAR, KC_INS, \ + _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_U, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______, _______, TOP, \ + _______, KC_ACL0, KC_ACL2, KC_WH_L, KC_WH_R, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE, KC_APP, KC_PGUP, BOTTOM, \ + _______, _______, _______, KC_WH_D, _______, _______, KC_HOME, KC_PGDN, KC_END \ ), }; diff --git a/keyboards/whitefox/keymaps/billypython/rules.mk b/keyboards/whitefox/keymaps/billypython/rules.mk index 8fbc1f3af..133c7af54 100644 --- a/keyboards/whitefox/keymaps/billypython/rules.mk +++ b/keyboards/whitefox/keymaps/billypython/rules.mk @@ -1,15 +1,6 @@ -AUDIO_ENABLE = no BACKLIGHT_ENABLE = no -BLUETOOTH_ENABLE = no BOOTMAGIC_ENABLE = no COMMAND_ENABLE = yes CONSOLE_ENABLE = yes -EXTRAKEY_ENABLE = yes -MIDI_ENABLE = no -MOUSEKEY_ENABLE = yes -NKRO_ENABLE = yes -RGBLIGHT_ENABLE = no -SLEEP_LED_ENABLE = no TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes VISUALIZER_ENABLE = no diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c index ad66ec103..61cc4eca0 100644 --- a/keyboards/whitefox/keymaps/default/keymap.c +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -35,7 +35,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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 \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(1), KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = LAYOUT( \ 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,\ @@ -45,7 +45,3 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), }; - -const uint16_t fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), -}; diff --git a/keyboards/whitefox/keymaps/konstantin/config.h b/keyboards/whitefox/keymaps/konstantin/config.h index d7a072b06..1364fe8a2 100644 --- a/keyboards/whitefox/keymaps/konstantin/config.h +++ b/keyboards/whitefox/keymaps/konstantin/config.h @@ -1,7 +1,6 @@ #pragma once +#define IS_COMMAND() (get_mods() == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) + #define LAYER_FN #define LAYER_NUMPAD - -#undef IS_COMMAND -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RCTL))) diff --git a/keyboards/wilba_tech/wt60_a/config.h b/keyboards/wilba_tech/wt60_a/config.h index 9eff7d7f1..0ca896d5e 100644 --- a/keyboards/wilba_tech/wt60_a/config.h +++ b/keyboards/wilba_tech/wt60_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c new file mode 100644 index 000000000..566736f5e --- /dev/null +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +// Default layout for WT60-A +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +// Default layer +[0] = LAYOUT_60_ansi( + 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_BSPC, + 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_BSLS, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, MO(1), KC_RCTL), + +// Fn1 Layer +[1] = LAYOUT_60_ansi( + KC_GRV, 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_DEL , + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn2 Layer +[2] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +// Fn3 Layer +[3] = LAYOUT_60_ansi( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt60_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk new file mode 100644 index 000000000..76a07d7a4 --- /dev/null +++ b/keyboards/wilba_tech/wt60_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt60_a/rules.mk b/keyboards/wilba_tech/wt60_a/rules.mk index 76a07d7a4..e41f2186b 100644 --- a/keyboards/wilba_tech/wt60_a/rules.mk +++ b/keyboards/wilba_tech/wt60_a/rules.mk @@ -66,6 +66,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_a/config.h b/keyboards/wilba_tech/wt65_a/config.h index 88366edc0..59c1d04a1 100644 --- a/keyboards/wilba_tech/wt65_a/config.h +++ b/keyboards/wilba_tech/wt65_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c new file mode 100644 index 000000000..c5ae81168 --- /dev/null +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/keymap.c @@ -0,0 +1,37 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + 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_BSPC, KC_BSPC, KC_HOME, + 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_BSLS, KC_PGUP, + 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_ENT, KC_PGDN, + KC_LSFT, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_GRV, 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_DEL, KC_DEL, KC_TRNS, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt65_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk new file mode 100644 index 000000000..76a07d7a4 --- /dev/null +++ b/keyboards/wilba_tech/wt65_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt65_a/rules.mk b/keyboards/wilba_tech/wt65_a/rules.mk index 76a07d7a4..e41f2186b 100644 --- a/keyboards/wilba_tech/wt65_a/rules.mk +++ b/keyboards/wilba_tech/wt65_a/rules.mk @@ -66,6 +66,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/config.h b/keyboards/wilba_tech/wt75_a/config.h new file mode 100644 index 000000000..a24ab2462 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/config.h @@ -0,0 +1,202 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x6582 // wilba.tech +#define PRODUCT_ID 0x075A // 75-A +#define DEVICE_VER 0x0001 +#define MANUFACTURER wilba.tech +#define PRODUCT wilba.tech WT75-A +#define DESCRIPTION wilba.tech WT75-A + +/* key matrix size */ +#define MATRIX_ROWS 6 +#define MATRIX_COLS 15 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F1, F0, E6, F4, F6, F7 } +#define MATRIX_COL_PINS { F5, D5, B1, B2, B3, D3, D2, C7, C6, B6, B5, B4, D7, D6, D4 } +#define UNUSED_PINS + +/* COL2ROW, ROW2COL, or CUSTOM_MATRIX */ +#define DIODE_DIRECTION ROW2COL + +// #define BACKLIGHT_PIN B7 +// #define BACKLIGHT_BREATHING +// #define BACKLIGHT_LEVELS 3 + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ + +/* 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 + +/* If defined, GRAVE_ESC will always act as ESC when CTRL is held. + * This is userful for the Windows task manager shortcut (ctrl+shift+esc). + */ +// #define GRAVE_ESC_CTRL_OVERRIDE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * 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 + +/* + * MIDI options + */ + +/* Prevent use of disabled MIDI features in the keymap */ +//#define MIDI_ENABLE_STRICT 1 + +/* enable basic MIDI features: + - MIDI notes can be sent when in Music mode is on +*/ +//#define MIDI_BASIC + +/* enable advanced MIDI features: + - MIDI notes can be added to the keymap + - Octave shift and transpose + - Virtual sustain, portamento, and modulation wheel + - etc. +*/ +//#define MIDI_ADVANCED + +/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ +//#define MIDI_TONE_KEYCODE_OCTAVES 1 + +#define WT_MONO_BACKLIGHT + +#define DYNAMIC_KEYMAP_LAYER_COUNT 4 + +// EEPROM usage + +// TODO: refactor with new user EEPROM code (coming soon) +#define EEPROM_MAGIC 0x451F +#define EEPROM_MAGIC_ADDR 32 +// Bump this every time we change what we store +// This will automatically reset the EEPROM with defaults +// and avoid loading invalid data from the EEPROM +#define EEPROM_VERSION 0x08 +#define EEPROM_VERSION_ADDR 34 + +// Dynamic keymap starts after EEPROM version +#define DYNAMIC_KEYMAP_EEPROM_ADDR 35 +// Dynamic macro starts after dynamic keymaps (35+(4*5*15*2)) = (35+600) +#define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 635 +#define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 389 +#define DYNAMIC_KEYMAP_MACRO_COUNT 16 diff --git a/keyboards/wilba_tech/wt75_a/info.json b/keyboards/wilba_tech/wt75_a/info.json new file mode 100644 index 000000000..d9c54a63a --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "wilba.tech WT75-A", + "url": "https://wilba.tech", + "maintainer": "Wilba", + "bootloader": "atmel-dfu", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1.5, "y":0}, {"label":"F2", "x":2.5, "y":0}, {"label":"F3", "x":3.5, "y":0}, {"label":"F4", "x":4.5, "y":0}, {"label":"F5", "x":5.75, "y":0}, {"label":"F6", "x":6.75, "y":0}, {"label":"F7", "x":7.75, "y":0}, {"label":"F8", "x":8.75, "y":0}, {"label":"F9", "x":10, "y":0}, {"label":"F10", "x":11, "y":0}, {"label":"F11", "x":12, "y":0}, {"label":"F12", "x":13, "y":0}, {"label":"Del", "x":15, "y":0}, {"label":"~", "x":0, "y":1.25}, {"label":"!", "x":1, "y":1.25}, {"label":"@", "x":2, "y":1.25}, {"label":"#", "x":3, "y":1.25}, {"label":"$", "x":4, "y":1.25}, {"label":"%", "x":5, "y":1.25}, {"label":"^", "x":6, "y":1.25}, {"label":"&", "x":7, "y":1.25}, {"label":"*", "x":8, "y":1.25}, {"label":"(", "x":9, "y":1.25}, {"label":")", "x":10, "y":1.25}, {"label":"_", "x":11, "y":1.25}, {"label":"+", "x":12, "y":1.25}, {"label":"Bksp", "x":13, "y":1.25}, {"label":"Bksp", "x":14, "y":1.25}, {"label":"Home", "x":15, "y":1.25}, {"label":"Tab", "x":0, "y":2.25, "w":1.5}, {"label":"Q", "x":1.5, "y":2.25}, {"label":"W", "x":2.5, "y":2.25}, {"label":"E", "x":3.5, "y":2.25}, {"label":"R", "x":4.5, "y":2.25}, {"label":"T", "x":5.5, "y":2.25}, {"label":"Y", "x":6.5, "y":2.25}, {"label":"U", "x":7.5, "y":2.25}, {"label":"I", "x":8.5, "y":2.25}, {"label":"O", "x":9.5, "y":2.25}, {"label":"P", "x":10.5, "y":2.25}, {"label":"{", "x":11.5, "y":2.25}, {"label":"}", "x":12.5, "y":2.25}, {"label":"|", "x":13.5, "y":2.25, "w":1.5}, {"label":"PgUp", "x":15, "y":2.25}, {"label":"Caps Lock", "x":0, "y":3.25, "w":1.75}, {"label":"A", "x":1.75, "y":3.25}, {"label":"S", "x":2.75, "y":3.25}, {"label":"D", "x":3.75, "y":3.25}, {"label":"F", "x":4.75, "y":3.25}, {"label":"G", "x":5.75, "y":3.25}, {"label":"H", "x":6.75, "y":3.25}, {"label":"J", "x":7.75, "y":3.25}, {"label":"K", "x":8.75, "y":3.25}, {"label":"L", "x":9.75, "y":3.25}, {"label":":", "x":10.75, "y":3.25}, {"label":"\"", "x":11.75, "y":3.25}, {"label":"Enter", "x":12.75, "y":3.25, "w":2.25}, {"label":"PgDn", "x":15, "y":3.25}, {"label":"Shift", "x":0, "y":4.25, "w":2.25}, {"label":"Z", "x":2.25, "y":4.25}, {"label":"X", "x":3.25, "y":4.25}, {"label":"C", "x":4.25, "y":4.25}, {"label":"V", "x":5.25, "y":4.25}, {"label":"B", "x":6.25, "y":4.25}, {"label":"N", "x":7.25, "y":4.25}, {"label":"M", "x":8.25, "y":4.25}, {"label":"<", "x":9.25, "y":4.25}, {"label":">", "x":10.25, "y":4.25}, {"label":"?", "x":11.25, "y":4.25}, {"label":"Shift", "x":12.25, "y":4.25, "w":1.75}, {"label":"\u2191", "x":14, "y":4.25}, {"label":"End", "x":15, "y":4.25}, {"label":"Ctrl", "x":0, "y":5.25, "w":1.25}, {"label":"Win", "x":1.25, "y":5.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":5.25, "w":1.25}, {"label":"6.25U", "x":3.75, "y":5.25, "w":6.25}, {"label":"Alt", "x":10, "y":5.25, "w":1.25}, {"label":"Win", "x":11.25, "y":5.25, "w":1.25}, {"label":"\u2190", "x":13, "y":5.25}, {"label":"\u2193", "x":14, "y":5.25}, {"label":"\u2192", "x":15, "y":5.25}] + } + } +}
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c b/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c new file mode 100644 index 000000000..77a534a23 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/default/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_DEL, + KC_GRV, 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_BSPC, KC_BSPC, KC_HOME, + 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_BSLS, KC_PGUP, + 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_ENT, KC_PGDN, + KC_LSFT, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt75_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c new file mode 100644 index 000000000..77a534a23 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/keymap.c @@ -0,0 +1,41 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + // Default layer + [0] = LAYOUT_all( + KC_ESC, 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_DEL, + KC_GRV, 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_BSPC, KC_BSPC, KC_HOME, + 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_BSLS, KC_PGUP, + 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_ENT, KC_PGDN, + KC_LSFT, 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_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_LEFT, KC_DOWN, KC_RGHT), + + // Fn1 Layer + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn2 Layer + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + // Fn3 Layer + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt75_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk new file mode 100644 index 000000000..76a07d7a4 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/readme.md b/keyboards/wilba_tech/wt75_a/readme.md new file mode 100644 index 000000000..027081360 --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/readme.md @@ -0,0 +1,15 @@ +# WILBA.TECH WT75-A + +![WILBA.TECH WT75-A](https://wilba.tech) + +WT75-A is a keyboard PCB supporting 75% layout with 0.25U blocker. [More info at wilba.tech](https://wilba.tech/) + +Keyboard Maintainer: [Wilba6582](https://github.com/Wilba6582) +Hardware Supported: WILBA.TECH WT75-A +Hardware Availability: Custom keyboard group buys + +Make example for this keyboard (after setting up your build environment): + + make wilba_tech/wt75_a:default + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs).
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt75_a/rules.mk b/keyboards/wilba_tech/wt75_a/rules.mk new file mode 100644 index 000000000..e41f2186b --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches diff --git a/keyboards/wilba_tech/wt75_a/wt75_a.c b/keyboards/wilba_tech/wt75_a/wt75_a.c new file mode 100644 index 000000000..ccff6d62c --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/wt75_a.c @@ -0,0 +1,17 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +// Nothing to see here, move along... ;-) diff --git a/keyboards/wilba_tech/wt75_a/wt75_a.h b/keyboards/wilba_tech/wt75_a/wt75_a.h new file mode 100644 index 000000000..4ddd1aabf --- /dev/null +++ b/keyboards/wilba_tech/wt75_a/wt75_a.h @@ -0,0 +1,43 @@ +/* Copyright 2018 Jason Williams (Wilba) + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + */ + +#pragma once + +#include "quantum.h" + +#define ____ KC_NO + +// Right switch of split backspace is at 2,13 and is the only switch +// whose physical position doesn't match switch matrix position :-( +// However, it also makes no sense to view the physical as 16 columns, +// so the numbering goes 00 to 14. Deal with it. + +#define LAYOUT_all( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ + K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K313, K114, \ + K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K314, \ + K400, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414, \ + K500, K501, K502, K506, K510, K511, K512, K513, K514 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, ____, K014 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, K214 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, ____, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, K413, K414 }, \ + { K500, K501, K502, ____, ____, ____, K506, ____, ____, ____, K510, K511, K512, K513, K514 } \ +} + diff --git a/keyboards/wilba_tech/wt80_a/config.h b/keyboards/wilba_tech/wt80_a/config.h index 7c15e4a5b..36f5c9574 100644 --- a/keyboards/wilba_tech/wt80_a/config.h +++ b/keyboards/wilba_tech/wt80_a/config.h @@ -51,7 +51,6 @@ // #define BACKLIGHT_BREATHING // #define BACKLIGHT_LEVELS 3 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -103,11 +102,6 @@ * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c new file mode 100644 index 000000000..9cbe7ff62 --- /dev/null +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/keymap.c @@ -0,0 +1,38 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_all( + KC_ESC, 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_PSCR, KC_SLCK, KC_PAUS, + KC_GRV, 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_BSPC, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, + 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_BSLS, KC_DEL, KC_END, KC_PGDN, + 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_ENT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_TRNS, KC_UP, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [2] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + [3] = LAYOUT_all( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/wilba_tech/wt80_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk new file mode 100644 index 000000000..76a07d7a4 --- /dev/null +++ b/keyboards/wilba_tech/wt80_a/keymaps/via/rules.mk @@ -0,0 +1,71 @@ +# project specific files +SRC = drivers/issi/is31fl3736.c \ + drivers/avr/i2c_master.c \ + keyboards/wilba_tech/wt_mono_backlight.c \ + keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt80_a/rules.mk b/keyboards/wilba_tech/wt80_a/rules.mk index 76a07d7a4..e41f2186b 100644 --- a/keyboards/wilba_tech/wt80_a/rules.mk +++ b/keyboards/wilba_tech/wt80_a/rules.mk @@ -66,6 +66,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c b/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c new file mode 100644 index 000000000..a9f40362c --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/keymap.c @@ -0,0 +1,16 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8 ), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + + LAYOUT( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) }; + diff --git a/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk new file mode 100644 index 000000000..f072c6719 --- /dev/null +++ b/keyboards/wilba_tech/wt8_a/keymaps/via/rules.mk @@ -0,0 +1,68 @@ +# project specific files +SRC = keyboards/wilba_tech/wt_main.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section +BOOTLOADER = atmel-dfu + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = yes # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE = no # MIDI support (+2400 to 4200, depending on config) +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output on port C6 +FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches + +RAW_ENABLE = yes +DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/wilba_tech/wt8_a/rules.mk b/keyboards/wilba_tech/wt8_a/rules.mk index f072c6719..f1c632289 100644 --- a/keyboards/wilba_tech/wt8_a/rules.mk +++ b/keyboards/wilba_tech/wt8_a/rules.mk @@ -63,6 +63,3 @@ UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches - -RAW_ENABLE = yes -DYNAMIC_KEYMAP_ENABLE = yes
\ No newline at end of file diff --git a/keyboards/xd60/config.h b/keyboards/xd60/config.h index 4bbaec882..6c447b89f 100644 --- a/keyboards/xd60/config.h +++ b/keyboards/xd60/config.h @@ -71,9 +71,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* Locking resynchronize hack */ #define LOCKING_RESYNC_ENABLE -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #endif diff --git a/keyboards/xd60/keymaps/default/keymap.c b/keyboards/xd60/keymaps/default/keymap.c index f8b44dc0a..868ca632e 100644 --- a/keyboards/xd60/keymaps/default/keymap.c +++ b/keyboards/xd60/keymaps/default/keymap.c @@ -9,7 +9,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_BSLS, \ 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_NO, KC_ENT, \ KC_LSFT, KC_NO, 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_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer LAYOUT_all( @@ -17,15 +17,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_WH_U, KC_UP, KC_WH_D, KC_BSPC,KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT,KC_DEL, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP,KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_PGDN, KC_RSFT, KC_PGUP, KC_INS, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_HOME, KC_PGDOWN,KC_END), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd60/keymaps/iso/keymap.c b/keyboards/xd60/keymaps/iso/keymap.c index 2ca2ea807..4ece241ef 100644 --- a/keyboards/xd60/keymaps/iso/keymap.c +++ b/keyboards/xd60/keymaps/iso/keymap.c @@ -12,7 +12,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_NO, \ 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_LSFT, KC_BSLS, 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_DEL, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_LEFT, KC_DOWN, KC_RIGHT), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [_FL] = LAYOUT_all( @@ -20,15 +20,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_VOLD, KC_MUTE, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, KC_NO, \ KC_NO, KC_MPLY, KC_MSTP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_ENT, \ KC_LSFT, RGB_TOG, RGB_MOD, KC_CUT, KC_COPY,KC_PASTE,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_HOME, KC_PGUP, KC_END, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, F(0), KC_NO, KC_PGDOWN, KC_NO), + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, MO(1), KC_NO, KC_PGDOWN, KC_NO), }; -// Custom Actions -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay -}; - // Macros const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { diff --git a/keyboards/xd75/config.h b/keyboards/xd75/config.h index af7573cb6..482edc9c1 100644 --- a/keyboards/xd75/config.h +++ b/keyboards/xd75/config.h @@ -52,7 +52,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define BACKLIGHT_PIN F5 #define BACKLIGHT_LEVELS 6 - /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -99,11 +98,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true diff --git a/keyboards/xd75/keymaps/boy_314/keymap.c b/keyboards/xd75/keymaps/boy_314/keymap.c index 1de733f0f..71c72514a 100644 --- a/keyboards/xd75/keymaps/boy_314/keymap.c +++ b/keyboards/xd75/keymaps/boy_314/keymap.c @@ -17,11 +17,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * .--------------------------------------------------------------------------------------------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | - | ` | = | 6 | 7 | 8 | 9 | 0 | BACKSP | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | ' | . | . | P | Y | [ | \ | ] | F | G | C | R | L | / | + * | TAB | ' | . | . | P | Y | [ | UP | ] | F | G | C | R | L | / | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------+--------| - * | CAP LK | A | O | E | U | I | HOME | DEL | PG UP | D | H | T | N | S | ENTER | + * | CAP LK | A | O | E | U | I | LEFT | DOWN | RIGHT | D | H | T | N | S | ENTER | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------------------------+--------| - * | LSHIFT | ; | Q | J | K | X | END | UP | PG DN | M | W | W | V | Z | RSHIFT | + * | LSHIFT | ; | Q | J | K | X | PG DN | UP | PG UP | M | W | W | V | Z | RSHIFT | * |--------+--------+--------+--------+--------+-----------------+--------+--------+--------+--------+-----------------+--------+--------| * | LCTRL | DEL | LALT | WIN | FN1 | SPACE | LEFT | DOWN | RIGHT | SPACE | FN2 | LEFT | DOWN | UP | RIGHT | * '--------------------------------------------------------------------------------------------------------------------------------------' @@ -29,9 +29,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DV] = { /* DVORAK */ { KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MINS, KC_GRV, KC_EQL, 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_LBRC, KC_BSLS, KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH }, - { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_HOME, KC_DEL, KC_PGUP, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT }, - { KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_END, KC_UP, KC_PGDN, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC }, + { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_LBRC, KC_UP, KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH }, + { KC_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LEFT, KC_DOWN, KC_RGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT }, + { KC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_PGDN, KC_UP, KC_PGUP, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC }, { KC_LCTL, KC_DEL, KC_LALT, KC_LGUI, MO(_FN1),KC_SPC, KC_LEFT, KC_DOWN, KC_RGHT, KC_SPC, MO(_FN2),KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT }, }, @@ -67,7 +67,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| * | | | | | | | 1 | 2 | 3 | | | | | | | * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | | | | + | 0 | . | | | | | | | + * | | | | | | | 0 | + | . | | | | | | | * '--------------------------------------------------------------------------------------------------------------------------------------' */ @@ -76,7 +76,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { { _______, _______, _______, _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______ }, { _______, _______, _______, _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, KC_PLUS, KC_0, KC_DOT, _______, _______, _______, _______, _______, _______ }, + { _______, _______, _______, _______, _______, _______, KC_0, KC_PLUS, KC_DOT, _______, _______, _______, _______, _______, _______ }, }, /* FUNCTION1 @@ -125,6 +125,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { } }; + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function diff --git a/keyboards/xd87/config.h b/keyboards/xd87/config.h index 3682af740..7af3d0357 100644 --- a/keyboards/xd87/config.h +++ b/keyboards/xd87/config.h @@ -42,7 +42,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ - #define MATRIX_ROW_PINS { D1, B0, B1, C7, D3, D5 } #define MATRIX_COL_PINS { E6, F0, F1, F4, F5, F6, F7, B5, B6, C6, D4, D6, D7, B4, B2, B3, D2 } @@ -115,11 +114,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -224,4 +218,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/xd87/xd87.h b/keyboards/xd87/xd87.h index c4df290a3..2ed47fe97 100644 --- a/keyboards/xd87/xd87.h +++ b/keyboards/xd87/xd87.h @@ -37,14 +37,14 @@ #define LAYOUT_tkl_ansi( \ K00, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K01, K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1D, K1E, K1F, K1G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, K1E, K1F, K1G, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ K40, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, K4F, \ K50, K51, K52, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ ) LAYOUT_all( \ K00, KC_NO, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K0D, K0E, K0F, K0G, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, KC_NO, K1D, KC_NO, K1E, K1F, K1G, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K1D, KC_NO, K1E, K1F, K1G, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, K2G, \ K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D, \ K40, KC_NO, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4C, KC_NO, KC_NO, K4F, KC_NO, \ @@ -67,4 +67,4 @@ K50, K51, K52, KC_NO, K58, K5A, K5B, K5C, K5D, K5E, K5F, K5G \ ) -#endif
\ No newline at end of file +#endif diff --git a/keyboards/xmmx/config.h b/keyboards/xmmx/config.h index 8cb2cf82d..c08829ce3 100644 --- a/keyboards/xmmx/config.h +++ b/keyboards/xmmx/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/yd68/config.h b/keyboards/yd68/config.h index 1b4d7f7a1..811e35c0d 100644 --- a/keyboards/yd68/config.h +++ b/keyboards/yd68/config.h @@ -112,11 +112,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. * */ -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - /* control how magic key switches layers */ //#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true //#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true @@ -221,4 +216,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define LCD_E_PIN 1 //< pin for Enable line #endif */ - diff --git a/keyboards/ymd75/config.h b/keyboards/ymd75/config.h index 748f43f26..36031eebf 100644 --- a/keyboards/ymd75/config.h +++ b/keyboards/ymd75/config.h @@ -48,7 +48,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1 -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/ymd96/config.h b/keyboards/ymd96/config.h index 1e9497fac..51d42603d 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -54,7 +54,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define NO_UART 1 #define BOOTLOADHID_BOOTLOADER 1*/ -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/ymd96/keymaps/AnthonyWharton/config.h b/keyboards/ymd96/keymaps/AnthonyWharton/config.h index 715e2c9a5..e730e99b2 100644 --- a/keyboards/ymd96/keymaps/AnthonyWharton/config.h +++ b/keyboards/ymd96/keymaps/AnthonyWharton/config.h @@ -57,7 +57,3 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGBLIGHT_EFFECT_KNIGHT_LED_NUM RGBLED_NUM #define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 #define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 500 - -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - diff --git a/keyboards/ymdk_np21/config.h b/keyboards/ymdk_np21/config.h index 2b358113d..5982b6c53 100644 --- a/keyboards/ymdk_np21/config.h +++ b/keyboards/ymdk_np21/config.h @@ -48,7 +48,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS -/* key combination for command */ -#define IS_COMMAND() (keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT))) - #endif diff --git a/keyboards/z150_blackheart/config.h b/keyboards/z150_blackheart/config.h index 362153652..c8a38b038 100644 --- a/keyboards/z150_blackheart/config.h +++ b/keyboards/z150_blackheart/config.h @@ -34,11 +34,6 @@ /* force n-key rollover*/ #define FORCE_NKRO -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS #define RGBLED_NUM 0 diff --git a/keyboards/zeal60/config.h b/keyboards/zeal60/config.h index 6f3d43473..e39b06cf6 100644 --- a/keyboards/zeal60/config.h +++ b/keyboards/zeal60/config.h @@ -49,11 +49,6 @@ // 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -126,4 +121,3 @@ #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 626 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 398 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 - diff --git a/keyboards/zeal60/zeal60_keycodes.h b/keyboards/zeal60/zeal60_keycodes.h index d9abf602b..7114a5efc 100644 --- a/keyboards/zeal60/zeal60_keycodes.h +++ b/keyboards/zeal60/zeal60_keycodes.h @@ -41,6 +41,25 @@ enum zeal60_keycodes { MACRO15, }; +enum user_keycodes { + USER00 = 0x5F80, + USER01, + USER02, + USER03, + USER04, + USER05, + USER06, + USER07, + USER08, + USER09, + USER10, + USER11, + USER12, + USER13, + USER14, + USER15, +}; + // Zeal60 specific "action functions" // These are only valid IDs in action_function() // Use FN_TT13, FN_TT23, etc. in keymaps diff --git a/keyboards/zeal65/config.h b/keyboards/zeal65/config.h index 24aae5e36..7406be865 100644 --- a/keyboards/zeal65/config.h +++ b/keyboards/zeal65/config.h @@ -49,11 +49,6 @@ // 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)) \ -) - /* * Feature disable options * These options are also useful to firmware size reduction. @@ -126,4 +121,3 @@ #define DYNAMIC_KEYMAP_MACRO_EEPROM_ADDR 666 #define DYNAMIC_KEYMAP_MACRO_EEPROM_SIZE 358 #define DYNAMIC_KEYMAP_MACRO_COUNT 16 - diff --git a/keyboards/zen/rev1/config.h b/keyboards/zen/rev1/config.h index 890d30757..f480cadcc 100644 --- a/keyboards/zen/rev1/config.h +++ b/keyboards/zen/rev1/config.h @@ -54,15 +54,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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)) \ -) - #define BACKLIGHT_PIN F4 #define BACKLIGHT_LEVELS 5 - /* ws2812 RGB LED */ #define RGB_DI_PIN D1 diff --git a/keyboards/zinc/rev1/config.h b/keyboards/zinc/rev1/config.h index c628400f2..370b5c203 100644 --- a/keyboards/zinc/rev1/config.h +++ b/keyboards/zinc/rev1/config.h @@ -29,7 +29,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT zinc rev.1 #define DESCRIPTION A split keyboard - #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -44,7 +43,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define MASTER_RIGHT //#define EE_HANDS - /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 @@ -68,11 +66,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 #define RGBLIGHT_TIMER @@ -145,5 +138,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION - //#endif diff --git a/keyboards/zinc/reva/config.h b/keyboards/zinc/reva/config.h index 158051890..f4277f713 100644 --- a/keyboards/zinc/reva/config.h +++ b/keyboards/zinc/reva/config.h @@ -26,7 +26,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #define PRODUCT zinc rev.A #define DESCRIPTION A split keyboard - #define PREVENT_STUCK_MODIFIERS #define TAPPING_FORCE_HOLD #define TAPPING_TERM 100 @@ -41,7 +40,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. //#define MASTER_RIGHT //#define EE_HANDS - /* key matrix size */ // Rows are doubled-up #define MATRIX_ROWS 8 @@ -65,11 +63,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. /* 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 D3 #define RGBLIGHT_TIMER diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h index ae9dcfef6..8732a6d37 100755 --- a/keyboards/zlant/config.h +++ b/keyboards/zlant/config.h @@ -38,11 +38,6 @@ /* 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)) \ -) - #define RGB_DI_PIN D6 #ifdef RGB_DI_PIN #define RGBLIGHT_ANIMATIONS diff --git a/keyboards/zlant/keymaps/default/keymap.c b/keyboards/zlant/keymaps/default/keymap.c index a701a7965..37f031f01 100755 --- a/keyboards/zlant/keymaps/default/keymap.c +++ b/keyboards/zlant/keymaps/default/keymap.c @@ -11,12 +11,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, \ RGB_HUI, RGB_HUD, KC_LGUI, KC_LALT, KC_LSFT, KC_SPC, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), - + /* BASE LAYER + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ Bspc │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ LCtrl│ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ Esc │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Enter│ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴──────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │LED H+│LED H-│ LGUI │ LAlt │LShift│ Space │ Fn │ Left │ Down │ Up │ Right│ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + */ [FN] = LAYOUT( _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_PGUP, KC_HOME, _______, _______, \ RGB_VAI, RGB_VAD, RESET, KC_PSCR, _______, _______, _______, _______, KC_PGDN, KC_END, _______, KC_DEL \ ) - -}; +}; + /* FN LAYER + * ┌──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┬──────┐ + * │ │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ │ F1 │ F2 │ F3 │ F4 │ F5 │ F6 │ - │ = │ [ │ ] │ \ │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │ │ F7 │ F8 │ F9 │ F10 │ F11 │ F12 │ │ PgUp │ Home │ │ │ + * └┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴──────┴┬─────┴┬─────┴┬─────┴┬─────┴┬─────┴┐ + * │LED V+│LED V-│ Reset│ PScr │ │ │ │ PgDn │ End │ │ Del │ + * └──────┴──────┴──────┴──────┴──────┴─────────────┴──────┴──────┴──────┴──────┴──────┘ + */ |