From 323cd357674ebd9ab6ac025ec8e015faeaa751e4 Mon Sep 17 00:00:00 2001 From: yiancar Date: Tue, 15 May 2018 22:54:50 +0100 Subject: Addition of HS60 ISO keyboard (#2972) * Added Modular keyboards L,R and NUM Created code modules for the 3 modules of the modular keyboard. Original idea by MechboardsUK. Uses i2c implementation similar to lets split * Remove modular from master This is to fix incorrect branching * HS60 initial rgb port porting HS60 to master rgb code * HS60 fixes * Hs60 rgb changes * Cleanup for HS60 ISO * More HS60 cleanup * Update config.h * More Cleanup for HS60 * HS60 modifications to work with configurator * More HS60 cleanup * Remove userspace layouts on HS60 * Update rules.mk * HS60 bootloader change --- keyboards/hs60/config.h | 139 +++++++++++++ keyboards/hs60/hs60.c | 338 +++++++++++++++++++++++++++++++ keyboards/hs60/hs60.h | 39 ++++ keyboards/hs60/keymaps/default/keymap.c | 46 +++++ keyboards/hs60/keymaps/default/readme.md | 6 + keyboards/hs60/readme.md | 16 ++ keyboards/hs60/rules.mk | 76 +++++++ 7 files changed, 660 insertions(+) create mode 100644 keyboards/hs60/config.h create mode 100644 keyboards/hs60/hs60.c create mode 100644 keyboards/hs60/hs60.h create mode 100644 keyboards/hs60/keymaps/default/keymap.c create mode 100644 keyboards/hs60/keymaps/default/readme.md create mode 100644 keyboards/hs60/readme.md create mode 100644 keyboards/hs60/rules.mk (limited to 'keyboards') diff --git a/keyboards/hs60/config.h b/keyboards/hs60/config.h new file mode 100644 index 0000000000..185b31cf61 --- /dev/null +++ b/keyboards/hs60/config.h @@ -0,0 +1,139 @@ +/* +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0257 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Yiancar-Designs +#define PRODUCT HS60 +#define DESCRIPTION GH60 compatible, tool free RGB keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * 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 { B0, B1, B2, B3, F7 } +#define MATRIX_COL_PINS { F1, F4, F5, E6, F0, B7, D2, D3, D5, D4, D6, D7, B4, B5 } +#define UNUSED_PINS { B6, C6, C7, F6 } + +/* bootloader configuration */ + +#define QMK_ESC_OUTPUT B5 // usually COL +#define QMK_ESC_INPUT B2 // usually ROW + +/* 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 + +/* 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 */ +#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 */ +#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. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* Backlight options */ + +//This is experimental do not enable yet +//#define RGB_MATRIX_KEYPRESSES // reacts to keypresses (will slow down matrix scan by a lot) + +#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 DRIVER_ADDR_1 0b1110100 +#define DRIVER_ADDR_2 0b1110101 + +#define DRIVER_COUNT 2 +#define DRIVER_1_LED_TOTAL 30 +#define DRIVER_2_LED_TOTAL 32 +#define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL + +#endif diff --git a/keyboards/hs60/hs60.c b/keyboards/hs60/hs60.c new file mode 100644 index 0000000000..b4820af273 --- /dev/null +++ b/keyboards/hs60/hs60.c @@ -0,0 +1,338 @@ +/* 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 . + */ +#include "hs60.h" +#include "config.h" + +// Please ignore this is for upcoming features +/*#ifdef RAW_ENABLE + +void raw_hid_receive( uint8_t *data, uint8_t length ) +{ + uint8_t command = data[0]; + switch ( command ) + { + case id_protocol_version: + { + msg_protocol_version *msg = (msg_protocol_version*)&data[1]; + msg->version = PROTOCOL_VERSION; + break; + } +#if USE_KEYMAPS_IN_EEPROM + case id_keymap_keycode_load: + { + msg_keymap_keycode_load *msg = (msg_keymap_keycode_load*)&data[1]; + msg->keycode = keymap_keycode_load( msg->layer, msg->row, msg->column ); + break; + } + case id_keymap_keycode_save: + { + msg_keymap_keycode_save *msg = (msg_keymap_keycode_save*)&data[1]; + keymap_keycode_save( msg->layer, msg->row, msg->column, msg->keycode); + break; + } + case id_keymap_default_save: + { + keymap_default_save(); + break; + } +#endif // USE_KEYMAPS_IN_EEPROM + case id_backlight_config_set_values: + { + msg_backlight_config_set_values *msg = (msg_backlight_config_set_values*)&data[1]; + backlight_config_set_values(msg); + backlight_config_save(); + break; + } + case id_backlight_config_set_alphas_mods: + { + msg_backlight_config_set_alphas_mods *msg = (msg_backlight_config_set_alphas_mods*)&data[1]; + backlight_config_set_alphas_mods( msg->alphas_mods ); + backlight_config_save(); + break; + } + case id_backlight_set_key_color: + { + msg_backlight_set_key_color *msg = (msg_backlight_set_key_color*)&data[1]; + backlight_set_key_color(msg->row, msg->column, msg->hsv); + break; + } + case id_system_get_state: + { + msg_system_state *msg = (msg_system_state*)&data[1]; + msg->value = backlight_get_tick(); + break; + } + default: + { + // Unhandled message. + data[0] = id_unhandled; + break; + } + } + + // Return same buffer with values changed + raw_hid_send( data, length ); + +} + +#endif*/ + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_1, C3_2, C4_2}, //A1 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_8, C2_8, C3_8}, //A8 + {0, C9_1, C8_1, C7_1}, //A9 + {0, C9_2, C8_2, C7_2}, //A10 + {0, C9_3, C8_3, C7_3}, //A11 + {0, C9_4, C8_4, C7_4}, //A12 + {0, C9_5, C8_5, C7_5}, //A13 + {0, C9_6, C8_6, C7_6}, //A14 + {0, C9_7, C8_7, C6_6}, //A15 + {0, C9_8, C7_7, C6_7}, //A16 + + {0, C1_9, C3_10, C4_10}, //B1 + {0, C1_10, C2_10, C4_11}, //B2 + {0, C1_11, C2_11, C3_11}, //B3 + {0, C1_12, C2_12, C3_12}, //B4 + {0, C1_13, C2_13, C3_13}, //B5 + {0, C1_14, C2_14, C3_14}, //B6 + {0, C1_15, C2_15, C3_15}, //B7 + {0, C1_16, C2_16, C3_16}, //B8 + {0, C9_9, C8_9, C7_9}, //B9 + {0, C9_10, C8_10, C7_10}, //B10 + {0, C9_11, C8_11, C7_11}, //B11 + {0, C9_12, C8_12, C7_12}, //B12 + {0, C9_13, C8_13, C7_13}, //B13 + {0, C9_14, C8_14, C7_14}, //B14 + + {1, C1_1, C3_2, C4_2}, //C1 + {1, C1_2, C2_2, C4_3}, //C2 + {1, C1_3, C2_3, C3_3}, //C3 + {1, C1_4, C2_4, C3_4}, //C4 + {1, C1_5, C2_5, C3_5}, //C5 + {1, C1_6, C2_6, C3_6}, //C6 + {1, C1_7, C2_7, C3_7}, //C7 + {1, C1_8, C2_8, C3_8}, //C8 + {1, C9_1, C8_1, C7_1}, //C9 + {1, C9_2, C8_2, C7_2}, //C10 + {1, C9_3, C8_3, C7_3}, //C11 + {1, C9_4, C8_4, C7_4}, //C12 + {1, C9_5, C8_5, C7_5}, //C13 + {1, C9_6, C8_6, C7_6}, //C14 + {1, C9_7, C8_7, C6_6}, //C15 + {1, C9_8, C7_7, C6_7}, //C16 + + {1, C1_9, C3_10, C4_10}, //D1 + {1, C1_10, C2_10, C4_11}, //D2 + {1, C1_11, C2_11, C3_11}, //D3 + {1, C1_12, C2_12, C3_12}, //D4 + {1, C1_13, C2_13, C3_13}, //D5 + {1, C1_14, C2_14, C3_14}, //D6 + {1, C1_15, C2_15, C3_15}, //D7 + {1, C1_16, C2_16, C3_16}, //D8 + {1, C9_9, C8_9, C7_9}, //D9 + {1, C9_10, C8_10, C7_10}, //D10 + {1, C9_11, C8_11, C7_11}, //D11 + {1, C9_12, C8_12, C7_12}, //D12 + {1, C9_13, C8_13, C7_13}, //D13 + {1, C9_14, C8_14, C7_14}, //D14 + {1, C9_15, C8_15, C6_14}, //D15 + {1, C9_16, C7_15, C6_15} //D16 +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +// +// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, +// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, ---, +// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, A15, A14, +// D3, D2, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10, +// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 +/* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 + {{0|(12<<4)}, {204, 0}, 0}, + {{0|(11<<4)}, {187, 0}, 0}, + {{0|(10<<4)}, {170, 0}, 0}, + {{0|(9<<4)}, {153, 0}, 0}, + {{0|(8<<4)}, {136, 0}, 0}, + {{0|(7<<4)}, {119, 0}, 0}, + {{1|(7<<4)}, {119, 16}, 0}, + {{1|(8<<4)}, {136, 16}, 0}, + {{1|(9<<4)}, {153, 16}, 0}, + {{1|(10<<4)}, {170, 16}, 0}, + {{1|(11<<4)}, {187, 16}, 0}, + {{1|(12<<4)}, {204, 16}, 0}, + {{2|(13<<4)}, {224, 8}, 1}, + {{2|(12<<4)}, {204, 32}, 0}, + {{2|(11<<4)}, {187, 32}, 0}, + + {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 + {{3|(9<<4)}, {153, 48}, 0}, + {{3|(8<<4)}, {136, 48}, 0}, + {{3|(7<<4)}, {119, 48}, 0}, + {{2|(7<<4)}, {119, 32}, 0}, + {{2|(8<<4)}, {136, 32}, 0}, + {{2|(9<<4)}, {153, 32}, 0}, + {{2|(10<<4)}, {170, 32}, 0}, + {{3|(11<<4)}, {187, 48}, 0}, + {{3|(13<<4)}, {214, 48}, 1}, + {{4|(13<<4)}, {224, 64}, 1}, + {{4|(12<<4)}, {204, 64}, 1}, + {{4|(11<<4)}, {187, 64}, 1}, + {{4|(10<<4)}, {170, 64}, 1}, + + {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 + {{0|(5<<4)}, { 85, 0}, 0}, + {{0|(4<<4)}, { 68, 0}, 0}, + {{0|(3<<4)}, { 51, 0}, 0}, + {{0|(2<<4)}, { 34, 0}, 0}, + {{0|(1<<4)}, { 17, 0}, 0}, + {{0|(0<<4)}, { 0, 0}, 1}, + {{1|(0<<4)}, { 0, 16}, 1}, + {{1|(1<<4)}, { 17, 16}, 0}, + {{1|(2<<4)}, { 34, 16}, 0}, + {{1|(3<<4)}, { 51, 16}, 0}, + {{1|(4<<4)}, { 68, 16}, 0}, + {{1|(5<<4)}, { 85, 16}, 0}, + {{1|(6<<4)}, {102, 16}, 0}, + {{2|(6<<4)}, {102, 32}, 0}, + {{2|(5<<4)}, { 85, 32}, 0}, + + {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 + {{3|(1<<4)}, { 17, 48}, 0}, + {{3|(0<<4)}, { 0, 48}, 1}, + {{2|(0<<4)}, { 0, 32}, 1}, + {{2|(1<<4)}, { 17, 32}, 0}, + {{2|(2<<4)}, { 34, 32}, 0}, + {{2|(3<<4)}, { 51, 32}, 0}, + {{2|(4<<4)}, { 68, 32}, 0}, + {{3|(3<<4)}, { 51, 48}, 0}, + {{3|(4<<4)}, { 68, 48}, 0}, + {{3|(5<<4)}, { 85, 48}, 0}, + {{3|(6<<4)}, {102, 48}, 0}, + {{4|(3<<4)}, {102, 64}, 0}, + {{4|(2<<4)}, { 34, 68}, 1}, + {{4|(1<<4)}, { 17, 68}, 1}, + {{4|(0<<4)}, { 0, 68}, 1} +}; + +void bootmagic_lite(void) +{ + // The lite version of TMK's bootmagic made by Wilba. + // 100% less potential for accidentally making the + // keyboard do stupid things. + + // We need multiple scans because debouncing can't be turned off. + matrix_scan(); + wait_ms(DEBOUNCING_DELAY); + matrix_scan(); + + // If the Esc and space bar are held down on power up, + // reset the EEPROM valid state and jump to bootloader. + // Assumes Esc is at [0,0] and spacebar is at [4,6]. + // This isn't very generalized, but we need something that doesn't + // rely on user's keymaps in firmware or EEPROM. + if ( ( matrix_get_row(0) & (1<<0) ) && + ( matrix_get_row(4) & (1<<6) ) ) + { + // Set the TMK/QMK EEPROM state as invalid. + eeconfig_disable(); + //eeprom_set_valid(false); + // Jump to bootloader. + bootloader_jump(); + } +} + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + bootmagic_lite(); + + // Please ignore this is for upcoming features + // If the EEPROM has the magic, the data is good. + // OK to load from EEPROM. + /*if (eeprom_is_valid()) + { + backlight_config_load(); + + // TODO: do something to "turn on" keymaps in EEPROM? + } + 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(); + + // Clear the LED colors stored in EEPROM + for ( int row=0; row < MATRIX_ROWS; row++ ) + { + HSV hsv; + for ( int column=0; column < MATRIX_COLS; column++ ) + { + hsv.h = rand() & 0xFF; + hsv.s = rand() & 0x7F; + hsv.v = 255; + backlight_set_key_color( row, column, hsv ); + } + } + #ifdef USE_KEYMAPS_IN_EEPROM + keymap_default_save(); + #endif + // Save the magic number last, in case saving was interrupted + eeprom_set_valid(true); + }*/ + + 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) { + //backlight_set_indicator_state(usb_led); +} + +void suspend_power_down_kb(void) +{ + rgb_matrix_set_suspend_state(true); +} + +void suspend_wakeup_init_kb(void) +{ + rgb_matrix_set_suspend_state(false); +} \ No newline at end of file diff --git a/keyboards/hs60/hs60.h b/keyboards/hs60/hs60.h new file mode 100644 index 0000000000..b6de3b1511 --- /dev/null +++ b/keyboards/hs60/hs60.h @@ -0,0 +1,39 @@ +/* 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 . + */ +#ifndef HS60_H +#define HS60_H + +#define XXX KC_NO + +#include "quantum.h" + +// This a shortcut to help you visually see your layout. + +#define LAYOUT_60_iso( \ + 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, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C, 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, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ + { K30, K31, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} + +#endif diff --git a/keyboards/hs60/keymaps/default/keymap.c b/keyboards/hs60/keymaps/default/keymap.c new file mode 100644 index 0000000000..2a5e823618 --- /dev/null +++ b/keyboards/hs60/keymaps/default/keymap.c @@ -0,0 +1,46 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +//This is the ISO version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_iso( /* 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_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_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_iso( /* FN */ + 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, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , \ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +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; +} \ No newline at end of file diff --git a/keyboards/hs60/keymaps/default/readme.md b/keyboards/hs60/keymaps/default/readme.md new file mode 100644 index 0000000000..cf1ac7a969 --- /dev/null +++ b/keyboards/hs60/keymaps/default/readme.md @@ -0,0 +1,6 @@ +The default keymap for ISO HS60 +=============================== + +![Layout image](https://i.imgur.com/Kua44z2.png) + +Default layer is normal ISO and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/readme.md b/keyboards/hs60/readme.md new file mode 100644 index 0000000000..15ecac6cd9 --- /dev/null +++ b/keyboards/hs60/readme.md @@ -0,0 +1,16 @@ +HS60 +==== + +[HS60](https://mechboards.co.uk/wp-content/uploads/2018/04/IMG_20180420_140353.jpg) + +This is a standard fixed layout 60% PCB. It comes in two varians, ISO and ANSI and support full per-key RGB. + +Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) +Hardware Supported: HS60 ISO and ANSI PCBs with Atmega 32u4 +Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/ + +Make example for this keyboard (after setting up your build environment): + + make hs60: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/hs60/rules.mk b/keyboards/hs60/rules.mk new file mode 100644 index 0000000000..050a1293ef --- /dev/null +++ b/keyboards/hs60/rules.mk @@ -0,0 +1,76 @@ +# MCU name +#MCU = at90usb1286 +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 +BOOTLOADER = qmk-dfu + +# 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 = 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 +RGB_MATRIX_ENABLE = yes # Use RGB matrix + +LAYOUTS = 60_iso # Define standard layouts + +# Experimental features for zealcmd please do no enable +#RAW_ENABLE = yes +#USE_KEYMAPS_IN_EEPROM = yes -- cgit v1.2.3 From 53a6501d71cabbe4c5c41652cf24fdc059609e5d Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Tue, 15 May 2018 19:34:34 -0700 Subject: Yet another update to drashna keymaps and userspace (EEPROM, RGB indicators) (#2959) * More Iris Tweaks * Mess with iris arrow keys * Massive layout overhaul to make everything more OLKB * Additional tweaks * Cleanup Userspace Remove unused layer code, and properly set userspace eeprom structure. * EEPROM stuff * Only use indicators if layer indication is enabled * Iris and Orthodox Tweaks (Status Indicators) * Additional tweaks to finish tri layer conversion * Disable ProMicro ligths globally * Add Pro Micro hacking info * Successfully get mod indication working on thumb clusters * Enable printing when console is enabled * Make Modifier Indicator lights more modular * Keymap cleanup * Tapping test changes * Cleanup and minor tweaks --- keyboards/iris/keymaps/drashna/config.h | 2 + keyboards/iris/keymaps/drashna/keymap.c | 130 ++++++++++++++++------------ keyboards/iris/keymaps/drashna/rules.mk | 1 + keyboards/orthodox/keymaps/drashna/keymap.c | 73 +++++++++++----- keyboards/orthodox/keymaps/drashna/rules.mk | 1 + keyboards/viterbi/keymaps/drashna/keymap.c | 16 +--- 6 files changed, 131 insertions(+), 92 deletions(-) (limited to 'keyboards') diff --git a/keyboards/iris/keymaps/drashna/config.h b/keyboards/iris/keymaps/drashna/config.h index 2a451e7c77..bfdd0022be 100644 --- a/keyboards/iris/keymaps/drashna/config.h +++ b/keyboards/iris/keymaps/drashna/config.h @@ -41,6 +41,8 @@ along with this program. If not, see . #define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 #define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 #define RGBLIGHT_EFFECT_BREATHE_CENTER 1 + +#define RGBLIGHT_LIMIT_VAL 225 #endif // RGBLIGHT_ENABLE #ifdef AUDIO_ENABLE diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index 64d074fc9f..b24e5fe533 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c @@ -2,79 +2,94 @@ #include QMK_KEYBOARD_H #include "drashna.h" +#ifdef INDICATOR_LIGHTS +extern userspace_config_t userspace_config; -#define KC_ALAP ALT_T(KC_APP) +uint8_t last_mod; +uint8_t last_led; +uint8_t last_osm; +bool has_mods_changed = false; +#endif +#define KC_ALAP ALT_T(KC_APP) +#define KC_OSLG OSM(MOD_LGUI) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, - KC_C1R3, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, - KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_LGUI, _________________QWERTY_R3_________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, + KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_OSLG, _________________QWERTY_R3_________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), [_COLEMAK] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS, - KC_C1R3, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, - KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_LGUI, _________________COLEMAK_R3________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, + KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_OSLG, _________________COLEMAK_R3________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), [_DVORAK] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS, - KC_C1R3, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT, - KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_LGUI, _________________DVORAK_R3_________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT, + KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_OSLG, _________________DVORAK_R3_________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), [_WORKMAN] = LAYOUT_wrapper( - KC_GESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS, - KC_C1R3, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, - KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_LGUI, _________________WORKMAN_R3________________, KC_MRSF, - LOWER, KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + KC_CCCV, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, + KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_OSLG, _________________WORKMAN_R3________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE ), - [_MODS] = LAYOUT( + [_MODS] = LAYOUT_wrapper( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, _______, _______, _______, _______, _______, _______ ), - [_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, + [_LOWER] = LAYOUT_wrapper( + _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_RBRC, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_LPRN, KC_RPRN, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, - _______, _______, KC_DEL, _______, _______, _______ + _______, _______, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______ ), - [_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, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_UNDS, KC_EQL , KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_END, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______ + [_RAISE] = LAYOUT_wrapper( + _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, + _______, _______, _______, _______, _______, _______ ), - [_ADJUST] = LAYOUT( - KC_MAKE, KC_RST, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, - RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), - KC_RGB_T,RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, - _______, _______, _______, _______, _______, _______ + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST, + VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, _______, _______, _______, _______, _______, EPRM, + _______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, + TG(_MODS),RGB_SMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, + _______, _______, _______, _______, _______, _______ ) }; +void matrix_init_keymap(void) { +#ifdef INDICATOR_LIGHTS + last_mod = get_mods(); + last_led = host_keyboard_leds(); + last_osm =get_oneshot_mods(); +#endif +} -#ifdef INDICATOR_LIGHT uint32_t layer_state_set_keymap (uint32_t state) { +#ifdef INDICATOR_LIGHTS uint8_t modifiders = get_mods(); uint8_t led_usb_state = host_keyboard_leds(); uint8_t one_shot = get_oneshot_mods(); @@ -92,41 +107,49 @@ uint32_t layer_state_set_keymap (uint32_t state) { rgblight_sethsv_at(120, 255, 255, 7); rgblight_sethsv_at(120, 255, 255, 8); } +#endif return state; } void matrix_scan_keymap (void) { - static uint8_t current_mods; - static uint8_t current_host_leds; - static uint8_t current_oneshot_mods; - static bool has_status_changed = true; - - if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) { - has_status_changed = true; - current_mods = get_mods(); - current_host_leds = host_keyboard_leds(); - current_oneshot_mods = get_oneshot_mods(); + +#ifdef INDICATOR_LIGHTS + uint8_t current_mod = get_mods(); + uint8_t current_led = host_keyboard_leds(); + uint8_t current_osm =get_oneshot_mods(); + + if (last_mod == current_mod) { + last_mod = current_mod; + has_mods_changed = true; + } + if (last_led == current_led) { + last_led = current_led; + has_mods_changed = true; } - if (has_status_changed) { - has_status_changed = false; + if (last_osm == current_osm) { + last_osm = current_osm; + has_mods_changed = true; + } + - if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1<. #include QMK_KEYBOARD_H #include "drashna.h" +#ifdef INDICATOR_LIGHTS +extern userspace_config_t userspace_config; + +uint8_t last_mod; +uint8_t last_led; +uint8_t last_osm; +bool has_mods_changed = false; +#endif // Each layer gets a name for readability, which is then used in the keymap matrix below. // The underscores don't mean anything - you can have a layer called STUFF or any other name. @@ -33,6 +41,7 @@ along with this program. If not, see . #define XXXXXXX KC_NO + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper(\ @@ -65,27 +74,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper(\ 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_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______ + _______, _________________FUNC_LEFT_________________, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ ), [_RAISE] = LAYOUT_wrapper(\ KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_COMM, KC_DOT, _______, _______ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______ ), [_ADJUST] = LAYOUT_wrapper(\ - KC_MAKE,KC_RESET, EPRM, _______, _______, _______, _______, _______, _______, _______, _______, _______, - RGB_SMOD,RGB_HUI, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, TG(_MODS), - KC_RGB_T,RGB_HUD, MU_ON, MU_OFF, MU_TOG, MU_MOD, _______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY + KC_MAKE, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RESET, + VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, EPRM, + TG(_MODS),RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY ) }; -#ifdef RGBLIGHT_ENABLE +void matrix_init_keymap(void) { +#ifdef INDICATOR_LIGHTS + last_mod = get_mods(); + last_led = host_keyboard_leds(); + last_osm =get_oneshot_mods(); +#endif +} + uint32_t layer_state_set_keymap (uint32_t state) { +#ifdef INDICATOR_LIGHTS uint8_t modifiders = get_mods(); uint8_t led_usb_state = host_keyboard_leds(); uint8_t one_shot = get_oneshot_mods(); @@ -103,41 +120,49 @@ uint32_t layer_state_set_keymap (uint32_t state) { rgblight_sethsv_at(120, 255, 255, 7); rgblight_sethsv_at(120, 255, 255, 8); } +#endif return state; } void matrix_scan_keymap (void) { - static uint8_t current_mods; - static uint8_t current_host_leds; - static uint8_t current_oneshot_mods; - static bool has_status_changed = true; - - if ( current_mods != get_mods() || current_host_leds != host_keyboard_leds() || current_oneshot_mods != get_oneshot_mods()) { - has_status_changed = true; - current_mods = get_mods(); - current_host_leds = host_keyboard_leds(); - current_oneshot_mods = get_oneshot_mods(); + +#ifdef INDICATOR_LIGHTS + uint8_t current_mod = get_mods(); + uint8_t current_led = host_keyboard_leds(); + uint8_t current_osm =get_oneshot_mods(); + + if (last_mod == current_mod) { + last_mod = current_mod; + has_mods_changed = true; + } + if (last_led == current_led) { + last_led = current_led; + has_mods_changed = true; } - if (has_status_changed) { - has_status_changed = false; + if (last_osm == current_osm) { + last_osm = current_osm; + has_mods_changed = true; + } + - if (current_mods & MODS_SHIFT_MASK || current_host_leds & (1< Date: Tue, 15 May 2018 18:26:04 -0700 Subject: Fix Orthodox Info.json files --- keyboards/orthodox/rev1/info.json | 25 +++++++++++++++++-------- keyboards/orthodox/rev3/info.json | 25 +++++++++++++++++-------- keyboards/orthodox/rev3_teensy/info.json | 25 +++++++++++++++++-------- 3 files changed, 51 insertions(+), 24 deletions(-) (limited to 'keyboards') diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json index 54afc306d8..b548404236 100644 --- a/keyboards/orthodox/rev1/info.json +++ b/keyboards/orthodox/rev1/info.json @@ -1,11 +1,20 @@ { - "keyboard_name": "Monkeebs Orthodox Rev.1", - "maintainer": "qmk", - "width": 17, - "height": 17.24, - "layouts": { - "LAYOUT": { - "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":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "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":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "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":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}] - } + "keyboard_name": "Monkeebs Orthodox Rev.1", + "maintainer": "qmk", + "width": 17, + "height": 17.24, + "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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3}, + {"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + ] } + } } diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json index fd0b324cff..476f10c794 100644 --- a/keyboards/orthodox/rev3/info.json +++ b/keyboards/orthodox/rev3/info.json @@ -1,11 +1,20 @@ { - "keyboard_name": "Monkeebs Orthodox Rev.3", - "maintainer": "qmk", - "width": 17, - "height": 17.24, - "layouts": { - "LAYOUT": { - "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":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "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":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "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":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}] - } + "keyboard_name": "Monkeebs Orthodox Rev.3", + "maintainer": "qmk", + "width": 17, + "height": 17.24, + "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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3}, + {"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + ] } + } } diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json index fd0b324cff..cf533ada01 100644 --- a/keyboards/orthodox/rev3_teensy/info.json +++ b/keyboards/orthodox/rev3_teensy/info.json @@ -1,11 +1,20 @@ { - "keyboard_name": "Monkeebs Orthodox Rev.3", - "maintainer": "qmk", - "width": 17, - "height": 17.24, - "layouts": { - "LAYOUT": { - "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":13, "y":0}, {"label":"U", "x":14, "y":0}, {"label":"I", "x":15, "y":0}, {"label":"O", "x":16, "y":0}, {"x":17, "y":0}, {"x":17, "y":0}, {"label":"P", "x":17, "y":0}, {"label":"BSPC", "x":18, "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":"LEFT", "x":7, "y":1}, {"label":"DOWN", "x":8, "y":1}, {"label":"UP", "x":10, "y":1}, {"label":"RGHT", "x":11, "y":1}, {"label":"H", "x":13, "y":1}, {"label":"J", "x":14, "y":1}, {"label":"K", "x":15, "y":1}, {"label":"L", "x":16, "y":1}, {"label":";", "x":17, "y":1}, {"label":"'", "x":18, "y":1}, {"label":"CTRL", "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":"LOWER", "x":6, "y":2}, {"label":"BSPC", "x":7, "y":2}, {"label":"ENT", "x":8, "y":2}, {"label":"RALT", "x":10, "y":2}, {"label":"SPC", "x":11, "y":2}, {"label":"RAISE", "x":12, "y":2}, {"label":"N", "x":13, "y":2}, {"label":"M", "x":14, "y":2}, {"label":",", "x":15, "y":2}, {"label":".", "x":16, "y":2}, {"label":"/", "x":17, "y":2}, {"label":"LGUI", "x":18, "y":2}] - } + "keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)", + "maintainer": "qmk", + "width": 17, + "height": 17.24, + "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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, + + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3}, + {"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + ] } + } } -- cgit v1.2.3 From 227c3b909a0e9c13156a7190c641758e35da9e94 Mon Sep 17 00:00:00 2001 From: GreenShadowMaker <39226745+GreenShadowMaker@users.noreply.github.com> Date: Thu, 17 May 2018 07:05:34 -0700 Subject: Add copy of knops/mini default keymap with comments for new user (#2989) --- .../knops/mini/keymaps/default-gsm-newbs/config.h | 24 + .../knops/mini/keymaps/default-gsm-newbs/keymap.c | 485 +++++++++++++++++++++ .../knops/mini/keymaps/default-gsm-newbs/readme.md | 12 + 3 files changed, 521 insertions(+) create mode 100644 keyboards/knops/mini/keymaps/default-gsm-newbs/config.h create mode 100644 keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c create mode 100644 keyboards/knops/mini/keymaps/default-gsm-newbs/readme.md (limited to 'keyboards') diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/config.h b/keyboards/knops/mini/keymaps/default-gsm-newbs/config.h new file mode 100644 index 0000000000..999d8876c2 --- /dev/null +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 Pawnerd + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c new file mode 100644 index 0000000000..e35b8ec080 --- /dev/null +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/keymap.c @@ -0,0 +1,485 @@ +#include QMK_KEYBOARD_H + +/* +* Copy of knopps mini default May 16,2018 +* Added comments in code to more easilly understand it. +* +* Key Layout +* _____ _____ _____ +* | | | | | | +* | 1 | | 2 | | 3 | +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* | 4 | | 5 | | 6 | +* |_____| |_____| |_____| +* +* Each Layout row below keys. 1,2,3,4,5,6 +* +* Hold 3 when powering on for DFU Program Mode +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* +* Layer 0 (Default) +* _____ _____ _____ +* | | | | | | +* Stop VolUp Play +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* Prev VolDwn Next +* |_____| |_____| |_____| +* +* Button 1 (stop) is Held to activate Layer 3 only while held, User then selects the keymap to change to +*/ + LAYOUT( + LT(3, KC_MSTP), KC_VOLU, KC_MPLY, KC_MPRV, KC_VOLD, KC_MNXT), + +/* +* Layer 1 +* _____ _____ _____ +* | | | | | | +* ESC Macro3 Macro4 +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* Macro5 Macro6 Macro7 +* |_____| |_____| |_____| +* +*/ + LAYOUT( + LT(3, KC_ESC), M(3), M(4), M(5), M(6), M(7)), + +/* +* Layer 2 +* _____ _____ _____ +* | | | | | | +* | 1 | | 2 | | 3 | +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* | 4 | |Macro0 Macro1 +* |_____| |_____| |_____| +* +*/ + LAYOUT( + LT(3, KC_1), KC_2, KC_3, KC_4, M(0), M(1)), + +/* +* Layer 3 Key Layout +* This Layer does the Layer Selection +* _____ _____ _____ +* | | | | | DFU +* |None | |None | | FLash +* |_____| |_____| |_____| +* _____ _____ _____ +* | | | | | | +* Layer Layer Layer +* 0 1 2 +* |_____| |_____| |_____| +* +* Layers 0,1,2 have Button 1 held to activate this layer. Then press the specific layer to switch to it. +* +*/ + LAYOUT( + KC_TRNS, KC_TRNS, RESET, TO(0), TO(1), TO(2)), + +// More Layers that can be used, but are not by default + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + LAYOUT( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + +}; + +// Older way of Macros found here: https://docs.qmk.fm/features/macros + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + //keyevent_t event = record->event; + + switch (id) { + case 0: + if (record->event.pressed) { + /* + * This is Macro 0 + * Content: tglhf + */ + return MACRO( T(T), T(G), T(L), T(H), T(F), T(ENT), END ); + } + break; + case 1: + if (record->event.pressed) { + /* + * This is Macro 1 + * Content: tgg + */ + return MACRO( T(T), T(G), T(G), T(ENT), END ); + } + break; + case 2: + if (record->event.pressed) { + /* + * This is Macro 2 + * Content: Press and hold "no" , type "l", release "no" + * I haven't found what this "NO" key maps to + */ + return MACRO( D(NO), T(L), U(NO), END ); + } + break; + case 3: + if (record->event.pressed) { + /* + * This is Macro 3 + * Content: press/hold LCTRL, type "2", release LCTRL + */ + return MACRO( D(LCTL), T(Z), U(LCTL), END ); + } + break; + case 4: + if (record->event.pressed) { + /* + * This is Macro 4 + * Content: press/hold LCTRL, type "2", release LCTRL + */ + return MACRO( D(LCTL), D(LSFT), T(Z), U(LSFT), U(LCTL), END ); + } + break; + case 5: + if (record->event.pressed) { + /* + * This is Macro 5 + * Content: press/hold LCTRL, type "x", release LCTRL + */ + return MACRO( D(LCTL), T(X), U(LCTL), END ); + } + break; + case 6: + if (record->event.pressed) { + /* + * This is Macro 6 + * Content: press/hold LCTRL, type "c", release LCTRL + */ + return MACRO( D(LCTL), T(C), U(LCTL), END ); + } + break; + case 7: + if (record->event.pressed) { + /* + * This is Macro 7 + * Content: press/hold LCTRL, type "v", release LCTRL + */ + return MACRO( D(LCTL), T(V), U(LCTL), END ); + } + break; + } + return MACRO_NONE; +} + + + +void set_switch_led(int ledId, bool state) { + if(state) { + switch(ledId) { + case 1: + PORTD |= (1<<7); + break; + case 2: + if((PINB & (1 << 7)) != 0) { + PORTC |= (1<<6); + } else { + PORTC |= (1<<7); + } + break; + case 3: + PORTD |= (1<<4); + break; + case 4: + PORTE |= (1<<6); + break; + case 5: + PORTB |= (1<<4); + break; + case 6: + PORTD |= (1<<6); + break; + } + } else { + switch(ledId) { + case 1: + PORTD &= ~(1<<7); + break; + case 2: + if((PINB & (1 << 7)) != 0) { + PORTC &= ~(1<<6); + } else { + PORTC &= ~(1<<7); + } + break; + case 3: + PORTD &= ~(1<<4); + break; + case 4: + PORTE &= ~(1<<6); + break; + case 5: + PORTB &= ~(1<<4); + break; + case 6: + PORTD &= ~(1<<6); + break; + } + } +} + + +void set_layer_led(int layerId) { + PORTD |= (1<<5); + PORTB &= ~(1<<6); + PORTB |= (1<<0); + switch(layerId) { + case 0: + PORTD &= ~(1<<5); + break; + case 1: + PORTB |= (1<<6); + break; + case 2: + PORTB &= ~(1<<0); + break; + } +} + +void matrix_init_user(void) { + led_init_ports(); + + PORTB |= (1 << 7); + DDRB &= ~(1<<7); + + PORTD |= (1<<7); + PORTC |= (1<<6); + PORTC |= (1<<7); + PORTD |= (1<<4); + PORTE |= (1<<6); + PORTB |= (1<<4); + PORTD |= (1<<6); + + set_layer_led(0); +} + +void matrix_scan_user(void) { +} + +void led_init_ports() { + // led voor switch #1 + DDRD |= (1<<7); + PORTD &= ~(1<<7); + + // led voor switch #2 + DDRC |= (1<<6); + DDRC |= (1<<7); + PORTC &= ~(1<<6); + PORTC &= ~(1<<7); + + // led voor switch #3 + DDRD |= (1<<4); + PORTD &= ~(1<<4); + + // led voor switch #4 + DDRE |= (1<<6); + PORTE &= ~(1<<6); + + // led voor switch #5 + DDRB |= (1<<4); + PORTB &= ~(1<<4); + + // led voor switch #6 + DDRD |= (1<<6); + PORTD &= ~(1<<6); + + /* + DDRD |= (1<<7); + PORTD |= (1<<7); + + DDRC |= (1<<6); + PORTC |= (1<<6); + + DDRD |= (1<<4); + PORTD |= (1<<4); + + DDRE |= (1<<6); + PORTE |= (1<<6); + + DDRB |= (1<<4); + PORTB |= (1<<4); + + DDRD |= (1<<6); + PORTD |= (1<<6); + // */ + + DDRD |= (1<<5); + DDRB |= (1<<6); + DDRB |= (1<<0); + //led_set_layer(0); +} + +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 { + + } + +} + + +/* +* NOTE: +* +* In case you don't understand this coding stuff, please +* feel free to mail me or post something +* at the /r/knops subreddit and I will configure the code as +* you wish for your needs to make the LEDs do what you want :-). +* +* Contact me at: support@knops.io +* +* +* Knops Mini LED Numbers: +* _____ _____ _____ +* | | | | | | +* | 1 | | 2 | | 3 | <--- +* |_____| |_____| |_____| | These LEDs are called 'Switch LEDs' +* _____ _____ _____ |----- To turn on/off these leds, use: +* | | | | | | | set_switch_led( [1-6], [true/false]); +* | 4 | | 5 | | 6 | <--- +* |_____| |_____| |_____| +* +* < 0 > < 1 > < 2 > <--- These front-LEDs are called 'Layer LEDs' +* To turn one of them on, use: +* set_layer_led( [0-2] ); +* +*/ + +/* +* This function led_set_layer gets called when you switch between layers. +* It allows you to turn on and off leds for each different layer and do +* other cool stuff. Currently the GUI does not have LED support. I am working +* on that, but takes time. +*/ +void led_set_layer(int layer) { + switch(layer) { + + /** + * Here is an example to turn LEDs on and of. By default: + * - the LEDs are turned on in layer 0 + * - the LEDs are turned off in layer 1 + * - the LEDs don't change from state for layer 2 + */ + + case 0: + set_layer_led(0); // Turn on only the first/left layer indicator + set_switch_led(1, true); + set_switch_led(2, true); + set_switch_led(3, true); + set_switch_led(4, true); + set_switch_led(5, true); + set_switch_led(6, true); + break; + + case 1: + set_layer_led(1); // Turn on only the second/middle layer indicator + set_switch_led(1, false); + set_switch_led(2, false); + set_switch_led(3, false); + set_switch_led(4, false); + set_switch_led(5, false); + set_switch_led(6, false); + break; + + case 2: + set_layer_led(2); // Turn on only the third/right layer indicator + + // Keep leds for layer two in their current state, since we don't use set_switch_led(SWITCH_ID, TRUE_OR_FALSE) + + break; + } +} + +bool process_record_user (uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case TO(0): + if (record->event.pressed) { + led_set_layer(0); + } + break; + case TO(1): + if (record->event.pressed) { + led_set_layer(1); + } + break; + case TO(2): + if (record->event.pressed) { + led_set_layer(2); + } + break; + } + return true; +} diff --git a/keyboards/knops/mini/keymaps/default-gsm-newbs/readme.md b/keyboards/knops/mini/keymaps/default-gsm-newbs/readme.md new file mode 100644 index 0000000000..784ef19afd --- /dev/null +++ b/keyboards/knops/mini/keymaps/default-gsm-newbs/readme.md @@ -0,0 +1,12 @@ +# Copy of Default Knops Mini Keymap + +*Note:* copy of knops,mini,default keymap on May 16,2018 with comments to help new user to QMK and knops mini create their own keymap + +## Key Layout + + 1 | 2 | 3 + 4 | 5 | 6 + +## Programming Keypad + +Hold 3 when powering on for DFU Program Mode -- cgit v1.2.3 From effc3e380f01bcd4c49f41e3c9c17562d8985161 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 17 May 2018 15:21:06 -0700 Subject: Add QMK Configurator support and remove Layouts definitions (#2977) * Add QMK Configurator support and remove userspace definitions * fix that build breakage * Unsupport community layouts but use standard layouts --- keyboards/hs60/hs60.c | 2 +- keyboards/hs60/hs60.h | 14 ++++++++++++++ keyboards/hs60/info.json | 16 ++++++++++++++++ keyboards/hs60/keymaps/default/keymap.c | 2 +- keyboards/hs60/readme.md | 4 +++- keyboards/hs60/rules.mk | 4 +--- 6 files changed, 36 insertions(+), 6 deletions(-) create mode 100644 keyboards/hs60/info.json (limited to 'keyboards') diff --git a/keyboards/hs60/hs60.c b/keyboards/hs60/hs60.c index b4820af273..74af9ad143 100644 --- a/keyboards/hs60/hs60.c +++ b/keyboards/hs60/hs60.c @@ -335,4 +335,4 @@ void suspend_power_down_kb(void) void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); -} \ No newline at end of file +} diff --git a/keyboards/hs60/hs60.h b/keyboards/hs60/hs60.h index b6de3b1511..69dbd1e2c5 100644 --- a/keyboards/hs60/hs60.h +++ b/keyboards/hs60/hs60.h @@ -36,4 +36,18 @@ { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ } +#define LAYOUT_60_ansi( \ + 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, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ + K40, K41, K42, K46, K4A, K4B, K4C, 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, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, XXX, K2D }, \ + { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ + { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ +} + #endif diff --git a/keyboards/hs60/info.json b/keyboards/hs60/info.json new file mode 100644 index 0000000000..20e0ae54e3 --- /dev/null +++ b/keyboards/hs60/info.json @@ -0,0 +1,16 @@ +{ + "keyboard_name": "HS60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_iso": { + "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "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":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":"AltGr", "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_ansi": { + "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}] + } + } +} diff --git a/keyboards/hs60/keymaps/default/keymap.c b/keyboards/hs60/keymaps/default/keymap.c index 2a5e823618..953172c739 100644 --- a/keyboards/hs60/keymaps/default/keymap.c +++ b/keyboards/hs60/keymaps/default/keymap.c @@ -43,4 +43,4 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; -} \ No newline at end of file +} diff --git a/keyboards/hs60/readme.md b/keyboards/hs60/readme.md index 15ecac6cd9..939b588286 100644 --- a/keyboards/hs60/readme.md +++ b/keyboards/hs60/readme.md @@ -7,7 +7,9 @@ This is a standard fixed layout 60% PCB. It comes in two varians, ISO and ANSI a Keyboard Maintainer: [Yiancar](http://yiancar-designs.com/) and on [github](https://github.com/yiancar) Hardware Supported: HS60 ISO and ANSI PCBs with Atmega 32u4 -Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/ +Hardware Availability: https://mechboards.co.uk/shop/all/hs60-pcb/ + +Due to the RGB implementation, the HS60 is currently not compatible with community layouts. Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/hs60/rules.mk b/keyboards/hs60/rules.mk index 050a1293ef..bff9659489 100644 --- a/keyboards/hs60/rules.mk +++ b/keyboards/hs60/rules.mk @@ -69,8 +69,6 @@ AUDIO_ENABLE = no # Audio output on port C6 FAUXCLICKY_ENABLE = no # Use buzzer to emulate clicky switches RGB_MATRIX_ENABLE = yes # Use RGB matrix -LAYOUTS = 60_iso # Define standard layouts - # Experimental features for zealcmd please do no enable -#RAW_ENABLE = yes +#RAW_ENABLE = yes #USE_KEYMAPS_IN_EEPROM = yes -- cgit v1.2.3 From 2411652a335065fd4743b383ab7d0fcf798cbb47 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 18 May 2018 07:45:06 -0700 Subject: remove a KC-NO in row 1 (#2994) --- keyboards/hs60/hs60.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hs60/hs60.h b/keyboards/hs60/hs60.h index 69dbd1e2c5..1796aa65e9 100644 --- a/keyboards/hs60/hs60.h +++ b/keyboards/hs60/hs60.h @@ -38,13 +38,13 @@ #define LAYOUT_60_ansi( \ 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, \ + 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, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ K40, K41, K42, K46, K4A, K4B, K4C, 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, XXX }, \ + { 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, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ -- cgit v1.2.3 From 8cdb4a91501fab114ae55def050d06c7b9569f30 Mon Sep 17 00:00:00 2001 From: Harley Laue Date: Fri, 18 May 2018 13:58:23 -0700 Subject: Add Contra layout & cleanup a few things (#2998) * Have Del become backspace on the bottom layer for grid layouts * Fix modtap for ESC * Add sleep to Adjust layer --- .../contra/keymaps/losinggeneration/README.md | 30 ++++++++++++++++ keyboards/contra/keymaps/losinggeneration/config.h | 27 +++++++++++++++ keyboards/contra/keymaps/losinggeneration/keymap.c | 40 ++++++++++++++++++++++ keyboards/contra/keymaps/losinggeneration/rules.mk | 17 +++++++++ .../levinson/keymaps/losinggeneration/README.md | 2 +- .../levinson/keymaps/losinggeneration/keymap.c | 4 +-- .../nyquist/keymaps/losinggeneration/README.md | 2 +- .../nyquist/keymaps/losinggeneration/keymap.c | 4 +-- 8 files changed, 120 insertions(+), 6 deletions(-) create mode 100644 keyboards/contra/keymaps/losinggeneration/README.md create mode 100644 keyboards/contra/keymaps/losinggeneration/config.h create mode 100644 keyboards/contra/keymaps/losinggeneration/keymap.c create mode 100644 keyboards/contra/keymaps/losinggeneration/rules.mk (limited to 'keyboards') diff --git a/keyboards/contra/keymaps/losinggeneration/README.md b/keyboards/contra/keymaps/losinggeneration/README.md new file mode 100644 index 0000000000..affd2fb9b4 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/README.md @@ -0,0 +1,30 @@ +losinggeneration's Contra Layout +============================ + +This build uses the MIT layout. + +See description of the layout in the common folder +[here](../../../../users/losinggeneration/README.md) + +## Features +- Adjust + - Removed AGSwap, AGNorm, & Del + - Added Caps Lock, F1-F12 in a 4x3 grid, arrow cluster, + and layer transitions to the new layers. + - Moved Reset & Audio control to the right side + +## Layouts + +### Adjust (Lower + Raise) + +``` + ,-----------------------------------------------------------------------------------. + | | F1 | F2 | F3 | F4 | | RESET| Game |Numpad|Mouse | |Sleep | + |------+------+------+------+------+------+------+------+------+------+------+------| + | | F5 | F6 | F7 | F8 | | |Qwerty|Colmak|Workmn|Dvorak| | + |------+------+------+------+------+------+------+------+------+------+------+------| + | CAPS | F9 | F10 | F11 | F12 | | | | | | Up | | + |------+------+------+------+------+-------------+------+------+------+------+------| + | | | | | | | | XXX | Left | Down |Right | + `-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/contra/keymaps/losinggeneration/config.h b/keyboards/contra/keymaps/losinggeneration/config.h new file mode 100644 index 0000000000..759b1d9a00 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/config.h @@ -0,0 +1,27 @@ +/* +Copyright 2017 Danny Nguyen +Copyright 2018 Harley Laue + +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 +long with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H +#define USE_MIT_LAYOUT + +#define TAPPING_TERM 250 + +#endif diff --git a/keyboards/contra/keymaps/losinggeneration/keymap.c b/keyboards/contra/keymaps/losinggeneration/keymap.c new file mode 100644 index 0000000000..d4a336c338 --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/keymap.c @@ -0,0 +1,40 @@ +#include QMK_KEYBOARD_H +#include "losinggeneration-config.h" +#include "losinggeneration-keymap.h" + +extern keymap_config_t keymap_config; + +#define MT_CAPS LSFT_T(KC_CAPS) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_QWERTY] = CATMAP( QWERTY_LAYER ), +[_COLEMAK] = CATMAP( COLEMAK_LAYER ), +[_WORKMAN] = CATMAP( WORKMAN_LAYER ), +[_DVORAK] = CATMAP( DVORAK_LAYER ), +[_GAME] = CATMAP( GAME_LAYER ), +[_NUMPAD] = CATMAP( NUMPAD_LAYER ), +[_MOUSE] = CATMAP( MOUSE_LAYER ), +[_LOWER] = CATMAP( LOWER_LAYER ), +[_RAISE] = CATMAP( RAISE_LAYER ), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | | RESET| Game |Numpad|Mouse | |Sleep | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | |Qwerty|Colmak|Workmn|Dvorak| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | CAPS | F9 | F10 | F11 | F12 | | | | | | Up | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | XXX | Left | Down |Right | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = CATMAP( \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, RESET , TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ + _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ + MT_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , _______, _______, _______, _______, _______, KC_UP , _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ +) + +}; + diff --git a/keyboards/contra/keymaps/losinggeneration/rules.mk b/keyboards/contra/keymaps/losinggeneration/rules.mk new file mode 100644 index 0000000000..1728afd85c --- /dev/null +++ b/keyboards/contra/keymaps/losinggeneration/rules.mk @@ -0,0 +1,17 @@ +# 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 +# +AUDIO_ENABLE = no # Audio output on port C6 +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +COMMAND_ENABLE = no # Commands for debug and configuration +CONSOLE_ENABLE = no # Console for debug(+400) +MIDI_ENABLE = no # MIDI controls +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/levinson/keymaps/losinggeneration/README.md b/keyboards/levinson/keymaps/losinggeneration/README.md index b406d50008..44c904508a 100644 --- a/keyboards/levinson/keymaps/losinggeneration/README.md +++ b/keyboards/levinson/keymaps/losinggeneration/README.md @@ -17,7 +17,7 @@ See description of the layout in the common folder ``` ,-----------------------------------------..-----------------------------------------. - | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | | + | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | |Sleep | |------+------+------+------+------+------||------+------+------+------+------+------| | | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| | |------+------+------+------+------+------||------+------+------+------+------+------| diff --git a/keyboards/levinson/keymaps/losinggeneration/keymap.c b/keyboards/levinson/keymaps/losinggeneration/keymap.c index 3512f59f1c..aea6aed78c 100644 --- a/keyboards/levinson/keymaps/losinggeneration/keymap.c +++ b/keyboards/levinson/keymaps/losinggeneration/keymap.c @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Adjust (Lower + Raise) * ,-----------------------------------------..-----------------------------------------. - * | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | | | + * | | F1 | F2 | F3 | F4 |BL Off|| RESET| Game |Numpad|Mouse | |Sleep | * |------+------+------+------+------+------||------+------+------+------+------+------| * | | F5 | F6 | F7 | F8 |BL Tg ||Aud on|Qwerty|Colmak|Workmn|Dvorak| | * |------+------+------+------+------+------||------+------+------+------+------+------| @@ -28,7 +28,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------''-----------------------------------------' */ [_ADJUST] = CATMAP( \ - _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , BL_OFF , RESET , TO_GAME, TO_NUM , TO_MS , _______, _______, \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , BL_OFF , RESET , TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , BL_TOGG, AU_ON , QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ KC_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , BL_ON , AU_OFF , _______, _______, _______, KC_UP , _______, \ _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ diff --git a/keyboards/nyquist/keymaps/losinggeneration/README.md b/keyboards/nyquist/keymaps/losinggeneration/README.md index be55af2e0a..a51b94e407 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/README.md +++ b/keyboards/nyquist/keymaps/losinggeneration/README.md @@ -18,7 +18,7 @@ See description of the layout in the common folder ,-----------------------------------------..-----------------------------------------. | RESET|DEBUG | | | | || | | | | | | |------+------+------+------+------+------||------+------+------+------+------+------| - | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| | | + | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| |Sleep | |------+------+------+------+------+------||------+------+------+------+------+------| | | F5 | F6 | F7 | F8 | || |Qwerty|Colmak|Workmn|Dvorak| | |------+------+------+------+------+------||------+------+------+------+------+------| diff --git a/keyboards/nyquist/keymaps/losinggeneration/keymap.c b/keyboards/nyquist/keymaps/losinggeneration/keymap.c index 65fbb9cdd4..3e2c6edb70 100644 --- a/keyboards/nyquist/keymaps/losinggeneration/keymap.c +++ b/keyboards/nyquist/keymaps/losinggeneration/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------..-----------------------------------------. * | RESET|DEBUG | | | | || | | | | | | * |------+------+------+------+------+------||------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| | | + * | | F1 | F2 | F3 | F4 | || | Game |Numpad| Mouse| |Sleep | * |------+------+------+------+------+------||------+------+------+------+------+------| * | | F5 | F6 | F7 | F8 | || |Qwerty|Colmak|Workmn|Dvorak| | * |------+------+------+------+------+------||------+------+------+------+------+------| @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ADJUST] = CATMAP( \ RESET , DEBUG , _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, _______, TO_GAME, TO_NUM , TO_MS , _______, _______, \ + _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , _______, _______, TO_GAME, TO_NUM , TO_MS , _______, KC_SLEP, \ _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , _______, _______, QWERTY , COLEMAK, WORKMAN, DVORAK , _______, \ KC_CAPS, KC_F9 , KC_F10, KC_F11 , KC_F12 , _______, _______, _______, _______, _______, KC_UP , _______, \ _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT \ -- cgit v1.2.3 From 27e3458f44ee9b06ec84431b9d4e861668ace563 Mon Sep 17 00:00:00 2001 From: Xyverz Date: Fri, 18 May 2018 15:32:50 -0700 Subject: Updating my maps in upstream master (#2987) * Adding Rama M10-A Macropad * ch-ch-ch changes... * Major overhaul based on SMT's keymap. * more changes. * Moved the FKeys to the ADJUST layer. * More rearranging. * Alias in Atreus62 keymap to make it more legible Added config.h to fix tapping_term issue for Caps Lock key in OSX * Added OrthoDox layout. * More layout changes. * Fixing things with the keyboard. * Finishing touches. Set left-hand master in config.h Embedded the arrow keys in keymap.c * Revised keymap making this easier to use. * additions and changes. * changes to various keymaps. * Minor adjustments to OrthoDox layout. * Added Eco keymap. Updated Let's Split keymap. * Added gherkin * Removed my M10A keymap * Planck Keymap Updates Updated my Planck keymap and created a simple keymap for Seph's Preonic. * Added readme * readme fixes * Update readme.md more clarification * Keymap Tweaks Removed the Power button setting from the keymap. It was in a horrible location. I'll work on getting it setup somewhere else sometime later. * Added Readme I finally got around to adding a readme to this keymap. I've also added minor changes to the layout. * Fixed Keymap Error * Fixed Readme * adding iris and levinson keymaps * Tweaks to keymap * added youngJZ keymap * Changes to keymap Added a readme.md * Levinson changes Added the readme.md and rules.mk files. Configured RGB underglow and backlighting. * fixed readme * changes to keymaps * Updated keymap * Updated readme.md * Updated Readme (again) * Updated Readme Fixed formatting. Again. * Updated readme This is the last readme update for this keyboard update. I hope. * Added Contra keymap * Kinesis Keymap Update * Updated Keymaps I've updated my Kinesis (Stapelberg) layout and my Clueboard 66 layout. I've also updated my Kinesis Readme. * Clueboard Keymap update Added media keys to my Clueboard 66 Rev2 layout. * Added keymap Added Minidox keymap & rules. Added user function to Let's Split keymap that turns off the red LEDs on the Pro Micros. * New Zen keymap Added Zen keyboard to my list of keyboards, so had to generate a new keymap for it. Also adding some changes to my MiniDox keymap and config.h, as well as my Levinson's config.h. The config.h file changes enable ee_hands. * A few changes for useability I made a few changes to the Minidox keymap to see if I can't make it more useable. I'm also working on streamlining the Zen keyboard keymap to reduce layers. * Re-vamped Iris keymap. * changes * minor keymap change This was a minor keymap change to use mod_tap for the backspace key: ALT when held, BSPC when tapped. * Added Fourier keymap * Keymap Cleanup Moved KC_ESC to KC_CAPS, and changed KC_ESC to KC_GRV This is because of muscle memory, I kept hitting ESC when trying to hit TAB. * Keymap Adjustments Swapped Caps/Esc, put Caps in Raise/Lower layers, put Grv in normal Esc position. Adjusted the readme.md to reflect these changes. * minor tweaks Added code to disable red ProMicro LEDs after flashing. * Clean-up * Corrections to keymap. Fixed a foul-up in the Zen keymap where the lctrl was where the LOWER should have been. * Changes to make this fall in line with the new Layout features * Moving to LAYOUTs for 4x12 boards * fixed config.h file * standardization changes * Reverted Atreus62 keymap to LAYOUT format * Switch Preonic and Nyquist to ortho_5x12 * Corrections to config.h * config.h file tweaks * config.h file tweaks --- keyboards/atreus62/keymaps/xyverz/keymap.c | 60 +++--- keyboards/atreus62/keymaps/xyverz/readme.md | 131 ++++++++++++ keyboards/clueboard/66/keymaps/xyverz/keymap.c | 177 +++++++++++----- keyboards/clueboard/keymaps/xyverz/config.h | 3 + keyboards/eco/keymaps/xyverz/keymap.c | 201 ++++++++++++++++++ keyboards/eco/keymaps/xyverz/readme.md | 3 + keyboards/eco/keymaps/xyverz/rules.mk | 21 ++ keyboards/fourier/keymaps/xyverz/config.h | 33 +++ keyboards/fourier/keymaps/xyverz/keymap.c | 85 ++++++++ keyboards/iris/keymaps/xyverz/config.h | 44 ++++ keyboards/iris/keymaps/xyverz/keymap.c | 161 +++++++++++++++ keyboards/iris/keymaps/xyverz/rules.mk | 2 + keyboards/kinesis/keymaps/xyverz/keymap.c | 34 ++- keyboards/kinesis/keymaps/xyverz/readme.md | 4 +- keyboards/kinesis/stapelberg/stapelberg.c | 12 ++ keyboards/lets_split/keymaps/xyverz/config.h | 45 ---- keyboards/lets_split/keymaps/xyverz/keymap.c | 190 ----------------- keyboards/minidox/keymaps/xyverz/config.h | 42 ++++ keyboards/minidox/keymaps/xyverz/keymap.c | 238 +++++++++++++++++++++ keyboards/minidox/keymaps/xyverz/rules.mk | 1 + keyboards/orthodox/keymaps/xyverz/config.h | 38 ++++ keyboards/orthodox/keymaps/xyverz/keymap.c | 157 ++++++++++++++ keyboards/orthodox/keymaps/xyverz/readme.md | 101 +++++++++ keyboards/planck/keymaps/xyverz/config.h | 29 --- keyboards/planck/keymaps/xyverz/keymap.c | 260 ----------------------- keyboards/planck/keymaps/xyverz/rules.mk | 6 - keyboards/preonic/keymaps/seph/config.h | 21 ++ keyboards/preonic/keymaps/seph/keymap.c | 79 +++++++ keyboards/preonic/keymaps/seph/rules.mk | 19 ++ keyboards/preonic/keymaps/xyverz/config.h | 21 -- keyboards/preonic/keymaps/xyverz/keymap.c | 275 ------------------------- keyboards/preonic/keymaps/xyverz/rules.mk | 23 --- keyboards/tv44/keymaps/xyverz/keymap.c | 13 +- keyboards/zen/keymaps/xyverz/config.h | 35 ++++ keyboards/zen/keymaps/xyverz/keymap.c | 178 ++++++++++++++++ keyboards/zen/keymaps/xyverz/rules.mk | 6 + 36 files changed, 1805 insertions(+), 943 deletions(-) create mode 100644 keyboards/atreus62/keymaps/xyverz/readme.md create mode 100644 keyboards/clueboard/keymaps/xyverz/config.h create mode 100644 keyboards/eco/keymaps/xyverz/keymap.c create mode 100644 keyboards/eco/keymaps/xyverz/readme.md create mode 100644 keyboards/eco/keymaps/xyverz/rules.mk create mode 100644 keyboards/fourier/keymaps/xyverz/config.h create mode 100644 keyboards/fourier/keymaps/xyverz/keymap.c create mode 100644 keyboards/iris/keymaps/xyverz/config.h create mode 100644 keyboards/iris/keymaps/xyverz/keymap.c create mode 100644 keyboards/iris/keymaps/xyverz/rules.mk delete mode 100644 keyboards/lets_split/keymaps/xyverz/config.h delete mode 100644 keyboards/lets_split/keymaps/xyverz/keymap.c create mode 100644 keyboards/minidox/keymaps/xyverz/config.h create mode 100644 keyboards/minidox/keymaps/xyverz/keymap.c create mode 100644 keyboards/minidox/keymaps/xyverz/rules.mk create mode 100644 keyboards/orthodox/keymaps/xyverz/config.h create mode 100644 keyboards/orthodox/keymaps/xyverz/keymap.c create mode 100644 keyboards/orthodox/keymaps/xyverz/readme.md delete mode 100644 keyboards/planck/keymaps/xyverz/config.h delete mode 100644 keyboards/planck/keymaps/xyverz/keymap.c delete mode 100644 keyboards/planck/keymaps/xyverz/rules.mk create mode 100644 keyboards/preonic/keymaps/seph/config.h create mode 100644 keyboards/preonic/keymaps/seph/keymap.c create mode 100644 keyboards/preonic/keymaps/seph/rules.mk delete mode 100644 keyboards/preonic/keymaps/xyverz/config.h delete mode 100644 keyboards/preonic/keymaps/xyverz/keymap.c delete mode 100644 keyboards/preonic/keymaps/xyverz/rules.mk create mode 100644 keyboards/zen/keymaps/xyverz/config.h create mode 100644 keyboards/zen/keymaps/xyverz/keymap.c create mode 100644 keyboards/zen/keymaps/xyverz/rules.mk (limited to 'keyboards') diff --git a/keyboards/atreus62/keymaps/xyverz/keymap.c b/keyboards/atreus62/keymaps/xyverz/keymap.c index 8cf4bc9a16..3788317378 100644 --- a/keyboards/atreus62/keymaps/xyverz/keymap.c +++ b/keyboards/atreus62/keymaps/xyverz/keymap.c @@ -14,16 +14,25 @@ CHANGELOG: 0.1 - Initial commit. Based off of Profet's default keymap. - 0.2 - Converted to a more Planck/Preonic keymap style file with + 0.2 - Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. Added a TODO list. + 0.3 - Moved location of media & volume keys. Added Print Screen, + Scroll Lock and Pause keys. Added a WOW gaming layer that + changes the location of Ctrl & Alt to the thumb keys. Added + readme. + 0.4 - After more useage, I realized that the ESC key was in the way + of my muscle memory (gee, thanks, Planck!) so I moved it to + the normal Caps Lock position, and moved Caps Lock to the same + position on the RAISE and LOWER layers. Added code to turn off + the Pro Micro LEDs after flashing. + 0.5 - Converted keymap to LAYOUT standard. TODO: * Make the layout more efficient, even if it means changing the RAISE and LOWER functionality. * Add legends in comments for each layer. Maybe. - * Add a gaming layer. */ @@ -58,54 +67,57 @@ enum atreus52_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Aliases to make the keymap clearer. +#define CTL_ENT CTL_T(KC_ENT) + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_DVORAK] = LAYOUT( /* dvorak */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, + [_DVORAK] = LAYOUT ( /* dvorak */ + 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_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_MINS, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), - [_QWERTY] = LAYOUT( /* qwerty */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + [_QWERTY] = LAYOUT ( /* qwerty */ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_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_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), - [_COLEMAK] = LAYOUT( /* colemak */ - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + [_COLEMAK] = LAYOUT ( /* colemak */ + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, - 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_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_RSFT, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL ), - [_WOW] = LAYOUT( /* Dvorak with minor modifications for playing World of Warcraft */ - KC_ESC, 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_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_MINS, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_T(KC_ENT), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + [_WOW] = LAYOUT ( /* Dvorak with minor modifications for playing World of Warcraft */ + 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LALT, CTL_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT ), - [_LOWER] = LAYOUT( + [_LOWER] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, - _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, - _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), - [_RAISE] = LAYOUT( + [_RAISE] = LAYOUT ( KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, - _______, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, - _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ ), - [_ADJUST] = LAYOUT( + [_ADJUST] = LAYOUT ( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, WOW, diff --git a/keyboards/atreus62/keymaps/xyverz/readme.md b/keyboards/atreus62/keymaps/xyverz/readme.md new file mode 100644 index 0000000000..cf00b65e3a --- /dev/null +++ b/keyboards/atreus62/keymaps/xyverz/readme.md @@ -0,0 +1,131 @@ +# Xyverz's Atreus62 Keymap + +## About this keymap: + +This is the Atreus62 keyboard layout by Xyverz aka u/Zrevyx on r/mk. I've blatantly stolen what works for me from the Planck and Preonic layouts and modified this file to fit me. Initial credet goes to u/profet23 for the doing all the work and adding this keyboard to QMK in the first place. + +I've got Dvorak, Qwerty, and Colemak layouts at this time, with the possibility of adding more in the future. + +The bottom row is fairly Kinesis-ish since the Contour and Advantage keyboards have been my daily drivers for the last 17 years. I hope You can get some enjoyment out of this layout should you chose it! + +### CHANGELOG: + +#### 0.1 + * Initial commit. Based off of Profet's default keymap. +#### 0.2 + * Converted to a more Planck/Preonic keymap style file with persistent layers enabled. Renamed layers to reflect OLKB maps. + * Added a TODO list. +#### 0.3 + * Moved location of media & volume keys. Added Print Screen, Scroll Lock and Pause keys. + * Added a WOW gaming layer that changes the location of Ctrl & Alt to the thumb keys. Right thumb is Ctrl when held, Enter when tapped. + * Added readme. +#### 0.4 + * Moved location of Escape key to Caps Lock position. Moved Caps Lock to same position on Raise/Lower Layers. + * Put Tilde/Grave in the upper-left corner + * Added code to turn off the red LEDs on the Pro Micro after flashing. They were annoying me. + +### TODO: + + * Make the layout more efficient, even if it means changing the RAISE + and LOWER functionality. + * Add legends in comments for each layer. Maybe. + * Enjoy this revision; figure out new things later. + +### Layer 0: Dvorak layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Gui ||Enter | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Layer 1: QWERTY layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | E | R | T | | Y | U | I | O | P | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | S | D | F | G | | D | H | T | N | S | ' | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | Z | X | C | V | B | Gui ||Enter | N | M | , | . | / | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 2: Colemak layer + + ,-----------------------------------------. ,-----------------------------------------. + | Grv | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | Q | W | F | P | G | | J | U | U | Y | ; | Del | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Esc | A | R | S | T | D | | H | N | E | I | O | ' | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | Z | X | C | V | B | Gui ||Enter | K | M | , | . | / | Shft | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 3: WoW gaming layer + + ,-----------------------------------------. ,-----------------------------------------. + | Esc | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Tab | ' | , | . | P | Y | | F | G | C | R | L | / | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | A | O | E | U | I | | D | H | T | N | S | - | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | Shft | ; | Q | J | K | X | Alt ||Ctrl/ | B | M | W | V | Z | Shft | + |------+------+------+------+------+------| ||Enter |------+------+------+------+------+------| + | Ctrl | Alt | Left | Rght | LOWER| BkSp |------'`------| Spc | RAISE| Up | Down | Gui | Ctrl | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 4: LOWER layer + + ,-----------------------------------------. ,-----------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ` | | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | | | + | { | } | | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | Prev | Play | Next | | || | | | PScr | ScLk | Pause| | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | + `-----------------------------------------' `-----------------------------------------' + + +### Keymap 5: RAISE layer + + ,-----------------------------------------. ,-----------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F12 | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | ~ | ` | | | | | | | | | | | \ | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | Caps | | Mute | Vol- | Vol+ | | | | | = | [ | ] | | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | Prev | Play | Next | | || | | | PScr | ScLk | Pause| | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | Home | End | | Del |------'`------| Ins | | PgUp | PgDn | | | + `-----------------------------------------' `-----------------------------------------' + +### Keymap 6: ADJUST layer + + ,-----------------------------------------. ,-----------------------------------------. + | | | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | |RESET | | | | | | | | | | | | + |------+------+------+------+------+------| |------+------+------+------+------+------| + | | | | | | | | |Qwerty|Colemk|Dvorak| | WoW | + |------+------+------+------+------+------|------.,------|------+------+------+------+------+------| + | | | | | | | || | | | | | | | + |------+------+------+------+------+------| || |------+------+------+------+------+------| + | | | | | | |------'`------| | | | | | | + `-----------------------------------------' `-----------------------------------------' diff --git a/keyboards/clueboard/66/keymaps/xyverz/keymap.c b/keyboards/clueboard/66/keymaps/xyverz/keymap.c index 3f08808a73..e3f413b490 100644 --- a/keyboards/clueboard/66/keymaps/xyverz/keymap.c +++ b/keyboards/clueboard/66/keymaps/xyverz/keymap.c @@ -2,77 +2,140 @@ // It's based on the default keymap, but Dvorak! #include "66.h" +#include "action_layer.h" +#include "eeconfig.h" -// Used for SHIFT_ESC -#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +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 _BL 0 -#define _FL 1 -#define _RS 2 +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _FL 3 +#define _CL 4 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Useful defines +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) +#define FN_CAPS LT(_FL, KC_CAPS) // Tap for Caps Lock, Hold for Function Layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Keymap _BL: (Base Layer) Default Layer - * ,--------------------------------------------------------------------------. ,----. - * |Esc~| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| BS| |PGUP| - * |--------------------------------------------------------------------------| |----| - * | Tab| '| ,| .| P| Y| F| G| C| R| L| /| =| \| |PGDN| - * |--------------------------------------------------------------------------| `----' - * |_FL/Caps| A| O| E| U| I| H| D| H| T| N| S| - | Ent| - * |-----------------------------------------------------------------------------. - * |Shift| BS| ;| Q| J| K| X| B| M| W| V| Z| BS|Shift| UP| - * |------------------------------------------------------------------------|----|----. - * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| - * `----------------------------------------------------------------------------------' + /* Keymap _QWERTY: Base Layer (Default Layer) + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| BS| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| S| D| F| G| H| J| K| L| ;| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| N| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' */ -[_BL] = LAYOUT( + +[_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_LBRC, KC_RBRC, KC_GRV, 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, \ + FN_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_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _COLEMAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| Q| W| F| P| G| J| L| U| Y| ;| [| ]| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| R| S| T| D| H| N| E| I| O| '| | Ent| + * |--------------------------------------------------------------. + * |Shift| | Z| X| C| V| B| K| M| ,| .| /|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT ( + KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ + 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_PGDN, \ + FN_CAPS, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + + /* Keymap _DVORAK: Base Layer + * ,-----------------------------------------------------------. ,---. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| [| ]| \| `| |PgU| + * |-----------------------------------------------------------| |---| + * |HpTab| '| ,| .| P| Y| F| G| C| R| L| /| =| BS| |PgD| + * |-----------------------------------------------------------| `---' + * |FnCaps| A| O| E| U| I| D| H| T| N| S| -| | Ent| + * |--------------------------------------------------------------. + * |Shift| | ;| Q| J| K| X| B| M| W| V| Z|Shift| Fn| Up| + * |------------------------------------------------------------------. + * |Ctrl|Gui|Alt | | Space| Space| |Alt |Gui |Ctrl|Left|Down|Rgt| + * `------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT ( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSPC, KC_PGUP, \ 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_EQL, KC_BSLS, KC_PGDN, \ - LT(_FL, KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_NUHS, KC_ENT, \ - KC_LSFT, KC_RO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_MHEN, KC_SPC, KC_SPC, KC_HENK, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), + FN_CAPS, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, XXXXXXX, KC_ENT, \ + KC_LSFT, XXXXXXX, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_SLSH, KC_RSFT, KC_UP, \ + KC_LCTL, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, KC_RGUI, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer - * ,--------------------------------------------------------------------------. ,----. - * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| - * |--------------------------------------------------------------------------| |----| - * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |PGUP| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HOME|PGDN| END| - * `----------------------------------------------------------------------------------' */ -[_FL] = 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_TRNS, KC_DEL, BL_STEP, \ - 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, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), KC_HOME, KC_PGDN, KC_END), - - /* Keymap _RS: Reset layer - * ,--------------------------------------------------------------------------. ,----. - * | | | | | | | | | | | | | | | RGB| |VAL+| - * |--------------------------------------------------------------------------| |----| - * | | | | |RESET| | | | | | | | | | |VAL-| - * |--------------------------------------------------------------------------| `----' - * | | | _RS| | | | | | | | | | | | - * |-----------------------------------------------------------------------------. - * | | | | | | | | | | | | | | |SAT+| - * |------------------------------------------------------------------------|----|----. - * | | | | | | | | | | _FL|HUE-|SAT-|HUE+| - * `----------------------------------------------------------------------------------' +[_FL] = 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, BL_STEP, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, \ + _______, _______, MO(_CL), _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, KC_PGUP, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + + /* Keymap _CL: Control layer */ -[_RS] = 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, RGB_TOG, RGB_VAI, \ - 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, RGB_VAD, \ - KC_TRNS, KC_TRNS, MO(_RS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - MO(_FL), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MO(_FL), RGB_SAI, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_MOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_HUI), +[_CL] = LAYOUT ( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, RGB_VAI, \ + _______, _______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, \ + _______, _______, MO(_CL), _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, \ + _______, _______, _______, _______, RGB_MOD, RGB_MOD, _______, _______, _______, _______, RGB_HUD, RGB_SAD, RGB_HUI), }; + +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) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + } + return true; +} diff --git a/keyboards/clueboard/keymaps/xyverz/config.h b/keyboards/clueboard/keymaps/xyverz/config.h new file mode 100644 index 0000000000..4999e4ff6c --- /dev/null +++ b/keyboards/clueboard/keymaps/xyverz/config.h @@ -0,0 +1,3 @@ +#include "../config.h" + +#define TAPPING_TERM 600 // ms diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..b68f9f8580 --- /dev/null +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -0,0 +1,201 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +// Default ECO Layout +// KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 + +#include "eco.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + BACKLIT +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Aliases to make reading the keymap easier +#define GUIBSPC GUI_T(KC_BSPC) // GUI when held, BSPC when tapped. + +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 | , | . | / |Shift | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, 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_NO, KC_NO, 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_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT +), + +/* 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 | | | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_NO, 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_NO, KC_NO, 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_NO, KC_NO, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT +), + +/* Dvorak + * ,-------------------------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | | | F | G | C | R | L | / | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | | D | H | T | N | S | - | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_NO, KC_NO, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT +), + +/* Lower + * ,-------------------------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Caps | | Mute | Vol- | Vol+ | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Brite| | Home | End | | Del | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ +), + +/* Raise + * ,-------------------------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ +), + + +/* Adjust + * ,-------------------------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | Reset| | | | | | | |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , + _______, RESET, _______, _______, _______, _______, KC_NO, KC_NO, _______, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ +), + +}; + +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) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + 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; + } + return true; +} + diff --git a/keyboards/eco/keymaps/xyverz/readme.md b/keyboards/eco/keymaps/xyverz/readme.md new file mode 100644 index 0000000000..cf168377d5 --- /dev/null +++ b/keyboards/eco/keymaps/xyverz/readme.md @@ -0,0 +1,3 @@ +# ECO Default Layout by u/That-Canadian + +KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 \ No newline at end of file diff --git a/keyboards/eco/keymaps/xyverz/rules.mk b/keyboards/eco/keymaps/xyverz/rules.mk new file mode 100644 index 0000000000..9a3059e715 --- /dev/null +++ b/keyboards/eco/keymaps/xyverz/rules.mk @@ -0,0 +1,21 @@ + + +# 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/fourier/keymaps/xyverz/config.h b/keyboards/fourier/keymaps/xyverz/config.h new file mode 100644 index 0000000000..9b46a61ccd --- /dev/null +++ b/keyboards/fourier/keymaps/xyverz/config.h @@ -0,0 +1,33 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +#define EE_HANDS + +#endif diff --git a/keyboards/fourier/keymaps/xyverz/keymap.c b/keyboards/fourier/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..3dd191be51 --- /dev/null +++ b/keyboards/fourier/keymaps/xyverz/keymap.c @@ -0,0 +1,85 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BASE 0 +#define _FN1 1 +#define _FN2 2 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, +}; + +#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) +#define KC_SPFN2 LT(_FN2, KC_SPACE) +#define KC_BSFN1 LT(_FN1, KC_BSPC) +#define KC_BSFN2 LT(_FN2, KC_BSPC) +#define KC_RST RESET +#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( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,MINS, + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + ESC , A , O , E , U , I , D , H , T , N , S , ENTER , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + LSFT ,SCLN, Q , J , K , X , B , M , W , V , Z , RSFT , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + LCTL ,LALT,LGUI ,FN2 , BSPC , SPC , FN1 ,RGUI ,RALT , RCTL + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,EQL , + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + CAPS ,RHUI,RSAI,RVAI,VOLU,LBRC,RBRC, , , ,SCLN, , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + RMOD ,RHUD,RSAD,RVAD,VOLD,LCBR,RCBR, , , , UP , , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + RTOG , , , , DEL , INS , ,LEFT ,DOWN , RGHT + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ), + + [_FN2] = LAYOUT_kc( + //,----+----+----+----+----+----|----+----+----+----+----+----+----. + TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN,UNDS,PLUS, + //|----`----`----`----`----`----|----`----`----`----`----`----`----| + CAPS , , ,INS ,PGUP,HOME, F1 , F2 , F3 , F4 , F5 , F6 , + //|-----`----`----`----`----`----|----`----`----`----`----`--------| + , , ,DEL ,PGDN,END , F7 , F8 , F9 ,F10 ,F11 , F12 , + //|-------`----`----`----`----`----|----`----`----`----`----`------| + , , , , DEL , INS , , , , + //`-----+----+-----+----+--------|--------+-----+-----+-----+------' + ) + +}; + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +}; + diff --git a/keyboards/iris/keymaps/xyverz/config.h b/keyboards/iris/keymaps/xyverz/config.h new file mode 100644 index 0000000000..0c61a8eac8 --- /dev/null +++ b/keyboards/iris/keymaps/xyverz/config.h @@ -0,0 +1,44 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#define USE_SERIAL +#define EE_HANDS + +#define PREVENT_STUCK_MODIFIERS + +#undef PRODUCT +#define PRODUCT Iris Keyboard + +#undef MANUFACTURER +#define MANUFACTURER Ian Sterling + +#undef DESCRIPTION +#define DESCRIPTION A column-staggered split ortholinear keyboard + +#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/iris/keymaps/xyverz/keymap.c b/keyboards/iris/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..c1a066b687 --- /dev/null +++ b/keyboards/iris/keymaps/xyverz/keymap.c @@ -0,0 +1,161 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +#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 KC_____ KC_TRNS +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_QWRT QWERTY +#define KC_CLMK COLEMAK +#define KC_DVRK DVORAK +#define KC_BSLT ALT_T(KC_BSPC) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc ( + EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS, + ESC , A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + LSFT, Z , X , C , V , B ,LOWR, RASE, N , M ,COMM,DOT ,SLSH,RSFT, + LCTL,BSPC,LGUI, ENT ,SPC ,LALT + ), + + [_COLEMAK] = LAYOUT_kc ( + EQL , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS, + TAB , Q , W , F , P , G , J , L , U , Y ,SCLN,BSPC, + ESC , A , R , S , T , D , H , N , E , I , O ,QUOT, + LSFT, Z , X , C , V , B ,LOWR, RASE, K , M ,COMM,DOT ,SLSH,RSFT, + LCTL,BSPC,LGUI, ENT ,SPC ,LALT + ), + + [_DVORAK] = LAYOUT_kc ( + LBRC, 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,RBRC, + TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH, + ESC , A , O , E , U , I , D , H , T , N , S ,MINS, + LSFT,SCLN, Q , J , K , X ,LOWR, RASE, B , M , W , V , Z ,RSFT, + LCTL,BSLT,LGUI, ENT ,SPC ,LALT + ), + + [_LOWER] = LAYOUT_kc ( + F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , + TILD,____,____, UP ,____,____, ____,____,____,____,____,____, + CAPS,____,LEFT,DOWN,RGHT,HOME, PGUP,UNDS,PLUS,LCBR,RCBR,PIPE, + BL_S,____,MUTE,VOLD,VOLU,END ,____, ____,PGDN,MPRV,MPLY,MNXT,____,____, + ____,DEL ,____, ____,INS ,____ + ), + + [_RAISE] = LAYOUT_kc ( + F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , + GRV ,____,____, UP ,____,____, ____,____,____,____,____,____, + CAPS,____,LEFT,DOWN,RGHT,HOME, PGUP,MINS,EQL ,LBRC,RBRC,BSLS, + BL_S,____,MUTE,VOLD,VOLU,END ,____, ____,PGDN,MPRV,MPLY,MNXT,____,____, + ____,DEL ,____, ____,INS ,____ + ), + + [_ADJUST] = LAYOUT_kc ( + F11 , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F12 , + ____,RST ,____,____,____,____, ____,____,____,____,____,____, + ____,____,____,____,____,____, ____,QWRT,CLMK,DVRK,____,____, + ____,____,____,____,____,____,____, ____,____,____,____,____,____,____, + ____,____,____, ____,____,____ + ) + +}; + +#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); +} + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +}; + +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/iris/keymaps/xyverz/rules.mk b/keyboards/iris/keymaps/xyverz/rules.mk new file mode 100644 index 0000000000..d7463419b4 --- /dev/null +++ b/keyboards/iris/keymaps/xyverz/rules.mk @@ -0,0 +1,2 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes diff --git a/keyboards/kinesis/keymaps/xyverz/keymap.c b/keyboards/kinesis/keymaps/xyverz/keymap.c index fa181e0390..4b4ad95cfd 100644 --- a/keyboards/kinesis/keymaps/xyverz/keymap.c +++ b/keyboards/kinesis/keymaps/xyverz/keymap.c @@ -1,4 +1,4 @@ -#include "kinesis.h" +#include QMK_KEYBOARD_H #include "action_layer.h" #include "eeconfig.h" @@ -132,7 +132,7 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_DV] = KEYMAP( +[_DV] = LAYOUT ( // Left Hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, @@ -158,10 +158,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, LT(_KP, KC_ENT), KC_SPC ), -[_QW] = KEYMAP( +[_QW] = LAYOUT ( // Left Hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, @@ -184,10 +184,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, LT(_KP, KC_ENT), KC_SPC ), -[_CM] = KEYMAP( +[_CM] = LAYOUT ( // Left Hand KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, @@ -210,7 +210,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, LT(_KP, KC_ENT), KC_SPC ), -[_MD] = KEYMAP( +[_MD] = LAYOUT ( // Left Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, @@ -236,7 +236,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______ ), -[_KP] = KEYMAP( +[_KP] = LAYOUT ( // Left Hand _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PWR, _______, _______, _______, _______, _______, @@ -300,3 +300,21 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) void matrix_init_user(void) { }; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1< -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 . -*/ - -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#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 - - -#ifdef SUBPROJECT_rev2 - /* RGB Underglow */ - #undef RGBLED_NUM - #define RGBLIGHT_ANIMATIONS - #define RGBLED_NUM 8 -#endif - -#endif diff --git a/keyboards/lets_split/keymaps/xyverz/keymap.c b/keyboards/lets_split/keymaps/xyverz/keymap.c deleted file mode 100644 index 838f579835..0000000000 --- a/keyboards/lets_split/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,190 +0,0 @@ -#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 planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - ADJUST -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Bksp |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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, 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,\ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), - -/* 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 | Bksp |Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_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_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_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_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_SLSH, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_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_CAPS, 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, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ - _______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_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_CAPS, 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_MPRV, KC_MPLY, KC_MNXT, _______, _______, \ - _______, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = LAYOUT ( \ - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ - _______, RESET, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - -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) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - 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; - } - return true; -} diff --git a/keyboards/minidox/keymaps/xyverz/config.h b/keyboards/minidox/keymaps/xyverz/config.h new file mode 100644 index 0000000000..6d7b6256a1 --- /dev/null +++ b/keyboards/minidox/keymaps/xyverz/config.h @@ -0,0 +1,42 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define USE_SERIAL + +#define EE_HANDS + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D7 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +#define IGNORE_MOD_TAP_INTERRUPT +#undef PERMISSIVE_HOLD + +#endif diff --git a/keyboards/minidox/keymaps/xyverz/keymap.c b/keyboards/minidox/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..3dd9903cad --- /dev/null +++ b/keyboards/minidox/keymaps/xyverz/keymap.c @@ -0,0 +1,238 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DVORAK 0 +#define _QWERTY 1 +#define _COLEMAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum planck_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + BACKLIT +}; + +// Adding macros to make the keymaps below much easier to read. +#define SFTSCLN SFT_T(KC_SCLN) +#define SFTSLSH SFT_T(KC_SLSH) +#define SFTZED SFT_T(KC_Z) +//#define ALTENT ALT_T(KC_ENT) +//#define ESCTRL CTL_T(KC_ESC) +//#define TABGUI GUI_T(KC_TAB) +#define CTRLQ CTL_T(KC_Q) +#define CTRLV CTL_T(KC_V) +#define ALTJ ALT_T(KC_J) +#define ALTW ALT_T(KC_W) +#define CTRLX CTL_T(KC_X) +#define CTRLDOT CTL_T(KC_DOT) +#define ALTC ALT_T(KC_C) +#define ALTCOMM ALT_T(KC_COMM) +//#define GUIBSPC GUI_T(KC_BSPC) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Dvorak + * + * ,----------------------------------. ,----------------------------------. + * | ' | , | . | P | Y | | F | G | C | R | L | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | O | E | U | I | | D | H | T | N | S | + * |------+------+------+------+------| |------+------+------+------+------| + * |SFT/ ;|CTL/ Q|ALT/ J| K | X | | B | M |ALT/ W|CTL/ V|SFT/ Z| + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | LOWER| Gui | | | | Ent |RAISE | + * `-------------| BSpc | | Spc |------+------. + * | | | | + * `------' `------' + */ +[_DVORAK] = LAYOUT ( \ + KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, \ + KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, \ + SFTSCLN, CTRLQ, ALTJ, KC_K, KC_X, KC_B, KC_M, ALTW, CTRLV, SFTZED, \ + LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ +), + +/* Qwerty + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | E | R | T | | Y | U | I | O | P | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | S | D | F | G | | H | J | K | L | ; | + * |------+------+------+------+------| |------+------+------+------+------| + * |SFT/ Z|CTL/ X|ALT/ C| V | B | | N | M |ALT/ ,|CTL/ .|SFT/ /| + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | LOWER| Gui | | | | Ent |RAISE | + * `-------------| BSpc | | Spc |------+------. + * | | | | + * `------' `------' + */ +[_QWERTY] = LAYOUT ( \ + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, \ + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, \ + SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_N, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ + LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ +), + +/* Colemak + * + * ,----------------------------------. ,----------------------------------. + * | Q | W | F | P | G | | J | L | U | Y | L | + * |------+------+------+------+------| |------+------+------+------+------| + * | A | R | S | T | D | | H | N | E | I | S | + * |------+------+------+------+------| |------+------+------+------+------| + * |SFT/ Z|CTL/ X|ALT/ C| V | B | | K | M |ALT/ ,|CTL/ .|SFT/ /| + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | LOWER| Gui | | | | Ent |RAISE | + * `-------------| BSpc | | Spc |------+------. + * | | | | + * `------' `------' + */ +[_COLEMAK] = LAYOUT ( \ + KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, \ + KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, \ + SFTZED, CTRLX, ALTC, KC_V, KC_B, KC_K, KC_M, ALTCOMM, CTRLDOT, SFTSLSH, \ + LOWER, KC_LGUI, KC_BSPC, KC_SPC, KC_ENT, RAISE \ +), + +/* Lower + * + * ,----------------------------------. ,----------------------------------. + * | ! | @ | # | $ | % | | ^ | & | * | ( | ) | + * |------+------+------+------+------| |------+------+------+------+------| + * | CAPS | | UP | | Home | | PgDn | + | { | } | _ | + * |------+------+------+------+------| |------+------+------+------+------| + * | ~ | Left | Down | Right| End | | PgUp | Mute | Vol- | Vol+ | / | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | Del | | | | | | | + * `-------------| Esc | | Tab |------+------. + * | | | | + * `------' `------' + */ +[_LOWER] = LAYOUT ( \ + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, \ + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, KC_PLUS, KC_LCBR, KC_RCBR, KC_UNDS, \ + KC_TILD, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLSH, \ + _______, KC_DEL, KC_ESC, KC_TAB, KC_PIPE, _______ \ +), + +/* Raise + * + * ,----------------------------------. ,----------------------------------. + * | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | + * |------+------+------+------+------| |------+------+------+------+------| + * | CAPS | | UP | | Home | | PgDn | = | [ | ] | - | + * |------+------+------+------+------| |------+------+------+------+------| + * | ` | Left | Down | Right| End | | PgUp | Prev | Play | Next | ? | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | Del | | | | \ | | + * `-------------| Esc | | Tab |------+------. + * | | | | + * `------' `------' + */ +[_RAISE] = LAYOUT ( \ + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ + KC_CAPS, _______, KC_UP, _______, KC_HOME, KC_PGUP, KC_EQL, KC_LBRC, KC_RBRC, KC_MINS, \ + KC_GRV, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, KC_PGDN, KC_MPRV, KC_MPLY, KC_MNXT, KC_QUES, \ + _______, KC_DEL, KC_ESC, KC_TAB, KC_BSLS, _______ \ +), + +/* Adjust (Lower + Raise) + * + * ,----------------------------------. ,----------------------------------. + * | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | + * |------+------+------+------+------| |------+------+------+------+------| + * | F11 | | | | | | | PrSc | ScLk | Paus | F12 | + * |------+------+------+------+------| |------+------+------+------+------| + * | |QWERTY|COLEMK|DVORAK| | |RESET | | | | | + * `----------------------------------' `----------------------------------' + * ,--------------------. ,------,-------------. + * | | | | | | | | + * `-------------| | | |------+------. + * | | | | + * `------' `------' + */ +[_ADJUST] = LAYOUT ( \ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_UP, KC_F9, KC_F10, \ + KC_F11, _______, _______, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, KC_F12, \ + _______, QWERTY, COLEMAK, DVORAK, _______, RESET, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______ \ +) +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +}; + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + 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; + } + return true; +}; diff --git a/keyboards/minidox/keymaps/xyverz/rules.mk b/keyboards/minidox/keymaps/xyverz/rules.mk new file mode 100644 index 0000000000..d34df5b19b --- /dev/null +++ b/keyboards/minidox/keymaps/xyverz/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. diff --git a/keyboards/orthodox/keymaps/xyverz/config.h b/keyboards/orthodox/keymaps/xyverz/config.h new file mode 100644 index 0000000000..fc6d5d23b5 --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/config.h @@ -0,0 +1,38 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#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 + +#endif diff --git a/keyboards/orthodox/keymaps/xyverz/keymap.c b/keyboards/orthodox/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..2b6551e199 --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/keymap.c @@ -0,0 +1,157 @@ +/* +This is the keymap for the keyboard + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DVORAK 0 +#define _QWERTY 1 +#define _COLEMAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_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_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT \ +), + +[_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, KC_F, KC_G, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT \ +), + +[_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_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_LCTL, KC_LALT, KC_RGUI, KC_RCTL, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT \ +), + +[_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_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, KC_HOME, KC_PGUP, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_INS, _______, _______, _______, KC_UP, KC_DOWN, _______, _______ \ +), + +[_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_CAPS, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_PGUP, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ + _______, _______, KC_LEFT, KC_RGHT, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, KC_INS, _______, _______, _______, KC_UP, KC_DOWN, _______, _______ \ +), + +[_ADJUST] = LAYOUT ( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, QWERTY , COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +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); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + 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/orthodox/keymaps/xyverz/readme.md b/keyboards/orthodox/keymaps/xyverz/readme.md new file mode 100644 index 0000000000..43229cd0aa --- /dev/null +++ b/keyboards/orthodox/keymaps/xyverz/readme.md @@ -0,0 +1,101 @@ +# Xyverz's Orthodox Keymap + +## About this keymap: + +This is my OrthoDox keymap, and the first iteration of my readme. I've based this keymap on both my Planck and ErgoDox/Kinesis Advantage keymaps. + +## Still to do: + + * Re-evaluate the placement of the arrow keys after some time using this keyboard. + +### Layer 0: Dvorak layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | ' | , | . | P | Y || F | G | C | R | L | \ | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | O | E | U | I || D | H | T | N | S | - | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | X || B | M | W | V | Z | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### Layer 1: Qwerty layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | Q | W | E | R | T || Y | U | I | O | P | BSPC | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | S | D | F | G || H | J | K | L | ; | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || N | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### Keymap 2: Colemak layer + + ,-------------------------------------------.,-------------------------------------------. + | Tab | Q | W | F | P | G || J | L | U | Y | ; | BSPC | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | Escape | A | R | S | T | D || H | N | E | I | O | ' | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | LShift | Z | X | C | V | B || K | M | , | . | / | RShift | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | LCtr | LAlt || RGui | RCtr | + ,------|------|------||------+------+------. + |Lower | Bspc | LGui || Enter| Space| Raise| + `--------------------'`--------------------' + +### layer 3 : Lower layer + + ,-------------------------------------------.,-------------------------------------------. + | ~ | ! | @ | # | $ | % || ^ | & | * | ( | ) | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | CapsLk | | Mute | Vol- | Vol+ | || | _ | + | { | } | | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Left | Rght | | || | | Up | Down | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | Home || PgUp | | + ,------|------|------||------+------+------. + | | Del | End || PgDn | Ins | | + `--------------------'`--------------------' + +### Keymap 4: Raise layer + + ,-------------------------------------------.,-------------------------------------------. + | ~ | 1 | 2 | 3 | 4 | 5 || 6 | 7 | 8 | 9 | 0 | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | CapsLk | | Prev | Play | Next | || | - | = | [ | ] | \ | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | Left | Rght | | || | | Up | Down | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | Home || PgUp | | + ,------|------|------||------+------+------. + | | Del | End || PgDn | Ins | | + `--------------------'`--------------------' + +### Keymap 5: Adjust Layer + + ,-------------------------------------------.,-------------------------------------------. + | F11 | F1 | F2 | F3 | F4 | F5 || F6 | F7 | F8 | F9 | F10 | F12 | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | |Reset | | | | || |Qwerty|Colemk|Dvorak| | | + |--------+------+------+------+------+------||------+------+------+------+------+--------| + | | | | | | || | | | | | | + `--------+------+------+------+------+------'`------+------+------+------+------+--------' + ,-------------.,-------------. + | | || | | + ,------|------|------||------+------+------. + | | | || | | | + `--------------------'`--------------------' + + diff --git a/keyboards/planck/keymaps/xyverz/config.h b/keyboards/planck/keymaps/xyverz/config.h deleted file mode 100644 index 4c61581993..0000000000 --- a/keyboards/planck/keymaps/xyverz/config.h +++ /dev/null @@ -1,29 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* - * 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 - -#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/xyverz/keymap.c b/keyboards/planck/keymaps/xyverz/keymap.c deleted file mode 100644 index 5ce52f36d8..0000000000 --- a/keyboards/planck/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,260 +0,0 @@ - -#include "planck.h" -#include "action_layer.h" -#ifdef AUDIO_ENABLE - #include "audio.h" -#endif -#include "eeconfig.h" - -extern keymap_config_t keymap_config; - -// Each layer gets a name for readability, which is then used in the keymap matrix below. -// The underscores don't mean anything - you can have a layer called STUFF or any other name. -// Layer names don't all need to be of the same length, obviously, and you can also skip them -// entirely and just use numbers. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum planck_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* 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 | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {KC_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_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, - -/* 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 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = { - {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_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT}, - {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT } -}, - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = { - {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______}, - {KC_CAPS, 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, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = { - {KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______}, - {KC_CAPS, 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_MPRV, KC_MPLY, KC_MNXT, _______, _______}, - {BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} -}, - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | Reset| |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_ADJUST] = { - {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, - {_______, RESET, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} - - -}; - -#ifdef AUDIO_ENABLE - -float tone_startup[][2] = SONG(STARTUP_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); -float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_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 BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - } - return true; -} - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); -} - -void shutdown_user() -{ - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif diff --git a/keyboards/planck/keymaps/xyverz/rules.mk b/keyboards/planck/keymaps/xyverz/rules.mk deleted file mode 100644 index 55bf853a07..0000000000 --- a/keyboards/planck/keymaps/xyverz/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -AUDIO_ENABLE = no # Audio output on port C6 - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif diff --git a/keyboards/preonic/keymaps/seph/config.h b/keyboards/preonic/keymaps/seph/config.h new file mode 100644 index 0000000000..4e12921fef --- /dev/null +++ b/keyboards/preonic/keymaps/seph/config.h @@ -0,0 +1,21 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// Number of backlight levels +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 3 + +/* ws2812 RGB LED */ +#undef RGB_DI_PIN +#define RGB_DI_PIN B3 +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 11 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + + +#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/seph/keymap.c b/keyboards/preonic/keymaps/seph/keymap.c new file mode 100644 index 0000000000..a80199c092 --- /dev/null +++ b/keyboards/preonic/keymaps/seph/keymap.c @@ -0,0 +1,79 @@ +#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. +#define _QW 0 +#define _LO 1 +#define _RA 2 + +// Fillers to make layering more clear +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | - | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Space |Raise | Up | Down | GUI |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_QW] = { + {KC_GESC, 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_MINS, 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}, + {KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, MO(_LO), KC_SPC, KC_SPC, MO(_RA), KC_UP, KC_DOWN, KC_RGUI, KC_ENT } +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | | | | | | _ | + | { | } | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | Mute | Vol- | Vol+ | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_LO] = { + {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, + {KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE}, + {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______}, + {BL_STEP, _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | | | | | | | | | | | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | | | | | | - | = | [ | ] | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | Prev | Play | Next | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| | Home | End | | Ins | | PgUp | PgDN | |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_RA] = { + {KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 }, + {KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_BSLS}, + {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______}, + {BL_STEP, _______, KC_HOME, KC_END, _______, KC_INS, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______} +} + +}; diff --git a/keyboards/preonic/keymaps/seph/rules.mk b/keyboards/preonic/keymaps/seph/rules.mk new file mode 100644 index 0000000000..5ccd4377a1 --- /dev/null +++ b/keyboards/preonic/keymaps/seph/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 = 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 # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # 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/preonic/keymaps/xyverz/config.h b/keyboards/preonic/keymaps/xyverz/config.h deleted file mode 100644 index 4e12921fef..0000000000 --- a/keyboards/preonic/keymaps/xyverz/config.h +++ /dev/null @@ -1,21 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -// Number of backlight levels -#undef BACKLIGHT_LEVELS -#define BACKLIGHT_LEVELS 3 - -/* ws2812 RGB LED */ -#undef RGB_DI_PIN -#define RGB_DI_PIN B3 -#undef RGBLED_NUM -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 11 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 - - -#endif \ No newline at end of file diff --git a/keyboards/preonic/keymaps/xyverz/keymap.c b/keyboards/preonic/keymaps/xyverz/keymap.c deleted file mode 100644 index 53e378e404..0000000000 --- a/keyboards/preonic/keymaps/xyverz/keymap.c +++ /dev/null @@ -1,275 +0,0 @@ -#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. -#define _QWERTY 0 -#define _COLEMAK 1 -#define _DVORAK 2 -#define _LOWER 3 -#define _RAISE 4 -#define _ADJUST 16 - -enum preonic_keycodes { - QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, - LOWER, - RAISE, - BACKLIT -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | - | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_QWERTY] = LAYOUT_preonic_grid( \ - 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_MINS, 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, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), - -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Bksp | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = LAYOUT_preonic_grid( \ - 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL, \ - 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | " | , | . | P | Y | F | G | C | R | L | / | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | - | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp |Space |Raise | Up | Down | GUI |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = LAYOUT_preonic_grid( \ - KC_ESC, 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_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, GUI_T(KC_BSPC), KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT \ -), - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Mute | Vol- | Vol+ | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = 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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ - KC_CAPS, 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_MUTE, KC_VOLD, KC_VOLU, _______, _______, \ - BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | \ | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Caps | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | Prev | Play | Next | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | Ins | | PgUp | PgDN | |Enter | - * `-----------------------------------------------------------------------------------' - */ -[_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_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSLS, \ - KC_CAPS, 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_MPRV, KC_MPLY, KC_MNXT, _______, _______, \ - BACKLIT, _______, KC_HOME, KC_END, _______, KC_DEL, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ \ -), - -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Reset| | | | | | | | | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |RGB ON| MODE | HUE+ | HUE- | SAT+ | SAT- | VAL+ | VAL- | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' - */ -[_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, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ - _______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ - _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) - - -}; - -#ifdef AUDIO_ENABLE -float tone_startup[][2] = { - {NOTE_B5, 20}, - {NOTE_B6, 8}, - {NOTE_DS6, 20}, - {NOTE_B6, 8} -}; - -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); - -float music_scale[][2] = SONG(MUSIC_SCALE_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 BACKLIT: - if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); - #endif - } else { - unregister_code(KC_RSFT); - } - return false; - break; - } - return true; -}; - -void matrix_init_user(void) { - #ifdef AUDIO_ENABLE - startup_user(); - #endif -} - -#ifdef AUDIO_ENABLE - -void startup_user() -{ - _delay_ms(20); // gets rid of tick - PLAY_SONG(tone_startup); -} - -void shutdown_user() -{ - PLAY_SONG(tone_goodbye); - _delay_ms(150); - stop_all_notes(); -} - -void music_on_user(void) -{ - music_scale_user(); -} - -void music_scale_user(void) -{ - PLAY_SONG(music_scale); -} - -#endif diff --git a/keyboards/preonic/keymaps/xyverz/rules.mk b/keyboards/preonic/keymaps/xyverz/rules.mk deleted file mode 100644 index ea5f6c164e..0000000000 --- a/keyboards/preonic/keymaps/xyverz/rules.mk +++ /dev/null @@ -1,23 +0,0 @@ -# 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 = 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 # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = no # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = yes # 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 - -ifndef QUANTUM_DIR - include ../../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/tv44/keymaps/xyverz/keymap.c b/keyboards/tv44/keymaps/xyverz/keymap.c index e3028019a0..08bea5bc13 100644 --- a/keyboards/tv44/keymaps/xyverz/keymap.c +++ b/keyboards/tv44/keymaps/xyverz/keymap.c @@ -26,25 +26,30 @@ enum planck_keycodes { #define _______ KC_TRNS #define XXXXXXX KC_NO +// Aliases for some other things I want to try out +#define RAI_ESC LT(_RAISE, KC_ESC) +#define LOW_QUQ LT(_LOWER, KC_QUOT) +#define LOW_MIN LT(_LOWER, KC_MINS) // Same as above, but for Dvorak layer +#define GUIBSPC GUI_T(KC_BSPC) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_DVORAK] = KEYMAP( /* 0: Dvorak */ KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + RAI_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, LOW_MIN, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT + KC_LCTL, KC_LALT, LOWER, GUIBSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT ), [_QWERTY] = KEYMAP( /* 1: Qwerty */ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, - KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + RAI_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LOW_QUQ, 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, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT ), [_COLEMAK] = KEYMAP( /* 2: Colemak */ 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, + RAI_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, LOW_QUQ, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LALT, LOWER, KC_BSPC, KC_SPC, RAISE, KC_LGUI, KC_ENT ), diff --git a/keyboards/zen/keymaps/xyverz/config.h b/keyboards/zen/keymaps/xyverz/config.h new file mode 100644 index 0000000000..818f899897 --- /dev/null +++ b/keyboards/zen/keymaps/xyverz/config.h @@ -0,0 +1,35 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +#define EE_HANDS + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/zen/keymaps/xyverz/keymap.c b/keyboards/zen/keymaps/xyverz/keymap.c new file mode 100644 index 0000000000..2180a7459c --- /dev/null +++ b/keyboards/zen/keymaps/xyverz/keymap.c @@ -0,0 +1,178 @@ +/* This is the Zen keyboard layout by Xyverz aka u/Zrevyx on r/mk. + This is pretty much a direct port of my Atreus62 keymap. + + The bottom row is fairly Kinesis-ish since the Contour and Advantage + keyboards have been my daily drivers for the last 17 years. I hope + You can get some enjoyment out of this layout should you chose it! + +CHANGELOG: + + 0.1 - Initial commit. Based off of Profet's default keymap. + +TODO: + + * Figure out how to make the bottom row work best for me. + * Add legends in comments for each layer. Maybe. + +*/ + +#include "zen.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _DVORAK 0 +#define _QWERTY 1 +#define _COLEMAK 2 +#define _WOW 3 +#define _LOWER 4 +#define _RAISE 5 +#define _ADJUST 16 + +enum atreus52_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, + COLEMAK, + WOW, + LOWER, + RAISE +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +// Aliases to make the keymap clearer. +#define CTLBSPC CTL_T(KC_BSPC) // CTRL when held, BSPC when tapped. +#define RGB_SWR RGB_M_SW // Swirl Animation alias +#define RGB_SNK RGB_M_SN // Snake Animation alias +#define ADJUST MO(_ADJUST) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_DVORAK] = KEYMAP( \ + KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_SLSH, KC_EQL, RAISE \ +), + +[_QWERTY] = KEYMAP( \ + 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_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, RAISE \ +), + +[_COLEMAK] = KEYMAP( \ + 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_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_DEL , \ + KC_CAPS, 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_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_RGUI, KC_RCTL, RAISE \ +), + +[_WOW] = KEYMAP( \ + KC_RBRC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, \ + LOWER, KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, CTLBSPC, KC_LALT, KC_ENT, KC_SPC, KC_UP, KC_DOWN, KC_SLSH, KC_EQL, RAISE \ +), + +[_LOWER] = KEYMAP( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_PLUS, KC_LCBR, KC_RCBR, _______, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + _______, _______, _______, KC_HOME, KC_END, KC_DEL, _______, _______, KC_INS, KC_PGUP, KC_PGDN, _______, _______, _______ \ +), + +[_RAISE] = KEYMAP( \ + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , \ + KC_TILD, KC_GRV, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, \ + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, KC_EQL, KC_LBRC, KC_RBRC, _______, \ + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, KC_PSCR, KC_SLCK, KC_PAUS, _______, \ + _______, _______, _______, KC_HOME, KC_END, KC_DEL, _______, _______, KC_INS, KC_PGUP, KC_PGDN, _______, _______, _______ \ +), + +[_ADJUST] = KEYMAP( \ + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_SNK, _______, QWERTY, COLEMAK, DVORAK, WOW, _______, \ + RGB_TOG, RGB_MOD, RGB_SWR, RGB_M_K, RGB_M_G, RGB_HUI, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), + +}; + + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +void matrix_init_user(void) { + // This will disable the red LEDs on the ProMicros + DDRD &= ~(1<<5); + PORTD &= ~(1<<5); + DDRB &= ~(1<<0); + PORTB &= ~(1<<0); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case DVORAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case WOW: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_WOW); + } + 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; + } + return true; +}; diff --git a/keyboards/zen/keymaps/xyverz/rules.mk b/keyboards/zen/keymaps/xyverz/rules.mk new file mode 100644 index 0000000000..22b6ec4766 --- /dev/null +++ b/keyboards/zen/keymaps/xyverz/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif -- cgit v1.2.3 From c55c646fa37d0e88430630152a8827e9431a34e5 Mon Sep 17 00:00:00 2001 From: Joe Burchett Date: Fri, 18 May 2018 16:33:03 -0700 Subject: fix broken links in readme.md for bigseries (#2997) --- keyboards/bigseries/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/bigseries/readme.md b/keyboards/bigseries/readme.md index dfb4156689..528df0de09 100644 --- a/keyboards/bigseries/readme.md +++ b/keyboards/bigseries/readme.md @@ -12,4 +12,4 @@ Make example for this keyboard (after setting up your build environment): make bigseries: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. \ No newline at end of file +See [build environment setup](https://docs.qmk.fm/install-build-tools) then the [make instructions](https://docs.qmk.fm/build-compile-instructions) for more information. -- cgit v1.2.3 From 1edb8bf1903b04e14160a56516e5c89a2e6cb9cd Mon Sep 17 00:00:00 2001 From: sennin32 Date: Sat, 19 May 2018 11:59:05 +0800 Subject: change do60 config (#2996) * add do60 support * DO60 on market config v0.2.8 * remove do60x * Changes for matching new naming rule --- keyboards/do60/config.h | 4 +-- keyboards/do60/do60.c | 51 ++++++++++++++++++++++++++------- keyboards/do60/do60.h | 11 +++---- keyboards/do60/keymaps/default/keymap.c | 10 +++---- keyboards/do60/keymaps/test/keymap.c | 2 +- 5 files changed, 55 insertions(+), 23 deletions(-) (limited to 'keyboards') diff --git a/keyboards/do60/config.h b/keyboards/do60/config.h index 88948b6a64..4a7dcddfdb 100644 --- a/keyboards/do60/config.h +++ b/keyboards/do60/config.h @@ -43,11 +43,11 @@ along with this program. If not, see . * */ #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3, B0 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, F4, B4, D7, D6, B3, B0 } #define UNUSED_PINS /* Backlight Setup */ -#define BACKLIGHT_PIN F4 +#define BACKLIGHT_PIN B5 #define BACKLIGHT_LEVELS 6 //#define BACKLIGHT_BREATHING diff --git a/keyboards/do60/do60.c b/keyboards/do60/do60.c index 502d02a40d..c1e509c5db 100644 --- a/keyboards/do60/do60.c +++ b/keyboards/do60/do60.c @@ -1,19 +1,50 @@ #include "do60.h" +#include "led.h" +//extern inline void do60_caps_led_on(void); +//extern inline void do60_bl_led_on(void); -extern inline void do60_caps_led_on(void); -extern inline void do60_bl_led_on(void); +//extern inline void do60_caps_led_off(void); +//extern inline void do60_bl_led_off(void); -extern inline void do60_caps_led_off(void); -extern inline void do60_bl_led_off(void); +extern inline void setdefaultrgb(void); +void matrix_init_kb(void) { + // Keyboard start-up code goes here + // Runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); + setdefaultrgb(); +}; + +void matrix_scan_kb(void) { + // Looping keyboard code goes here + // This runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // Set caps lock LED pin as output + DDRB |= (1 << 2); + // Default to off + PORTB |= (1 << 2); +} + void led_set_kb(uint8_t usb_led) { - if (usb_led & (1< Date: Fri, 18 May 2018 21:00:13 -0700 Subject: checking in xxinophobia's changes to get ISO enter working correctly (#2999) --- keyboards/hs60/info.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hs60/info.json b/keyboards/hs60/info.json index 20e0ae54e3..677054cc6e 100644 --- a/keyboards/hs60/info.json +++ b/keyboards/hs60/info.json @@ -6,9 +6,8 @@ "height": 5, "layouts": { "LAYOUT_60_iso": { - "layout": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"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":"~", "x":12.75, "y":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "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":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":"AltGr", "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": [{"label":"\u00ac", "x":0, "y":0}, {"label":"!", "x":1, "y":0}, {"label":"\"", "x":2, "y":0}, {"label":"\u00a3", "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":"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":"~", "x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":1, "w":1.25, "h":2}, {"label":"Shift", "x":0, "y":3, "w":1.25}, {"label":"|", "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":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":"AltGr", "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_ansi": { "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}] } -- cgit v1.2.3 From c9102f9e35f479bd7d5dd06ce10a5089b199fb0d Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 18 May 2018 21:00:48 -0700 Subject: Renamed jd40's LAYOUT to LAYOUT_kc (#3000) Made a new LAYOUT without all the KC_## --- keyboards/jd40/jd40.h | 18 +++++++++++++++--- keyboards/jd40/keymaps/default/keymap.c | 8 ++++---- 2 files changed, 19 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/jd40/jd40.h b/keyboards/jd40/jd40.h index 0000bc7ed9..3ed6149f05 100644 --- a/keyboards/jd40/jd40.h +++ b/keyboards/jd40/jd40.h @@ -4,7 +4,7 @@ #include "quantum.h" #include "led.h" -/* GH60 LEDs +/* GH60 LEDs * GPIO pads * 0 F7 WASD LEDs * 1 F6 ESC LED @@ -13,7 +13,7 @@ * B2 Capslock LED * B0 not connected */ - + /* inline void gh60_caps_led_on(void) { DDRB |= (1<<2); PORTB &= ~(1<<2); } inline void gh60_poker_leds_on(void) { DDRF |= (1<<4); PORTF &= ~(1<<4); } @@ -30,7 +30,7 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } /* JD40 MKII keymap definition macro */ -#define LAYOUT( \ +#define LAYOUT_kc( \ 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, \ @@ -42,4 +42,16 @@ inline void gh60_wasd_leds_off(void) { DDRF &= ~(1<<7); PORTF &= ~(1<<7); } { KC_##K35, KC_##K36, KC_##K37, KC_##K38, KC_##K39, KC_NO, KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_NO } \ } +#define LAYOUT( \ + 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 \ +) { \ + { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12 }, \ + { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, KC_NO }, \ + { K24, K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, KC_NO }, \ + { K35, K36, K37, K38, K39, KC_NO, K40, K41, K42, K43, K44, KC_NO } \ +} + #endif diff --git a/keyboards/jd40/keymaps/default/keymap.c b/keyboards/jd40/keymaps/default/keymap.c index b8cff95ac4..b4ec055053 100644 --- a/keyboards/jd40/keymaps/default/keymap.c +++ b/keyboards/jd40/keymaps/default/keymap.c @@ -7,25 +7,25 @@ #define _UL 3 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BL] = LAYOUT( + [_BL] = LAYOUT_kc( F12, Q, W, E, R, T, Y, U, I, O, P, BSPC, TAB, A, S, D, F, G, H, J, K, L, ENT, LSFT, Z, X, C, V, B, N, M, COMM, UP, DOT, LCTL, LGUI, LALT, FN0, SPC, SPC, FN0, LEFT, DOWN, RIGHT), - [_AL] = LAYOUT( + [_AL] = LAYOUT_kc( GRV, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, DEL, CAPS, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, SCLN, PGUP, QUOT, TRNS, TRNS, TRNS, TRNS, FN3, FN3, TRNS, HOME, PGDN, END), - [_FL] = LAYOUT( + [_FL] = LAYOUT_kc( TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), - [_UL] = LAYOUT( + [_UL] = LAYOUT_kc( TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, FN4, FN5, FN11, FN10, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, -- cgit v1.2.3 From 0b591fd84394e2c07d3047fb29e734b612bfc248 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 20 May 2018 09:59:02 -0700 Subject: Merlin community layouts (#3004) * community layout support for eagle_viper v2 and remove mechmerlin keymap dir * community layout support for eagle_viper v2 and remove mechmerlin keymap dir * Change to QMK_KEYBOARD_H and remove merlin keymap in favor of cmmunity layouts * community layout support 60_ansi * community layout support for 60_ansi --- keyboards/e6v2/e6v2.h | 2 +- keyboards/e6v2/info.json | 2 +- keyboards/e6v2/keymaps/amnesia0287/keymap.c | 2 +- keyboards/e6v2/keymaps/default/keymap.c | 6 +-- keyboards/e6v2/rules.mk | 2 + keyboards/eagle_viper/rules.mk | 2 + keyboards/eagle_viper/v2/keymaps/default/keymap.c | 2 +- .../eagle_viper/v2/keymaps/mechmerlin/keymap.c | 44 ---------------- .../eagle_viper/v2/keymaps/mechmerlin/readme.md | 15 ------ .../eagle_viper/v2/keymaps/profanum429/keymap.c | 2 +- keyboards/kc60/keymaps/dbroqua/keymap.c | 2 +- keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c | 2 +- keyboards/kc60/keymaps/default/keymap.c | 2 +- keyboards/kc60/keymaps/mechmerlin/keymap.c | 61 ---------------------- keyboards/kc60/keymaps/mechmerlin/readme.md | 20 ------- keyboards/kc60/keymaps/sgoodwin/keymap.c | 2 +- keyboards/kc60/keymaps/stanleylai/keymap.c | 2 +- keyboards/kc60/keymaps/wigguno/keymap.c | 2 +- keyboards/kc60/keymaps/workman-dead/keymap.c | 2 +- keyboards/kc60/keymaps/ws2812/keymap.c | 2 +- keyboards/v60_type_r/keymaps/default/keymap.c | 2 +- keyboards/v60_type_r/keymaps/vimouse/keymap.c | 2 +- keyboards/v60_type_r/rules.mk | 2 + 23 files changed, 24 insertions(+), 158 deletions(-) delete mode 100644 keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c delete mode 100644 keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md delete mode 100644 keyboards/kc60/keymaps/mechmerlin/keymap.c delete mode 100644 keyboards/kc60/keymaps/mechmerlin/readme.md (limited to 'keyboards') diff --git a/keyboards/e6v2/e6v2.h b/keyboards/e6v2/e6v2.h index 954d800b0a..6416b4bd5f 100644 --- a/keyboards/e6v2/e6v2.h +++ b/keyboards/e6v2/e6v2.h @@ -18,7 +18,7 @@ { K40, K41, K42, KC_NO, KC_NO, KC_NO, K46, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D, KC_NO }, \ } -#define LAYOUT_ansi( \ +#define LAYOUT_60_ansi( \ 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, \ diff --git a/keyboards/e6v2/info.json b/keyboards/e6v2/info.json index fc6f9660aa..1cac56f7e7 100644 --- a/keyboards/e6v2/info.json +++ b/keyboards/e6v2/info.json @@ -9,7 +9,7 @@ "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}, {"x":13, "y":0}, {"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":"|", "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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"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":"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_ansi": { + "LAYOUT_60_ansi": { "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}] }, diff --git a/keyboards/e6v2/keymaps/amnesia0287/keymap.c b/keyboards/e6v2/keymaps/amnesia0287/keymap.c index 33fb6cda0a..625ddb74ab 100644 --- a/keyboards/e6v2/keymaps/amnesia0287/keymap.c +++ b/keyboards/e6v2/keymaps/amnesia0287/keymap.c @@ -1,4 +1,4 @@ -#include "e6v2.h" +#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. diff --git a/keyboards/e6v2/keymaps/default/keymap.c b/keyboards/e6v2/keymaps/default/keymap.c index 4349793a34..945787f0dc 100644 --- a/keyboards/e6v2/keymaps/default/keymap.c +++ b/keyboards/e6v2/keymaps/default/keymap.c @@ -1,14 +1,14 @@ -#include "e6v2.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT_ansi( + [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_SPACE, KC_RALT, MO(1), KC_MENU, KC_RCTL ), - [1] = LAYOUT_ansi( + [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, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, diff --git a/keyboards/e6v2/rules.mk b/keyboards/e6v2/rules.mk index c2c02b6147..7d28042d85 100644 --- a/keyboards/e6v2/rules.mk +++ b/keyboards/e6v2/rules.mk @@ -66,3 +66,5 @@ 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 + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/eagle_viper/rules.mk b/keyboards/eagle_viper/rules.mk index ba2241fa8c..ad8bd5ca14 100644 --- a/keyboards/eagle_viper/rules.mk +++ b/keyboards/eagle_viper/rules.mk @@ -1 +1,3 @@ DEFAULT_FOLDER = eagle_viper/v2 + +LAYOUTS = 60_ansi \ No newline at end of file diff --git a/keyboards/eagle_viper/v2/keymaps/default/keymap.c b/keyboards/eagle_viper/v2/keymaps/default/keymap.c index 3fdd1cfdd3..2a6bda74f6 100644 --- a/keyboards/eagle_viper/v2/keymaps/default/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/default/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "eagle_viper.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ diff --git a/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c b/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c deleted file mode 100644 index a7f14b6782..0000000000 --- a/keyboards/eagle_viper/v2/keymaps/mechmerlin/keymap.c +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright 2017 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 . - */ -#include "eagle_viper.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* layer 0: qwerty */ - [0] = LAYOUT_eagle(\ - 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, - 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_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RGUI, KC_RCTL), - - [1] = LAYOUT_eagle(\ - 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, - RGB_TOG, RGB_MOD, RGB_VAI, KC_TRNS, RESET, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, KC_TRNS, - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_END, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_PGDN, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, TG(2), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - [2] = LAYOUT_eagle(\ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT), - }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -}; diff --git a/keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md b/keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md deleted file mode 100644 index 2e87846964..0000000000 --- a/keyboards/eagle_viper/v2/keymaps/mechmerlin/readme.md +++ /dev/null @@ -1,15 +0,0 @@ -MechMerlin's Duck Eagle V2 Layout -====================== - -This is the preferred 60% layout used by u/merlin36, host of the MechMerlin YouTube channel. - -![Duck Eagle V2 Layout](https://imgur.com/FRcsmJc.png) - -## Keymap Notes -- Highly influenced by the KBP V60 and WKL B.Face standard layouts -- Does not support any form of inswitch lighting as Merlin hates them. -- Arrow toggle switch is FN + Space -- Reset is FN + R - -### Build -To build this keymap, simply run `make eagle_viper/v2:mechmerlin` from the qmk_firmware directory. \ No newline at end of file diff --git a/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c b/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c index bd53fc3e76..d3be5e8005 100644 --- a/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c +++ b/keyboards/eagle_viper/v2/keymaps/profanum429/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "eagle_viper.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* layer 0: qwerty */ diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index 4834659ae1..f28e441b0a 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FNCAPS 1 diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c index 93b3adae27..10e00650d1 100644 --- a/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua_hhkb/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H #define _QWERTY 0 #define _FN 1 diff --git a/keyboards/kc60/keymaps/default/keymap.c b/keyboards/kc60/keymaps/default/keymap.c index 2736745f2e..045ab810f9 100644 --- a/keyboards/kc60/keymaps/default/keymap.c +++ b/keyboards/kc60/keymaps/default/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Basic QWERTY */ diff --git a/keyboards/kc60/keymaps/mechmerlin/keymap.c b/keyboards/kc60/keymaps/mechmerlin/keymap.c deleted file mode 100644 index d27493e165..0000000000 --- a/keyboards/kc60/keymaps/mechmerlin/keymap.c +++ /dev/null @@ -1,61 +0,0 @@ -// This is the 60% layout preferred by u/merlin36 the host of the MechMerlin YouTube channel. -// The layout is highly influenced by the WKL B.Face and KBP V60 standard layouts. -// Layout designed for use on KC60 with no inswitch or underglow lighting. - -#include "kc60.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = LAYOUT( /* Basic QWERTY */ - 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_LCTL, 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_NO, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(2), KC_RALT, KC_RGUI, KC_RCTL \ - ), - [1] = LAYOUT( /* HHKB-ish Base 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_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_DEL, \ - 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_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_NO, KC_RSFT, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_NO, MO(3), KC_RALT, KC_RGUI, KC_RCTL \ - ), - [2] = LAYOUT( /* FN Layer 1 - Basic QWERTY */ - 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_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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, TO(1), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, \ - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, KC_NO, KC_PGUP, \ - KC_TRNS, KC_TRNS, KC_TRNS, TG(4), KC_NO, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ - ), - [3] = LAYOUT( /* FN Layer 2 - HHKB-ish Base 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_INS, \ - KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_BSPC, \ - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, TO(0), KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RIGHT, KC_NO, KC_TRNS, \ - KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_NO, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - [4] = LAYOUT( /* Arrow Layers - Basic QWERTY ONLY */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_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_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_UP, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT \ - ), - [5] = LAYOUT( /* Blank Layer for later usage */ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ - KC_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_NO, 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_NO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS \ - ), - -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - return MACRO_NONE; -}; diff --git a/keyboards/kc60/keymaps/mechmerlin/readme.md b/keyboards/kc60/keymaps/mechmerlin/readme.md deleted file mode 100644 index 3a67ab17f9..0000000000 --- a/keyboards/kc60/keymaps/mechmerlin/readme.md +++ /dev/null @@ -1,20 +0,0 @@ -MechMerlin's KC60 Layout -====================== - -This is the 60% layout used by u/merlin36, host of the MechMerlin YouTube channel. -It has 5 layers, base QWERTY, base HHKB, FN 1, FN 2(HHKB), and an arrows only layer. - -Merlin's KC60 was acquired from Massdrop: https://www.massdrop.com/buy/kc60-mechanical-keyboard and is the Co-Star stabilizer version - -If you would like to program your KC60 using the manufacturer recommended approach, please follow the guide on keychatter: https://www.keychatter.com/2015/07/05/programming-the-kc60/. - -## Keymap Notes -- Highly influenced by the KBP V60 and WKL B.Face standard layouts -- Does not support any form of inswitch or underglow lighting as Merlin hates them. -- Arrow toggle switch is FN + Space -- Reset is FN + R -- HHKB keymap is approximate as keyboard is not built like HHKB - - -### Build -To build this keymap, simply run `make KEYMAP=mechmerlin`. diff --git a/keyboards/kc60/keymaps/sgoodwin/keymap.c b/keyboards/kc60/keymaps/sgoodwin/keymap.c index fc7d6c8440..25870d0a78 100644 --- a/keyboards/kc60/keymaps/sgoodwin/keymap.c +++ b/keyboards/kc60/keymaps/sgoodwin/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* diff --git a/keyboards/kc60/keymaps/stanleylai/keymap.c b/keyboards/kc60/keymaps/stanleylai/keymap.c index 7f7afdf75c..887b5da728 100644 --- a/keyboards/kc60/keymaps/stanleylai/keymap.c +++ b/keyboards/kc60/keymaps/stanleylai/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#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. diff --git a/keyboards/kc60/keymaps/wigguno/keymap.c b/keyboards/kc60/keymaps/wigguno/keymap.c index caff9b837c..a4a946f0df 100644 --- a/keyboards/kc60/keymaps/wigguno/keymap.c +++ b/keyboards/kc60/keymaps/wigguno/keymap.c @@ -2,7 +2,7 @@ // It also moves the reset key off the base layer, as in the default kc60 layout for this firmware. // I have swapped FN and RGUI as my rainbow keyset has them in the opposite order. -#include "kc60.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/kc60/keymaps/workman-dead/keymap.c b/keyboards/kc60/keymaps/workman-dead/keymap.c index abb9785c3a..b524b61cf7 100644 --- a/keyboards/kc60/keymaps/workman-dead/keymap.c +++ b/keyboards/kc60/keymaps/workman-dead/keymap.c @@ -1,4 +1,4 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H #define _WM 0 #define _QW 1 diff --git a/keyboards/kc60/keymaps/ws2812/keymap.c b/keyboards/kc60/keymaps/ws2812/keymap.c index 50b30ac23d..d445df3370 100644 --- a/keyboards/kc60/keymaps/ws2812/keymap.c +++ b/keyboards/kc60/keymaps/ws2812/keymap.c @@ -1,5 +1,5 @@ -#include "kc60.h" +#include QMK_KEYBOARD_H // Used for SHIFT_ESC #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) diff --git a/keyboards/v60_type_r/keymaps/default/keymap.c b/keyboards/v60_type_r/keymaps/default/keymap.c index 3ba77c658c..4f9b7f9b21 100644 --- a/keyboards/v60_type_r/keymaps/default/keymap.c +++ b/keyboards/v60_type_r/keymaps/default/keymap.c @@ -17,7 +17,7 @@ /* This is the default ANSI layout provided by the KBP V60 Type R * as depicted in their manual and on the stock keycaps. */ -#include "v60_type_r.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { diff --git a/keyboards/v60_type_r/keymaps/vimouse/keymap.c b/keyboards/v60_type_r/keymaps/vimouse/keymap.c index 1e3775ab6f..fba7111480 100644 --- a/keyboards/v60_type_r/keymaps/vimouse/keymap.c +++ b/keyboards/v60_type_r/keymaps/vimouse/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "v60_type_r.h" +#include QMK_KEYBOARD_H #define _____ KC_TRNS #define XXXXX KC_NO diff --git a/keyboards/v60_type_r/rules.mk b/keyboards/v60_type_r/rules.mk index b970f2722d..afd65cd1a4 100644 --- a/keyboards/v60_type_r/rules.mk +++ b/keyboards/v60_type_r/rules.mk @@ -67,3 +67,5 @@ 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 + +LAYOUTS = 60_ansi \ No newline at end of file -- cgit v1.2.3 From 3e0ec8b1719f3f98da3c4327908a5bb10a6b0c9b Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Sun, 20 May 2018 10:25:34 -0700 Subject: Kira 75 QMK Support (#3003) * preliminary check in of Kira75 * Layout done * make an appropriate keymap and fix layout commas * formatting changes and housekeeping * add info.json contents for QMK Configurator support * add RGB underglow support * add support for caps and num lock leds --- keyboards/kira75/config.h | 197 +++++++++++++++++++++++++++++ keyboards/kira75/info.json | 12 ++ keyboards/kira75/keymaps/default/config.h | 24 ++++ keyboards/kira75/keymaps/default/keymap.c | 63 +++++++++ keyboards/kira75/keymaps/default/readme.md | 1 + keyboards/kira75/kira75.c | 43 +++++++ keyboards/kira75/kira75.h | 50 ++++++++ keyboards/kira75/readme.md | 15 +++ keyboards/kira75/rules.mk | 68 ++++++++++ 9 files changed, 473 insertions(+) create mode 100644 keyboards/kira75/config.h create mode 100644 keyboards/kira75/info.json create mode 100644 keyboards/kira75/keymaps/default/config.h create mode 100644 keyboards/kira75/keymaps/default/keymap.c create mode 100644 keyboards/kira75/keymaps/default/readme.md create mode 100644 keyboards/kira75/kira75.c create mode 100644 keyboards/kira75/kira75.h create mode 100644 keyboards/kira75/readme.md create mode 100644 keyboards/kira75/rules.mk (limited to 'keyboards') diff --git a/keyboards/kira75/config.h b/keyboards/kira75/config.h new file mode 100644 index 0000000000..e75ac342c4 --- /dev/null +++ b/keyboards/kira75/config.h @@ -0,0 +1,197 @@ +/* +Copyright 2018 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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x0000 +#define DEVICE_VER 0x0001 +#define MANUFACTURER thesiscamper +#define PRODUCT kira75 +#define DESCRIPTION Custom 75% keyboard + +/* key matrix size */ +#define MATRIX_ROWS 6 +#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, D2, D3, D5, D4 } +#define MATRIX_COL_PINS { F6, F7, C7, C6, B6, B5, B4, F5, F4, F1, F0, E6, B3, B2, B1, B0 } +#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 E2 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 18 +#define RGBLIGHT_HUE_STEP 8 +#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 + +/* 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 */ +#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 +//#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 + +#endif diff --git a/keyboards/kira75/info.json b/keyboards/kira75/info.json new file mode 100644 index 0000000000..9111053ae9 --- /dev/null +++ b/keyboards/kira75/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Kira 75", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"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":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":6.25}, {"label":"Alt", "x":10, "y":5, "w":1.5}, {"label":"Ctrl", "x":11.5, "y":5, "w":1.5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + } + } +} \ No newline at end of file diff --git a/keyboards/kira75/keymaps/default/config.h b/keyboards/kira75/keymaps/default/config.h new file mode 100644 index 0000000000..2c852d1819 --- /dev/null +++ b/keyboards/kira75/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/kira75/keymaps/default/keymap.c b/keyboards/kira75/keymaps/default/keymap.c new file mode 100644 index 0000000000..cba4ca9927 --- /dev/null +++ b/keyboards/kira75/keymaps/default/keymap.c @@ -0,0 +1,63 @@ +/* Copyright 2018 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 . + */ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT( /* Base */ + 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_INS, \ + KC_TILD, 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_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, MO(1), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT \ +), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +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; +}; + + +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/kira75/keymaps/default/readme.md b/keyboards/kira75/keymaps/default/readme.md new file mode 100644 index 0000000000..fcf6f71110 --- /dev/null +++ b/keyboards/kira75/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for kira75 diff --git a/keyboards/kira75/kira75.c b/keyboards/kira75/kira75.c new file mode 100644 index 0000000000..4b53290bef --- /dev/null +++ b/keyboards/kira75/kira75.c @@ -0,0 +1,43 @@ +/* Copyright 2018 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 . + */ +#include "kira75.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/kira75/kira75.h b/keyboards/kira75/kira75.h new file mode 100644 index 0000000000..8c564f2082 --- /dev/null +++ b/keyboards/kira75/kira75.h @@ -0,0 +1,50 @@ +/* Copyright 2018 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 . + */ +#ifndef KIRA75_H +#define KIRA75_H + +#include "quantum.h" + + +// Functions for setting LEDs on toggle keys +inline void caps_led_on(void) { DDRD |= (1<<7); PORTD &= ~(1<<7); } +inline void caps_led_off(void) { DDRD &= ~(1<<7); PORTD &= ~(1<<7); } + +inline void num_led_on(void) { DDRD |= (1<<6); PORTD &= ~(1<<6); } +inline void num_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } + +// 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, 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, K1F, \ + K20, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3F, \ + K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, K4D, K4E, K4F, \ + K50, K51, K53, K56, K5A, K5B, K5D, K5E, K5F \ +) \ +{ \ + { 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, KC_NO, K1F }, \ + { K20, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E, K2F }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, KC_NO, K3F }, \ + { KC_NO, K41, K42, K43, K44, K45, K46, K47, K48, K49, K4A, K4B, KC_NO, K4D, K4E, K4F }, \ + { K50, K51, KC_NO, K53, KC_NO, KC_NO, K56, KC_NO, KC_NO, KC_NO, K5A, K5B, KC_NO, K5D, K5E, K5F } \ +} + +#endif diff --git a/keyboards/kira75/readme.md b/keyboards/kira75/readme.md new file mode 100644 index 0000000000..f2c0f3228b --- /dev/null +++ b/keyboards/kira75/readme.md @@ -0,0 +1,15 @@ +# Kira 75 + +![kira75](imgur.com image replace me!) + +75% keyboard designed by thesiscamper + +Keyboard Maintainer: [MechMerlin](https://github.com/mechmerlin) +Hardware Supported: Kira 75 +Hardware Availability: Group Buy + +Make example for this keyboard (after setting up your build environment): + + make kira75: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/kira75/rules.mk b/keyboards/kira75/rules.mk new file mode 100644 index 0000000000..45eb6ee376 --- /dev/null +++ b/keyboards/kira75/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 = 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 -- cgit v1.2.3 From 068b80383f6a796983c25b223f6f3faa4216fa7b Mon Sep 17 00:00:00 2001 From: yiancar Date: Sun, 20 May 2018 18:28:05 +0100 Subject: HS60 ANSI keymap (#3010) * Added Modular keyboards L,R and NUM Created code modules for the 3 modules of the modular keyboard. Original idea by MechboardsUK. Uses i2c implementation similar to lets split * Remove modular from master This is to fix incorrect branching * HS60 ANSI update * HS60 ANSI update --- keyboards/hs60/hs60.c | 160 ++++++++++++++++++++++++++++++- keyboards/hs60/hs60.h | 9 +- keyboards/hs60/keymaps/ANSI/config.h | 26 +++++ keyboards/hs60/keymaps/ANSI/keymap.c | 46 +++++++++ keyboards/hs60/keymaps/ANSI/readme.md | 6 ++ keyboards/hs60/keymaps/default/keymap.c | 2 +- keyboards/hs60/keymaps/default/readme.md | 2 +- 7 files changed, 243 insertions(+), 8 deletions(-) create mode 100644 keyboards/hs60/keymaps/ANSI/config.h create mode 100644 keyboards/hs60/keymaps/ANSI/keymap.c create mode 100644 keyboards/hs60/keymaps/ANSI/readme.md (limited to 'keyboards') diff --git a/keyboards/hs60/hs60.c b/keyboards/hs60/hs60.c index 74af9ad143..169f84b020 100644 --- a/keyboards/hs60/hs60.c +++ b/keyboards/hs60/hs60.c @@ -90,6 +90,162 @@ void raw_hid_receive( uint8_t *data, uint8_t length ) #endif*/ +#ifdef HS60_ANSI + +const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { +/* Refer to IS31 manual for these locations + * driver + * | R location + * | | G location + * | | | B location + * | | | | */ + {0, C1_1, C3_2, C4_2}, //A1 + {0, C1_2, C2_2, C4_3}, //A2 + {0, C1_3, C2_3, C3_3}, //A3 + {0, C1_4, C2_4, C3_4}, //A4 + {0, C1_5, C2_5, C3_5}, //A5 + {0, C1_6, C2_6, C3_6}, //A6 + {0, C1_7, C2_7, C3_7}, //A7 + {0, C1_8, C2_8, C3_8}, //A8 + {0, C9_1, C8_1, C7_1}, //A9 + {0, C9_2, C8_2, C7_2}, //A10 + {0, C9_3, C8_3, C7_3}, //A11 + {0, C9_4, C8_4, C7_4}, //A12 + {0, C9_5, C8_5, C7_5}, //A13 + {0, C9_6, C8_6, C7_6}, //A14 + {0, C9_7, C8_7, C6_6}, //A15 + {0, C9_8, C7_7, C6_7}, //A16 + + {0, C1_9, C3_10, C4_10}, //B1 + {0, C1_10, C2_10, C4_11}, //B2 + {0, C1_11, C2_11, C3_11}, //B3 + {0, C1_12, C2_12, C3_12}, //B4 + {0, C1_13, C2_13, C3_13}, //B5 + {0, C1_14, C2_14, C3_14}, //B6 + {0, C1_15, C2_15, C3_15}, //B7 + {0, C1_16, C2_16, C3_16}, //B8 + {0, C9_9, C8_9, C7_9}, //B9 + {0, C9_10, C8_10, C7_10}, //B10 + {0, C9_11, C8_11, C7_11}, //B11 + {0, C9_12, C8_12, C7_12}, //B12 + {0, C9_13, C8_13, C7_13}, //B13 + {0, C9_14, C8_14, C7_14}, //B14 + + {1, C1_1, C3_2, C4_2}, //C1 + {1, C1_2, C2_2, C4_3}, //C2 + {1, C1_3, C2_3, C3_3}, //C3 + {1, C1_4, C2_4, C3_4}, //C4 + {1, C1_5, C2_5, C3_5}, //C5 + {1, C1_6, C2_6, C3_6}, //C6 + {1, C1_7, C2_7, C3_7}, //C7 + {1, C1_8, C2_8, C3_8}, //C8 + {1, C9_1, C8_1, C7_1}, //C9 + {1, C9_2, C8_2, C7_2}, //C10 + {1, C9_3, C8_3, C7_3}, //C11 + {1, C9_4, C8_4, C7_4}, //C12 + {1, C9_5, C8_5, C7_5}, //C13 + {1, C9_6, C8_6, C7_6}, //C14 + {1, C9_7, C8_7, C6_6}, //C15 + {1, C9_8, C7_7, C6_7}, //C16 + + {1, C1_9, C3_10, C4_10}, //D1 + //D2 + {1, C1_11, C2_11, C3_11}, //D3 + {1, C1_12, C2_12, C3_12}, //D4 + {1, C1_13, C2_13, C3_13}, //D5 + {1, C1_14, C2_14, C3_14}, //D6 + {1, C1_15, C2_15, C3_15}, //D7 + {1, C1_16, C2_16, C3_16}, //D8 + {1, C9_9, C8_9, C7_9}, //D9 + {1, C9_10, C8_10, C7_10}, //D10 + {1, C9_11, C8_11, C7_11}, //D11 + {1, C9_12, C8_12, C7_12}, //D12 + {1, C9_13, C8_13, C7_13}, //D13 + {1, C9_14, C8_14, C7_14}, //D14 + {1, C9_15, C8_15, C6_14}, //D15 + {1, C9_16, C7_15, C6_15} //D16 +}; + +const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { +// +// C7, C6, C5, C4, C3, C2, C1, A7, A6, A5, A4, A3, A2, A1, +// C8, C9, C10, C11, C12, C13, C14, A8, A9, A10, A11, A12, A13, A15, +// D4, D5, D6, D7, D8, C16, C15, B5, B6, B7, B8, A16, ---, A14, +// D3, ---, D1, D9, D10, D11, D12, B4, B3, B2, B1, B9, ---, B10, +// D16, D15, D14, ---, ---, ---, D13, ---, ---, ---, B14, B13, B12, B11 +/* {row | col << 4} + * | {x=0..224, y=0..64} + * | | modifier + * | | | */ + {{0|(13<<4)}, {224, 0}, 1}, //A1-A16 + {{0|(12<<4)}, {204, 0}, 0}, + {{0|(11<<4)}, {187, 0}, 0}, + {{0|(10<<4)}, {170, 0}, 0}, + {{0|(9<<4)}, {153, 0}, 0}, + {{0|(8<<4)}, {136, 0}, 0}, + {{0|(7<<4)}, {119, 0}, 0}, + {{1|(7<<4)}, {119, 16}, 0}, + {{1|(8<<4)}, {136, 16}, 0}, + {{1|(9<<4)}, {153, 16}, 0}, + {{1|(10<<4)}, {170, 16}, 0}, + {{1|(11<<4)}, {187, 16}, 0}, + {{1|(12<<4)}, {204, 16}, 0}, + {{2|(13<<4)}, {224, 32}, 1}, + {{2|(12<<4)}, {224, 16}, 0}, + {{2|(11<<4)}, {197, 32}, 0}, + + {{3|(10<<4)}, {170, 48}, 0}, //B1-B14 + {{3|(9<<4)}, {153, 48}, 0}, + {{3|(8<<4)}, {136, 48}, 0}, + {{3|(7<<4)}, {119, 48}, 0}, + {{2|(7<<4)}, {119, 32}, 0}, + {{2|(8<<4)}, {136, 32}, 0}, + {{2|(9<<4)}, {153, 32}, 0}, + {{2|(10<<4)}, {170, 32}, 0}, + {{3|(11<<4)}, {187, 48}, 0}, + {{3|(13<<4)}, {214, 48}, 1}, + {{4|(13<<4)}, {224, 64}, 1}, + {{4|(12<<4)}, {204, 64}, 1}, + {{4|(11<<4)}, {187, 64}, 1}, + {{4|(10<<4)}, {170, 64}, 1}, + + {{0|(6<<4)}, {102, 0}, 0}, //C1-C16 + {{0|(5<<4)}, { 85, 0}, 0}, + {{0|(4<<4)}, { 68, 0}, 0}, + {{0|(3<<4)}, { 51, 0}, 0}, + {{0|(2<<4)}, { 34, 0}, 0}, + {{0|(1<<4)}, { 17, 0}, 0}, + {{0|(0<<4)}, { 0, 0}, 1}, + {{1|(0<<4)}, { 0, 16}, 1}, + {{1|(1<<4)}, { 17, 16}, 0}, + {{1|(2<<4)}, { 34, 16}, 0}, + {{1|(3<<4)}, { 51, 16}, 0}, + {{1|(4<<4)}, { 68, 16}, 0}, + {{1|(5<<4)}, { 85, 16}, 0}, + {{1|(6<<4)}, {102, 16}, 0}, + {{2|(6<<4)}, {102, 32}, 0}, + {{2|(5<<4)}, { 85, 32}, 0}, + + {{3|(2<<4)}, { 32, 48}, 0}, //D1-D16 + //D2 + {{3|(0<<4)}, { 10, 48}, 1}, + {{2|(0<<4)}, { 0, 32}, 1}, + {{2|(1<<4)}, { 17, 32}, 0}, + {{2|(2<<4)}, { 34, 32}, 0}, + {{2|(3<<4)}, { 51, 32}, 0}, + {{2|(4<<4)}, { 68, 32}, 0}, + {{3|(3<<4)}, { 51, 48}, 0}, + {{3|(4<<4)}, { 68, 48}, 0}, + {{3|(5<<4)}, { 85, 48}, 0}, + {{3|(6<<4)}, {102, 48}, 0}, + {{4|(3<<4)}, {102, 64}, 0}, + {{4|(2<<4)}, { 34, 68}, 1}, + {{4|(1<<4)}, { 17, 68}, 1}, + {{4|(0<<4)}, { 0, 68}, 1} +}; + +#else + const is31_led g_is31_leds[DRIVER_LED_TOTAL] = { /* Refer to IS31 manual for these locations * driver @@ -242,6 +398,8 @@ const rgb_led g_rgb_leds[DRIVER_LED_TOTAL] = { {{4|(0<<4)}, { 0, 68}, 1} }; +#endif + void bootmagic_lite(void) { // The lite version of TMK's bootmagic made by Wilba. @@ -335,4 +493,4 @@ void suspend_power_down_kb(void) void suspend_wakeup_init_kb(void) { rgb_matrix_set_suspend_state(false); -} +} \ No newline at end of file diff --git a/keyboards/hs60/hs60.h b/keyboards/hs60/hs60.h index 1796aa65e9..4de781e5fa 100644 --- a/keyboards/hs60/hs60.h +++ b/keyboards/hs60/hs60.h @@ -38,16 +38,15 @@ #define LAYOUT_60_ansi( \ 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, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K2C, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ K40, K41, K42, K46, K4A, K4B, K4C, 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 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, XXX }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D }, \ { K30, XXX, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, XXX, K3D }, \ { K40, K41, K42, XXX, XXX, XXX, K46, XXX, XXX, XXX, K4A, K4B, K4C, K4D } \ } - -#endif +#endif \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ANSI/config.h b/keyboards/hs60/keymaps/ANSI/config.h new file mode 100644 index 0000000000..bab67fd558 --- /dev/null +++ b/keyboards/hs60/keymaps/ANSI/config.h @@ -0,0 +1,26 @@ +/* +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 . +*/ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Include overwrites for specific keymap */ + +#define HS60_ANSI + +#endif \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ANSI/keymap.c b/keyboards/hs60/keymaps/ANSI/keymap.c new file mode 100644 index 0000000000..923af9e2ce --- /dev/null +++ b/keyboards/hs60/keymaps/ANSI/keymap.c @@ -0,0 +1,46 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi( /* 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_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, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_ansi( /* FN */ + 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, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +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; +} \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ANSI/readme.md b/keyboards/hs60/keymaps/ANSI/readme.md new file mode 100644 index 0000000000..fa811319d3 --- /dev/null +++ b/keyboards/hs60/keymaps/ANSI/readme.md @@ -0,0 +1,6 @@ +The default keymap for ANSI HS60 +================================ + +![Layout image](https://imgur.com/CSyPw0J.png) + +Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/keymaps/default/keymap.c b/keyboards/hs60/keymaps/default/keymap.c index 953172c739..2a5e823618 100644 --- a/keyboards/hs60/keymaps/default/keymap.c +++ b/keyboards/hs60/keymaps/default/keymap.c @@ -43,4 +43,4 @@ void matrix_scan_user(void) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { return true; -} +} \ No newline at end of file diff --git a/keyboards/hs60/keymaps/default/readme.md b/keyboards/hs60/keymaps/default/readme.md index cf1ac7a969..9125cb349e 100644 --- a/keyboards/hs60/keymaps/default/readme.md +++ b/keyboards/hs60/keymaps/default/readme.md @@ -1,6 +1,6 @@ The default keymap for ISO HS60 =============================== -![Layout image](https://i.imgur.com/Kua44z2.png) +![Layout image](https://imgur.com/HXj4tYL.png) Default layer is normal ISO and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file -- cgit v1.2.3 From f698bbcd65426cf7144b886f7fc7ec29d6d7c41f Mon Sep 17 00:00:00 2001 From: Barry Huang Date: Mon, 21 May 2018 01:28:33 +0800 Subject: Capslock indicator add (#3007) * Capslock indicator add * edit * name correction * led_set_user(usb_led); delete --- keyboards/pk60/pk60.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'keyboards') diff --git a/keyboards/pk60/pk60.c b/keyboards/pk60/pk60.c index 909230def2..9cf2e1578d 100644 --- a/keyboards/pk60/pk60.c +++ b/keyboards/pk60/pk60.c @@ -1 +1,12 @@ #include "pk60.h" + +void led_set_kb(uint8_t usb_led) { + + if (usb_led & (1< Date: Tue, 15 May 2018 20:33:49 -0700 Subject: Fix Orthodox height --- keyboards/orthodox/rev1/info.json | 10 +++++----- keyboards/orthodox/rev3/info.json | 10 +++++----- keyboards/orthodox/rev3_teensy/info.json | 10 +++++----- 3 files changed, 15 insertions(+), 15 deletions(-) (limited to 'keyboards') diff --git a/keyboards/orthodox/rev1/info.json b/keyboards/orthodox/rev1/info.json index b548404236..0a8442cf4b 100644 --- a/keyboards/orthodox/rev1/info.json +++ b/keyboards/orthodox/rev1/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "Monkeebs Orthodox Rev.1", - "maintainer": "qmk", + "maintainer": "drashna", "width": 17, "height": 17.24, "layouts": { @@ -9,11 +9,11 @@ {"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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3}, - {"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, + {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, - {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} ] } } diff --git a/keyboards/orthodox/rev3/info.json b/keyboards/orthodox/rev3/info.json index 476f10c794..289169d72b 100644 --- a/keyboards/orthodox/rev3/info.json +++ b/keyboards/orthodox/rev3/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "Monkeebs Orthodox Rev.3", - "maintainer": "qmk", + "maintainer": "drashna", "width": 17, "height": 17.24, "layouts": { @@ -9,11 +9,11 @@ {"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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3}, - {"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, + {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, - {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} ] } } diff --git a/keyboards/orthodox/rev3_teensy/info.json b/keyboards/orthodox/rev3_teensy/info.json index cf533ada01..d578a41340 100644 --- a/keyboards/orthodox/rev3_teensy/info.json +++ b/keyboards/orthodox/rev3_teensy/info.json @@ -1,6 +1,6 @@ { "keyboard_name": "Monkeebs Orthodox Rev.3 (Teensy)", - "maintainer": "qmk", + "maintainer": "drashna", "width": 17, "height": 17.24, "layouts": { @@ -9,11 +9,11 @@ {"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":13, "y":0}, {"x":14, "y":0}, {"x":15, "y":0}, {"x":16, "y":0}, {"x":17, "y":0}, {"x":18, "y":0}, - {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":3}, {"x":8, "y":3}, - {"x":10, "y":3}, {"x":11, "y":3}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, + {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":7, "y":2.75, "h":1.25}, {"x":8, "y":2.75, "h":1.25}, + {"x":10, "y":2.75, "h":1.25}, {"x":11, "y":2.75, "h":1.25}, {"x":13, "y":1}, {"x":14, "y":1}, {"x":15, "y":1}, {"x":16, "y":1}, {"x":17, "y":1}, {"x":18, "y":1}, - {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":4}, {"x":7, "y":4}, {"x":8, "y":4}, - {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":4}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} + {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":3.75, "h":1.25}, {"x":7, "y":4}, {"x":8, "y":4}, + {"x":10, "y":4}, {"x":11, "y":4}, {"x":12, "y":3.75, "h":1.25}, {"x":13, "y":2}, {"x":14, "y":2}, {"x":15, "y":2}, {"x":16, "y":2}, {"x":17, "y":2}, {"x":18, "y":2} ] } } -- cgit v1.2.3 From 4dc89d974b5faa6c39281f07f901877541ca8b12 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 20 May 2018 21:34:18 -0700 Subject: Fix Ergodox EZ Info.json files (#2979) * Fix Ergodox EZ Info.json files * Ugh, column stagger! * Whoops, added offset to wrong axis * Add changes to Ergodone and Ergodox Infinity --- keyboards/ergodone/info.json | 53 +++++++++++++++++--- keyboards/ergodox_ez/info.json | 94 +++++++++++++++++++++++++++++++++--- keyboards/ergodox_infinity/info.json | 53 +++++++++++++++++--- 3 files changed, 182 insertions(+), 18 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodone/info.json b/keyboards/ergodone/info.json index 64ab0fe66e..31e756466c 100644 --- a/keyboards/ergodone/info.json +++ b/keyboards/ergodone/info.json @@ -5,11 +5,52 @@ "height": 9.375, "layouts": { - "LAYOUT_ergodox": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "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":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, "w":1.5}, {"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, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] - }, - "LAYOUT_ergodox_pretty": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "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":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, "w":1.5}, {"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, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] - } + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] } + } } diff --git a/keyboards/ergodox_ez/info.json b/keyboards/ergodox_ez/info.json index fc39c78485..7470ab9068 100644 --- a/keyboards/ergodox_ez/info.json +++ b/keyboards/ergodox_ez/info.json @@ -7,16 +7,98 @@ "layouts": { "LAYOUT_ergodox": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "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":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, "w":1.5}, {"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, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] }, "LAYOUT_ergodox_pretty": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "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":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, "w":1.5}, {"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, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}] + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] }, "LAYOUT_ergodox_80": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "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":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, "w":1.5}, {"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, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}] - }, + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + }, "LAYOUT_ergodox_pretty_80": { - "layout": [{"x":0, "y":0, "w":1.5}, {"x":1.5, "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":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, "w":1.5}, {"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, "h":1.5}, {"x":9.5, "y":1, "h":1.5}, {"x":10.5, "y":1}, {"x":11.5, "y":1}, {"x":12.5, "y":1}, {"x":13.5, "y":1}, {"x":14.5, "y":1}, {"x":15.5, "y":1, "w":1.5}, {"x":0, "y":2, "w":1.5}, {"x":1.5, "y":2}, {"x":2.5, "y":2}, {"x":3.5, "y":2}, {"x":4.5, "y":2}, {"x":5.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":14.5, "y":2}, {"x":15.5, "y":2, "w":1.5}, {"x":6.5, "y":2.5, "h":1.5}, {"x":9.5, "y":2.5, "h":1.5}, {"x":0, "y":3, "w":1.5}, {"x":1.5, "y":3}, {"x":2.5, "y":3}, {"x":3.5, "y":3}, {"x":4.5, "y":3}, {"x":5.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":14.5, "y":3}, {"x":15.5, "y":3, "w":1.5}, {"x":0.5, "y":4}, {"x":1.5, "y":4}, {"x":2.5, "y":4}, {"x":3.5, "y":4}, {"x":4.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7}] - } + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} + ] + } } } diff --git a/keyboards/ergodox_infinity/info.json b/keyboards/ergodox_infinity/info.json index 1022a740e2..a24c6b0a19 100644 --- a/keyboards/ergodox_infinity/info.json +++ b/keyboards/ergodox_infinity/info.json @@ -3,11 +3,52 @@ "width": 19.5, "height": 9.375, "layouts": { - "LAYOUT_ergodox": { - "layout": [{"label":"#", "x":3.5, "y":0}, {"label":"*", "x":15, "y":0}, {"label":"@", "x":2.5, "y":0.125}, {"label":"$", "x":4.5, "y":0.125}, {"label":"&", "x":14, "y":0.125}, {"label":"(", "x":16, "y":0.125}, {"label":"%", "x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":12, "y":0.25}, {"label":"^", "x":13, "y":0.25}, {"x":0, "y":0.375, "w":1.5}, {"label":"!", "x":1.5, "y":0.375}, {"label":")", "x":17, "y":0.375}, {"x":18, "y":0.375, "w":1.5}, {"label":"E", "x":3.5, "y":1}, {"label":"I", "x":15, "y":1}, {"label":"W", "x":2.5, "y":1.125}, {"label":"R", "x":4.5, "y":1.125}, {"label":"U", "x":14, "y":1.125}, {"label":"O", "x":16, "y":1.125}, {"label":"T", "x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, {"x":12, "y":1.25, "h":1.5}, {"label":"Y", "x":13, "y":1.25}, {"x":0, "y":1.375, "w":1.5}, {"label":"Q", "x":1.5, "y":1.375}, {"label":"P", "x":17, "y":1.375}, {"x":18, "y":1.375, "w":1.5}, {"label":"D", "x":3.5, "y":2}, {"label":"K", "x":15, "y":2}, {"label":"S", "x":2.5, "y":2.125}, {"label":"F", "x":4.5, "y":2.125}, {"label":"J", "x":14, "y":2.125}, {"label":"L", "x":16, "y":2.125}, {"label":"G", "x":5.5, "y":2.25}, {"label":"H", "x":13, "y":2.25}, {"x":0, "y":2.375, "w":1.5}, {"label":"A", "x":1.5, "y":2.375}, {"label":":", "x":17, "y":2.375}, {"x":18, "y":2.375, "w":1.5}, {"x":6.5, "y":2.75, "h":1.5}, {"x":12, "y":2.75, "h":1.5}, {"label":"C", "x":3.5, "y":3}, {"label":"<", "x":15, "y":3}, {"label":"X", "x":2.5, "y":3.125}, {"label":"V", "x":4.5, "y":3.125}, {"label":"M", "x":14, "y":3.125}, {"label":">", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375, "h":2}, {"x":1, "y":5.375, "h":2}, {"x":2, "y":5.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375, "h":2}, {"x":-1.0, "y":7.375, "h":2}, {"x":-3.0, "y":8.375}] - }, - "LAYOUT_ergodox_pretty": { - "layout": [{"label":"#", "x":3.5, "y":0}, {"label":"*", "x":15, "y":0}, {"label":"@", "x":2.5, "y":0.125}, {"label":"$", "x":4.5, "y":0.125}, {"label":"&", "x":14, "y":0.125}, {"label":"(", "x":16, "y":0.125}, {"label":"%", "x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":12, "y":0.25}, {"label":"^", "x":13, "y":0.25}, {"x":0, "y":0.375, "w":1.5}, {"label":"!", "x":1.5, "y":0.375}, {"label":")", "x":17, "y":0.375}, {"x":18, "y":0.375, "w":1.5}, {"label":"E", "x":3.5, "y":1}, {"label":"I", "x":15, "y":1}, {"label":"W", "x":2.5, "y":1.125}, {"label":"R", "x":4.5, "y":1.125}, {"label":"U", "x":14, "y":1.125}, {"label":"O", "x":16, "y":1.125}, {"label":"T", "x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, {"x":12, "y":1.25, "h":1.5}, {"label":"Y", "x":13, "y":1.25}, {"x":0, "y":1.375, "w":1.5}, {"label":"Q", "x":1.5, "y":1.375}, {"label":"P", "x":17, "y":1.375}, {"x":18, "y":1.375, "w":1.5}, {"label":"D", "x":3.5, "y":2}, {"label":"K", "x":15, "y":2}, {"label":"S", "x":2.5, "y":2.125}, {"label":"F", "x":4.5, "y":2.125}, {"label":"J", "x":14, "y":2.125}, {"label":"L", "x":16, "y":2.125}, {"label":"G", "x":5.5, "y":2.25}, {"label":"H", "x":13, "y":2.25}, {"x":0, "y":2.375, "w":1.5}, {"label":"A", "x":1.5, "y":2.375}, {"label":":", "x":17, "y":2.375}, {"x":18, "y":2.375, "w":1.5}, {"x":6.5, "y":2.75, "h":1.5}, {"x":12, "y":2.75, "h":1.5}, {"label":"C", "x":3.5, "y":3}, {"label":"<", "x":15, "y":3}, {"label":"X", "x":2.5, "y":3.125}, {"label":"V", "x":4.5, "y":3.125}, {"label":"M", "x":14, "y":3.125}, {"label":">", "x":16, "y":3.125}, {"label":"B", "x":5.5, "y":3.25}, {"label":"N", "x":13, "y":3.25}, {"x":0, "y":3.375, "w":1.5}, {"label":"Z", "x":1.5, "y":3.375}, {"label":"?", "x":17, "y":3.375}, {"x":18, "y":3.375, "w":1.5}, {"x":3.5, "y":4}, {"x":15, "y":4}, {"x":2.5, "y":4.125}, {"x":4.5, "y":4.125}, {"x":14, "y":4.125}, {"x":16, "y":4.125}, {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":17, "y":4.375}, {"x":18, "y":4.375}, {"x":1, "y":4.375}, {"x":2, "y":4.375}, {"x":0, "y":5.375, "h":2}, {"x":1, "y":5.375, "h":2}, {"x":2, "y":5.375}, {"x":2, "y":6.375}, {"x":-3.0, "y":6.375}, {"x":-2, "y":6.375}, {"x":-3.0, "y":7.375}, {"x":-2, "y":7.375, "h":2}, {"x":-1.0, "y":7.375, "h":2}, {"x":-3.0, "y":8.375}] - } + "LAYOUT_ergodox": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + } } } -- cgit v1.2.3 From 9483a88d75fc6fd42c1ad138cf39e66e1874dcb5 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sun, 20 May 2018 21:45:38 -0700 Subject: Add 80 key layout to Ergodone, as it appears to support it (#2984) * Add 80 key layout to Ergodone * Add layouts * Missed a comma ..... --- keyboards/ergodone/ergodone.h | 53 ++++++++++++++++++++++++++++++ keyboards/ergodone/info.json | 75 ++++++++++++++++++++++++++++++++++++------- 2 files changed, 116 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodone/ergodone.h b/keyboards/ergodone/ergodone.h index c63afe838b..b04826e69c 100644 --- a/keyboards/ergodone/ergodone.h +++ b/keyboards/ergodone/ergodone.h @@ -99,6 +99,38 @@ inline void ergodox_led_all_set(uint8_t n) {} { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ } +#define LAYOUT_ergodox_80( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k45,k46,k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59,k47,k48, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { 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, KC_NO, KC_NO, k28, k29, k2A, k2B, k2C, k2D }, \ + { k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D }, \ + { k40, k41, k42, k43, k44, k45, k45, k47, k48, k49, k4A, k4B, k4C, k4D }, \ + { KC_NO, k51, k52, k53, k54, k55, k56, k57, k58, k59, k5A, k5B, k5C, KC_NO } \ + } + #define KEYMAP_PRETTY( \ /* left hand, spatial positions */ /* right hand, spatial positions */ \ L00,L01,L02,L03,L04,L05,L06, R00,R01,R02,R03,R04,R05,R06, \ @@ -120,6 +152,27 @@ inline void ergodox_led_all_set(uint8_t n) {} { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ } +#define LAYOUT_ergodox_pretty_80( \ + /* left hand, spatial positions */ /* right hand, spatial positions */ \ + 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, 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, R42,R43,R44,R45,R46, \ + L55,L56, R50,R51, \ + L45,L46,L54, R52,R40,R41, \ + L53,L52,L51, R55,R54,R53 ) \ + \ + /* matrix positions */ \ + { \ + { 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,KC_NO, KC_NO,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 }, \ + { KC_NO,L51,L52,L53,L54,L55,L56, R50,R51,R52,R53,R54,R55,KC_NO } \ + } + #define LAYOUT_ergodox KEYMAP #define LAYOUT_ergodox_pretty KEYMAP_PRETTY diff --git a/keyboards/ergodone/info.json b/keyboards/ergodone/info.json index 31e756466c..81c7e2afaa 100644 --- a/keyboards/ergodone/info.json +++ b/keyboards/ergodone/info.json @@ -6,6 +6,55 @@ "layouts": { "LAYOUT_ergodox": { + + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + + {"x":6, "y":5}, {"x":7, "y":5}, + {"x":7, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + + {"x":9, "y":5}, {"x":10, "y":5}, + {"x":9, "y":6}, + {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_pretty": { + "layout": [ + {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + + {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + + {"x":0, "y":2.375, "w":1.5}, {"x":1.5, "y":2.375}, {"x":2.5, "y":2.125}, {"x":3.5, "y":2}, {"x":4.5, "y":2.125}, {"x":5.5, "y":2.25}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + + {"x":0, "y":3.375, "w":1.5}, {"x":1.5, "y":3.375}, {"x":2.5, "y":3.125}, {"x":3.5, "y":3}, {"x":4.5, "y":3.125}, {"x":5.5, "y":3.25}, {"x":6.5, "y":2.75, "h":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + + {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, + {"x":7, "y":6}, {"x":9, "y":6}, + {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + ] + }, + "LAYOUT_ergodox_80": { + "layout": [ {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":0, "y":1.375, "w":1.5}, {"x":1.5, "y":1.375}, {"x":2.5, "y":1.125}, {"x":3.5, "y":1}, {"x":4.5, "y":1.125}, {"x":5.5, "y":1.25}, {"x":6.5, "y":1.25, "h":1.5}, @@ -14,23 +63,25 @@ {"x":0.5, "y":4.375}, {"x":1.5, "y":4.375}, {"x":2.5, "y":4.125}, {"x":3.5, "y":4}, {"x":4.5, "y":4.125}, {"x":6, "y":5}, {"x":7, "y":5}, - {"x":7, "y":6}, - {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, - {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, - {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, - {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, - {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, - {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, + + {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, + {"x":9.5, "y":1.25, "h":1.5}, {"x":10.5, "y":1.25}, {"x":11.5, "y":1.125}, {"x":12.5, "y":1}, {"x":13.5, "y":1.125}, {"x":14.5, "y":1.375}, {"x":15.5, "y":1.375, "w":1.5}, + {"x":10.5, "y":2.25}, {"x":11.5, "y":2.125}, {"x":12.5, "y":2}, {"x":13.5, "y":2.125}, {"x":14.5, "y":2.375}, {"x":15.5, "y":2.375, "w":1.5}, + {"x":9.5, "y":2.75, "h":1.5}, {"x":10.5, "y":3.25}, {"x":11.5, "y":3.125}, {"x":12.5, "y":3}, {"x":13.5, "y":3.125}, {"x":14.5, "y":3.375}, {"x":15.5, "y":3.375, "w":1.5}, + {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, {"x":9, "y":5}, {"x":10, "y":5}, - {"x":9, "y":6}, - {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} ] }, - "LAYOUT_ergodox_pretty": { + "LAYOUT_ergodox_pretty_80": { + "layout": [ {"x":0, "y":0.375, "w":1.5}, {"x":1.5, "y":0.375}, {"x":2.5, "y":0.125}, {"x":3.5, "y":0}, {"x":4.5, "y":0.125}, {"x":5.5, "y":0.25}, {"x":6.5, "y":0.25}, {"x":9.5, "y":0.25}, {"x":10.5, "y":0.25}, {"x":11.5, "y":0.125}, {"x":12.5, "y":0}, {"x":13.5, "y":0.125}, {"x":14.5, "y":0.375}, {"x":15.5, "y":0.375, "w":1.5}, @@ -48,8 +99,8 @@ {"x":11.5, "y":4.125}, {"x":12.5, "y":4}, {"x":13.5, "y":4.125}, {"x":14.5, "y":4.375}, {"x":15.5, "y":4.375}, {"x":6, "y":5}, {"x":7, "y":5}, {"x":9, "y":5}, {"x":10, "y":5}, - {"x":7, "y":6}, {"x":9, "y":6}, - {"x":5, "y":6, "h":2}, {"x":6, "y":6, "h":2}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":6, "h":2}, {"x":11, "y":6, "h":2} + {"x":5, "y":6}, {"x":6, "y":6}, {"x":7, "y":6}, {"x":9, "y":6}, {"x":10, "y":6}, {"x":11, "y":6}, + {"x":5, "y":7}, {"x":6, "y":7}, {"x":7, "y":7}, {"x":9, "y":7}, {"x":10, "y":7}, {"x":11, "y":7} ] } } -- cgit v1.2.3 From 36fe0828cfce8ebf1ba261d3191b0e65d5fb15fc Mon Sep 17 00:00:00 2001 From: Joe Wasson Date: Mon, 21 May 2018 18:17:15 -0700 Subject: Remove ISO imposter key from TKL keymap (#3014) --- keyboards/frosty_flake/frosty_flake.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/frosty_flake/frosty_flake.h b/keyboards/frosty_flake/frosty_flake.h index ac293df0f2..953172a8b0 100644 --- a/keyboards/frosty_flake/frosty_flake.h +++ b/keyboards/frosty_flake/frosty_flake.h @@ -87,6 +87,20 @@ /* 7 */ { KA7, KB7, KC7, KD7, KE7, KF7, KG7, KH7, KI7, KJ7, KC_NO, KC_NO, KC_NO, KC_NO, KO7, KC_NO, KQ7, KR7 } \ } -#define LAYOUT_tkl_ansi KEYMAP_TKL +#define LAYOUT_tkl_ansi( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ +) KEYMAP_TKL( \ + KJ6, KI4, KH4, KH2, KH6, KA7, KE6, KD2, KD4, KB4, KB7, KB6, KB0, KC7, KC5, KA5, \ + KJ4, KJ7, KI7, KH7, KG7, KG4, KF4, KF7, KE7, KD7, KR7, KR4, KE4, KB2, KL4, KO4, KQ4, \ + KJ2, KJ5, KI5, KH5, KG5, KG2, KF2, KF5, KE5, KD5, KR5, KR2, KE2, KB3, KK4, KO7, KQ7, \ + KI2, KJ3, KI3, KH3, KG3, KG6, KF6, KF3, KE3, KD3, KR3, KR6, KB1, \ + KN2, KC_NO, KJ1, KI1, KH1, KG1, KG0, KF0, KF1, KE1, KD1, KR0, KN3, KO6, \ + KA4, KP2, KC6, KK6, KC0, KM3, KD0, KA1, KO0, KK0, KL0 \ +) #endif -- cgit v1.2.3 From 1e8be6b741ed2299fed1d7b5f1b05dc23530658b Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Tue, 22 May 2018 04:12:56 +0200 Subject: Fix atom47 keyboard revision naming (#3013) * Fixed Atom47 revisions, rev1 is rev3 * Remove rev1 folder * Added bootloader to info.json * Renamed layout * Change readme for atom47 * Remove bootloader line from info.json --- keyboards/atom47/keymaps/LEdiodes/keymap.c | 8 ++-- keyboards/atom47/keymaps/default/keymap.c | 8 ++-- keyboards/atom47/keymaps/maartenwut/keymap.c | 6 +-- keyboards/atom47/readme.md | 6 +-- keyboards/atom47/rev1/config.h | 69 ---------------------------- keyboards/atom47/rev1/info.json | 13 ------ keyboards/atom47/rev1/rev1.c | 24 ---------- keyboards/atom47/rev1/rev1.h | 23 ---------- keyboards/atom47/rev1/rules.mk | 2 - keyboards/atom47/rev2/info.json | 5 +- keyboards/atom47/rev2/rev2.h | 2 +- keyboards/atom47/rev3/config.h | 69 ++++++++++++++++++++++++++++ keyboards/atom47/rev3/info.json | 12 +++++ keyboards/atom47/rev3/rev3.c | 24 ++++++++++ keyboards/atom47/rev3/rev3.h | 23 ++++++++++ keyboards/atom47/rev3/rules.mk | 2 + keyboards/atom47/rules.mk | 2 +- 17 files changed, 148 insertions(+), 150 deletions(-) delete mode 100644 keyboards/atom47/rev1/config.h delete mode 100644 keyboards/atom47/rev1/info.json delete mode 100644 keyboards/atom47/rev1/rev1.c delete mode 100644 keyboards/atom47/rev1/rev1.h delete mode 100644 keyboards/atom47/rev1/rules.mk create mode 100644 keyboards/atom47/rev3/config.h create mode 100644 keyboards/atom47/rev3/info.json create mode 100644 keyboards/atom47/rev3/rev3.c create mode 100644 keyboards/atom47/rev3/rev3.h create mode 100644 keyboards/atom47/rev3/rules.mk (limited to 'keyboards') diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c index b987c433fe..56582a906d 100644 --- a/keyboards/atom47/keymaps/LEdiodes/keymap.c +++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c @@ -9,25 +9,25 @@ #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_L0] = LAYOUT_ansi( +[_L0] = 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_SCLN, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_L1), \ KC_LCTL, KC_LGUI, KC_LALT, TG(_L3), KC_SPC, KC_SPC, MO(_L2), KC_RALT, KC_APP, KC_RCTRL), \ -[_L2] = LAYOUT_ansi( +[_L2] = LAYOUT( _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, \ KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, \ _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_L1] = LAYOUT_ansi( +[_L1] = 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_L3] = LAYOUT_ansi( +[_L3] = LAYOUT( _______, _______, _______, KC_7, KC_8, KC_9, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_4, KC_5, KC_6, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, KC_1, KC_2, KC_3, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/atom47/keymaps/default/keymap.c b/keyboards/atom47/keymaps/default/keymap.c index 945e66ab7b..a66961fba9 100644 --- a/keyboards/atom47/keymaps/default/keymap.c +++ b/keyboards/atom47/keymaps/default/keymap.c @@ -13,25 +13,25 @@ #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = LAYOUT_ansi( +[_MA] = 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_SCLN, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, MO(_FN1), \ KC_LCTL, KC_LGUI, KC_LALT, MO(_PN), KC_SPC, KC_SPC, MO(_FN), KC_RALT, KC_APP, KC_RCTRL), \ -[_FN] = LAYOUT_ansi( +[_FN] = LAYOUT( _______, KC_VOLD, KC_VOLU, KC_MUTE, RESET, _______, KC_CALC, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_SLCK, KC_PAUS, \ KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RIGHT, KC_INS, _______, \ _______, _______, _______, _______, _______, _______, _______, BL_TOGG, BL_DEC, BL_INC, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_FN1] = LAYOUT_ansi( +[_FN1] = 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ _______, _______, _______, _______, _______, KC_QUOT, KC_SLSH, KC_LBRC, KC_RBRC, KC_BSLS, KC_RSFT, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), \ -[_PN] = LAYOUT_ansi( +[_PN] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, \ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/atom47/keymaps/maartenwut/keymap.c b/keyboards/atom47/keymaps/maartenwut/keymap.c index abe63a41e8..33ed0936a0 100644 --- a/keyboards/atom47/keymaps/maartenwut/keymap.c +++ b/keyboards/atom47/keymaps/maartenwut/keymap.c @@ -19,19 +19,19 @@ enum custom_keycodes { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_MA] = LAYOUT_ansi( +[_MA] = LAYOUT( KC_GESC, 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_SCLN, 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, MO(_LO), KC_SPC, KC_SPC, MO(_RA), KC_RALT, KC_APP, KC_RCTRL), \ -[_LO] = LAYOUT_ansi( +[_LO] = 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_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, \ _______, CTRLZ, CTRLX, CTRLC, CTRLV, _______, _______, KC_QUOT, KC_LBRC, KC_RBRC, KC_BSLS, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET), \ -[_RA] = LAYOUT_ansi( +[_RA] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______, _______, \ KC_CAPS, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_PSCR, \ diff --git a/keyboards/atom47/readme.md b/keyboards/atom47/readme.md index 1e96d42e9d..66f599c6b3 100644 --- a/keyboards/atom47/readme.md +++ b/keyboards/atom47/readme.md @@ -4,11 +4,11 @@ ## Support Keyboard Maintainer: [Maarten Dekkers](https://github.com/maartenwut) -Hardware Supported: Atom47 rev3 +Hardware Supported: Atom47 rev2/rev3 Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?topic=93447.msg2545221) -## Features +## Features (rev3 and up) - QMK Firmware - 6 Underglow RGB leds - In-switch leds @@ -19,7 +19,7 @@ Hardware Availability: [GeekHack.com Group Buy](https://geekhack.org/index.php?t - CapsLock indicator ## Build -To build the default keymap, simply run `make atom47:default`. +To build the default keymap for the latest revision, simply run `make atom47:default`. Specifiy the revision like so: `make atom47/rev3: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/atom47/rev1/config.h b/keyboards/atom47/rev1/config.h deleted file mode 100644 index d21d8ce34d..0000000000 --- a/keyboards/atom47/rev1/config.h +++ /dev/null @@ -1,69 +0,0 @@ -/* -Copyright 2012 Maarten Dekkers . -*/ - -#ifndef REV1_CONFIG_H -#define REV1_CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0003 -#define MANUFACTURER Vortex -#define PRODUCT Core -#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.1 - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 13 - -// ROWS: Top to bottom, COLS: Left to right - -#define MATRIX_ROW_PINS {B3,B2,B1,B0} -#define MATRIX_COL_PINS {B7,F0,F1,F4,F6,D4,D6,D7,B4,B5,C6,C7,F7} -#define UNUSED_PINS - -#define BACKLIGHT_PIN B6 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* 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 - -#define RGB_DI_PIN F5 // The pin the LED strip is connected to -#define RGBLED_NUM 6 // Number of LEDs in your strip - -#define QMK_ESC_OUTPUT B7 // usually COL -#define QMK_ESC_INPUT B3 // usually ROW -#define QMK_LED E6 - -#endif diff --git a/keyboards/atom47/rev1/info.json b/keyboards/atom47/rev1/info.json deleted file mode 100644 index 219e0f2718..0000000000 --- a/keyboards/atom47/rev1/info.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "keyboard_name": "Atom47", - "url": "", - "maintainer": "qmk", - "bootloader": "", - "width": 13, - "height": 4, - "layouts": { - "LAYOUT_ansi": { - "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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":12, "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, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] - } - } -} diff --git a/keyboards/atom47/rev1/rev1.c b/keyboards/atom47/rev1/rev1.c deleted file mode 100644 index 816b43b9ab..0000000000 --- a/keyboards/atom47/rev1/rev1.c +++ /dev/null @@ -1,24 +0,0 @@ -#include "rev1.h" -#include "led.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - matrix_init_user(); - led_init_ports(); -}; - -void matrix_scan_kb(void) { - // put your looping keyboard code here - // runs every cycle (a lot) - matrix_scan_user(); -}; - -void led_init_ports(void) { - // * Set our LED pins as output - DDRE |= (1 << 6); -} - -void led_set_kb(uint8_t usb_led) { - led_set_user(usb_led); -} diff --git a/keyboards/atom47/rev1/rev1.h b/keyboards/atom47/rev1/rev1.h deleted file mode 100644 index f8329a7842..0000000000 --- a/keyboards/atom47/rev1/rev1.h +++ /dev/null @@ -1,23 +0,0 @@ -#ifndef ATOM47_REV1_H -#define ATOM47_REV1_H - -#include "quantum.h" - -// readability -#define XXX KC_NO - -#define LAYOUT_ansi( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1c, \ - k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ - k30, k31, k32, k33, k35, k37, k39, k3a, k3b, k3c \ -) \ -{ \ - {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ - {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ - {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ - {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ -} - - -#endif diff --git a/keyboards/atom47/rev1/rules.mk b/keyboards/atom47/rev1/rules.mk deleted file mode 100644 index 13e553b562..0000000000 --- a/keyboards/atom47/rev1/rules.mk +++ /dev/null @@ -1,2 +0,0 @@ -NKRO_ENABLE = no # 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) diff --git a/keyboards/atom47/rev2/info.json b/keyboards/atom47/rev2/info.json index 219e0f2718..0170699906 100644 --- a/keyboards/atom47/rev2/info.json +++ b/keyboards/atom47/rev2/info.json @@ -1,8 +1,7 @@ { "keyboard_name": "Atom47", - "url": "", - "maintainer": "qmk", - "bootloader": "", + "url": "https://atomkb.eu/atom47", + "maintainer": "Maarten Dekkers", "width": 13, "height": 4, "layouts": { diff --git a/keyboards/atom47/rev2/rev2.h b/keyboards/atom47/rev2/rev2.h index f0134511da..bfea34e062 100644 --- a/keyboards/atom47/rev2/rev2.h +++ b/keyboards/atom47/rev2/rev2.h @@ -6,7 +6,7 @@ // readability #define XXX KC_NO -#define LAYOUT_ansi( \ +#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, k1c, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2c, \ diff --git a/keyboards/atom47/rev3/config.h b/keyboards/atom47/rev3/config.h new file mode 100644 index 0000000000..8a91e29903 --- /dev/null +++ b/keyboards/atom47/rev3/config.h @@ -0,0 +1,69 @@ +/* +Copyright 2012 Maarten Dekkers . +*/ + +#ifndef REV3_CONFIG_H +#define REV3_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER Vortex +#define PRODUCT Core +#define DESCRIPTION Atom47 PCB for the Vortex Core Rev.3 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 13 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {B3,B2,B1,B0} +#define MATRIX_COL_PINS {B7,F0,F1,F4,F6,D4,D6,D7,B4,B5,C6,C7,F7} +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* 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 + +#define RGB_DI_PIN F5 // The pin the LED strip is connected to +#define RGBLED_NUM 6 // Number of LEDs in your strip + +#define QMK_ESC_OUTPUT B7 // usually COL +#define QMK_ESC_INPUT B3 // usually ROW +#define QMK_LED E6 + +#endif diff --git a/keyboards/atom47/rev3/info.json b/keyboards/atom47/rev3/info.json new file mode 100644 index 0000000000..0170699906 --- /dev/null +++ b/keyboards/atom47/rev3/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Atom47", + "url": "https://atomkb.eu/atom47", + "maintainer": "Maarten Dekkers", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT_ansi": { + "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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":12, "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, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] + } + } +} diff --git a/keyboards/atom47/rev3/rev3.c b/keyboards/atom47/rev3/rev3.c new file mode 100644 index 0000000000..2cd04fa767 --- /dev/null +++ b/keyboards/atom47/rev3/rev3.c @@ -0,0 +1,24 @@ +#include "rev3.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRE |= (1 << 6); +} + +void led_set_kb(uint8_t usb_led) { + led_set_user(usb_led); +} diff --git a/keyboards/atom47/rev3/rev3.h b/keyboards/atom47/rev3/rev3.h new file mode 100644 index 0000000000..ad875bb404 --- /dev/null +++ b/keyboards/atom47/rev3/rev3.h @@ -0,0 +1,23 @@ +#ifndef ATOM47_REV3_H +#define ATOM47_REV3_H + +#include "quantum.h" + +// readability +#define XXX KC_NO + +#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, k1c, \ + k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, \ + k30, k31, k32, k33, k35, k37, k39, k3a, k3b, k3c \ +) \ +{ \ + {k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c}, \ + {k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, XXX, k1c}, \ + {k20, XXX, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c}, \ + {k30, k31, k32, k33, XXX, k35, XXX, k37, XXX, k39, k3a, k3b, k3c} \ +} + + +#endif diff --git a/keyboards/atom47/rev3/rules.mk b/keyboards/atom47/rev3/rules.mk new file mode 100644 index 0000000000..13e553b562 --- /dev/null +++ b/keyboards/atom47/rev3/rules.mk @@ -0,0 +1,2 @@ +NKRO_ENABLE = no # 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) diff --git a/keyboards/atom47/rules.mk b/keyboards/atom47/rules.mk index bebdb98d62..5f3dbb6686 100644 --- a/keyboards/atom47/rules.mk +++ b/keyboards/atom47/rules.mk @@ -62,5 +62,5 @@ AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -DEFAULT_FOLDER = atom47/rev2 +DEFAULT_FOLDER = atom47/rev3 -- cgit v1.2.3 From 61f30ba5422660ad2c1013ec71e4358fe7c4372e Mon Sep 17 00:00:00 2001 From: QMK Bot Date: Tue, 22 May 2018 02:16:00 +0000 Subject: convert to unix line-endings [skip ci] --- keyboards/atom47/keymaps/LEdiodes/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/atom47/keymaps/LEdiodes/keymap.c b/keyboards/atom47/keymaps/LEdiodes/keymap.c index 56582a906d..15343ab335 100644 --- a/keyboards/atom47/keymaps/LEdiodes/keymap.c +++ b/keyboards/atom47/keymaps/LEdiodes/keymap.c @@ -1,4 +1,4 @@ -#include QMK_KEYBOARD_H +#include QMK_KEYBOARD_H // These are all aliases for the function layers. #define _L0 0 -- cgit v1.2.3 From ddbe60dc3652a4130fdf8167e06897e2c88d8e42 Mon Sep 17 00:00:00 2001 From: Maarten Dekkers Date: Tue, 22 May 2018 16:03:10 +0200 Subject: Fix Atom47 configurator layout (#3018) --- keyboards/atom47/rev2/info.json | 2 +- keyboards/atom47/rev3/info.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atom47/rev2/info.json b/keyboards/atom47/rev2/info.json index 0170699906..3c45ca8d45 100644 --- a/keyboards/atom47/rev2/info.json +++ b/keyboards/atom47/rev2/info.json @@ -5,7 +5,7 @@ "width": 13, "height": 4, "layouts": { - "LAYOUT_ansi": { + "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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":12, "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, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] } } diff --git a/keyboards/atom47/rev3/info.json b/keyboards/atom47/rev3/info.json index 0170699906..3c45ca8d45 100644 --- a/keyboards/atom47/rev3/info.json +++ b/keyboards/atom47/rev3/info.json @@ -5,7 +5,7 @@ "width": 13, "height": 4, "layouts": { - "LAYOUT_ansi": { + "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":0, "y":1, "w":1.25}, {"x":1.25, "y":1}, {"x":2.25, "y":1}, {"x":3.25, "y":1}, {"x":4.25, "y":1}, {"x":5.25, "y":1}, {"x":6.25, "y":1}, {"x":7.25, "y":1}, {"x":8.25, "y":1}, {"x":9.25, "y":1}, {"x":10.25, "y":1}, {"x":11.25, "y":1, "w":1.75}, {"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, "w":1.25}, {"x":12, "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, "w":1.75}, {"x":6, "y":3, "w":2.75}, {"x":8.75, "y":3}, {"x":9.75, "y":3}, {"x":10.75, "y":3}, {"x":11.75, "y":3, "w":1.25}] } } -- cgit v1.2.3 From 5018892fa80ae1f68ea1b8924b840b7b160adad1 Mon Sep 17 00:00:00 2001 From: rfvizarra Date: Tue, 22 May 2018 16:04:53 +0200 Subject: A personal layout for the orthodox keyboard (#3006) * A personal layout for the orthodox keyboard * Added layout readme.md * Consolidated inclues with #include QMK_KEYBOARD_H * Moved layer tones setup to config.h * Replace persistent_default_layer_set calls with set_single_persistent_default_layer * Simplified the process_record_user function using layer_state_set_user function and MO() to set the lower, raise, nav and media layers * Removed AUDIO_ENABLE ifdefs and persistent_default_layer_set() as they are not needed any more --- keyboards/orthodox/keymaps/rfvizarra/config.h | 45 ++++++++ keyboards/orthodox/keymaps/rfvizarra/keymap.c | 138 +++++++++++++++++++++++++ keyboards/orthodox/keymaps/rfvizarra/readme.md | 19 ++++ keyboards/orthodox/keymaps/rfvizarra/rules.mk | 0 4 files changed, 202 insertions(+) create mode 100644 keyboards/orthodox/keymaps/rfvizarra/config.h create mode 100644 keyboards/orthodox/keymaps/rfvizarra/keymap.c create mode 100644 keyboards/orthodox/keymaps/rfvizarra/readme.md create mode 100644 keyboards/orthodox/keymaps/rfvizarra/rules.mk (limited to 'keyboards') diff --git a/keyboards/orthodox/keymaps/rfvizarra/config.h b/keyboards/orthodox/keymaps/rfvizarra/config.h new file mode 100644 index 0000000000..7ac207f0d3 --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/config.h @@ -0,0 +1,45 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE +#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(COLEMAK_SOUND), \ + SONG(DVORAK_SOUND) \ +} +#endif + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL +#define USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#endif diff --git a/keyboards/orthodox/keymaps/rfvizarra/keymap.c b/keyboards/orthodox/keymaps/rfvizarra/keymap.c new file mode 100644 index 0000000000..55f0fa016b --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/keymap.c @@ -0,0 +1,138 @@ +/* +This is the keymap for the keyboard + +Copyright 2012 Jun Wako +Copyright 2015 Jack Humbert +Copyright 2017 Art Ortenburger + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include 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 _NAV 5 +#define _NAV2 6 +#define _MEDIA 7 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT( \ + 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_LGUI, KC_LALT, MO(_MEDIA) , KC_DEL, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + MO(_NAV),KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_LOWER), KC_LSFT, CTL_T(KC_ENT), KC_RALT, KC_SPC, MO(_RAISE), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LGUI \ + ), + + [_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_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, MO(_LOWER), KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, MO(_RAISE), KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH, KC_LGUI \ + ), + + [_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, KC_U, KC_I, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, \ + KC_LCTL, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, MO(_LOWER), KC_SPACE, KC_BSPC, KC_DEL, KC_ENT, MO(_RAISE), KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LGUI \ + ), + + [_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_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCTL, _______, _______, KC_RCTL, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, _______, _______, _______, _______, KC_F12, KC_HOME, KC_COMM, KC_DOT, KC_END, _______ \ + ), + + [_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_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_PGUP, KC_COMM, KC_DOT, KC_PGDN, _______ \ + ), + + [_NAV] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_NAV2] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_MEDIA] = LAYOUT( \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_MPLY, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + [_ADJUST] = LAYOUT( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, QWERTY , COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ) + + +}; + +uint32_t layer_state_set_user(uint32_t state) { + state = update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); + state = update_tri_layer_state(state, _LOWER, _NAV, _NAV2); + return state; +} + +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 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; + } + return true; +} + diff --git a/keyboards/orthodox/keymaps/rfvizarra/readme.md b/keyboards/orthodox/keymaps/rfvizarra/readme.md new file mode 100644 index 0000000000..922832c17e --- /dev/null +++ b/keyboards/orthodox/keymaps/rfvizarra/readme.md @@ -0,0 +1,19 @@ +# A personal Orthodox Layout + +![Orthodox](https://i.imgur.com/RQ5SKj4.jpg) + +This is the layout for my daily driver orthodox. It's based on a custom handwire keyboard that I've been using for quite some time. It's based on Plank's/Let's split layouts for the lower/raise layers. I added the shift, control/enter, alt/altgr and del to the thumb cluster. + +To build the firmware run from qmk's project folder + + make orthodox/rev3:rfvizarra:avrdude + +And to flash it, run + + make orthodox/rev3:rfvizarra:avrdude + +reset your keyboard pro micro while connected to the PC with a micro usb cable. + +Repeat on both halves. + +See [install build tools](https://docs.qmk.fm/install-build-tools) then the [build/compile instructions](https://docs.qmk.fm/build-compile-instructions) for more information. diff --git a/keyboards/orthodox/keymaps/rfvizarra/rules.mk b/keyboards/orthodox/keymaps/rfvizarra/rules.mk new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3 From def0ff48c09e8eae0e00fcd6049358f5ed0ea816 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 22 May 2018 15:12:06 -0400 Subject: Add mike808 Viterbi layout (#3019) --- keyboards/viterbi/keymaps/mike808/config.h | 43 ++++++++ keyboards/viterbi/keymaps/mike808/keymap.c | 158 +++++++++++++++++++++++++++++ keyboards/viterbi/keymaps/mike808/rules.mk | 1 + 3 files changed, 202 insertions(+) create mode 100644 keyboards/viterbi/keymaps/mike808/config.h create mode 100644 keyboards/viterbi/keymaps/mike808/keymap.c create mode 100644 keyboards/viterbi/keymaps/mike808/rules.mk (limited to 'keyboards') diff --git a/keyboards/viterbi/keymaps/mike808/config.h b/keyboards/viterbi/keymaps/mike808/config.h new file mode 100644 index 0000000000..bfca915f24 --- /dev/null +++ b/keyboards/viterbi/keymaps/mike808/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2018 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_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 2 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/viterbi/keymaps/mike808/keymap.c b/keyboards/viterbi/keymaps/mike808/keymap.c new file mode 100644 index 0000000000..c7e48b135c --- /dev/null +++ b/keyboards/viterbi/keymaps/mike808/keymap.c @@ -0,0 +1,158 @@ +#include QMK_KEYBOARD_H + +#define _DVORAK 0 +#define _QWERTY 1 +#define _FN1 2 +#define _MOUSE 3 + +enum custom_keycodes { + DVORAK = SAFE_RANGE, + QWERTY, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_DVOR DVORAK +#define KC_QWER QWERTY +#define KC_FN1 MO(_FN1) + +// Tap-Hold keys (QWERTY) +#define KC_S_C MT(MOD_LCTL, KC_S) +#define KC_D_A MT(MOD_LALT, KC_D) +#define KC_F_G MT(MOD_LGUI, KC_F) +#define KC_J_G MT(MOD_RGUI, KC_J) +#define KC_K_A MT(MOD_RALT, KC_K) +#define KC_L_C MT(MOD_RCTL, KC_L) + +// Tap-Hold keys (Dvorak) +#define KC_O_C MT(MOD_LCTL, KC_O) +#define KC_E_A MT(MOD_LALT, KC_E) +#define KC_U_G MT(MOD_LGUI, KC_U) +#define KC_H_G MT(MOD_RGUI, KC_H) +#define KC_T_A MT(MOD_RALT, KC_T) +#define KC_N_C MT(MOD_RCTL, KC_N) + +#define KC_G_A LGUI(KC_A) +#define KC_G_C LGUI(KC_C) +#define KC_G_V LGUI(KC_V) +#define KC_G_X LGUI(KC_X) +#define KC_G_Z LGUI(KC_Z) +#define KC_G_BL LGUI(KC_BSLS) +#define KC_G_TB LGUI(KC_TAB) +#define KC_G_SP LGUI(KC_SPC) + +#define KC_ENTM LT(_MOUSE, KC_ENT) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + DVOR,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,MINS,PGUP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_A ,TAB , Q , W , E , R , T , Y , U , I , O , P ,BSLS,PGDN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_X ,CAPS, A ,S_C ,D_A ,F_G , G , H ,J_G ,K_A ,L_C ,SCLN,QUOT, UP , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_C ,LSFT, Z , X , C , V , B , N , M ,COMM,DOT ,SLSH,RSFT,DOWN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,EQL ,LEFT,RGHT + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_DVORAK] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + QWER,ESC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,EQL ,PGUP, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_A ,TAB ,QUOT,COMM,DOT , P , Y , F , G , C , R , L ,SLSH,PGDN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_X ,CAPS, A ,O_C ,E_A ,U_G , I , D ,H_G ,T_A ,N_C , S ,MINS, UP , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_C ,LSFT,SCLN, Q , J , K , X , B , M , W , V , Z ,RSFT,DOWN, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + G_V ,FN1 ,G_TB,G_SP,BSPC,SPC ,SPC , ENTM,ENTM,G_Z ,GRV ,BSLS,LEFT,RGHT + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_FN1] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 ,F11 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,EXLM, AT ,LCBR,RCBR,PIPE, , P7 , P8 , P9 ,ASTR,F12 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,HASH,DLR ,LPRN,RPRN,GRV , , P4 , P5 , P6 ,PLUS,MINS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,PERC,CIRC,LBRC,RBRC,TILD, AMPR, P1 , P2 , P3 ,SLSH, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , ,PDOT, P0 ,EQL , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ), + + [_MOUSE] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,MS_U, , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , ,MS_L,MS_D,MS_R, , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , ,BTN1,BTN2, , , , , , , , + //`----+----+----+----+----+----+----' `----+----+----+----+----+----+----' + ) +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +#endif + +void update_rgblight(uint16_t layer) { + if (layer & (1UL << _DVORAK)) { + rgblight_sethsv_green(); + } else if (layer & (1UL << _QWERTY)) { + rgblight_sethsv_goldenrod(); + } +} + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); + #ifdef RGBLIGHT_ENABLE + update_rgblight(default_layer); + #endif // RGBLIGHT_ENABLE +} + +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); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistent_default_layer_set(1UL << _DVORAK); + } + return false; + break; + } + return true; +} + + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + rgblight_enable(); + uint8_t default_layer = eeconfig_read_default_layer(); + update_rgblight(default_layer); + #endif +} diff --git a/keyboards/viterbi/keymaps/mike808/rules.mk b/keyboards/viterbi/keymaps/mike808/rules.mk new file mode 100644 index 0000000000..1e3cebb145 --- /dev/null +++ b/keyboards/viterbi/keymaps/mike808/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = yes -- cgit v1.2.3 From 4b1f60a3f5ed223e34ae8381e57f600551ccf085 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 22 May 2018 12:12:50 -0700 Subject: Refactor update for 6ball (#3017) --- keyboards/6ball/6ball.h | 4 +--- keyboards/6ball/keymaps/default/keymap.c | 20 +++++++------------- 2 files changed, 8 insertions(+), 16 deletions(-) (limited to 'keyboards') diff --git a/keyboards/6ball/6ball.h b/keyboards/6ball/6ball.h index 34fcc4e6a7..234235341d 100644 --- a/keyboards/6ball/6ball.h +++ b/keyboards/6ball/6ball.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k01, k02, k03, \ k04, k05, k06 \ ) \ @@ -11,6 +11,4 @@ { k02, k03, k06, k05, k04, k01 } \ } -#define KC_KEYMAP(k01, k02, k03, k04, k05, k06) KEYMAP(KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06) - #endif diff --git a/keyboards/6ball/keymaps/default/keymap.c b/keyboards/6ball/keymaps/default/keymap.c index f93587ffc3..5081161e38 100644 --- a/keyboards/6ball/keymaps/default/keymap.c +++ b/keyboards/6ball/keymaps/default/keymap.c @@ -1,28 +1,22 @@ -#include "6ball.h" +#include QMK_KEYBOARD_H #define _MAIN 0 #define _FN 1 -#define KC_ KC_TRNS - #define KC_CAPW LGUI(LSFT(KC_3)) // Capture whole screen #define KC_CPYW LGUI(LSFT(LCTL(KC_3))) // Copy whole screen #define KC_CAPP LGUI(LSFT(KC_4)) // Capture portion of screen #define KC_CPYP LGUI(LSFT(LCTL(KC_4))) // Copy portion of screen #define KC_X0 LT(_FN, KC_ESC) -#define KC_RTOG RGB_TOG -#define KC_RMOD RGB_MOD -#define KC_RHUI RGB_HUI -#define KC_RHUD RGB_HUD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_MAIN] = KC_KEYMAP( - F , X0 ,LCTL, - R , D , M + [_MAIN] = LAYOUT( + KC_F, KC_X0, KC_LCTL, + KC_R, KC_D, KC_M ), - [_FN] = KC_KEYMAP( - F , ,RHUI, - RTOG,RMOD,RHUD + [_FN] = LAYOUT( + KC_F, KC_TRNS, RGB_HUI, + RGB_TOG, RGB_MOD, RGB_HUD ) }; -- cgit v1.2.3 From 7658f10fba71974bdd6dfc33fbd53deff76b1f83 Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 22 May 2018 15:40:43 -0400 Subject: Fix led enabled slave (#3022) * Account for backlight enabled flag when passing backlight level to slave * Add BL_TOGG to keymap for testing * Apply backlight fix to Iris * Port I2C LED backlight control from Iris to Levinson --- keyboards/iris/matrix.c | 11 +++++++---- keyboards/levinson/matrix.c | 25 +++++++++++++++++++++---- 2 files changed, 28 insertions(+), 8 deletions(-) (limited to 'keyboards') diff --git a/keyboards/iris/matrix.c b/keyboards/iris/matrix.c index dcfc0216ea..7195fb0ead 100644 --- a/keyboards/iris/matrix.c +++ b/keyboards/iris/matrix.c @@ -30,7 +30,11 @@ along with this program. If not, see . #include "pro_micro.h" #include "config.h" #include "timer.h" -#include "backlight.h" + +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif #ifdef USE_I2C # include "i2c.h" @@ -86,7 +90,6 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; static void select_col(uint8_t col); #endif - __attribute__ ((weak)) void matrix_init_kb(void) { matrix_init_user(); @@ -202,7 +205,7 @@ int i2c_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - err = i2c_master_write(get_backlight_level()); + err = i2c_master_write(backlight_config.enable ? backlight_config.level : 0); #else // Write zero, so our byte index is the same err = i2c_master_write(0x00); @@ -244,7 +247,7 @@ int serial_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); + serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0; #endif return 0; } diff --git a/keyboards/levinson/matrix.c b/keyboards/levinson/matrix.c index ed913f34b4..7195fb0ead 100644 --- a/keyboards/levinson/matrix.c +++ b/keyboards/levinson/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2012 Jun Wako +Copyright 2017 Danny Nguyen 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 @@ -30,7 +30,11 @@ along with this program. If not, see . #include "pro_micro.h" #include "config.h" #include "timer.h" -#include "backlight.h" + +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif #ifdef USE_I2C # include "i2c.h" @@ -199,6 +203,15 @@ int i2c_transaction(void) { err = i2c_master_write(0x00); if (err) goto i2c_error; +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + err = i2c_master_write(backlight_config.enable ? backlight_config.level : 0); +#else + // Write zero, so our byte index is the same + err = i2c_master_write(0x00); +#endif + if (err) goto i2c_error; + // Start read err = i2c_master_start(SLAVE_I2C_ADDRESS + I2C_READ); if (err) goto i2c_error; @@ -234,7 +247,7 @@ int serial_transaction(void) { #ifdef BACKLIGHT_ENABLE // Write backlight level for slave to read - serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); + serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0; #endif return 0; } @@ -276,8 +289,12 @@ void matrix_slave_scan(void) { int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; #ifdef USE_I2C +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(i2c_slave_buffer[0]); +#endif for (int i = 0; i < ROWS_PER_HAND; ++i) { - i2c_slave_buffer[i] = matrix[offset+i]; + i2c_slave_buffer[i+1] = matrix[offset+i]; } #else // USE_SERIAL for (int i = 0; i < ROWS_PER_HAND; ++i) { -- cgit v1.2.3 From c29d8ffd5af86eddc7e09d1963d8e26f544c5de6 Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Tue, 22 May 2018 14:19:55 -0700 Subject: Adds basic support for u/flehrad's bigswitch pcb (#3015) * Adds basic support for u/flehrad's bigswitch pcb - also adds support for OSX Eject/Power The function of this key depends on the version of OSX and if you have physical media. For a macbook pro 2017 holding this key down brings up the shutdown dialog. If you wrap it in LCTL and LSFT the screenlock turns on immediately. * Switch to Layout Macro - add a code for OSX Sleep * Add a README * Turn on RGB by default * Add info.json * Address comments by @drashna * Only define Eject in keymap --- keyboards/bigswitch/README.md | 10 +++++ keyboards/bigswitch/bigswitch.c | 22 ++++++++++ keyboards/bigswitch/bigswitch.h | 28 +++++++++++++ keyboards/bigswitch/config.h | 59 +++++++++++++++++++++++++++ keyboards/bigswitch/info.json | 13 ++++++ keyboards/bigswitch/keymaps/default/keymap.c | 27 +++++++++++++ keyboards/bigswitch/rules.mk | 60 ++++++++++++++++++++++++++++ 7 files changed, 219 insertions(+) create mode 100644 keyboards/bigswitch/README.md create mode 100644 keyboards/bigswitch/bigswitch.c create mode 100755 keyboards/bigswitch/bigswitch.h create mode 100755 keyboards/bigswitch/config.h create mode 100644 keyboards/bigswitch/info.json create mode 100755 keyboards/bigswitch/keymaps/default/keymap.c create mode 100755 keyboards/bigswitch/rules.mk (limited to 'keyboards') diff --git a/keyboards/bigswitch/README.md b/keyboards/bigswitch/README.md new file mode 100644 index 0000000000..2679a0aec5 --- /dev/null +++ b/keyboards/bigswitch/README.md @@ -0,0 +1,10 @@ +Big Switch PCB by flehrad +========================= + +Designed by Don of the Board Podcast and sold as a kit by [keeb.io](https://keeb.io/collections/frontpage/products/big-switch-pcb?variant=7507922845726) + +### Technical Specifications + + * Uses a atmega32u4 pro micro or pin compatible MCU + * Pins B5 and B6 connect to the pins on the Big Switch + * Optionally you may add a RGB strip to pin D3 for data and take power from VCC and GND diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/bigswitch/bigswitch.c new file mode 100644 index 0000000000..05935f2e9e --- /dev/null +++ b/keyboards/bigswitch/bigswitch.c @@ -0,0 +1,22 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include "bigswitch.h" + +void matrix_init_user(void) { + rgblight_enable(); + rgblight_mode(9); +} diff --git a/keyboards/bigswitch/bigswitch.h b/keyboards/bigswitch/bigswitch.h new file mode 100755 index 0000000000..ea3d51a1f3 --- /dev/null +++ b/keyboards/bigswitch/bigswitch.h @@ -0,0 +1,28 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef BIGSWITCH_H +#define BIGSWITCH_H + +#include "quantum.h" + +#define LAYOUT( \ + K00 \ +) { \ + { K00 } \ +} + +#endif diff --git a/keyboards/bigswitch/config.h b/keyboards/bigswitch/config.h new file mode 100755 index 0000000000..b6cbf06e92 --- /dev/null +++ b/keyboards/bigswitch/config.h @@ -0,0 +1,59 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0x1209 +#define PRODUCT_ID 0xB195 +#define DEVICE_VER 0x0001 +#define MANUFACTURER flehrad +#define PRODUCT BigSwitch PCB +#define DESCRIPTION A single key board for Novelkeys Big Switch + +/* key matrix size */ +#define MATRIX_ROWS 1 +#define MATRIX_COLS 1 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B5 } +#define MATRIX_COL_PINS { B6 } +#define UNUSED_PINS { } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 50 + +/* key combination for command */ +#define IS_COMMAND() ( \ + false \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN D3 +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 5 +#endif + +#endif diff --git a/keyboards/bigswitch/info.json b/keyboards/bigswitch/info.json new file mode 100644 index 0000000000..8d3d746f57 --- /dev/null +++ b/keyboards/bigswitch/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Bigswitch PCB", + "url": "", + "maintainer": "qmk", + "bootloader": "", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0, "w":4, "h":4}] + } + } +} diff --git a/keyboards/bigswitch/keymaps/default/keymap.c b/keyboards/bigswitch/keymaps/default/keymap.c new file mode 100755 index 0000000000..210d001236 --- /dev/null +++ b/keyboards/bigswitch/keymaps/default/keymap.c @@ -0,0 +1,27 @@ +/* +Copyright 2018 QMK Contributors + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H +#define KC_OSX_EJECT 0x66 +#define LOCK_OSX LSFT(LCTL(KC_OSX_EJECT)) +#define SLEEP_OSX LALT(LGUI(KC_OSX_EJECT)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +LAYOUT(SLEEP_OSX), + +}; diff --git a/keyboards/bigswitch/rules.mk b/keyboards/bigswitch/rules.mk new file mode 100755 index 0000000000..e4e72f09a2 --- /dev/null +++ b/keyboards/bigswitch/rules.mk @@ -0,0 +1,60 @@ +# 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) + +# Bootloader +BOOTLOADER = caterina + +# 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 = 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 +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +NKRO_ENABLE = no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Custom backlighting code is used, so this should not be enabled +AUDIO_ENABLE = no # This can be enabled if a speaker is connected to the expansion port. Not compatible with RGBLIGHT below +RGBLIGHT_ENABLE = yes # This can be enabled if a ws2812 strip is connected to the expansion port. + -- cgit v1.2.3 From c465cf2fd3bc57259ad72441e462f07b694b962e Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 22 May 2018 15:58:56 -0700 Subject: Refactor and Configurator updates for 9key (#3024) --- keyboards/9key/9key.h | 2 +- keyboards/9key/info.json | 12 ++++++++++++ keyboards/9key/keymaps/default/keymap.c | 6 +++--- 3 files changed, 16 insertions(+), 4 deletions(-) create mode 100644 keyboards/9key/info.json (limited to 'keyboards') diff --git a/keyboards/9key/9key.h b/keyboards/9key/9key.h index f1cb30628f..b60dc53c00 100644 --- a/keyboards/9key/9key.h +++ b/keyboards/9key/9key.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, \ k10, k11, k12, \ k20, k21, k22 \ diff --git a/keyboards/9key/info.json b/keyboards/9key/info.json new file mode 100644 index 0000000000..cadfdbc4c2 --- /dev/null +++ b/keyboards/9key/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "9key", + "url": "", + "maintainer": "qmk", + "width": 3, + "height": 3, + "layouts": { + "LAYOUT": { + "layout": [{"label":"k00", "x":0, "y":0}, {"label":"k01", "x":1, "y":0}, {"label":"k02", "x":2, "y":0}, {"label":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}] + } + } +} diff --git a/keyboards/9key/keymaps/default/keymap.c b/keyboards/9key/keymaps/default/keymap.c index 65f0cdd208..9f63971695 100644 --- a/keyboards/9key/keymaps/default/keymap.c +++ b/keyboards/9key/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "9key.h" +#include QMK_KEYBOARD_H // Tap Dance Declarations enum { @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 7/0 | 8 | 9/FN | 7/0 = Dbl Tap 7 for 0 - 9/FN = Hold 9 for FN * `-----------------------' */ -[0] = KEYMAP( \ +[0] = LAYOUT( \ KC_1, KC_2, KC_3, \ KC_4, TD(ENT_5), KC_6, \ TD(ZERO_7), KC_8, LT(1, KC_9) \ @@ -37,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 00 | . | | * `-----------------------' */ -[1] = KEYMAP( \ +[1] = LAYOUT( \ KC_ESC, KC_PLUS, KC_MINS, \ KC_BSPC, KC_ASTR, KC_SLSH, \ M(DBL_0), KC_DOT, KC_TRNS \ -- cgit v1.2.3 From 760b11b5e84291019605af3abeef2d09f8991779 Mon Sep 17 00:00:00 2001 From: epaew Date: Wed, 23 May 2018 08:59:43 +0900 Subject: Add edvorakjp layout for the Iris keyboard (#3020) * add edvorakjp libraries * add edvorakjp iris keymap * change the custom eeconfig's address to prevent future address conflicts * deleted the verbose line of rule.mk --- keyboards/iris/keymaps/edvorakjp/config.h | 30 +++++ keyboards/iris/keymaps/edvorakjp/keymap.c | 171 +++++++++++++++++++++++++++++ keyboards/iris/keymaps/edvorakjp/readme.md | 21 ++++ keyboards/iris/keymaps/edvorakjp/rules.mk | 16 +++ 4 files changed, 238 insertions(+) create mode 100644 keyboards/iris/keymaps/edvorakjp/config.h create mode 100644 keyboards/iris/keymaps/edvorakjp/keymap.c create mode 100644 keyboards/iris/keymaps/edvorakjp/readme.md create mode 100644 keyboards/iris/keymaps/edvorakjp/rules.mk (limited to 'keyboards') diff --git a/keyboards/iris/keymaps/edvorakjp/config.h b/keyboards/iris/keymaps/edvorakjp/config.h new file mode 100644 index 0000000000..cc24ffc312 --- /dev/null +++ b/keyboards/iris/keymaps/edvorakjp/config.h @@ -0,0 +1,30 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.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 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 10 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#define RGBLIGHT_LIMIT_VAL 100 + +#define MOUSEKEY_WHEEL_MAX_SPEED 10 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 20 + +#define TAPPING_TERM 120 + +#endif diff --git a/keyboards/iris/keymaps/edvorakjp/keymap.c b/keyboards/iris/keymaps/edvorakjp/keymap.c new file mode 100644 index 0000000000..286aa3b5bb --- /dev/null +++ b/keyboards/iris/keymaps/edvorakjp/keymap.c @@ -0,0 +1,171 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.h" + +#include "edvorakjp.h" + +extern edvorakjp_config_t edvorakjp_config; + +enum custom_keycodes { + KC_LOCK = NEW_SAFE_RANGE, +}; + +#define KC_ KC_TRNS + +#define KC_TMB1 LGUI_T(KC_TAB) +#define KC_TMB2 LSFT_T(KC_SPC) +#define KC_TMB3 LOWER // act as LOWER when hold, as KC_LANG2(=English) when tapped +#define KC_TMB4 LCTL_T(KC_ESC) +#define KC_TMB5 RSFT_T(KC_DEL) +#define KC_TMB6 RAISE // act as RAISE when hold, as KC_LANG1(=Japanese) when tapped +#define KC_TMB7 RCTL_T(KC_BSPC) +#define KC_TMB8 RALT_T(KC_ENT) +#define KC_TMB9 LGUI(KC_TAB) + +#define KC_RST RESET +#define KC_DBUG DEBUG +#define KC_RTOG RGB_TOG +#define KC_EDJP EDVORAK +#define KC_QWER QWERTY + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_EDVORAK] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LBRC,RBRC,COMM,DOT , P , Y , F , G , R , W , Q ,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + EQL , A , O , E , I , U , D , T , N , S , M ,MINS, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + QUOT,SCLN, X , C , V , Z ,TMB4, TMB5, B , H , J , K , L ,SLSH, + //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + TMB1,TMB2,TMB3, TMB6,TMB7,TMB8 + // `----+----+----' `----+----+----' + ), + + [_EDVORAKJ1] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , AI , OU , EI , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , , Y , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , + //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_EDVORAKJ2] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , AI , OU , EI , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , Y , , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + ,ANN ,ONN ,ENN ,INN ,UNN , , , , , , , , , + //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + GRV ,EXLM, AT ,HASH,DLR ,PERC, CIRC,AMPR,ASTR,LPRN,RPRN,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + EQL , Q , W , E , R , T , Y , U , I , O , P ,MINS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LBRC, A , S , D , F , G , H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + RBRC, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,BSLS, + //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , ,SLSH,ASTR, , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,BTN4,WH_U,BTN5, , , 7 , 8 , 9 ,MINS, , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , ,WH_L,WH_D,WH_R, , , 4 , 5 , 6 ,PLUS, , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , ,BTN1,BTN3,BTN2, , , , , 1 , 2 , 3 , , , + //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + , , , , 0 , + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F1 , F2 , F3 , F4 , F5 ,LCBR, RCBR, , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + F6 , F7 , F8 , F9 ,F10 ,LPRN, RPRN,HOME,PGDN,PGUP,END , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + F11 ,F12 ,PSCR,SLCK,PAUS,LBRC,LOCK, ,RBRC,LEFT,DOWN, UP ,RGHT, , + //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + TMB9, , , , , + // `----+----+----' `----+----+----' + ), + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , ,EXTOFF, , ,EXTON, , , , , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + ,RST ,DBUG,RTOG,WIN , , ,MAC ,QWER,EDJP, , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , , , , , , , , + //`----+----+----+----+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ) +}; + +void matrix_init_keymap() { +} + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case KC_LOCK: + if (record->event.pressed) { + if (edvorakjp_config.enable_kc_lang) { + SEND_STRING( SS_LCTRL(SS_LSFT(SS_TAP(X_POWER))) ); + } else { + SEND_STRING( SS_LGUI("L") ); + } + } + return false; + } + return true; +} + +uint32_t layer_state_set_keymap(uint32_t state) { + switch (biton32(state)) { + case _EDVORAKJ1: + case _EDVORAKJ2: + // _EDVORAKJ1 & J2 are same colored + rgblight_setrgb (0xFF, 0xFF, 0xFF); + break; + case _LOWER: + rgblight_setrgb (0xFF, 0x00, 0x00); + break; + case _RAISE: + rgblight_setrgb (0x00, 0x00, 0xFF); + break; + case _ADJUST: + rgblight_setrgb (0x00, 0xFF, 0x00); + break; + default: // for any other layers, or the default layer + rgblight_mode(28); + break; + } + return state; +} diff --git a/keyboards/iris/keymaps/edvorakjp/readme.md b/keyboards/iris/keymaps/edvorakjp/readme.md new file mode 100644 index 0000000000..e5d3eab11f --- /dev/null +++ b/keyboards/iris/keymaps/edvorakjp/readme.md @@ -0,0 +1,21 @@ +# edvorakjp + +Epaew's Enhanced Dvorak layout for Japanese Programmer +see [here](../../../../users/edvorakjp) for more informations. + +## License + +Copyright 2018 Ryo Maeda epaew.333@gmail.com @epaew + +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 . diff --git a/keyboards/iris/keymaps/edvorakjp/rules.mk b/keyboards/iris/keymaps/edvorakjp/rules.mk new file mode 100644 index 0000000000..1c88fbc7bc --- /dev/null +++ b/keyboards/iris/keymaps/edvorakjp/rules.mk @@ -0,0 +1,16 @@ +# 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 = 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -- cgit v1.2.3 From c1dd36a19db1ae3e50b70100ab11758c442fbd29 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 22 May 2018 17:06:58 -0700 Subject: Refactor and Configurator update for ACR60 (#3025) --- keyboards/acr60/acr60.h | 12 ++++++------ keyboards/acr60/info.json | 33 ++++++++++++++++++++++++++++++++ keyboards/acr60/keymaps/default/keymap.c | 8 ++++---- keyboards/acr60/keymaps/mitch/keymap.c | 15 ++++++++------- 4 files changed, 51 insertions(+), 17 deletions(-) create mode 100644 keyboards/acr60/info.json (limited to 'keyboards') diff --git a/keyboards/acr60/acr60.h b/keyboards/acr60/acr60.h index 49defe00f3..9a2d59f634 100644 --- a/keyboards/acr60/acr60.h +++ b/keyboards/acr60/acr60.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -17,7 +17,7 @@ { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ } -#define KEYMAP_HHKB( \ +#define LAYOUT_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -31,7 +31,7 @@ { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, KC_NO, K411, KC_NO, K413, KC_NO } \ } -#define KEYMAP_TRUE_HHKB( \ +#define LAYOUT_true_hhkb( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -45,7 +45,7 @@ { KC_NO, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, KC_NO, KC_NO } \ } -#define KEYMAP_2_SHIFTS( \ +#define LAYOUT_2_shifts( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -59,7 +59,7 @@ { K400, K401, KC_NO, K403, K404, KC_NO, K406, KC_NO, K408, KC_NO, K410, K411, K412, K413, K414 } \ } -#define KEYMAP_DIRECTIONAL( \ +#define LAYOUT_directional( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ @@ -90,7 +90,7 @@ * | K400 | K401 | K403 | K404 | K406 | K408 | K410 | K411 | K413 | K414 | * `-----------------------------------------------------------------------------------------' */ -#define MITCHSPLIT( \ +#define LAYOUT_mitchsplit( \ K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K014, \ K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ diff --git a/keyboards/acr60/info.json b/keyboards/acr60/info.json new file mode 100644 index 0000000000..660c357990 --- /dev/null +++ b/keyboards/acr60/info.json @@ -0,0 +1,33 @@ +{ + "keyboard_name": "ACR60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 67, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_hhkb": { + "key_count": 61, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K401", "x":1.5, "y":4}, {"label":"K403", "x":2.5, "y":4, "w":1.5}, {"label":"K406", "x":4, "y":4, "w":7}, {"label":"K411", "x":11, "y":4, "w":1.5}, {"label":"K413", "x":12.5, "y":4}] + }, + "LAYOUT_true_hhkb": { + "key_count": 61, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K401", "x":1.5, "y":4}, {"label":"K403", "x":2.5, "y":4, "w":1.5}, {"label":"K406", "x":4, "y":4, "w":6}, {"label":"K410", "x":10, "y":4, "w":1.5}, {"label":"K411", "x":11.5, "y":4}] + }, + "LAYOUT_2_shifts": { + "key_count": 68, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3}, {"label":"K301", "x":1, "y":3}, {"label":"K302", "x":2, "y":3}, {"label":"K303", "x":3, "y":3}, {"label":"K304", "x":4, "y":3}, {"label":"K305", "x":5, "y":3}, {"label":"K306", "x":6, "y":3}, {"label":"K307", "x":7, "y":3}, {"label":"K308", "x":8, "y":3}, {"label":"K309", "x":9, "y":3}, {"label":"K310", "x":10, "y":3}, {"label":"K311", "x":11, "y":3}, {"label":"K312", "x":12, "y":3}, {"label":"K313", "x":13, "y":3}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_directional": { + "key_count": 67, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":1.25}, {"label":"K301", "x":1.25, "y":3}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K312", "x":11.25, "y":3, "w":1.75}, {"label":"K313", "x":13, "y":3}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.25}, {"label":"K406", "x":6, "y":4, "w":1.25}, {"label":"K408", "x":7.25, "y":4, "w":2.75}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] + }, + "LAYOUT_mitchsplit": { + "key_count": 64, + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K014", "x":13, "y":0, "w":2}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":2.25}, {"label":"K302", "x":2.25, "y":3}, {"label":"K303", "x":3.25, "y":3}, {"label":"K304", "x":4.25, "y":3}, {"label":"K305", "x":5.25, "y":3}, {"label":"K306", "x":6.25, "y":3}, {"label":"K307", "x":7.25, "y":3}, {"label":"K308", "x":8.25, "y":3}, {"label":"K309", "x":9.25, "y":3}, {"label":"K310", "x":10.25, "y":3}, {"label":"K311", "x":11.25, "y":3}, {"label":"K313", "x":12.25, "y":3, "w":1.75}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K404", "x":3.75, "y":4, "w":2.75}, {"label":"K406", "x":6.5, "y":4, "w":1.25}, {"label":"K408", "x":7.75, "y":4, "w":2.25}, {"label":"K410", "x":10, "y":4, "w":1.25}, {"label":"K411", "x":11.25, "y":4, "w":1.25}, {"label":"K413", "x":12.5, "y":4, "w":1.25}, {"label":"K414", "x":13.75, "y":4, "w":1.25}] + } + } +} diff --git a/keyboards/acr60/keymaps/default/keymap.c b/keyboards/acr60/keymaps/default/keymap.c index c9ea787dcf..a07e0ddc59 100644 --- a/keyboards/acr60/keymaps/default/keymap.c +++ b/keyboards/acr60/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "acr60.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) @@ -12,21 +12,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * accent key set up on the 2nd layer, although on the first layer it includes grave key (tilde) when shift is held down, * via the function actions code at the bottom. */ - KEYMAP( + 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, 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, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, MO(2), KC_NO, MO(1), KC_RCTL), - KEYMAP( + 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_TRNS, KC_DEL, KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, 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, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - KEYMAP( + LAYOUT( KC_TRNS, M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/acr60/keymaps/mitch/keymap.c b/keyboards/acr60/keymaps/mitch/keymap.c index 566b27359e..b7fcb5a04a 100644 --- a/keyboards/acr60/keymaps/mitch/keymap.c +++ b/keyboards/acr60/keymaps/mitch/keymap.c @@ -1,4 +1,4 @@ -#include "acr60.h" +#include QMK_KEYBOARD_H #define _DFT 0 #define _NGUI 1 @@ -18,8 +18,9 @@ /* * This is Mitch's default ACR60 layout (also DZ60, on which the ACR60 is based). This is a * Mac-oriented layout, as noted by the GUI keys immediately next to the space bar area of the - * lower modifier row. This uses the MITCHSPLIT keymap as defined in arc60.h, which uses a - * 3-split space bar and a split right shift. Otherwise it's a standard 60% layout (for now). + * lower modifier row. This uses the LAYOUT_mitchsplit keymap as defined in arc60.h, which + * uses a 3-split space bar and a split right shift. Otherwise it's a standard 60% layout (for + * now). * * For me, this is a great place to start getting used to a split key setup and still mostly * sticking to a standard staggered 60% layout so my entire game isn't thrown off. @@ -62,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * * Hit MO(_FN) and Alt in that order to lock into the _FN layer. */ - [_DFT] = MITCHSPLIT( /* Basic QWERTY */ + [_DFT] = LAYOUT_mitchsplit( /* Basic QWERTY */ 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_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, \ 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, \ @@ -91,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * to the default layer. */ /* Layer 2: "special effects": RGB lighting, backlighting, bootloader */ - [_NGUI] = MITCHSPLIT( + [_NGUI] = LAYOUT_mitchsplit( ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ @@ -118,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * To go to the _NGUI layer, Fn+comma, to go to _DFT from _NGUI, hit Fn+M. */ /* Layer 1: Functions, primary layer switching, media controls, directional */ - [_FN] = MITCHSPLIT( + [_FN] = LAYOUT_mitchsplit( 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, bbbbbb, bbbbbb, bbbbbb, bbbbbb, bbbbbb, KC_HOME, KC_PGUP, KC_UP , KC_PGDOWN,KC_END, bbbbbb, bbbbbb, bbbbbb, \ ______, KC_VOLD, KC_VOLU, KC_MUTE, bbbbbb, bbbbbb, bbbbbb, KC_LEFT, KC_DOWN, KC_RIGHT, bbbbbb, bbbbbb, ______, \ @@ -159,7 +160,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * something specific more quickly. */ /* Layer 2: "special effects": RGB lighting, backlighting, bootloader */ - [_SFX] = MITCHSPLIT( + [_SFX] = LAYOUT_mitchsplit( ______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW,RGB_M_SN,RGB_M_K, RGB_M_X, RGB_M_G,______, ______, ______, ______, ______, \ ______, BL_TOGG, BL_STEP, BL_DEC, BL_INC, ______, ______, ______, ______, ______, ______, ______, ______, RESET, \ ______, RGB_TOG, RGB_MOD,______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ -- cgit v1.2.3 From 0026da1414a3660064f976f4fb47abee4b16ed45 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 22 May 2018 20:14:50 -0700 Subject: Fix to KC60 LAYOUT_60_ansi matrix (#3026) --- keyboards/kc60/kc60.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'keyboards') diff --git a/keyboards/kc60/kc60.h b/keyboards/kc60/kc60.h index 227d1f130d..b8e16c0b30 100644 --- a/keyboards/kc60/kc60.h +++ b/keyboards/kc60/kc60.h @@ -41,9 +41,9 @@ * |-----------------------------------------------------------------------------------------+ * | K10 | K11 | K12 | K13 | K14 | K15 | K16 | K17 | K18 | K19 | K1A | K1B | K1C | K1D | * |-----------------------------------------------------------------------------------------+ - * | K20 | K21 | K22 | K23 | K24 | K25 | K26 | K17 | K28 | K29 | K2A | K2B | K2C | + * | K20 | K21 | K22 | K23 | K24 | K25 | K26 | K17 | K28 | K29 | K2A | K2B | K2D | * |-----------------------------------------------------------------------------------------+ - * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3C | + * | K30 | K32 | K33 | K34 | K35 | K36 | K37 | K38 | K39 | K3A | K3B | K3D | * |-----------------------------------------------------------------------------------------+ * | K40 | K41 | K42 | K45 | K4A | K4B | K4C | K4D | * `-----------------------------------------------------------------------------------------' @@ -52,15 +52,15 @@ #define LAYOUT_60_ansi( \ 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, \ - K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2D, \ + K30, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3D, \ K40, K41, K42, K45, K4A, K4B, K4C, 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, K2C, KC_NO }, \ - { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, KC_NO }, \ - { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, 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, KC_NO, K2D }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, KC_NO, K3D }, \ + { K40, K41, K42, KC_NO, KC_NO, K45, KC_NO, KC_NO, KC_NO, KC_NO, K4A, K4B, K4C, K4D } \ } /* Mini Lshift -- cgit v1.2.3 From 575b2a66df2d75fa6cf689912b0c1a0816f3fe66 Mon Sep 17 00:00:00 2001 From: Felipe Coury Date: Wed, 23 May 2018 00:53:11 -0300 Subject: Adds Zlant keyboard support (#3028) * Added Zlant support * Uses LAYOUT and identifies individual layers * Removed deprecated =? usage on rules.mk * Adds readme for Zlant keyboard and its default layout * Fixed LAYOUT constant * Minor zlant readme formatting fix --- keyboards/zlant/config.h | 58 +++++++++++++++++++++++++++++++ keyboards/zlant/keymaps/default/keymap.c | 20 +++++++++++ keyboards/zlant/keymaps/default/readme.md | 5 +++ keyboards/zlant/readme.md | 17 +++++++++ keyboards/zlant/rules.mk | 56 +++++++++++++++++++++++++++++ keyboards/zlant/zlant.c | 1 + keyboards/zlant/zlant.h | 18 ++++++++++ 7 files changed, 175 insertions(+) create mode 100755 keyboards/zlant/config.h create mode 100755 keyboards/zlant/keymaps/default/keymap.c create mode 100644 keyboards/zlant/keymaps/default/readme.md create mode 100644 keyboards/zlant/readme.md create mode 100755 keyboards/zlant/rules.mk create mode 100755 keyboards/zlant/zlant.c create mode 100755 keyboards/zlant/zlant.h (limited to 'keyboards') diff --git a/keyboards/zlant/config.h b/keyboards/zlant/config.h new file mode 100755 index 0000000000..456d225aa2 --- /dev/null +++ b/keyboards/zlant/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Matthew Cordier +#define PRODUCT Zlant +#define DESCRIPTION keyboard firmware for Zlant + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B0, B1, D4, D5 } +#define MATRIX_COL_PINS { F0, F1, F4, F5, F6, F7, B7, D1, D2, D3, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ + +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 0 +#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 + +/* 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 + +#define RGB_DI_PIN D6 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/zlant/keymaps/default/keymap.c b/keyboards/zlant/keymaps/default/keymap.c new file mode 100755 index 0000000000..d586c841d8 --- /dev/null +++ b/keyboards/zlant/keymaps/default/keymap.c @@ -0,0 +1,20 @@ +#include QMK_KEYBOARD_H + +#define BASE 0 +#define FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [BASE] = 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + 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), + + [FN] = LAYOUT( + KC_TRNS, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_PGUP, KC_HOME, KC_TRNS, KC_TRNS, + RGB_VAI, RGB_VAD, RESET, KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_END, KC_TRNS, KC_DEL) + +}; diff --git a/keyboards/zlant/keymaps/default/readme.md b/keyboards/zlant/keymaps/default/readme.md new file mode 100644 index 0000000000..968702a16c --- /dev/null +++ b/keyboards/zlant/keymaps/default/readme.md @@ -0,0 +1,5 @@ +![Zlant Layout Image](https://i.imgur.com/Siz8qsL.jpg) + +# Default Zlant Layout + +This is the default layout that comes flashed on the Zlant prototype. diff --git a/keyboards/zlant/readme.md b/keyboards/zlant/readme.md new file mode 100644 index 0000000000..0780cedeb1 --- /dev/null +++ b/keyboards/zlant/readme.md @@ -0,0 +1,17 @@ +# Zlant + +![Zlant](https://i.imgur.com/Siz8qsL.jpg) + +A compact 40% inspired by the Plank with a staggered layout instead. + +Keyboard Maintainer: [Felipe Coury](https://github.com/fcoury) + +Hardware Supported: Zlant Prototype PCB + +Hardware Availability: Group buy soon + +Make example for this keyboard (after setting up your build environment): + + make zlant: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/zlant/rules.mk b/keyboards/zlant/rules.mk new file mode 100755 index 0000000000..482f99b223 --- /dev/null +++ b/keyboards/zlant/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 = yes diff --git a/keyboards/zlant/zlant.c b/keyboards/zlant/zlant.c new file mode 100755 index 0000000000..b60e9425c7 --- /dev/null +++ b/keyboards/zlant/zlant.c @@ -0,0 +1 @@ +#include "zlant.h" diff --git a/keyboards/zlant/zlant.h b/keyboards/zlant/zlant.h new file mode 100755 index 0000000000..48c7b3f409 --- /dev/null +++ b/keyboards/zlant/zlant.h @@ -0,0 +1,18 @@ +#ifndef KB_H +#define KB_H + +#include "quantum.h" + +#define LAYOUT( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, 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, \ + K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, 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 }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311 } \ +} + +#endif -- cgit v1.2.3 From 2ec0e014302fbdcd61047e90c131d0e1302f2e17 Mon Sep 17 00:00:00 2001 From: Barry Huang Date: Wed, 23 May 2018 23:27:52 +0800 Subject: config edit for caps indicator (#3016) * Capslock indicator add * edit * name correction * led_set_user(usb_led); delete * config edit for caps indicator * keymap.c fix * led.h include --- keyboards/pk60/pk60.c | 33 +++++++++++++++++++++++++++------ 1 file changed, 27 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/pk60/pk60.c b/keyboards/pk60/pk60.c index 9cf2e1578d..f1d9dd6412 100644 --- a/keyboards/pk60/pk60.c +++ b/keyboards/pk60/pk60.c @@ -1,12 +1,33 @@ #include "pk60.h" +#include "led.h" + +void matrix_init_kb (void) { + + matrix_init_user(); + led_init_ports(); + +} + +void matrix_scan_kb(void) { + + matrix_scan_user(); + +}; + +void led_init_ports(void) { + + DDRF |= (1 << 4); + PORTF |= (1 << 4); + +} void led_set_kb(uint8_t usb_led) { - if (usb_led & (1< Date: Thu, 24 May 2018 15:26:38 -0700 Subject: Refactor for Alps64 (#3029) * Refactor for Alps64 * Reverts deletion of LAYOUT_kc macro; renames LAYOUT_standard_60 to LAYOUT_60_ansi * Add LAYOUTS = 60_ansi to rules.mk * Rename LAYOUT_standard_60 to LAYOUT_60_ansi in info.json --- keyboards/alps64/alps64.h | 2 +- keyboards/alps64/info.json | 2 +- keyboards/alps64/keymaps/default/keymap.c | 17 +++++++++-------- keyboards/alps64/rules.mk | 2 ++ 4 files changed, 13 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/alps64/alps64.h b/keyboards/alps64/alps64.h index a7ac93421c..4e8587435c 100644 --- a/keyboards/alps64/alps64.h +++ b/keyboards/alps64/alps64.h @@ -55,7 +55,7 @@ along with this program. If not, see . { K70, K71, K72, K73, K74, K75, K76, K77 } \ } -#define LAYOUT_standard_60( \ +#define LAYOUT_60_ansi( \ K36, K37, K46, K47, K56, K57, K66, K67, K76, K77, K06, K07, K17, K27, \ K34, K35, K44, K45, K54, K55, K64, K65, K75, K05, K15, K16, K25, K24, \ K32, K33, K43, K52, K53, K63, K73, K74, K03, K04, K13, K14, K23, \ diff --git a/keyboards/alps64/info.json b/keyboards/alps64/info.json index 41735cf7ea..1f1af4f1f3 100644 --- a/keyboards/alps64/info.json +++ b/keyboards/alps64/info.json @@ -9,7 +9,7 @@ "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}, {"x":13, "y":0}, {"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":"|", "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":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":"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_standard_60": { + "LAYOUT_60_ansi": { "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}] }, diff --git a/keyboards/alps64/keymaps/default/keymap.c b/keyboards/alps64/keymaps/default/keymap.c index 12f78952df..dd598379e8 100644 --- a/keyboards/alps64/keymaps/default/keymap.c +++ b/keyboards/alps64/keymaps/default/keymap.c @@ -1,12 +1,13 @@ -#include "alps64.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* 0: qwerty */ - LAYOUT_kc( \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,EQL, NUHS, BSPC, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC,RBRC,BSLS, \ - CAPS,A, S, D, F, G, H, J, K, L, SCLN,QUOT,ENT, \ - LSFT,NUBS,Z, X, C, V, B, N, M, COMM,DOT, SLSH,RSFT,ESC, \ - LCTL,LGUI,LALT, SPC, APP, RALT,RGUI,RCTL), + /* 0: qwerty */ + 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_NUHS, 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_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_ESC, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_APP, KC_RALT, KC_RGUI, KC_RCTL + ), }; const uint16_t PROGMEM fn_actions[] = {}; diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk index 621dc5a95b..4f35faac29 100644 --- a/keyboards/alps64/rules.mk +++ b/keyboards/alps64/rules.mk @@ -64,3 +64,5 @@ CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # 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 + +LAYOUTS = 60_ansi -- cgit v1.2.3 From 9ae6f4f927bc27012929785e0f7479501406331f Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Thu, 24 May 2018 15:27:43 -0700 Subject: Wait for QMK to initialize before configuring RGB (#3030) Wait for 1 second before turning on RGB to get debug messages on console. - configure HSV color, on a brand new pro micro the default values are 0, 0, 0 --- keyboards/bigswitch/bigswitch.c | 15 +++++++++++++-- keyboards/bigswitch/config.h | 2 +- 2 files changed, 14 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/bigswitch/bigswitch.c index 05935f2e9e..3cc11e6026 100644 --- a/keyboards/bigswitch/bigswitch.c +++ b/keyboards/bigswitch/bigswitch.c @@ -16,7 +16,18 @@ along with this program. If not, see . */ #include "bigswitch.h" +volatile uint8_t runonce = true; +static uint16_t my_timer; + void matrix_init_user(void) { - rgblight_enable(); - rgblight_mode(9); + my_timer = timer_read(); +} + +void matrix_scan_user(void) { + if (runonce && timer_elapsed(my_timer) > 1000) { + runonce = false; + rgblight_sethsv(0x0, 0xff, 0x80); + rgblight_mode(9); + rgblight_enable(); + } } diff --git a/keyboards/bigswitch/config.h b/keyboards/bigswitch/config.h index b6cbf06e92..cc290fd79b 100755 --- a/keyboards/bigswitch/config.h +++ b/keyboards/bigswitch/config.h @@ -53,7 +53,7 @@ along with this program. If not, see . #ifdef RGBLIGHT_ENABLE #define RGB_DI_PIN D3 #define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 5 +#define RGBLED_NUM 8 #endif #endif -- cgit v1.2.3 From 1b81c4dd2bfd85eb4d17ee4484c98c1ec411b6ba Mon Sep 17 00:00:00 2001 From: Barry Huang Date: Fri, 25 May 2018 06:28:54 +0800 Subject: pk60.c fix for capslock indicator (#3032) * Capslock indicator add * edit * name correction * led_set_user(usb_led); delete * config edit for caps indicator * keymap.c fix * led.h include * pk60.c fix for capslock indicator --- keyboards/pk60/pk60.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/pk60/pk60.c b/keyboards/pk60/pk60.c index f1d9dd6412..a9da0ff229 100644 --- a/keyboards/pk60/pk60.c +++ b/keyboards/pk60/pk60.c @@ -15,7 +15,7 @@ void matrix_scan_kb(void) { }; void led_init_ports(void) { - + // Set capslock LED pin as pinout DDRF |= (1 << 4); PORTF |= (1 << 4); @@ -24,9 +24,11 @@ void led_init_ports(void) { void led_set_kb(uint8_t usb_led) { if (usb_led & (1< Date: Fri, 25 May 2018 00:30:32 +0200 Subject: Update my keymap (#3037) * Update keymap.c --- keyboards/planck/keymaps/sascha/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/sascha/keymap.c b/keyboards/planck/keymaps/sascha/keymap.c index ae268756b1..922c4c81d1 100644 --- a/keyboards/planck/keymaps/sascha/keymap.c +++ b/keyboards/planck/keymaps/sascha/keymap.c @@ -24,15 +24,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ * │ ` │ ! │ @ │ # │ $ │ % │ ^ │ & │ * │ ü │ ö │ ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Caps │ Home │ End │ PgUp │ PgDn │ INS │ F1 │ ß │ Left │ Down │ Up │ Rght │ + * │ SINS │ ♥ │ ≈ │ ✓ │ ✗ │ ← │ → │ € │ ß │ Ü │ Ö │ Ä │ * ├──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┼──────┤ - * │ Powr │ Rset │ VoUp │ VoDn │ BLTg │ BLSt │ BLBr │ Shft │ Alt │ Ctrl │ GUI │ │ + * │ Powr │ Rset │ BLSt │ Home │ End │ PgUp │ PgDn │ Left │ Down │ Up │ Rght │ │ * └──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┴──────┘ */ - { KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL } , - { KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , UC(L'ü') , UC(L'ö') , UC(L'ä') } , - { KC_CAPS , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_INS , KC_F1 , UC(L'ß') , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT } , - { KC_PWR , RESET , KC_VOLU , KC_VOLD , BL_TOGG , BL_STEP , BL_BRTG , KC_RSFT , KC_RALT , KC_RCTL , KC_RGUI , KC_TRNS } + { KC_TILD , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_DEL } , + { KC_GRV , KC_EXLM , KC_AT , KC_HASH , KC_DLR , KC_PERC , KC_CIRC , KC_AMPR , KC_ASTR , UC(L'ü') , UC(L'ö') , UC(L'ä') } , + { S(KC_INS) , UC(L'♥') , UC(L'≈') , UC(L'✓') , UC(L'✗') , UC(L'←') , UC(L'→') , UC(L'€') , UC(L'ß') , UC(L'Ü') , UC(L'Ö') , UC(L'Ä') } , + { KC_PWR , RESET , BL_STEP , KC_HOME , KC_END , KC_PGUP , KC_PGDN , KC_LEFT , KC_DOWN , KC_UP , KC_RGHT , KC_TRNS } } }; -- cgit v1.2.3 From dff86c6e0968d6693d715f1fbe22b805ede2e443 Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 24 May 2018 18:31:29 -0400 Subject: Fix keymap to use renamed macro (#3039) --- keyboards/fourier/keymaps/valgrahf/keymap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/fourier/keymaps/valgrahf/keymap.c b/keyboards/fourier/keymaps/valgrahf/keymap.c index 93c92a68af..53ac6f4ba4 100644 --- a/keyboards/fourier/keymaps/valgrahf/keymap.c +++ b/keyboards/fourier/keymaps/valgrahf/keymap.c @@ -34,7 +34,7 @@ enum custom_keycodes { #define KC_RVAD RGB_VAD const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = LAYOUT_kc( //,----+----+----+----+----+----|----+----+----+----+----+----+----. TAB , Q , W , E , R , T , Y , U , I , O , P , DEL,BSPC, //|----`----`----`----`----`----|----`----`----`----`----`----`----| @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`-----+----+-----+-------------|--------+-----+-----+-----+------' ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( //,----+----+----+----+----+----|----+----+----+----+----+----+----. GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , , , //|----`----`----`----`----`----|----`----`----`----`----`----`----| @@ -58,7 +58,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`-----+----+-----+-------------|--------+-----+-----+-----+------' ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( //,----+----+----+----+----+----|----+----+----+----+----+----+----. TILD,EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, , , //|----`----`----`----`----`----|----`----`----`----`----`----`----| -- cgit v1.2.3 From 6073fa774ec29dc2a781c8d8ba55c2d3dc21ced0 Mon Sep 17 00:00:00 2001 From: yiancar Date: Thu, 24 May 2018 23:32:01 +0100 Subject: Rename ANSI keymap of HS60 (#3041) --- keyboards/hs60/keymaps/ANSI/config.h | 26 -------------------- keyboards/hs60/keymaps/ANSI/keymap.c | 46 ----------------------------------- keyboards/hs60/keymaps/ANSI/readme.md | 6 ----- keyboards/hs60/keymaps/ansi/config.h | 26 ++++++++++++++++++++ keyboards/hs60/keymaps/ansi/keymap.c | 46 +++++++++++++++++++++++++++++++++++ keyboards/hs60/keymaps/ansi/readme.md | 6 +++++ 6 files changed, 78 insertions(+), 78 deletions(-) delete mode 100644 keyboards/hs60/keymaps/ANSI/config.h delete mode 100644 keyboards/hs60/keymaps/ANSI/keymap.c delete mode 100644 keyboards/hs60/keymaps/ANSI/readme.md create mode 100644 keyboards/hs60/keymaps/ansi/config.h create mode 100644 keyboards/hs60/keymaps/ansi/keymap.c create mode 100644 keyboards/hs60/keymaps/ansi/readme.md (limited to 'keyboards') diff --git a/keyboards/hs60/keymaps/ANSI/config.h b/keyboards/hs60/keymaps/ANSI/config.h deleted file mode 100644 index bab67fd558..0000000000 --- a/keyboards/hs60/keymaps/ANSI/config.h +++ /dev/null @@ -1,26 +0,0 @@ -/* -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 . -*/ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -/* Include overwrites for specific keymap */ - -#define HS60_ANSI - -#endif \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ANSI/keymap.c b/keyboards/hs60/keymaps/ANSI/keymap.c deleted file mode 100644 index 923af9e2ce..0000000000 --- a/keyboards/hs60/keymaps/ANSI/keymap.c +++ /dev/null @@ -1,46 +0,0 @@ -/* 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 . - */ -#include QMK_KEYBOARD_H - -//This is the ANSI version of the PCB - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = LAYOUT_60_ansi( /* 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_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, MO(1) , KC_APP, KC_RCTL), - -[1] = LAYOUT_60_ansi( /* FN */ - 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, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS,\ - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ - KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS,\ - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; - -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; -} \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ANSI/readme.md b/keyboards/hs60/keymaps/ANSI/readme.md deleted file mode 100644 index fa811319d3..0000000000 --- a/keyboards/hs60/keymaps/ANSI/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -The default keymap for ANSI HS60 -================================ - -![Layout image](https://imgur.com/CSyPw0J.png) - -Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ansi/config.h b/keyboards/hs60/keymaps/ansi/config.h new file mode 100644 index 0000000000..bab67fd558 --- /dev/null +++ b/keyboards/hs60/keymaps/ansi/config.h @@ -0,0 +1,26 @@ +/* +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 . +*/ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Include overwrites for specific keymap */ + +#define HS60_ANSI + +#endif \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ansi/keymap.c b/keyboards/hs60/keymaps/ansi/keymap.c new file mode 100644 index 0000000000..923af9e2ce --- /dev/null +++ b/keyboards/hs60/keymaps/ansi/keymap.c @@ -0,0 +1,46 @@ +/* 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 . + */ +#include QMK_KEYBOARD_H + +//This is the ANSI version of the PCB + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = LAYOUT_60_ansi( /* 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_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, MO(1) , KC_APP, KC_RCTL), + +[1] = LAYOUT_60_ansi( /* FN */ + 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, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET , KC_TRNS,\ + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ + KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_SPI, RGB_SPD, KC_TRNS,\ + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +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; +} \ No newline at end of file diff --git a/keyboards/hs60/keymaps/ansi/readme.md b/keyboards/hs60/keymaps/ansi/readme.md new file mode 100644 index 0000000000..fa811319d3 --- /dev/null +++ b/keyboards/hs60/keymaps/ansi/readme.md @@ -0,0 +1,6 @@ +The default keymap for ANSI HS60 +================================ + +![Layout image](https://imgur.com/CSyPw0J.png) + +Default layer is normal ANSI and Fn layer is used for RGB functions, Volume control and arrow cluster \ No newline at end of file -- cgit v1.2.3 From 0dc21d70f05a78a04b93b06d4b9b401422bb86ed Mon Sep 17 00:00:00 2001 From: Danny Date: Thu, 24 May 2018 18:40:30 -0400 Subject: Add info.json for Fourier & Laplace (#3038) * Add info.json for Fourier * Add info.json for Laplace --- keyboards/fourier/info.json | 67 +++++++++++++++++++++++++++++++++++++++++++++ keyboards/laplace/info.json | 63 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 130 insertions(+) create mode 100644 keyboards/fourier/info.json create mode 100644 keyboards/laplace/info.json (limited to 'keyboards') diff --git a/keyboards/fourier/info.json b/keyboards/fourier/info.json new file mode 100644 index 0000000000..b16476c4b9 --- /dev/null +++ b/keyboards/fourier/info.json @@ -0,0 +1,67 @@ +{ + "keyboard_name": "Fourier", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "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":7, "y":0}, + {"label":"U", "x":8, "y":0}, + {"label":"I", "x":9, "y":0}, + {"label":"O", "x":10, "y":0}, + {"label":"P", "x":11, "y":0}, + {"label":"Del", "x":12, "y":0}, + {"label":"Backspace", "x":13, "y":0}, + + {"label":"Esc", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + + {"label":"H", "x":7.25, "y":1}, + {"label":"J", "x":8.25, "y":1}, + {"label":"K", "x":9.25, "y":1}, + {"label":"L", "x":10.25, "y":1}, + {"label":";", "x":11.25, "y":1}, + {"label":"Enter", "x":12.25, "y":1, "w":1.75}, + + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + + {"label":"N", "x":7.75, "y":2}, + {"label":"M", "x":8.75, "y":2}, + {"label":"<", "x":9.75, "y":2}, + {"label":">", "x":10.75, "y":2}, + {"label":"?", "x":11.75, "y":2}, + {"label":"Shift", "x":12.75, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Alt", "x":1, "y":3}, + {"label":"Gui", "x":2, "y":3}, + {"label":"Fn1", "x":3, "y":3}, + {"label":"Space", "x":4, "y":3, "w":2.25}, + + {"label":"Backspace", "x":7.25, "y":3, "w":2.25}, + {"label":"Gui", "x":9.5, "y":3}, + {"label":"Alt", "x":10.5, "y":3, "w":1.25}, + {"label":"Fn2", "x":11.75, "y":3}, + {"label":"Ctrl", "x":12.75, "y":3, "w":1.25} + ] + } + } +} \ No newline at end of file diff --git a/keyboards/laplace/info.json b/keyboards/laplace/info.json new file mode 100644 index 0000000000..e783a1f496 --- /dev/null +++ b/keyboards/laplace/info.json @@ -0,0 +1,63 @@ +{ + "keyboard_name": "Laplace", + "url": "https://keeb.io", + "maintainer": "nooges", + "width": 13, + "height": 4, + "layouts": { + "LAYOUT": { + "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":"Del", "x":11, "y":0}, + {"label":"Backspace", "x":12, "y":0}, + + {"label":"Esc", "x":0, "y":1, "w":1.25}, + {"label":"A", "x":1.25, "y":1}, + {"label":"S", "x":2.25, "y":1}, + {"label":"D", "x":3.25, "y":1}, + {"label":"F", "x":4.25, "y":1}, + {"label":"G", "x":5.25, "y":1}, + {"label":"H", "x":6.25, "y":1}, + {"label":"J", "x":7.25, "y":1}, + {"label":"K", "x":8.25, "y":1}, + {"label":"L", "x":9.25, "y":1}, + {"label":";", "x":10.25, "y":1}, + {"label":"Enter", "x":11.25, "y":1, "w":1.75}, + + {"label":"Shift", "x":0, "y":2, "w":1.75}, + {"label":"Z", "x":1.75, "y":2}, + {"label":"X", "x":2.75, "y":2}, + {"label":"C", "x":3.75, "y":2}, + {"label":"V", "x":4.75, "y":2}, + {"label":"B", "x":5.75, "y":2}, + {"label":"N", "x":6.75, "y":2}, + {"label":"M", "x":7.75, "y":2}, + {"label":"<", "x":8.75, "y":2}, + {"label":">", "x":9.75, "y":2}, + {"label":"?", "x":10.75, "y":2}, + {"label":"Shift", "x":11.75, "y":2, "w":1.25}, + + {"label":"Ctrl", "x":0, "y":3}, + {"label":"Alt", "x":1, "y":3}, + {"label":"Gui", "x":2, "y":3}, + {"label":"Fn1", "x":3, "y":3}, + {"label":"Space", "x":4, "y":3, "w":2.25}, + {"label":"Backspace", "x":6.25, "y":3, "w":2.25}, + {"label":"Gui", "x":8.5, "y":3}, + {"label":"Alt", "x":9.5, "y":3, "w":1.25}, + {"label":"Fn2", "x":10.75, "y":3}, + {"label":"Ctrl", "x":11.75, "y":3, "w":1.25} + ] + } + } +} \ No newline at end of file -- cgit v1.2.3 From 2c01ec0d8cef183f23c4db0307a0dc5cffd5fa2b Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 24 May 2018 21:11:29 -0700 Subject: Refactor and Configurator updates for ALU84 (#3043) * Readme update per template on docs.qmk.fm * Refactor for LAYOUT macro * Add info.json --- keyboards/alu84/alu84.h | 2 +- keyboards/alu84/info.json | 12 ++++++++++++ keyboards/alu84/keymaps/default/keymap.c | 6 +++--- keyboards/alu84/keymaps/turbomech/keymap.c | 6 +++--- keyboards/alu84/readme.md | 6 ++---- 5 files changed, 21 insertions(+), 11 deletions(-) create mode 100644 keyboards/alu84/info.json (limited to 'keyboards') diff --git a/keyboards/alu84/alu84.h b/keyboards/alu84/alu84.h index 299b6a22b2..c171e4c1d8 100755 --- a/keyboards/alu84/alu84.h +++ b/keyboards/alu84/alu84.h @@ -22,7 +22,7 @@ -#define KEYMAP( \ +#define LAYOUT( \ K000, K001, K002, K003, K004, 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, \ diff --git a/keyboards/alu84/info.json b/keyboards/alu84/info.json new file mode 100644 index 0000000000..97f2b5facc --- /dev/null +++ b/keyboards/alu84/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "ALU84", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K015", "x":15, "y":0}, {"label":"K100", "x":0, "y":1}, {"label":"K101", "x":1, "y":1}, {"label":"K102", "x":2, "y":1}, {"label":"K103", "x":3, "y":1}, {"label":"K104", "x":4, "y":1}, {"label":"K105", "x":5, "y":1}, {"label":"K106", "x":6, "y":1}, {"label":"K107", "x":7, "y":1}, {"label":"K108", "x":8, "y":1}, {"label":"K109", "x":9, "y":1}, {"label":"K110", "x":10, "y":1}, {"label":"K111", "x":11, "y":1}, {"label":"K112", "x":12, "y":1}, {"label":"K114", "x":13, "y":1, "w":2}, {"label":"K115", "x":15, "y":1}, {"label":"K200", "x":0, "y":2, "w":1.5}, {"label":"K202", "x":1.5, "y":2}, {"label":"K203", "x":2.5, "y":2}, {"label":"K204", "x":3.5, "y":2}, {"label":"K205", "x":4.5, "y":2}, {"label":"K206", "x":5.5, "y":2}, {"label":"K207", "x":6.5, "y":2}, {"label":"K208", "x":7.5, "y":2}, {"label":"K209", "x":8.5, "y":2}, {"label":"K210", "x":9.5, "y":2}, {"label":"K211", "x":10.5, "y":2}, {"label":"K212", "x":11.5, "y":2}, {"label":"K213", "x":12.5, "y":2}, {"label":"K214", "x":13.5, "y":2, "w":1.5}, {"label":"K215", "x":15, "y":2}, {"label":"K300", "x":0, "y":3, "w":1.75}, {"label":"K302", "x":1.75, "y":3}, {"label":"K303", "x":2.75, "y":3}, {"label":"K304", "x":3.75, "y":3}, {"label":"K305", "x":4.75, "y":3}, {"label":"K306", "x":5.75, "y":3}, {"label":"K307", "x":6.75, "y":3}, {"label":"K308", "x":7.75, "y":3}, {"label":"K309", "x":8.75, "y":3}, {"label":"K310", "x":9.75, "y":3}, {"label":"K311", "x":10.75, "y":3}, {"label":"K312", "x":11.75, "y":3}, {"label":"K313", "x":12.75, "y":3, "w":2.25}, {"label":"K315", "x":15, "y":3}, {"label":"K400", "x":0, "y":4, "w":2.25}, {"label":"K402", "x":2.25, "y":4}, {"label":"K403", "x":3.25, "y":4}, {"label":"K404", "x":4.25, "y":4}, {"label":"K405", "x":5.25, "y":4}, {"label":"K406", "x":6.25, "y":4}, {"label":"K407", "x":7.25, "y":4}, {"label":"K408", "x":8.25, "y":4}, {"label":"K409", "x":9.25, "y":4}, {"label":"K410", "x":10.25, "y":4}, {"label":"K411", "x":11.25, "y":4}, {"label":"K413", "x":12.25, "y":4, "w":1.75}, {"label":"K414", "x":14, "y":4}, {"label":"K415", "x":15, "y":4}, {"label":"K500", "x":0, "y":5, "w":1.25}, {"label":"K501", "x":1.25, "y":5, "w":1.25}, {"label":"K503", "x":2.5, "y":5, "w":1.25}, {"label":"K506", "x":3.75, "y":5, "w":6.25}, {"label":"K510", "x":10, "y":5}, {"label":"K511", "x":11, "y":5}, {"label":"K512", "x":12, "y":5}, {"label":"K513", "x":13, "y":5}, {"label":"K514", "x":14, "y":5}, {"label":"K515", "x":15, "y":5}] + } + } +} diff --git a/keyboards/alu84/keymaps/default/keymap.c b/keyboards/alu84/keymaps/default/keymap.c index 31e640ec90..10dbe273a7 100755 --- a/keyboards/alu84/keymaps/default/keymap.c +++ b/keyboards/alu84/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "alu84.h" +#include QMK_KEYBOARD_H #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) #define _BL 0 @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -' */ - [_BL] = KEYMAP( + [_BL] = LAYOUT( KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, 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_POWER, 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, LCTL(LGUI(KC_N)), @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - -+ - - - - - - - + - - - - - - - - -+ - - - -+ - - - - - + - - - - - - -+ - - - - - - - + - - - - - - - -+ - - - - -+ - - - - -+ - - - - + - - - - -+ - - - - - -+ - - -+ - - - -+ - - - - -' */ - [_FN1] = KEYMAP( + [_FN1] = LAYOUT( LALT(LGUI(KC_Q)), 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, 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_DEL, LCTL(LALT(LGUI(KC_S))), KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/alu84/keymaps/turbomech/keymap.c b/keyboards/alu84/keymaps/turbomech/keymap.c index 97b192a7bb..b204a68657 100644 --- a/keyboards/alu84/keymaps/turbomech/keymap.c +++ b/keyboards/alu84/keymaps/turbomech/keymap.c @@ -15,7 +15,7 @@ */ -#include "alu84.h" +#include QMK_KEYBOARD_H #include "turbomech.h" #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) @@ -47,7 +47,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -' */ - [_QWERTY] = KEYMAP( + [_QWERTY] = LAYOUT( KC_ESC, KC_F14, KC_F15, LCTL(KC_UP), LCTL(KC_L), KC_F11, LALT(LGUI(KC_D)), LCTL(KC_S), LCTL(LSFT(KC_O)), LCTL(LGUI(KC_1)), LCTL(LGUI(KC_2)), LCTL(LGUI(KC_3)), KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, 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_POWER, 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, LCTL(LGUI(KC_N)), @@ -78,7 +78,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ - [_FUNCTION] = KEYMAP( + [_FUNCTION] = LAYOUT( LALT(LGUI(KC_Q)), 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_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_DEL, LCTL(LALT(LGUI(KC_S))), KC_TRNS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, diff --git a/keyboards/alu84/readme.md b/keyboards/alu84/readme.md index 9d23bff067..ab20c41389 100644 --- a/keyboards/alu84/readme.md +++ b/keyboards/alu84/readme.md @@ -5,10 +5,8 @@ ALU84 A 75% keyboard made and sold by MECHKEYS [More info on MECHKEYS](https://mechkeys.ca). -Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) - -Hardware Supported: ALU84 - +Keyboard Maintainer: [TurboMech](https://github.com/TurboMech) +Hardware Supported: ALU84 Hardware Availability: [MECHKEYS](https://mechkeys.ca) Make example for this keyboard (after setting up your build environment): -- cgit v1.2.3 From dc4298408b1cba59e926a75a62a22eb767233f5e Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Thu, 24 May 2018 23:34:19 -0700 Subject: fix LAYOUT_all in info.json (#3046) --- keyboards/pk60/info.json | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/pk60/info.json b/keyboards/pk60/info.json index 7e2d90b6c9..6c4aecc5f4 100644 --- a/keyboards/pk60/info.json +++ b/keyboards/pk60/info.json @@ -1,9 +1,9 @@ { - "keyboard_name": "pk60", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, + "keyboard_name": "pk60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, "layouts": { "LAYOUT_ansi": { "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":"Del", "x":13, "y":0}, {"label":"Bs", "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":"|", "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}, {"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, "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}] @@ -26,7 +26,7 @@ }, "LAYOUT_all": { - "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"\"", "x":12.75, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25}, {"label":"Shift", "x":0, "y":3.25}, {"x":1, "y":3.25}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25}, {"x":4.75, "y":4.25, "w":5.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + "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}, {"x":13, "y":0}, {"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":"|", "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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] } } -} \ No newline at end of file +} -- cgit v1.2.3 From 9b08fb7328137bb57d9fa55163c997cb7156ea1a Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 25 May 2018 08:39:08 -0700 Subject: Fix info.json for kbd66 (#3045) * Change LAYOUT to LAYOUT_all Fix info.json file * edit the CORRECT info.json this time * revert my errors --- keyboards/kbd66/info.json | 82 ++--------------------------- keyboards/kbd66/kbd66.h | 2 +- keyboards/kbd66/keymaps/ansi/keymap.c | 4 +- keyboards/kbd66/keymaps/default/keymap.c | 4 +- keyboards/kbd66/keymaps/iso/keymap.c | 4 +- keyboards/kbd66/keymaps/maartenwut/keymap.c | 8 +-- 6 files changed, 16 insertions(+), 88 deletions(-) (limited to 'keyboards') diff --git a/keyboards/kbd66/info.json b/keyboards/kbd66/info.json index c242abb9f0..339be95e78 100644 --- a/keyboards/kbd66/info.json +++ b/keyboards/kbd66/info.json @@ -1,84 +1,12 @@ { - "keyboard_name": "kbd66", + "keyboard_name": "KBD66", "url": "", "maintainer": "qmk", "width": 16.5, "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": "Bkspc", "x": 13, "y": 0 }, - { "label": "Bkspc", "x": 14, "y": 0 }, - { "x": 15.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 }, - { "x": 15.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 }, - { "x": 12.75, "y": 2 }, - { "label": "Enter", "x": 13.75, "y": 2, "w": 1.25 }, - { "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.25 }, - { "label": "Fn", "x": 13.5, "y": 3 }, - { "label": "Up", "x": 14.5, "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.25 }, - { "x": 4, "y": 4, "w": 2.75 }, - { "x": 6.75, "y": 4, "w": 2.75 }, - { "label": "Alt", "x": 9.5, "y": 4, "w": 1.25 }, - { "label": "Win", "x": 10.75, "y": 4, "w": 1.25 }, - { "label": "Menu", "x": 12, "y": 4, "w": 1.5 }, - { "label": "Left", "x": 13.5, "y": 4 }, - { "label": "Down", "x": 14.5, "y": 4 }, - { "label": "Right", "x": 15.5, "y": 4 } - ] - } + "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}, {"x":13, "y":0}, {"x":14, "y":0}, {"x":15.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}, {"x":15.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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"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.25}, {"x":13.5, "y":3}, {"x":14.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.5}, {"x":4, "y":4, "w":2.75}, {"x":6.75, "y":4, "w":2.75}, {"label":"Alt", "x":9.5, "y":4, "w":1.5}, {"label":"Win", "x":11, "y":4, "w":1.25}, {"label":"Menu", "x":12.25, "y":4, "w":1.25}, {"label":"Ctrl", "x":13.5, "y":4}, {"x":14.5, "y":4}, {"x":15.5, "y":4}] + } } -} +} \ No newline at end of file diff --git a/keyboards/kbd66/kbd66.h b/keyboards/kbd66/kbd66.h index 784e8e493e..6a4b99ec42 100644 --- a/keyboards/kbd66/kbd66.h +++ b/keyboards/kbd66/kbd66.h @@ -19,7 +19,7 @@ #include "quantum.h" // This a shortcut to help you visually see your layout. -#define LAYOUT( \ +#define LAYOUT_all( \ 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, k1F, \ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2D, \ diff --git a/keyboards/kbd66/keymaps/ansi/keymap.c b/keyboards/kbd66/keymaps/ansi/keymap.c index 253d8d5db3..f2275d9f63 100644 --- a/keyboards/kbd66/keymaps/ansi/keymap.c +++ b/keyboards/kbd66/keymaps/ansi/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = LAYOUT( +[_L0] = LAYOUT_all( 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, XXXXX, 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, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |PDn|SLk| * `-------------------------------------------------------------------' */ -[_L1] = LAYOUT( +[_L1] = 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_HOME, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, RESET, _____, _____, _____, _____, _____, _____, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _____, _____, diff --git a/keyboards/kbd66/keymaps/default/keymap.c b/keyboards/kbd66/keymaps/default/keymap.c index 3e8a90ee55..6a4c0b57f6 100644 --- a/keyboards/kbd66/keymaps/default/keymap.c +++ b/keyboards/kbd66/keymaps/default/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = LAYOUT( +[_L0] = LAYOUT_all( 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_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, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |PDn|SLk| * `-------------------------------------------------------------------' */ -[_L1] = LAYOUT( +[_L1] = 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_HOME, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, RESET, _____, _____, _____, _____, _____, _____, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _____, _____, diff --git a/keyboards/kbd66/keymaps/iso/keymap.c b/keyboards/kbd66/keymaps/iso/keymap.c index 6b9b7ac4d4..4e30409849 100644 --- a/keyboards/kbd66/keymaps/iso/keymap.c +++ b/keyboards/kbd66/keymaps/iso/keymap.c @@ -35,7 +35,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctl |OS |Alt | Space |Alt | Fn |Ctl |LFT|DWN|RIG| * `-------------------------------------------------------------------' */ -[_L0] = LAYOUT( +[_L0] = LAYOUT_all( 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_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_NUHS, 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, @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | |PDn|SLk| * `-------------------------------------------------------------------' */ -[_L1] = LAYOUT( +[_L1] = 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_HOME, _____, _____, _____, _____, _____, _____, _____, _____, _____, _____, KC_PSCR, KC_VOLD, KC_VOLU, KC_MUTE, KC_END, RESET, _____, _____, _____, _____, _____, _____, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, _____, _____, diff --git a/keyboards/kbd66/keymaps/maartenwut/keymap.c b/keyboards/kbd66/keymaps/maartenwut/keymap.c index da438022e6..daeb934778 100755 --- a/keyboards/kbd66/keymaps/maartenwut/keymap.c +++ b/keyboards/kbd66/keymaps/maartenwut/keymap.c @@ -14,7 +14,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Main Layer -[_MA] = LAYOUT( +[_MA] = LAYOUT_all( 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_MPLY, 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, @@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LGUI, KC_LALT, SPACE, SPACE, KC_RALT, KC_RCTRL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), //Function Layer -[_FL] = LAYOUT( +[_FL] = 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, TRNS, RESET, KC_PSCR, TRNS, ______, ______, ______, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______, TRNS, ______, ______, ______, TRNS, TG(_GA), TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, @@ -30,7 +30,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, ______, KC_PGDN, ______), //Arrow keys layer (space bar) -[_AR] = LAYOUT( +[_AR] = 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, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, @@ -38,7 +38,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS), //Game layer (fn + g) -[_GA] = LAYOUT( +[_GA] = LAYOUT_all( TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, -- cgit v1.2.3 From 910c50bca109e998dd3fa0775d73b1030ed4827e Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 25 May 2018 08:39:39 -0700 Subject: Add some generic/sparse readmes to get rid of errors (#3048) --- keyboards/chibios_test/readme.md | 3 +++ keyboards/chibios_test/stm32_f072_onekey/readme.md | 3 +++ keyboards/chibios_test/stm32_f103_onekey/readme.md | 3 +++ keyboards/chibios_test/teensy_lc_onekey/readme.md | 3 +++ 4 files changed, 12 insertions(+) create mode 100644 keyboards/chibios_test/readme.md create mode 100644 keyboards/chibios_test/stm32_f072_onekey/readme.md create mode 100644 keyboards/chibios_test/stm32_f103_onekey/readme.md create mode 100644 keyboards/chibios_test/teensy_lc_onekey/readme.md (limited to 'keyboards') diff --git a/keyboards/chibios_test/readme.md b/keyboards/chibios_test/readme.md new file mode 100644 index 0000000000..096ecd6aea --- /dev/null +++ b/keyboards/chibios_test/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test Keyboards + +Test code for several ARM based ChibiOS boards \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f072_onekey/readme.md b/keyboards/chibios_test/stm32_f072_onekey/readme.md new file mode 100644 index 0000000000..c5e504e49c --- /dev/null +++ b/keyboards/chibios_test/stm32_f072_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the stm32_f072 one key keyboard \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f103_onekey/readme.md b/keyboards/chibios_test/stm32_f103_onekey/readme.md new file mode 100644 index 0000000000..d375ef7d84 --- /dev/null +++ b/keyboards/chibios_test/stm32_f103_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the stm32_f103 one key keyboard \ No newline at end of file diff --git a/keyboards/chibios_test/teensy_lc_onekey/readme.md b/keyboards/chibios_test/teensy_lc_onekey/readme.md new file mode 100644 index 0000000000..4f99113870 --- /dev/null +++ b/keyboards/chibios_test/teensy_lc_onekey/readme.md @@ -0,0 +1,3 @@ +# ChibiOS Test + +Test code for the teensy lc one key keyboard \ No newline at end of file -- cgit v1.2.3 From 220b5119fa38c73deab194affe65b74073890c8e Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 25 May 2018 08:40:36 -0700 Subject: Refactor for AMJ40 (#3047) --- keyboards/amj40/amj40.h | 2 +- keyboards/amj40/keymaps/default/keymap.c | 10 +++++----- keyboards/amj40/keymaps/fabian/keymap.c | 18 +++++++++--------- keyboards/amj40/keymaps/jetpacktuxedo/keymap.c | 12 ++++++------ keyboards/amj40/keymaps/myee/keymap.c | 10 +++++----- 5 files changed, 26 insertions(+), 26 deletions(-) (limited to 'keyboards') diff --git a/keyboards/amj40/amj40.h b/keyboards/amj40/amj40.h index ab629cba7f..613f3740f9 100755 --- a/keyboards/amj40/amj40.h +++ b/keyboards/amj40/amj40.h @@ -17,7 +17,7 @@ * | 30 | 31 | 32 | 34 | 35 | 39 | 3A | 3B | * `-----------------------------------------------------------' */ -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1b, \ k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ diff --git a/keyboards/amj40/keymaps/default/keymap.c b/keyboards/amj40/keymaps/default/keymap.c index e4607eae5c..c81317b844 100755 --- a/keyboards/amj40/keymaps/default/keymap.c +++ b/keyboards/amj40/keymaps/default/keymap.c @@ -1,7 +1,7 @@ -#include "amj40.h" +#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. @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | LCtl | LGui| LAlt| spc fn0 | spc fn1 |fn2|RAlt|RCtl | * `-----------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ 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,\ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_LOWER] = KEYMAP( \ + [_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_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),BL_TOGG, BL_INC, BL_DEC, \ @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_RAISE] = KEYMAP( \ + [_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_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_DEL, \ @@ -95,7 +95,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Stop| App| | * `-----------------------------------------------------------' */ - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, \ _______, _______, _______, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, \ diff --git a/keyboards/amj40/keymaps/fabian/keymap.c b/keyboards/amj40/keymaps/fabian/keymap.c index 41a128e2b2..5055771ff8 100755 --- a/keyboards/amj40/keymaps/fabian/keymap.c +++ b/keyboards/amj40/keymaps/fabian/keymap.c @@ -13,11 +13,11 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "amj40.h" +#include QMK_KEYBOARD_H // Set the custom keymap -#undef KEYMAP -#define KEYMAP( \ +#undef LAYOUT +#define LAYOUT( \ 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, \ @@ -73,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT( \ HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ CTL_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ @@ -91,7 +91,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_COLEMAK] = KEYMAP( \ +[_COLEMAK] = LAYOUT( \ HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ CTL_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ SFT_BSP, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT, \ @@ -109,7 +109,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Meh | Alt | GUI | Lower and Space | Raise | GUI |AltGr | Ctrl | * `-----------------------------------------------------------------------------------' */ -[_DVORAK] = KEYMAP( \ +[_DVORAK] = LAYOUT( \ HPR_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ CTL_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ SFT_BSP, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT, \ @@ -127,7 +127,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_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_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, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_BTN1, \ @@ -145,7 +145,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_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_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_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_BTN2, \ @@ -163,7 +163,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ -[_ADJUST] = KEYMAP( \ +[_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, RESET, KC_DEL, \ _______, _______, MU_MOD, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ _______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______, \ diff --git a/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c index 62f4376f58..caf6700bc3 100755 --- a/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/amj40/keymaps/jetpacktuxedo/keymap.c @@ -1,8 +1,8 @@ -#include "amj40.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Default Layer - [0] = KEYMAP( \ + [0] = 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,\ LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(2, KC_ENT),\ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RSFT, KC_SLSH),\ @@ -10,7 +10,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Number Layer - [1] = KEYMAP( \ + [1] = LAYOUT( \ 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_TRNS, KC_MINS, KC_EQL, KC_SCLN, KC_QUOT, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, MT(MOD_RSFT, KC_BSLS), \ @@ -18,7 +18,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Shifted Layer - [2] = KEYMAP( \ + [2] = 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,\ KC_TRNS, KC_UNDS, KC_PLUS, KC_COLN, KC_DQUO, KC_TRNS, KC_HOME, KC_PGDN, KC_PGUP, KC_END, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PIPE, \ @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Fkey Layer - [3] = KEYMAP( \ + [3] = LAYOUT( \ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET,\ KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ @@ -34,7 +34,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), // Gaming Layer - [4] = KEYMAP( \ + [4] = LAYOUT( \ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,\ KC_TAB, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ diff --git a/keyboards/amj40/keymaps/myee/keymap.c b/keyboards/amj40/keymaps/myee/keymap.c index b36d6c61e1..baddea72d5 100644 --- a/keyboards/amj40/keymaps/myee/keymap.c +++ b/keyboards/amj40/keymaps/myee/keymap.c @@ -1,7 +1,7 @@ -#include "amj40.h" +#include QMK_KEYBOARD_H // Keymap myee // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -28,28 +28,28 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( \ + [_QWERTY] = LAYOUT( \ KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,\ F(2), 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), KC_RGUI,KC_RALT, KC_RCTL \ ), - [_LOWER] = KEYMAP( \ + [_LOWER] = LAYOUT( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_UP, KC_MINS, KC_EQL, KC_DEL, \ _______, _______, KC_ASTR, KC_LBRC, KC_RBRC, KC_QUOT, KC_DQUO, KC_LEFT, KC_DOWN, KC_RGHT, KC_BSLS, \ _______, _______, _______, KC_LPRN, KC_RPRN, KC_HOME, KC_PGUP, KC_PGDN, KC_END, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______ \ ), - [_RAISE] = KEYMAP( \ + [_RAISE] = LAYOUT( \ KC_GRV, KC_LPRN, KC_RPRN, KC_DQUO, KC_QUOT, KC_SCLN, KC_COLON,KC_UNDS, KC_PLUS, _______, _______, KC_BSPC, \ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, \ _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, BL_INC, BL_DEC \ ), - [_ADJUST] = KEYMAP( \ + [_ADJUST] = LAYOUT( \ _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ -- cgit v1.2.3 From 82466aafd12f936cd3b2582ea7deaf507ec893ec Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 25 May 2018 10:51:06 -0700 Subject: Fix Orthodox compile issue in online configurator (#3044) --- keyboards/orthodox/serial.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/orthodox/serial.c b/keyboards/orthodox/serial.c index 4936e4249f..fea57b6510 100644 --- a/keyboards/orthodox/serial.c +++ b/keyboards/orthodox/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. -- cgit v1.2.3 From 24b8d84b6c3e2a49ce98a48738e469079d051bc8 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Fri, 25 May 2018 11:49:43 -0700 Subject: Fix Split keyboards so they compile on Configurator (#3051) * Fix serial split for BFO9000 * Fix serial split for DeltaSplit75 * Fix serial split for Helix * Fix serial split for MiniDox * Fix serial split for Viterbi * Revert "Fix serial split for Helix" since it's super complex This reverts commit 72538df105ba6d5fe6915773a20c509f2a47785d. We'll let the helix owner fix this issue, or dive into the code later --- keyboards/bfo9000/serial.c | 2 +- keyboards/deltasplit75/serial.c | 2 +- keyboards/minidox/serial.c | 2 +- keyboards/viterbi/serial.c | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/bfo9000/serial.c b/keyboards/bfo9000/serial.c index 4936e4249f..fea57b6510 100644 --- a/keyboards/bfo9000/serial.c +++ b/keyboards/bfo9000/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/deltasplit75/serial.c b/keyboards/deltasplit75/serial.c index 6faed09ce0..74bcbb6bf6 100644 --- a/keyboards/deltasplit75/serial.c +++ b/keyboards/deltasplit75/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/minidox/serial.c b/keyboards/minidox/serial.c index 6faed09ce0..74bcbb6bf6 100644 --- a/keyboards/minidox/serial.c +++ b/keyboards/minidox/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. diff --git a/keyboards/viterbi/serial.c b/keyboards/viterbi/serial.c index 6faed09ce0..74bcbb6bf6 100644 --- a/keyboards/viterbi/serial.c +++ b/keyboards/viterbi/serial.c @@ -12,7 +12,7 @@ #include #include "serial.h" -#ifdef USE_SERIAL +#ifndef USE_I2C // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. -- cgit v1.2.3 From 9200934de79882ce20299503f7c02cece8d80de6 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 25 May 2018 12:47:16 -0700 Subject: Attempting Debug on Configurator (re: #3052) (#3053) --- keyboards/amj60/info.json | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 keyboards/amj60/info.json (limited to 'keyboards') diff --git a/keyboards/amj60/info.json b/keyboards/amj60/info.json new file mode 100644 index 0000000000..c8fb68b28d --- /dev/null +++ b/keyboards/amj60/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "AMJ60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_60_ansi": { + "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":"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":"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":"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":"k3d", "x":12.25, "y":3, "w":2.75}, {"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":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + } + } +} -- cgit v1.2.3 From a659666e8af1643cd7a0273259dd0a782b5e5cc6 Mon Sep 17 00:00:00 2001 From: yiancar Date: Sat, 26 May 2018 04:07:06 +0100 Subject: Fix HS60 config for ANSI keymap (#3054) - This is mostly for safety --- keyboards/hs60/config.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'keyboards') diff --git a/keyboards/hs60/config.h b/keyboards/hs60/config.h index 185b31cf61..d37fc8990d 100644 --- a/keyboards/hs60/config.h +++ b/keyboards/hs60/config.h @@ -133,7 +133,13 @@ along with this program. If not, see . #define DRIVER_COUNT 2 #define DRIVER_1_LED_TOTAL 30 + +#ifdef HS60_ANSI +#define DRIVER_2_LED_TOTAL 31 +#else #define DRIVER_2_LED_TOTAL 32 +#endif + #define DRIVER_LED_TOTAL DRIVER_1_LED_TOTAL + DRIVER_2_LED_TOTAL #endif -- cgit v1.2.3 From 6e867a7ecc3953c5ca2e97df986446e31ac96f03 Mon Sep 17 00:00:00 2001 From: Salt-Peanuts Date: Sat, 26 May 2018 11:54:38 -0400 Subject: Updated keymaps (#3056) * Updated info and fixed minor errors * Updated folder name; overdue updates to keymap and readme files Updated folder name; overdue updates to keymap and readme files * Updated tri-layer feature * Revert "Updated tri-layer feature" This reverts commit 59b8b85761740e24f671e10fceea869f06a33ade. * Updated tri-layer on keymap * Fixed typos * Updated keymaps --- .../kinesis/keymaps/insertsnideremarks/config.h | 1 + .../kinesis/keymaps/insertsnideremarks/keymap.c | 554 ++++++++++----------- .../kinesis/keymaps/insertsnideremarks/readme.md | 55 +- 3 files changed, 266 insertions(+), 344 deletions(-) (limited to 'keyboards') diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/config.h b/keyboards/kinesis/keymaps/insertsnideremarks/config.h index 38d08b20c8..02eed310a1 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/config.h +++ b/keyboards/kinesis/keymaps/insertsnideremarks/config.h @@ -7,6 +7,7 @@ // place overrides here #define PREVENT_STUCK_MODIFIERS #define TAPPING_TERM 175 +#define TAPPING_TOGGLE 2 #endif diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c index 999e76ca3f..b318e1bea0 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c +++ b/keyboards/kinesis/keymaps/insertsnideremarks/keymap.c @@ -5,30 +5,32 @@ extern keymap_config_t keymap_config; enum kinesis_layers { - _CMODDH, // Colemak Mod-DH Matrix (default layer) + _COLEMAK, // Colemak (default layer) _QWERTY, // Qwerty - _COLEMAK, // Colemak _NUMBERS, // Numbers & Symbols _NUMBERS2, // Numbers & Symbols 2 (identical as _NUMBERS; basically used for tri-layer access to _ADJUST) _FUNCTION, // Function _FUNCTION2, // Function 2 (identical as _FUNCTION; used to allow for easier use of space and backspace while using function layer arrows) _NUMPAD, // Numpad - _CMODDHGM, // Colemak Mod-DH Matrix gaming/vanilla (no dual-role keys with layer access) + _COLEMAKGM, // Colemak gaming/vanilla (no dual-role keys with layer access) _QWERTYGM, // QWERTY gaming/vanilla (no dual-role keys with layer access) - _ADJUST // Adjust layer + _ADJUST, // Adjust layer, accessed via tri-layer feature) + _ADJUST2 // Second Adjust layer, accessed outside of tri-layer feature) }; enum kinesis_keycodes { - CMODDH = SAFE_RANGE, + COLEMAK = SAFE_RANGE, QWERTY, - COLEMAK, - CMODDHGM, + COLEMAKGM, QWERTYGM, + NUMPAD = TG(_NUMPAD), + ADJUST = MO(_ADJUST2), SPCFN = LT(_FUNCTION, KC_SPC), BSPCFN = LT(_FUNCTION2, KC_BSPC), ENTNS = LT(_NUMBERS, KC_ENT), DELNS = LT(_NUMBERS2, KC_DEL), CTLESC = CTL_T(KC_ESC), + ALTAPP = ALT_T(KC_APP), NKROTG = MAGIC_TOGGLE_NKRO }; @@ -52,13 +54,13 @@ enum { void dance_LAYER_finished(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { - layer_on(_ADJUST); - set_oneshot_layer(_ADJUST, ONESHOT_START); + layer_on(_ADJUST2); + set_oneshot_layer(_ADJUST2, ONESHOT_START); } } void dance_LAYER_reset(qk_tap_dance_state_t *state, void *user_data) { if (state->count == 2) { - layer_off(_ADJUST); + layer_off(_ADJUST2); clear_oneshot_layer_state(ONESHOT_PRESSED); } } @@ -78,82 +80,83 @@ qk_tap_dance_action_t tap_dance_actions[] = { }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Colemak Mod-DH Matrix -* (Defauit layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) +/* Fundtion Row Keys +/ (Identical across layers, unless otherwise noted; Numpad is a toggle; Adjust is mometary) * ,-----------------------------------------------------------------------------------------------------------. * | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| * `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |Esc/Ctrl| A | R | S | T | G | | M | N | E | I | O | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |SC Shift| Z | X | C | D | V | | K | H | , | . | / |SC Shift| -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl| Hyper | | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | -* | / | / |-------| |-------| / | / | -* | Fn | Number| Bspc | | Tab |Number2| Fn2 | -* `-----------------------' `-----------------------' */ -[_CMODDH] = KEYMAP( + +/* Colemak +* (Defauit layer; keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl| Hyper | | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | +* | / | / |-------| |-------| / | / | +* | Fn | Number| Bspc | | Enter |Number2| Fn2 | +* `-----------------------' `-----------------------' +*/ +[_COLEMAK] = KEYMAP( // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, - CTLESC, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSPO, KC_Z, KC_X, KC_C, KC_D, KC_V, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, + CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_INS, KC_GRV, KC_LBRC, KC_RBRC, //Left Thumb CTLESC, ALL_T(KC_NO), - ALT_T(KC_APP), + ALTAPP, SPCFN, ENTNS, KC_BSPC, //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, //Right Thumb KC_RALT, KC_RCTL, KC_RGUI, - KC_TAB, DELNS, BSPCFN + KC_ENT, DELNS, BSPCFN ), /* QWERTY * (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |Esc/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |SC Shift| Z | X | C | V | B | | N | M | , | . | / |SC Shift| -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl| Hyper | | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | -* | / | / |-------| |-------| / | / | -* | Fn | Number| Bspc | | Tab |Number2| Fn2 | -* `-----------------------' `-----------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |Esc/Ctrl| A | S | D | F | G | | H | J | K | L | ; | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* |SC Shift| Z | X | C | V | B | | N | M | , | . | / |SC Shift| +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl| Hyper | | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | +* | / | / |-------| |-------| / | / | +* | Fn | Number| Bspc | | Enter |Number2| Fn2 | +* `-----------------------' `-----------------------' */ [_QWERTY] = KEYMAP( // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, CTLESC, KC_A, KC_S, KC_D, KC_F, KC_G, @@ -161,11 +164,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_INS, KC_GRV, KC_LBRC, KC_RBRC, //Left Thumb CTLESC, ALL_T(KC_NO), - ALT_T(KC_APP), + ALTAPP, SPCFN, ENTNS, KC_BSPC, //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -174,81 +177,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Right Thumb KC_RALT, KC_RCTL, KC_RGUI, - KC_TAB, DELNS, BSPCFN -), - -/* Colemak -* (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl| Hyper | | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | Space | Enter |App/Alt| | RGUI | Delete| Bspc | -* | / | / |-------| |-------| / | / | -* | Fn | Number| Bspc | | Tab |Number2| Fn2 | -* `-----------------------' `-----------------------' -*/ -[_COLEMAK] = KEYMAP( - // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, - CTLESC, KC_A, KC_R, KC_S, KC_T, KC_D, - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, - KC_INS, KC_GRV, KC_LBRC, KC_RBRC, - //Left Thumb - CTLESC, ALL_T(KC_NO), - ALT_T(KC_APP), - SPCFN, ENTNS, KC_BSPC, - //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), - KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - //Right Thumb - KC_RALT, KC_RCTL, - KC_RGUI, - KC_TAB, DELNS, BSPCFN + KC_ENT, DELNS, BSPCFN ), /* Number/symbol layer * (Multiple characters: single-tap for first, double-tap for second) -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | ( | ) | [ { | ] } | | | | | | -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | | | | | -* `-----------------------' `-----------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | 6 | 7 | 8 | 9 | 0 | | ^ | & | * | ( | ) | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | 1 | 2 | 3 | 4 | 5 | | ! | @ | # | $ | % | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | . | / * | - _ | + = | | ` ~ | [ { | ] } | | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ( | ) | [ { | ] } | | | | | | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' */ [_NUMBERS] = KEYMAP( // Left Hand @@ -301,27 +252,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), /* Function layer -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | Up | | | | | | Up |Ctrl+Y| | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | |Ctrl+A| Left | Down | Right|C+A+Tb| | PgUp | Right| Down | Left | Home | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | |Ctrl+Z|Ctrl+X|Ctrl+C|Ctrl+V| Bspc | | PgDn | Mute | Vol- | Vol+ | End | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | | | | | Prev | Play | Next | Stop | -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | |C+A+Tab| | | -* `-----------------------' `-----------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | F12 | F1 | F2 | F3 | F4 | F5 | | F6 | F7 | F8 | F9 | F10 | F11 | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | Up | | | | | | Up |Ctrl+Y| | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | |Ctrl+A| Left | Down | Right|C+A+Tb| | PgUp | Right| Down | Left | Home | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | |Ctrl+Z|Ctrl+X|Ctrl+C|Ctrl+V| Bspc | | PgDn | Mute | Vol- | Vol+ | End | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | | | | | Prev | Play | Next | Stop | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' */ [_FUNCTION] = KEYMAP( // Left Hand @@ -343,9 +291,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, // Right Thumb - _______, _______, + _______, _______, _______, - LCA(KC_TAB), _______, _______ + _______, _______, _______ ), [_FUNCTION2] = KEYMAP( @@ -368,34 +316,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_PGDN, KC_MUTE, KC_VOLD, KC_VOLU, KC_END, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MSTP, // Right Thumb - _______, _______, + _______, _______, _______, - LCA(KC_TAB), _______, _______ + _______, _______, _______ ), /* Numpad layer * (Left side duplicates layout from the Numbers layer, just with numpad output; right side layout close to PC numpad layout) -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | | NumLk| | | | | | Tab | NumLk| KP / | kP *| KP - | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | KP . |KP/KP*| KP- _| KP+ =| | | KP 1 | KP 2 | KP 3 |KP Ent| | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | ( | ) | [ { | ] } | | KP 0 | , | KP . |KP Ent| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | | | | | -* `-----------------------' `-----------------------' +* ,-------------------------------------------. ,-------------------------------------------. +* | | NumLk| | | | | | Tab | NumLk| KP / | KP * | KP - | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | KP 1 | KP 2 | KP 3 | KP 4 | KP 5 | | | KP 4 | KP 5 | KP 6 | = | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | KP . |KP/KP*| KP- _| KP+ =| | | KP 1 | KP 2 | KP 3 |KP Ent| | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | ( | ) | [ { | ] } | | KP 0 | , | KP . |KP Ent| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | KP Ent| | | +* `-----------------------' `-----------------------' */ [_NUMPAD] = KEYMAP( // Left Hand @@ -422,82 +367,76 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { _______, _______, _______ ), -/* Colemak Mod-DH Matrix gaming/vanilla -* (No access to Function or Numbers layers; mainly used for gaming; double-tap the TD(ADJ) above LAlt to access Adjust layer) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Ctrl | A | R | S | T | G | | M | N | E | I | O | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | D | V | | K | H | , | . | / | Shift | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | | | LAlt | | RGUI | | | -* | Space | Enter |-------| |-------| Delete| Bspc | -* | | | Bspc | | Tab | | | -* `-----------------------' `-----------------------' +/* Colemak gaming/vanilla +* (No access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | | | LAlt | | RGUI | | | +* | Space | Enter |-------| |-------| Delete| Bspc | +* | | | Bspc | | Enter | | | +* `-----------------------' `-----------------------' */ -[_CMODDHGM] = KEYMAP( +[_COLEMAKGM] = KEYMAP( // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_B, - KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, + KC_LCTL, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_INS, KC_GRV, KC_LBRC, KC_RBRC, //Left Thumb CTLESC, TD(ADJ), KC_LALT, KC_SPC, KC_ENT, KC_BSPC, //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSLS, - KC_M, KC_N, KC_E, KC_I, KC_O, KC_QUOT, - KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, + KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, //Right Thumb KC_RALT, KC_RCTL, KC_RGUI, - KC_TAB, KC_DEL, KC_BSPC + KC_ENT, KC_DEL, KC_BSPC ), /* QWERTY gaming/vanilla -* (No access to Function or Numbers layers; mainly used for gaming; double-tap the TD(ADJ) above LAlt to access Adjust layer) -* ,-----------------------------------------------------------------------------------------------------------. -* | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | Ins | ` | [ | ] | | Left | Down | Up | Right| -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | -* ,-------|-------|-------| |-------+-------+-------. -* | | | LAlt | | RGUI | | | -* | Space | Enter |-------| |-------| Delete| Bspc | -* | | | Bspc | | Tab | | | -* `-----------------------' `-----------------------' +* (No access to Function or Numbers layers; mainly used for gaming; double-tap and hold TD(ADJ) above LAlt to access Adjust layer) +* ,-------------------------------------------. ,-------------------------------------------. +* | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Ctrl | A | S | D | F | G | | H | J | K | L | ; | ' | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | Shift | Z | X | C | V | B | | N | M | , | . | / | Shift | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | Ins | ` | [ | ] | | Left | Down | Up | Right| +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* |Esc/Ctl|TD(ADJ)| | RAlt | RCtl | +* ,-------|-------|-------| |-------+-------+-------. +* | | | LAlt | | RGUI | | | +* | Space | Enter |-------| |-------| Delete| Bspc | +* | | | Bspc | | Enter | | | +* `-----------------------' `-----------------------' */ [_QWERTYGM] = KEYMAP( // Left Hand - KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, + KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, @@ -508,7 +447,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LALT, KC_SPC, KC_ENT, KC_BSPC, //Right Hand - KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, TG(_NUMPAD), MO(_ADJUST), + KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, NUMPAD, ADJUST, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, @@ -517,52 +456,74 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Right Thumb KC_RALT, KC_RCTL, KC_RGUI, - KC_TAB, KC_DEL, KC_BSPC + KC_ENT, KC_DEL, KC_BSPC ), /* Adjust layer -* (Enter/Number + Delete/Number2 under non-gaming/vanilla layers) -* ,-----------------------------------------------------------------------------------------------------------. -* | | | | | | | | | | | | | | | | | | | -* `-----------------------------------------------------------------------------------------------------------' -* ,-------------------------------------------. ,-------------------------------------------. -* | |CModDH|Qwerty|Colmak|CMoDGM| QWGM | |Numpad| | | | | RESET | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | | | | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | |NKROTG| | | | | -* |--------+------+------+------+------+------| |------+------+------+------+------+--------| -* | | | | | | | | | | | | | | -* `--------+------+------+------+------+------' `------+------+------+------+------+--------' -* | | | | | | | | | | -* `---------------------------' `---------------------------' -* ,---------------. ,---------------. -* | | | | | | -* ,-------|-------|-------| |-------+-------+-------. -* | | | | | | | | -* | | |-------| |-------| | | -* | | | | | | | | -* `-----------------------' `-----------------------' +* (Enter/Number + Delete/Number2 under non-gaming/vanilla layers; Numpad is a toggle) +* ,-------------------------------------------. ,-------------------------------------------. +* | |Colmak|Qwerty| |ClmkGM| QWGM | |Numpad| | | | | RESET | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | |NKROTG| | | | | +* |--------+------+------+------+------+------| |------+------+------+------+------+--------| +* | | | | | | | | | | | | | | +* `--------+------+------+------+------+------' `------+------+------+------+------+--------' +* | | | | | | | | | | +* `---------------------------' `---------------------------' +* ,---------------. ,---------------. +* | | | | | | +* ,-------|-------|-------| |-------+-------+-------. +* | | | | | | | | +* | | |-------| |-------| | | +* | | | | | | | | +* `-----------------------' `-----------------------' */ [_ADJUST] = KEYMAP( // Left Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, CMODDH, QWERTY, COLEMAK, CMODDHGM, QWERTYGM, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Left Thumb + _______, _______, + _______, + _______, _______, _______, + // Right Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, + _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, + // Right Thumb + _______, _______, + _______, + _______, _______, _______ +), + +[_ADJUST2] = KEYMAP( + // Left Hand + _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, COLEMAK, QWERTY, _______, COLEMAKGM, QWERTYGM, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, // Left Thumb - _______, _______, - _______, - _______, _______, _______, + _______, _______, + _______, + _______, _______, _______, // Right Hand - _______, _______, _______, _______, _______, _______, _______, _______, _______, - TG(_NUMPAD), _______, _______, _______, _______, RESET, - _______, _______, _______, _______, _______, _______, - _______, NKROTG, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, + NUMPAD, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, + _______, NKROTG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, // Right Thumb _______, _______, _______, @@ -582,58 +543,42 @@ void persistent_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case CMODDH: + case COLEMAK: if (record->event.pressed) { - persistent_default_layer_set(1UL << _CMODDH); + persistent_default_layer_set(1UL << _COLEMAK); layer_off ( _QWERTY); - layer_off ( _COLEMAK); layer_off ( _NUMBERS); layer_off ( _NUMBERS2); layer_off ( _FUNCTION); layer_off ( _FUNCTION2); layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); + layer_off ( _COLEMAKGM); layer_off ( _QWERTYGM); layer_off ( _ADJUST); - } + layer_off ( _ADJUST2); + } return false; break; case QWERTY: if (record->event.pressed) { persistent_default_layer_set(1UL << _QWERTY); - layer_off ( _CMODDH); layer_off ( _COLEMAK); layer_off ( _NUMBERS); layer_off ( _NUMBERS2); layer_off ( _FUNCTION); layer_off ( _FUNCTION2); layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); - layer_off ( _QWERTYGM); - layer_off ( _ADJUST); - } - return false; - break; - case COLEMAK: - if (record->event.pressed) { - persistent_default_layer_set(1UL << _COLEMAK); - layer_off ( _CMODDH); - layer_off ( _QWERTY); - layer_off ( _NUMBERS); - layer_off ( _NUMBERS2); - layer_off ( _FUNCTION); - layer_off ( _FUNCTION2); - layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); + layer_off ( _COLEMAKGM); layer_off ( _QWERTYGM); layer_off ( _ADJUST); + layer_off ( _ADJUST2); + } return false; break; - case CMODDHGM: + case COLEMAKGM: if (record->event.pressed) { - default_layer_set(1UL << _CMODDHGM); - layer_off ( _CMODDH); + default_layer_set(1UL << _COLEMAKGM); layer_off ( _QWERTY); layer_off ( _COLEMAK); layer_off ( _NUMBERS); @@ -643,13 +588,13 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off ( _NUMPAD); layer_off ( _QWERTYGM); layer_off ( _ADJUST); - } + layer_off ( _ADJUST2); + } return false; break; case QWERTYGM: if (record->event.pressed) { default_layer_set(1UL << _QWERTYGM); - layer_off ( _CMODDH); layer_off ( _QWERTY); layer_off ( _COLEMAK); layer_off ( _NUMBERS); @@ -657,9 +602,10 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { layer_off ( _FUNCTION); layer_off ( _FUNCTION2); layer_off ( _NUMPAD); - layer_off ( _CMODDHGM); + layer_off ( _COLEMAKGM); layer_off ( _ADJUST); - } + layer_off ( _ADJUST2); + } return false; break; } diff --git a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md index b3c573b625..353fca0775 100644 --- a/keyboards/kinesis/keymaps/insertsnideremarks/readme.md +++ b/keyboards/kinesis/keymaps/insertsnideremarks/readme.md @@ -12,11 +12,11 @@ Changes to the thumb clusters include: I've largely left the function keys untouched, with the intension of not using them. They are neither easy to use nor reach due to their locations and size, and, prior to Advantage2, particularly terrible rubber domes were used. They have since updated the keys with Cherry ML switches on Advantage2, but did not resolve the issues of size or location. Additionally, leaving the function keys unused here makes it easier for me to adapt the keymaps to my other keyboards, most of which do not have physical function keys. -I use Colemak Mod-DH Matrix as my default layout. There are QWERTY and regular Colemak layouts as well. +I use Colemak as my default layout. I've included QWERTY here as well. -Additionally, I've added gaming/vanilla version of Colemak Mod-DH Matrix and QWERTY layouts. These layouts have no access to the Function or Numbers layers, thus no dual-role keys with layer access, and are mainly used for gaming. +Additionally, I've added gaming/vanilla version of Colemak and QWERTY layouts. These layouts have no access to the Function or Numbers layers, thus no dual-role keys with layer access, and are mainly used for gaming. -Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and Colemak. The gaming/vanilla Colemak Mod-DH Matrix and QWERTY can be set as default layer, but will not be persistent. +Persistent default layer has been enabled for Colemak and QWERTY. The gaming/vanilla Colemak and QWERTY can be set as default layer, but will not be persistent. ## Future plans @@ -25,7 +25,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and * Utilize the leftover spots on the key matrix, as well as unused pins on Teensy to run macropad and/or foot pedals. -### Colemak Mod-DH Matrix +### Colemak (Default layer, keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| @@ -33,11 +33,11 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and ,-------------------------------------------. ,-------------------------------------------. | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |Esc/Ctrl| A | R | S | T | G | | M | N | E | I | O | ' | + |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |SC Shift| Z | X | C | D | V | | K | H | , | . | / |SC Shift| + |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' @@ -49,7 +49,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and | Fn | Number| Bspc | | Tab |Number2| Fn2 | `-----------------------' `-----------------------' - + ### QWERTY (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) ,-----------------------------------------------------------------------------------------------------------. @@ -75,31 +75,6 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and `-----------------------' `-----------------------' -### Colemak - (Keys separated by /: tap for first, hold for second; uses Space Cadet Shifts) - ,-----------------------------------------------------------------------------------------------------------. - | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| - `-----------------------------------------------------------------------------------------------------------' - ,-------------------------------------------. ,-------------------------------------------. - | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |Esc/Ctrl| A | R | S | T | D | | H | N | E | I | O | ' | - |--------+------+------+------+------+------| |------+------+------+------+------+--------| - |SC Shift| Z | X | C | V | B | | K | M | , | . | / |SC Shift| - `--------+------+------+------+------+------' `------+------+------+------+------+--------' - | Ins | ` | [ | ] | | Left | Down | Up | Right| - `---------------------------' `---------------------------' - ,---------------. ,---------------. - |Esc/Ctl| Hyper | | RAlt | RCtl | - ,-------|-------|-------| |-------+-------+-------. - | Space | Enter |App/Alt| | RGUI | Delete| Bspc | - | / | / |-------| |-------| / | / | - | Fn | Number| Bspc | | Tab |Number2| Fn2 | - `-----------------------' `-----------------------' - - ### Numbers & Symbols layer (Multiple characters: single-tap for first, double-tap for second) ,-----------------------------------------------------------------------------------------------------------. @@ -155,7 +130,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and | | | | | | | | | | | | | | | | | | | `-----------------------------------------------------------------------------------------------------------' ,-------------------------------------------. ,-------------------------------------------. - | | NumLk| | | | | | Tab | NumLk| KP / | kP *| KP - | | + | | NumLk| | | | | | Tab | NumLk| KP / | KP * | KP - | | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | | KP 6 | KP 7 | KP 8 | KP 9 | KP 0 | | | KP 7 | KP 8 | KP 9 | KP + | | |--------+------+------+------+------+------| |------+------+------+------+------+--------| @@ -174,7 +149,7 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and `-----------------------' `-----------------------' -### Colemak Mod-DH Matrix gaming/vanilla +### Colemak gaming/vanilla (No access to Function or Numbers layers; mainly used for gaming; double-tap TD(ADJ) for one shot access to Adjust layer) ,-----------------------------------------------------------------------------------------------------------. | ESC | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | PScr| SLck| Paus|Numpd|Adjst| @@ -182,11 +157,11 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and ,-------------------------------------------. ,-------------------------------------------. | = | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | - | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Tab | Q | W | F | P | B | | J | L | U | Y | ; | \ | + | Tab | Q | W | F | P | G | | J | L | U | Y | ; | \ | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Ctrl | A | R | S | T | G | | M | N | E | I | O | ' | + | Ctrl | A | R | S | T | D | | H | N | E | I | O | ' | |--------+------+------+------+------+------| |------+------+------+------+------+--------| - | Shift | Z | X | C | D | V | | K | H | , | . | / | Shift | + | Shift | Z | X | C | V | B | | K | M | , | . | / | Shift | `--------+------+------+------+------+------' `------+------+------+------+------+--------' | Ins | ` | [ | ] | | Left | Down | Up | Right| `---------------------------' `---------------------------' @@ -228,8 +203,8 @@ Persistent default layer has been enabled for Colemak Mod-DH Matrix, QWERTY, and ,-----------------------------------------------------------------------------------------------------------. | | | | | | | | | | | | | | | | | | | `-----------------------------------------------------------------------------------------------------------' - ,-------------------------------------------. ,------------------------------------------ - | |CModDH|Qwerty|Colmak|CMoDGM| QWGM | |Numpad| | | | | RESET | + ,-------------------------------------------. ,-------------------------------------------. + | |Colmak|Qwerty| |ClmkGM| QWGM | |Numpad| | | | | RESET | |--------+------+------+------+------+------| |------+------+------+------+------+--------| | | | | | | | | | | | | | | |--------+------+------+------+------+------| |------+------+------+------+------+--------| -- cgit v1.2.3 From 504ce1b4bc2a7ed785ba85bb8f6b80987c7b2412 Mon Sep 17 00:00:00 2001 From: mtdjr Date: Sat, 26 May 2018 14:06:08 -0400 Subject: Add mtdjr keymaps for Iris, Let's Split, TADA68, XD75, and handwired dox (#3058) * Add keymaps for Iris, Let's Split, TADA68, XD75, and handwired not_so_minidox * remove handwired not_so_minidox --- keyboards/iris/keymaps/mtdjr/config.h | 42 ++++ keyboards/iris/keymaps/mtdjr/keymap.c | 307 ++++++++++++++++++++++++++++ keyboards/iris/keymaps/mtdjr/rules.mk | 7 + keyboards/lets_split/keymaps/mtdjr/config.h | 37 ++++ keyboards/lets_split/keymaps/mtdjr/keymap.c | 194 ++++++++++++++++++ keyboards/lets_split/keymaps/mtdjr/rules.mk | 4 + keyboards/tada68/keymaps/mtdjr/keymap.c | 87 ++++++++ keyboards/tada68/keymaps/mtdjr/readme.md | 3 + keyboards/tada68/keymaps/mtdjr/rules.mk | 21 ++ keyboards/xd75/keymaps/mtdjr/config.h | 28 +++ keyboards/xd75/keymaps/mtdjr/keymap.c | 135 ++++++++++++ keyboards/xd75/keymaps/mtdjr/readme.md | 1 + keyboards/xd75/keymaps/mtdjr/rules.mk | 22 ++ 13 files changed, 888 insertions(+) create mode 100644 keyboards/iris/keymaps/mtdjr/config.h create mode 100644 keyboards/iris/keymaps/mtdjr/keymap.c create mode 100644 keyboards/iris/keymaps/mtdjr/rules.mk create mode 100644 keyboards/lets_split/keymaps/mtdjr/config.h create mode 100644 keyboards/lets_split/keymaps/mtdjr/keymap.c create mode 100644 keyboards/lets_split/keymaps/mtdjr/rules.mk create mode 100644 keyboards/tada68/keymaps/mtdjr/keymap.c create mode 100644 keyboards/tada68/keymaps/mtdjr/readme.md create mode 100644 keyboards/tada68/keymaps/mtdjr/rules.mk create mode 100644 keyboards/xd75/keymaps/mtdjr/config.h create mode 100644 keyboards/xd75/keymaps/mtdjr/keymap.c create mode 100644 keyboards/xd75/keymaps/mtdjr/readme.md create mode 100644 keyboards/xd75/keymaps/mtdjr/rules.mk (limited to 'keyboards') diff --git a/keyboards/iris/keymaps/mtdjr/config.h b/keyboards/iris/keymaps/mtdjr/config.h new file mode 100644 index 0000000000..0e8938775f --- /dev/null +++ b/keyboards/iris/keymaps/mtdjr/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +//#define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +#define TAPPING_TERM 250 +// #define MASTER_RIGHT +// #define EE_HANDS + +// #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/iris/keymaps/mtdjr/keymap.c b/keyboards/iris/keymaps/mtdjr/keymap.c new file mode 100644 index 0000000000..ba95d16b23 --- /dev/null +++ b/keyboards/iris/keymaps/mtdjr/keymap.c @@ -0,0 +1,307 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "action_macro.h" +#include +#include "pincontrol.h" + +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 +#define _SUPER 3 +#define _ADJUST 16 +#define SOLENOID_DEFAULT_DWELL 12 +#define SOLENOID_MAX_DWELL 100 +#define SOLENOID_MIN_DWELL 4 +#define SOLENOID_PIN C6 + + +bool solenoid_enabled = false; +bool solenoid_on = false; +bool solenoid_buzz = false; +bool solenoid_buzzing = false; +uint16_t solenoid_start = 0; +uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; + + +void solenoid_buzz_on(void) { + solenoid_buzz = true; +} + +void solenoid_buzz_off(void) { + solenoid_buzz = false; +} + +void solenoid_dwell_minus(void) { + if (solenoid_dwell > 0) solenoid_dwell--; +} + +void solenoid_dwell_plus(void) { + if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; +} + +void solenoid_toggle(void) { + solenoid_enabled = !solenoid_enabled; +} + +void solenoid_stop(void) { + digitalWrite(SOLENOID_PIN, PinLevelLow); + solenoid_on = false; + solenoid_buzzing = false; +} + +void solenoid_fire(void) { + if (!solenoid_enabled) return; + + if (!solenoid_buzz && solenoid_on) return; + if (solenoid_buzz && solenoid_buzzing) return; + + solenoid_on = true; + solenoid_buzzing = true; + solenoid_start = timer_read(); + digitalWrite(SOLENOID_PIN, PinLevelHigh); +} + +void solenoid_check(void) { + uint16_t elapsed = 0; + + if (!solenoid_on) return; + + elapsed = timer_elapsed(solenoid_start); + + //Check if it's time to finish this solenoid click cycle + if (elapsed > solenoid_dwell) { + solenoid_stop(); + return; + } + + //Check whether to buzz the solenoid on and off + if (solenoid_buzz) { + if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){ + if (!solenoid_buzzing) { + solenoid_buzzing = true; + digitalWrite(SOLENOID_PIN, PinLevelHigh); + } + } + else { + if (solenoid_buzzing) { + solenoid_buzzing = false; + digitalWrite(SOLENOID_PIN, PinLevelLow); + } + } + } +} + +void solenoid_setup(void) { + pinMode(SOLENOID_PIN, PinDirectionOutput); +} + +void matrix_init_user(void) { + solenoid_setup(); +} + +void matrix_scan_user(void) { + solenoid_check(); +} + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + SUPER, + ADJUST, + SOL_TOG, + SOLENOID_DWELL_MINUS, + SOLENOID_DWELL_PLUS, + SOLENOID_BUZZ_ON, + SOLENOID_BUZZ_OFF, + TD_ESC = 0, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_SUPR SUPER +#define KC_RST RESET +#define KC_BL_S BL_STEP +#define KC_EXC TD(TD_ESC) +#define SOLTOG SOLENOID_TOG + +// Macro Declarations +#define UM_ROOT M(0) +#define UM_PPLY M(1) +#define UM_PSEF M(2) +#define KC_XCPY M(3) +#define KC_XINS M(4) +#define UM_CAD M(5) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + EXC , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + TAB , Q , W , E , R , T , Y , U , I , O , P ,QUOT, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + LSFT, A , S , D , F , G , H , J , K , L ,SCLN,ENT , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + EQL, Z , X , C , V , B ,LGUI, LALT, N , M ,COMM,DOT ,SLSH,MINS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + LCTL,RASE,SPC , SPC ,LOWR,SUPR + // `----+----+----' `----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , , , , , , , , ,LCBR,RCBR,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , , , UP , , ,PIPE, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , , , , , , ,LEFT,DOWN,RGHT, , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , , , , , , , ,HOME, ,END , ,EQL , + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + , F1 , F2 , F3 , F4 , , , , ,LBRC,RBRC,DEL , + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F5 , F6 , F7 , F8 , , , , , , ,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + , F9 ,F10 ,F11 ,F12 , , , , , , , , + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + , , ,XCPY,XINS, , , , , , , , ,PLUS, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + , , , , , + // `----+----+----' `----+----+----' + ), + + [_SUPER] = LAYOUT( + //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. + SOL_TOG, UM_ROOT, UM_PPLY, UM_PSEF, _______, _______, _______, _______, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, _______, _______, _______, + //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UM_CAD , + //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, + //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' + _______, _______, _______, _______, _______, _______ + // `--------+--------+--------' `--------+--------+--------' +) + +}; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for grave accent, twice for ESC + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_ESC) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + solenoid_fire(); + } + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case SUPER: + if (record->event.pressed) { + layer_on(_SUPER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_SUPER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case SOLTOG: + if (record->event.pressed) { + solenoid_toggle(); + } + break; + case SOLENOID_DWELL_MINUS: + if (record->event.pressed) { + solenoid_dwell_minus(); + } + break; + case SOLENOID_DWELL_PLUS: + if (record->event.pressed) { + solenoid_dwell_plus(); + } + break; + case SOLENOID_BUZZ_ON: + if (record->event.pressed) { + solenoid_buzz_on(); + } + break; + case SOLENOID_BUZZ_OFF: + if (record->event.pressed) { + solenoid_buzz_off(); + } + break; + } + return true; +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + SEND_STRING("ps -ef | grep "); + return false; break; + case 3: + return MACRO(D(LCTL), T(INS), U(LCTL), END); + break; + case 4: + return MACRO(D(LSFT), T(INS), U(LSFT), END); + break; + case 5: + return MACRO(D(LCTL), D(RALT), T(DEL), END); + break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/iris/keymaps/mtdjr/rules.mk new file mode 100644 index 0000000000..7c19013e5b --- /dev/null +++ b/keyboards/iris/keymaps/mtdjr/rules.mk @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no +TAP_DANCE_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/mtdjr/config.h b/keyboards/lets_split/keymaps/mtdjr/config.h new file mode 100644 index 0000000000..761e9e175d --- /dev/null +++ b/keyboards/lets_split/keymaps/mtdjr/config.h @@ -0,0 +1,37 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial, not both */ + +// #define USE_SERIAL + #define USE_I2C + #define TAPPING_TERM 250 +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define _MASTER_RIGHT +#define EE_HANDS + +#endif diff --git a/keyboards/lets_split/keymaps/mtdjr/keymap.c b/keyboards/lets_split/keymaps/mtdjr/keymap.c new file mode 100644 index 0000000000..36aa517224 --- /dev/null +++ b/keyboards/lets_split/keymaps/mtdjr/keymap.c @@ -0,0 +1,194 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "action_macro.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 _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + TD_ESC = 0 +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +// Macro Declarations +#define UM_ROOT M(0) +#define UM_PPLY M(1) +#define UM_COPY M(2) +#define UM_INSR M(3) +#define UM_PSEF M(4) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Esc/~ | A | S | D | F | G | | H | J | K | L | ; | '/" | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Up | Down |Right | + * `-----------------------------------------' '-----------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + TD(TD_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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ +), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | [ | ] | { | } | | | 4 | 5 | 6 | * | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | copy |insert| | | | 1 | 2 | 3 | + | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | 0 | . | = | _ | + * `-----------------------------------------' '-----------------------------------------' + */ +[_LOWER] = KEYMAP( \ + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, KC_4, KC_5, KC_6, KC_ASTR, KC_BSLS, \ + _______, XXXXXXX, XXXXXXX, UM_COPY, UM_INSR, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PLUS, KC_MINS, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_UNDS \ +), + + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | \ | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' '-----------------------------------------' + */ +[_RAISE] = KEYMAP( \ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_PIPE,\ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | ROOT | PPLY | PSEF | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| | | F1 | F2 | F3 | F4 | F5 | F6 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | UNDO | CUT | COPY |PASTE | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Home | | | End | + * `-----------------------------------------' '-----------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, UM_ROOT, UM_PPLY, UM_PSEF, _______, _______, RESET, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + _______, KC_UNDO, KC_CUT, UM_COPY, UM_INSR, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, KC_END \ +) + + +}; + +#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); +} + +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for nothing, twice for ESC + [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_NO, KC_ESC) +}; + +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 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; +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + return MACRO(D(LCTL), T(INS), U(LCTL), END); + break; + case 3: + return MACRO(D(LSFT), T(INS), U(LSFT), END); + break; + case 4: + SEND_STRING("ps -ef | grep "); + return false; break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/lets_split/keymaps/mtdjr/rules.mk b/keyboards/lets_split/keymaps/mtdjr/rules.mk new file mode 100644 index 0000000000..f0ed9e8dcc --- /dev/null +++ b/keyboards/lets_split/keymaps/mtdjr/rules.mk @@ -0,0 +1,4 @@ +TAP_DANCE_ENABLE = yes +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/tada68/keymaps/mtdjr/keymap.c b/keyboards/tada68/keymaps/mtdjr/keymap.c new file mode 100644 index 0000000000..1b1f6ad4f1 --- /dev/null +++ b/keyboards/tada68/keymaps/mtdjr/keymap.c @@ -0,0 +1,87 @@ +#include "tada68.h" +#include "action_macro.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. +#define _BL 0 +#define _FL 1 + +// Macro Declarations +#define UM_ROOT M(0) +#define UM_PPLY M(1) +#define UM_PSEF M(2) +#define UM_XCPY M(3) +#define UM_XINS M(4) +#define UM_CAD M(5) + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |Ins | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Alt |Gui | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = KEYMAP_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_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_RSFT,KC_UP, KC_PGDN, \ + KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RALT,MO(_FL), KC_RCTRL, KC_LEFT,KC_DOWN, KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | F1|F2 |F3 |F4 |F5 |F6 |F7 |F8 |F9 |F10|F11|F12|Del |Grv | + * |----------------------------------------------------------------| + * | | RT | PPLY| PS | | | | | | | | | | |Hme | + * |----------------------------------------------------------------| + * | | BL- |BL | BL+|BLG| | | | | | | | |End | + * |----------------------------------------------------------------| + * | | | |CP|PST | | PLY| NXT|MUT|VD |VU | McL|MsU|McR | + * |----------------------------------------------------------------| + * | | | | | | | |MsL|MsD|MsR | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + _______, 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, \ + _______,UM_ROOT,UM_PPLY,UM_PSEF,_______,_______,_______,_______,_______,_______,KC_PSCR,_______,_______,_______, KC_HOME, \ + _______,BL_DEC ,BL_TOGG,BL_INC,BL_BRTG,_______,_______,_______,_______,_______,_______,_______, _______, KC_END, \ + _______,_______ ,_______,UM_XCPY,UM_XINS,_______,KC_MPLY,KC_MNXT,KC_MUTE,KC_VOLD,KC_VOLU,KC_BTN1,KC_MS_U,KC_BTN2, \ + _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D,KC_MS_R), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + if (record->event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + SEND_STRING("ps -ef | grep "); + return false; break; + case 3: + return MACRO(D(LCTL), T(INS), U(LCTL), END); + break; + case 4: + return MACRO(D(LSFT), T(INS), U(LSFT), END); + break; + case 5: + return MACRO(D(LCTL), D(RALT), T(DEL), END); + break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/tada68/keymaps/mtdjr/readme.md b/keyboards/tada68/keymaps/mtdjr/readme.md new file mode 100644 index 0000000000..53412d7c25 --- /dev/null +++ b/keyboards/tada68/keymaps/mtdjr/readme.md @@ -0,0 +1,3 @@ +# default TADA68 layout + +This layout replicates the default factory layout of the TADA68. diff --git a/keyboards/tada68/keymaps/mtdjr/rules.mk b/keyboards/tada68/keymaps/mtdjr/rules.mk new file mode 100644 index 0000000000..2a7ff27793 --- /dev/null +++ b/keyboards/tada68/keymaps/mtdjr/rules.mk @@ -0,0 +1,21 @@ +# 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 = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h new file mode 100644 index 0000000000..aadcaa3875 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/config.h @@ -0,0 +1,28 @@ +/* Copyright 2017 Benjamin Kesselring + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here +#define RGBLIGHT_SLEEP +#define MANUFACTURER mtdjr +#define PRODUCT XD75 +#define DESCRIPTION XD75Re + +#endif diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c new file mode 100644 index 0000000000..696c82ae4f --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/keymap.c @@ -0,0 +1,135 @@ +/* Copyright 2017 Wunder + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "xd75.h" +#include "action_layer.h" + + +enum custom_keycodes { + // TD_ESC = 0, + TD_LOCK = 0, +}; + +// Layers +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2 + + + +// Shortcuts +#define KC_____ KC_NO +#define KC_ KC_TRNS +#define KC_RST RESET +#define KC_RASE MO(_RAISE) +#define KC_LOWR MO(_LOWER) + +// RGB and Backlighting +#define KC_RGB RGB_TOG +#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 +#define KC_BLT BL_TOGG +#define KC_BLS BL_STEP +#define KC_BLI BL_INC +#define KC_BLD BL_DEC + +// Tapdance +//#define KC_EXC TD(TD_ESC) +#define KC_LOCK TD(TD_LOCK) + +// Macros +#define KC_ROOT M(0) +#define KC_PPLY M(1) +#define KC_PSEF M(2) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ESC, 1 , 2 , 3 , 4 , 5 ,PGUP,PSCR,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + TAB, Q , W , E , R , T , INS,BSLS, DEL, Y , U , I , O , P ,QUOT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LCTL, A , S , D , F , G ,HOME,PLUS,LOCK, H , J , K , L ,SCLN, ENT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B ,LBRC,MINS,RBRC, N , M ,COMM, DOT,SLSH,RSFT, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + LOWR,LCTL,LALT,LGUI,____, SPC,RASE, GRV,LOWR, SPC,____,LEFT,DOWN,UP ,RGHT +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +), + + [_LOWER] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ____, F1, F2, F3, F4, F5, F6,____, F7, F8, F9, F10, F11, F12,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,ROOT,PPLY,PSEF,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,MUTE, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ,____,____,____,____,____, ,____, ,MPLY,____,MPRV,VOLD,VOLU,MNXT +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +), + +[_RAISE] = KC_KEYMAP( +// .--------------------------------------------------------------------------. + ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ____,____,____,____, RST,____,____,____,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + CAPS,____,____,____,____,____,____, BLI,____,____,____,____,____,____,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,____,____,____,____,BTN1,BTN2,____, +// |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| + ,____,____,____,____,____, ,____, ,____,____,MS_L,MS_D,MS_U,MS_R +// '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' +) +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + //Tap once for left ctrl, twice for ESC + //[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_ESC), + [TD_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_END, LGUI(KC_L)) +}; +void led_set_user(uint8_t usb_led) { + if (usb_led & (1<event.pressed) { + switch(id) { + case 0: + SEND_STRING("sudo su -\n"); + return false; break; + case 1: + SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); + return false; break; + case 2: + SEND_STRING("ps -ef | grep "); + return false; break; + } + } + return MACRO_NONE; +}; diff --git a/keyboards/xd75/keymaps/mtdjr/readme.md b/keyboards/xd75/keymaps/mtdjr/readme.md new file mode 100644 index 0000000000..d53c0f34a8 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/readme.md @@ -0,0 +1 @@ +# The default keymap for xd75 diff --git a/keyboards/xd75/keymaps/mtdjr/rules.mk b/keyboards/xd75/keymaps/mtdjr/rules.mk new file mode 100644 index 0000000000..28462ff160 --- /dev/null +++ b/keyboards/xd75/keymaps/mtdjr/rules.mk @@ -0,0 +1,22 @@ +# Copyright 2013 Jun Wako +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +BACKLIGHT_ENABLE = yes +TAP_DANCE_ENABLE = yes +RGBLIGHT_ENABLE = yes -- cgit v1.2.3 From 28525ab4619374b0f067e55ab303b72c647a0de5 Mon Sep 17 00:00:00 2001 From: Guido Bartolucci Date: Sat, 26 May 2018 14:07:35 -0400 Subject: Adding guidoism's planck layouts (#3059) * Initial commit of guidoism * created movement layer * movement layer works! * removed unnecessary layers * moved enter key up and recreated caps lock * Added num pad --- keyboards/planck/keymaps/guidoism/config.h | 42 +++++ keyboards/planck/keymaps/guidoism/keymap.c | 252 ++++++++++++++++++++++++++++ keyboards/planck/keymaps/guidoism/readme.md | 2 + keyboards/planck/keymaps/guidoism/rules.mk | 0 4 files changed, 296 insertions(+) create mode 100644 keyboards/planck/keymaps/guidoism/config.h create mode 100644 keyboards/planck/keymaps/guidoism/keymap.c create mode 100644 keyboards/planck/keymaps/guidoism/readme.md create mode 100644 keyboards/planck/keymaps/guidoism/rules.mk (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/guidoism/config.h b/keyboards/planck/keymaps/guidoism/config.h new file mode 100644 index 0000000000..a1635f2bab --- /dev/null +++ b/keyboards/planck/keymaps/guidoism/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#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 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/guidoism/keymap.c b/keyboards/planck/keymaps/guidoism/keymap.c new file mode 100644 index 0000000000..5251b23c61 --- /dev/null +++ b/keyboards/planck/keymaps/guidoism/keymap.c @@ -0,0 +1,252 @@ +/* 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 . + */ + +#include "planck.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _LOWER, + _RAISE, + _MOVEMENT, + _NUMPAD, + _CODE, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + MOVEMENT, + NUMPAD, + CODE, + BACKLIT +}; + +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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Move |Numpad| Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + // {KC_ESC, LT(MOVEMENT, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + // {KC_ESC, MEH_T(KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {LSFT_T(KC_CAPS), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, + {MOVEMENT, NUMPAD, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LPRN, KC_RPRN, KC_LCBR, KC_RCBR} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_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} +}, + +/* 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] = { + {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, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Movement + * ,-----------------------------------------------------------------------------------. + * | | | | | | | Home | PgUp | Up | PgDn | End | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | Left | Down | Right| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOVEMENT] = { + {_______, _______, _______, _______, _______, _______, KC_HOME, KC_PGUP, KC_UP, KC_PGDN, KC_END, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Numpad + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | 7 | 8 | 9 | / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | 4 | 5 | 6 | * | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | 1 | 2 | 3 | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | 0 | = | + | + * `-----------------------------------------------------------------------------------' +[_NUMPAD] = { + {_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_SLASH}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_ASTERISK}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_MINUS}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_KP_EQUAL, KC_KP_PLUS} +}, + */ + +/* Numpad + */ +[_NUMPAD] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_7, KC_KP_8, KC_KP_9}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_4, KC_KP_5, KC_KP_6}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_1, KC_KP_2, KC_KP_3}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_KP_0, KC_DOT} +}, + +/* Code + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_CODE] = { + {_______, _______, _______, _______, _______, _______, _______, KC_LCBR, KC_RCBR, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_LPRN, KC_RPRN, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_LBRC, KC_RBRC, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty| | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, 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, AG_NORM, AG_SWAP, 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 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 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 MOVEMENT: + if (record->event.pressed) { + layer_on(_MOVEMENT); + } else { + layer_off(_MOVEMENT); + } + return false; + break; + case NUMPAD: + if (record->event.pressed) { + layer_on(_NUMPAD); + } else { + layer_off(_NUMPAD); + } + return false; + break; + case CODE: + if (record->event.pressed) { + layer_on(_CODE); + } else { + layer_off(_CODE); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + PORTE &= ~(1<<6); + } else { + unregister_code(KC_RSFT); + PORTE |= (1<<6); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/guidoism/readme.md b/keyboards/planck/keymaps/guidoism/readme.md new file mode 100644 index 0000000000..de9680b498 --- /dev/null +++ b/keyboards/planck/keymaps/guidoism/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/planck/keymaps/guidoism/rules.mk b/keyboards/planck/keymaps/guidoism/rules.mk new file mode 100644 index 0000000000..e69de29bb2 -- cgit v1.2.3 From 716877b40ae77a7d354ea3a1a1ee5fb03fdb0a32 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 26 May 2018 11:22:56 -0700 Subject: Refactor and Configurator updates for AMJ60 (#3055) * Refactor for AMJ60 * Configurator update for AMJ60 --- keyboards/amj60/amj60.h | 14 ++++++-------- keyboards/amj60/info.json | 15 +++++++++++++++ keyboards/amj60/keymaps/default/keymap.c | 6 +++--- keyboards/amj60/keymaps/iso_split_rshift/keymap.c | 10 +++++----- keyboards/amj60/keymaps/maximized/keymap.c | 6 +++--- 5 files changed, 32 insertions(+), 19 deletions(-) (limited to 'keyboards') diff --git a/keyboards/amj60/amj60.h b/keyboards/amj60/amj60.h index b6aa6b7d3c..400f0691ee 100644 --- a/keyboards/amj60/amj60.h +++ b/keyboards/amj60/amj60.h @@ -19,7 +19,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ 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, \ @@ -48,7 +48,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ANSI( \ +#define LAYOUT_60_ansi( \ 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, \ @@ -63,8 +63,6 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } -#define LAYOUT_60_ansi KEYMAP_ANSI - /* AMJ60 HHKB matrix layout * ,------------------------------------------------------------. * | 00 |01| 02| 03| 04| 05| 06| 07| 08| 09| 0a| 0b| 0c| 0d| 49 | @@ -79,7 +77,7 @@ * `------------------------------------------------------------' */ -#define KEYMAP_HHKB( \ +#define LAYOUT_hhkb( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49, \ 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, \ @@ -107,7 +105,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ISO( \ +#define LAYOUT_iso( \ 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, \ @@ -135,7 +133,7 @@ * | 40 | 41 | 42 | 45 | 4a | 4b | 4c | 4d | * `-----------------------------------------------------------' */ -#define KEYMAP_ISO_SPLITRSHIFT( \ +#define LAYOUT_iso_splitrshift( \ 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, \ @@ -150,7 +148,7 @@ {k40, k41, k42, XXX, XXX, k45, XXX, XXX, XXX, XXX, k4a, k4b, k4c, k4d} \ } -#define KEYMAP_MAX( \ +#define LAYOUT_max( \ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0d, k49,\ 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, \ diff --git a/keyboards/amj60/info.json b/keyboards/amj60/info.json index c8fb68b28d..dd6a7aef0d 100644 --- a/keyboards/amj60/info.json +++ b/keyboards/amj60/info.json @@ -5,8 +5,23 @@ "width": 15, "height": 5, "layouts": { + "LAYOUT": { + "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}, {"label":"k49", "x":14, "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":"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":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"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":"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":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, "LAYOUT_60_ansi": { "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":"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":"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":"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":"k3d", "x":12.25, "y":3, "w":2.75}, {"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":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_hhkb": { + "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}, {"label":"k49", "x":14, "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":"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":"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":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "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":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_iso": { + "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":"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":"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":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"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":"k3d", "x":12.25, "y":3, "w":2.75}, {"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":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_iso_splitrshift": { + "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":"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":"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":"k2c", "x":12.75, "y":2}, {"label":"k2d", "x":13.75, "y":2, "w":1.25}, {"label":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"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":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "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":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] + }, + "LAYOUT_max": { + "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}, {"label":"k49", "x":14, "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":"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":"k30", "x":0, "y":3, "w":1.25}, {"label":"k31", "x":1.25, "y":3}, {"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":"k3d", "x":12.25, "y":3, "w":1.75}, {"label":"k3c", "x":14, "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":"k45", "x":3.75, "y":4, "w":6.25}, {"label":"k4a", "x":10, "y":4, "w":1.25}, {"label":"k4b", "x":11.25, "y":4, "w":1.25}, {"label":"k4c", "x":12.5, "y":4, "w":1.25}, {"label":"k4d", "x":13.75, "y":4, "w":1.25}] } } } diff --git a/keyboards/amj60/keymaps/default/keymap.c b/keyboards/amj60/keymaps/default/keymap.c index 5c0b374fe6..fd8e198f59 100644 --- a/keyboards/amj60/keymaps/default/keymap.c +++ b/keyboards/amj60/keymaps/default/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#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. @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| * `-----------------------------------------------------------' */ - [_DEF] = KEYMAP_MAX( + [_DEF] = LAYOUT_max( 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_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, \ @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_MAX( + [_SPC] = LAYOUT_max( KC_PSCR, 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_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ diff --git a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c index ee6511f834..b5fd731ddd 100644 --- a/keyboards/amj60/keymaps/iso_split_rshift/keymap.c +++ b/keyboards/amj60/keymaps/iso_split_rshift/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#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. @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| Gui Menu, RCtrl is * `-----------------------------------------------------------' LEFT DWN RIGHT */ - [_DEF] = KEYMAP_ISO_SPLITRSHIFT( + [_DEF] = LAYOUT_iso_splitrshift( 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, \ TABDUAL, 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, \ CAPSDUAL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, ENTERDUAL, \ @@ -68,7 +68,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_ISO_SPLITRSHIFT( + [_SPC] = LAYOUT_iso_splitrshift( KC_PSCR, 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_PAUS, KC_UP, GER_BRC_L, GER_BRC_R, _______, _______, GER_PAR_L, GER_PAR_R, _______, _______, _______, _______, _______, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, KC_MPLY, \ @@ -88,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Pos1|PgDn|End | * `-----------------------------------------------------------' */ - [_TAB] = KEYMAP_ISO_SPLITRSHIFT( + [_TAB] = LAYOUT_iso_splitrshift( KC_WAKE, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ _______, _______, _______, _______, _______, _______, _______, GER_CUR_L, GER_CUR_R, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, KC_ENT, \ @@ -108,7 +108,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | |Alt |Left|Down|Right| * `-----------------------------------------------------------' */ - [_SFX] = KEYMAP_ISO_SPLITRSHIFT( + [_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, \ diff --git a/keyboards/amj60/keymaps/maximized/keymap.c b/keyboards/amj60/keymaps/maximized/keymap.c index 5c0b374fe6..fd8e198f59 100644 --- a/keyboards/amj60/keymaps/maximized/keymap.c +++ b/keyboards/amj60/keymaps/maximized/keymap.c @@ -1,5 +1,5 @@ -#include "amj60.h" +#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. @@ -29,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space/Fn0 |Alt |Win |Menu|RCtl| * `-----------------------------------------------------------' */ - [_DEF] = KEYMAP_MAX( + [_DEF] = LAYOUT_max( 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_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, \ @@ -49,7 +49,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | |Alt |Prev|Vol-|Next| * `-----------------------------------------------------------' */ - [_SPC] = KEYMAP_MAX( + [_SPC] = LAYOUT_max( KC_PSCR, 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_PAUS, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, KC_MPLY, \ -- cgit v1.2.3 From a677d8a00dc7bb42c1d9ba29455d24f6d8bfaef6 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 27 May 2018 19:19:09 -0700 Subject: Refactor and Configurator updates for AMJ Pad (#3060) * Refactor for AMJ Pad * Configurator update for AMJ Pad * Add hardware agnostic layouts numpad_6x4 and ortho_6x4 * Add agnostic layouts to rules.mk * Refactor AMJ Pad to use new hardware agnostic layouts --- keyboards/amjpad/amjpad.h | 54 ++++++++++++++------------- keyboards/amjpad/info.json | 16 +++++--- keyboards/amjpad/keymaps/default/keymap.c | 33 ++++++++-------- keyboards/amjpad/keymaps/max/keymap.c | 34 ++++++++--------- keyboards/amjpad/keymaps/ortho_left/keymap.c | 34 ++++++++--------- keyboards/amjpad/keymaps/ortho_right/keymap.c | 35 +++++++++-------- keyboards/amjpad/rules.mk | 2 + 7 files changed, 108 insertions(+), 100 deletions(-) (limited to 'keyboards') diff --git a/keyboards/amjpad/amjpad.h b/keyboards/amjpad/amjpad.h index ffba1c9b94..d9a0516215 100644 --- a/keyboards/amjpad/amjpad.h +++ b/keyboards/amjpad/amjpad.h @@ -23,38 +23,40 @@ */ // The first section contains all of the arguments // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, \ - k40, k41, k42, k43, \ - k50, k52 \ +#define LAYOUT_numpad_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, \ + k30, k31, k32, k23, \ + k40, k41, k42, \ + k50, k52, k43 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, XXX}, \ - {k40, k41, k42, k43}, \ - {k50, XXX, k52, XXX} \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, XXX}, \ + {k40, k41, k42, k43}, \ + {k50, XXX, k52, XXX} \ } -#define MAXKEYMAP( \ - k00, k01, k02, k03, \ - k10, k11, k12, k13, \ - k20, k21, k22, k23, \ - k30, k31, k32, k33, \ - k40, k41, k42, k43, \ - k50, k51, k52, k53\ + +#define LAYOUT_ortho_6x4( \ + k00, k01, k02, k03, \ + k10, k11, k12, k13, \ + k20, k21, k22, k23, \ + k30, k31, k32, k33, \ + k40, k41, k42, k43, \ + k50, k51, k52, k53 \ ) \ { \ - {k00, k01, k02, k03}, \ - {k10, k11, k12, k13}, \ - {k20, k21, k22, k23}, \ - {k30, k31, k32, k33}, \ - {k40, k41, k42, k43}, \ - {k50, k51, k52, k53} \ + {k00, k01, k02, k03}, \ + {k10, k11, k12, k13}, \ + {k20, k21, k22, k23}, \ + {k30, k31, k32, k33}, \ + {k40, k41, k42, k43}, \ + {k50, k51, k52, k53} \ } + void matrix_init_user(void); void matrix_scan_user(void); diff --git a/keyboards/amjpad/info.json b/keyboards/amjpad/info.json index 3873d548f0..dde839dd87 100644 --- a/keyboards/amjpad/info.json +++ b/keyboards/amjpad/info.json @@ -1,13 +1,17 @@ { - "keyboard_name": "AMJ Pad", - "url": "", - "maintainer": "qmk", - "bootloader": "", - "width": 4, - "height": 6, + "keyboard_name": "AMJ Pad", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 6, "layouts": { "LAYOUT": { + "key_count": 21, "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, "h":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4, "h":2}, {"x":0, "y":5, "w":2}, {"x":2, "y":5}] + }, + "LAYOUT_all": { + "key_count": 24, + "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":"k10", "x":0, "y":1}, {"label":"k11", "x":1, "y":1}, {"label":"k12", "x":2, "y":1}, {"label":"k13", "x":3, "y":1}, {"label":"k20", "x":0, "y":2}, {"label":"k21", "x":1, "y":2}, {"label":"k22", "x":2, "y":2}, {"label":"k23", "x":3, "y":2}, {"label":"k30", "x":0, "y":3}, {"label":"k31", "x":1, "y":3}, {"label":"k32", "x":2, "y":3}, {"label":"k33", "x":3, "y":3}, {"label":"k40", "x":0, "y":4}, {"label":"k41", "x":1, "y":4}, {"label":"k42", "x":2, "y":4}, {"label":"k43", "x":3, "y":4}, {"label":"k50", "x":0, "y":5}, {"label":"k51", "x":1, "y":5}, {"label":"k52", "x":2, "y":5}, {"label":"k53", "x":3, "y":5}] } } } diff --git a/keyboards/amjpad/keymaps/default/keymap.c b/keyboards/amjpad/keymaps/default/keymap.c index 362afd1079..1ec81e6db8 100644 --- a/keyboards/amjpad/keymaps/default/keymap.c +++ b/keyboards/amjpad/keymaps/default/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -33,13 +33,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------' */ -[_BL] = KEYMAP( - KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ - KC_NLCK,KC_PSLS,KC_PAST,KC_PMNS, \ - KC_P7, KC_P8, KC_P9, KC_PPLS, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, LT(_FL,KC_PDOT)), + [_BL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, \ + KC_NLCK, 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, LT(_FL,KC_PDOT), KC_PENT \ + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -56,14 +57,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 0 |./FN| | * `-------------------' */ -[_FL] = KEYMAP( - - KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, RESET, \ - KC_P4, KC_P5, KC_P6, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_P0, LT(_FL,KC_PDOT)), + [_FL] = LAYOUT_numpad_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, \ + KC_P4, KC_P5, KC_P6, RESET, \ + KC_P1, KC_P2, KC_P3, \ + KC_P0, LT(_FL,KC_PDOT), KC_PENT \ + ), }; enum function_id { diff --git a/keyboards/amjpad/keymaps/max/keymap.c b/keyboards/amjpad/keymaps/max/keymap.c index 926a494a90..463a265de1 100644 --- a/keyboards/amjpad/keymaps/max/keymap.c +++ b/keyboards/amjpad/keymaps/max/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -33,14 +33,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------' */ -[_BL] = MAXKEYMAP( - - KC_ESC, KC_TAB, KC_MINS,KC_EQL, \ - KC_F1, KC_F2, KC_F3, KC_F4, \ - KC_P7, KC_P8, KC_P9, KC_PMNS, \ - KC_P4, KC_P5, KC_P6, KC_PENT, \ - KC_P1, KC_P2, KC_P3, KC_BSLS, \ - KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), + [_BL] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_MINS,KC_EQL, \ + KC_F1, KC_F2, KC_F3, KC_F4, \ + KC_P7, KC_P8, KC_P9, KC_PMNS, \ + KC_P4, KC_P5, KC_P6, KC_PENT, \ + KC_P1, KC_P2, KC_P3, KC_BSLS, \ + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -57,14 +57,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | 0 |./FN| | * `-------------------' */ -[_FL] = MAXKEYMAP( - - KC_ESC,KC_TAB,KC_BSPC,KC_PEQL, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ - KC_P7, KC_P8, KC_P9, RESET, \ - KC_P4, KC_P5, KC_P6, KC_PENT, \ - KC_P1, KC_P2, KC_P3, KC_PENT, \ - KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT), + [_FL] = LAYOUT_ortho_6x4( + KC_ESC, KC_TAB, KC_BSPC, KC_PEQL, \ + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + KC_P7, KC_P8, KC_P9, RESET, \ + KC_P4, KC_P5, KC_P6, KC_PENT, \ + KC_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), }; enum function_id { diff --git a/keyboards/amjpad/keymaps/ortho_left/keymap.c b/keyboards/amjpad/keymaps/ortho_left/keymap.c index d3e4d9944b..5245138bd1 100644 --- a/keyboards/amjpad/keymaps/ortho_left/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_left/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -30,14 +30,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-------------------' */ -[_BL] = MAXKEYMAP( - - KC_T, KC_G, KC_B, KC_SPACE,\ - KC_R, KC_F, KC_V, MO(1), \ - KC_E, KC_D, KC_C, KC_LGUI, \ - KC_W, KC_S, KC_X, KC_LALT, \ - KC_Q, KC_A, KC_Z, KC_LCTL, \ - KC_TAB, KC_ESC, KC_LSHIFT, MO(1)), + [_BL] = LAYOUT_ortho_6x4( + KC_T, KC_G, KC_B, KC_SPACE,\ + KC_R, KC_F, KC_V, MO(1), \ + KC_E, KC_D, KC_C, KC_LGUI, \ + KC_W, KC_S, KC_X, KC_LALT, \ + KC_Q, KC_A, KC_Z, KC_LCTL, \ + KC_TAB, KC_ESC, KC_LSHIFT, MO(1) + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -54,12 +54,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | ` | Del|Shft| | * `-------------------' */ -[_FL] = MAXKEYMAP( - - KC_5, KC_F5, KC_F11, _______, \ - KC_4, KC_F4, KC_F10, _______, \ - KC_3, KC_F3, KC_F9, _______, \ - KC_2, KC_F2, KC_F8, _______, \ - KC_1, KC_F1, KC_F7, _______, \ - KC_GRV,KC_DEL, _______, _______), + [_FL] = LAYOUT_ortho_6x4( + KC_5, KC_F5, KC_F11, _______, \ + KC_4, KC_F4, KC_F10, _______, \ + KC_3, KC_F3, KC_F9, _______, \ + KC_2, KC_F2, KC_F8, _______, \ + KC_1, KC_F1, KC_F7, _______, \ + KC_GRV,KC_DEL, _______, _______ + ), }; diff --git a/keyboards/amjpad/keymaps/ortho_right/keymap.c b/keyboards/amjpad/keymaps/ortho_right/keymap.c index 33e599abdc..52e93524b5 100644 --- a/keyboards/amjpad/keymaps/ortho_right/keymap.c +++ b/keyboards/amjpad/keymaps/ortho_right/keymap.c @@ -1,4 +1,4 @@ -#include "amjpad.h" +#include QMK_KEYBOARD_H #ifdef RGBLIGHT_ENABLE #include "rgblight.h" @@ -29,15 +29,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Rght| Ret| " |Bspc| * `-------------------' */ - -[_BL] = MAXKEYMAP( - - KC_SPACE, KC_N, KC_H, KC_Y, \ - MO(1), KC_M, KC_J, KC_U, \ - KC_LEFT, KC_COMM, KC_K, KC_I, \ - KC_DOWN, KC_DOT, KC_L, KC_O, \ - KC_UP, KC_SLASH, KC_SCLN, KC_P, \ - KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC), + [_BL] = LAYOUT_ortho_6x4( + KC_SPACE, KC_N, KC_H, KC_Y, \ + MO(1), KC_M, KC_J, KC_U, \ + KC_LEFT, KC_COMM, KC_K, KC_I, \ + KC_DOWN, KC_DOT, KC_L, KC_O, \ + KC_UP, KC_SLASH, KC_SCLN, KC_P, \ + KC_RIGHT, KC_ENT, KC_QUOT, KC_BSPC + ), /* Keymap _FL: Function Layer * ,-------------------. @@ -54,12 +53,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Rght| Ret| \ | Del| * `-------------------' */ -[_FL] = MAXKEYMAP( - - _______, KC_F12, KC_F6, KC_6, \ - _______, _______, KC_MINS, KC_7, \ - _______, _______, KC_EQL, KC_8, \ - _______, _______, KC_LBRC, KC_9, \ - _______, _______, KC_RBRC, KC_0, \ - _______, _______, KC_BSLS, KC_DEL), + [_FL] = LAYOUT_ortho_6x4( + _______, KC_F12, KC_F6, KC_6, \ + _______, _______, KC_MINS, KC_7, \ + _______, _______, KC_EQL, KC_8, \ + _______, _______, KC_LBRC, KC_9, \ + _______, _______, KC_RBRC, KC_0, \ + _______, _______, KC_BSLS, KC_DEL + ), }; diff --git a/keyboards/amjpad/rules.mk b/keyboards/amjpad/rules.mk index dd5b2bbe0c..f378a4ede2 100644 --- a/keyboards/amjpad/rules.mk +++ b/keyboards/amjpad/rules.mk @@ -64,3 +64,5 @@ MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID + +LAYOUTS = numpad_6x4 ortho_6x4 -- cgit v1.2.3 From 8ddebce2d7d42eedbafae5b92dff1af229115fac Mon Sep 17 00:00:00 2001 From: jamesofarrell Date: Mon, 28 May 2018 13:48:59 +1000 Subject: Add Canoe support (#3063) * Adding Canoe support * fix readme * Remove usless comment * fixing issues --- keyboards/canoe/canoe.c | 45 ++++ keyboards/canoe/canoe.h | 39 +++ keyboards/canoe/config.h | 41 ++++ keyboards/canoe/i2c.c | 106 +++++++++ keyboards/canoe/i2c.h | 27 +++ keyboards/canoe/keymaps/default/keymap.c | 40 ++++ keyboards/canoe/matrix.c | 106 +++++++++ keyboards/canoe/readme.md | 16 ++ keyboards/canoe/rules.mk | 50 ++++ keyboards/canoe/usbconfig.h | 396 +++++++++++++++++++++++++++++++ 10 files changed, 866 insertions(+) create mode 100644 keyboards/canoe/canoe.c create mode 100644 keyboards/canoe/canoe.h create mode 100644 keyboards/canoe/config.h create mode 100644 keyboards/canoe/i2c.c create mode 100644 keyboards/canoe/i2c.h create mode 100644 keyboards/canoe/keymaps/default/keymap.c create mode 100644 keyboards/canoe/matrix.c create mode 100644 keyboards/canoe/readme.md create mode 100644 keyboards/canoe/rules.mk create mode 100644 keyboards/canoe/usbconfig.h (limited to 'keyboards') diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c new file mode 100644 index 0000000000..6a67562348 --- /dev/null +++ b/keyboards/canoe/canoe.c @@ -0,0 +1,45 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "canoe.h" +#include "rgblight.h" + +#include + +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + +extern rgblight_config_t rgblight_config; + +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); +} + +__attribute__ ((weak)) +void matrix_scan_user(void) { + rgblight_task(); +} diff --git a/keyboards/canoe/canoe.h b/keyboards/canoe/canoe.h new file mode 100644 index 0000000000..157aabcf23 --- /dev/null +++ b/keyboards/canoe/canoe.h @@ -0,0 +1,39 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CANOE_H +#define CANOE_H + +#define KNO KC_NO + +#include "quantum.h" + +#define LAYOUT( \ + KD0, KC0, KB0, KA0, K90, K80, K70, K60, K50, K40, K30, K20, K10, K00, KE0, \ + KD1, KC1, KB1, KA1, K91, K81, K71, K61, K51, K41, K31, K21, K11, K01, KE1, \ + KD2, KC2, KB2, KA2, K92, K82, K72, K62, K52, K42, K32, K22, K12, KE2, \ + KD3, KC3, KB3, KA3, K93, K83, K73, K63, K53, K43, K33, K23, K03, KE3, \ + KD4, KC4, KB4, K84, K44, K34, K24, K04, KE4 \ +){ \ + { K00, K10, K20, K30, K40, K50, K60, K70, K80, K90, KA0, KB0, KC0, KD0, KE0 }, \ + { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC1, KD1, KE1 }, \ + { KNO, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KE2 }, \ + { K03, KNO, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KE3 }, \ + { K04, KNO, K24, K34, K44, KNO, KNO, KNO, K84, KNO, KNO, KB4, KC4, KD4, KE4 } \ +} + +#endif diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h new file mode 100644 index 0000000000..f8e368df25 --- /dev/null +++ b/keyboards/canoe/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef BMINI_CONFIG_H +#define BMINI_CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER percent +#define PRODUCT canoe + +#define RGBLED_NUM 2 + +/* matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +#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))) + +#endif diff --git a/keyboards/canoe/i2c.c b/keyboards/canoe/i2c.c new file mode 100644 index 0000000000..a4f9521352 --- /dev/null +++ b/keyboards/canoe/i2c.c @@ -0,0 +1,106 @@ +/* +Copyright 2016 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +// Please do not modify this file + +#include +#include + +#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< + +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 . +*/ + +// Please do not modify this file + +#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/canoe/keymaps/default/keymap.c b/keyboards/canoe/keymaps/default/keymap.c new file mode 100644 index 0000000000..fc67308476 --- /dev/null +++ b/keyboards/canoe/keymaps/default/keymap.c @@ -0,0 +1,40 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = 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_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_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, MO(_FL), KC_LEFT, KC_DOWN, KC_RIGHT), + + [_FL] = 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_PAUS, \ + 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, KC_NO, KC_NO, KC_MUTE,KC_VOLD, KC_VOLU, KC_NO, KC_RSFT, KC_PGUP, KC_END, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_RALT, KC_TRNS, KC_HOME, KC_PGDOWN,KC_END) + +}; diff --git a/keyboards/canoe/matrix.c b/keyboards/canoe/matrix.c new file mode 100644 index 0000000000..57aa36b5ff --- /dev/null +++ b/keyboards/canoe/matrix.c @@ -0,0 +1,106 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +#define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1<> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +uint8_t matrix_scan(void) { + for (uint8_t row = 0; row < MATRIX_ROWS; row++) { + matrix_set_row_status(row); + _delay_us(5); + + matrix_row_t cols = ( + // cols 0..7, PORTA 0 -> 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_user(); + + return 1; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md new file mode 100644 index 0000000000..96cd8007ce --- /dev/null +++ b/keyboards/canoe/readme.md @@ -0,0 +1,16 @@ +CANOE +======== + +A 65% keyboard with RGB + +Keyboard Maintainer: QMK Community + +Hardware Supported: Canoe + +Hardware Availability: https://geekhack.org/index.php?topic=92418.0 + +Make example for this keyboard (after setting up your build environment): + + make canoe: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/canoe/rules.mk b/keyboards/canoe/rules.mk new file mode 100644 index 0000000000..73c361e2a8 --- /dev/null +++ b/keyboards/canoe/rules.mk @@ -0,0 +1,50 @@ +# Copyright 2017 Luiz Ribeiro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# 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 = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = yes +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/canoe/usbconfig.h b/keyboards/canoe/usbconfig.h new file mode 100644 index 0000000000..d2d848fcdc --- /dev/null +++ b/keyboards/canoe/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ -- cgit v1.2.3 From 2b677ddac9aaba14f75787ab4b6d81054ad6ffd4 Mon Sep 17 00:00:00 2001 From: Danny Date: Mon, 28 May 2018 18:02:41 -0400 Subject: Fix nyquist (and other splits using D2 in debouncing) (#3067) * Update default Nyquist revision * LED slave fix * Sync changes from lets_split * Add needed check for debouncing * Remove line that was setting PD2 pin and interfering with use of that pin * Add backlight key to keymap --- keyboards/deltasplit75/matrix.c | 1 - keyboards/ergo42/matrix.c | 1 - keyboards/fourier/matrix.c | 1 - keyboards/handwired/dactyl_manuform/matrix.c | 1 - keyboards/iris/matrix.c | 1 - keyboards/lets_split/matrix.c | 1 - keyboards/levinson/matrix.c | 1 - keyboards/nyquist/keymaps/hexwire/keymap.c | 3 +- keyboards/nyquist/matrix.c | 48 ++++++++++++++++++++++++++-- keyboards/nyquist/rules.mk | 6 ++-- keyboards/redox/matrix.c | 1 - keyboards/vitamins_included/matrix.c | 1 - keyboards/viterbi/matrix.c | 1 - keyboards/zen/matrix.c | 1 - 14 files changed, 50 insertions(+), 18 deletions(-) (limited to 'keyboards') diff --git a/keyboards/deltasplit75/matrix.c b/keyboards/deltasplit75/matrix.c index db84fb02ce..1ac5c5039d 100644 --- a/keyboards/deltasplit75/matrix.c +++ b/keyboards/deltasplit75/matrix.c @@ -146,7 +146,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/ergo42/matrix.c b/keyboards/ergo42/matrix.c index 80d4ce46a8..fc42dd14d9 100644 --- a/keyboards/ergo42/matrix.c +++ b/keyboards/ergo42/matrix.c @@ -151,7 +151,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/fourier/matrix.c b/keyboards/fourier/matrix.c index ed913f34b4..fdeead7dc7 100644 --- a/keyboards/fourier/matrix.c +++ b/keyboards/fourier/matrix.c @@ -149,7 +149,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/handwired/dactyl_manuform/matrix.c b/keyboards/handwired/dactyl_manuform/matrix.c index c3bfe80423..904850d4d3 100644 --- a/keyboards/handwired/dactyl_manuform/matrix.c +++ b/keyboards/handwired/dactyl_manuform/matrix.c @@ -157,7 +157,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/iris/matrix.c b/keyboards/iris/matrix.c index 7195fb0ead..217264f263 100644 --- a/keyboards/iris/matrix.c +++ b/keyboards/iris/matrix.c @@ -153,7 +153,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index c3bfe80423..904850d4d3 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -157,7 +157,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/levinson/matrix.c b/keyboards/levinson/matrix.c index 7195fb0ead..217264f263 100644 --- a/keyboards/levinson/matrix.c +++ b/keyboards/levinson/matrix.c @@ -153,7 +153,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/nyquist/keymaps/hexwire/keymap.c b/keyboards/nyquist/keymaps/hexwire/keymap.c index 699cc3de5b..40df4bcab4 100644 --- a/keyboards/nyquist/keymaps/hexwire/keymap.c +++ b/keyboards/nyquist/keymaps/hexwire/keymap.c @@ -36,6 +36,7 @@ enum custom_keycodes { #define KC_X2 RAISE #define KC_X3 LT(_FN3, KC_GRV) #define KC_X4 MT(MOD_LSFT, KC_ENT) +#define KC_BL_S BL_STEP const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -91,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR, RCBR, P1 , P2 , P3 ,MINS, , //|----+----+----+----+----+----| |----+----+----+----+----+----| - , , , , , , DEL , , P0 ,PDOT, , + BL_S, , , , , , DEL , , P0 ,PDOT, , //`----+----+----+----+----+----' `----+----+----+----+----+----' ), diff --git a/keyboards/nyquist/matrix.c b/keyboards/nyquist/matrix.c index 5fbae1150e..3cdad4adb8 100644 --- a/keyboards/nyquist/matrix.c +++ b/keyboards/nyquist/matrix.c @@ -1,5 +1,5 @@ /* -Copyright 2017 Danny Nguyen +Copyright 2017 Danny Nguyen 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 @@ -31,6 +31,11 @@ along with this program. If not, see . #include "config.h" #include "timer.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" + extern backlight_config_t backlight_config; +#endif + #ifdef USE_I2C # include "i2c.h" #else // USE_SERIAL @@ -58,6 +63,8 @@ static matrix_row_t matrix_debouncing[MATRIX_ROWS]; #define ERROR_DISCONNECT_COUNT 5 +#define SERIAL_LED_ADDR 0x00 + #define ROWS_PER_HAND (MATRIX_ROWS/2) static uint8_t error_count = 0; @@ -115,12 +122,23 @@ uint8_t matrix_cols(void) void matrix_init(void) { +#ifdef DISABLE_JTAG + // JTAG disable for PORT F. write JTD bit twice within four cycles. + MCUCR |= (1< 0) if (debouncing) return false; +#endif return true; } diff --git a/keyboards/nyquist/rules.mk b/keyboards/nyquist/rules.mk index 840628e1c5..e8f1840418 100644 --- a/keyboards/nyquist/rules.mk +++ b/keyboards/nyquist/rules.mk @@ -58,13 +58,13 @@ 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 +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality MIDI_ENABLE = no # MIDI controls AUDIO_ENABLE = no # Audio output on port C6 UNICODE_ENABLE = no # Unicode BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. USE_I2C = yes +RGBLIGHT_ENABLE = yes # 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 @@ -72,4 +72,4 @@ CUSTOM_MATRIX = yes LAYOUTS = ortho_5x12 -DEFAULT_FOLDER = nyquist/rev1 \ No newline at end of file +DEFAULT_FOLDER = nyquist/rev2 diff --git a/keyboards/redox/matrix.c b/keyboards/redox/matrix.c index 20c0f1d349..1607775bd6 100644 --- a/keyboards/redox/matrix.c +++ b/keyboards/redox/matrix.c @@ -146,7 +146,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/vitamins_included/matrix.c b/keyboards/vitamins_included/matrix.c index 7079a8da93..cf4c1064f8 100644 --- a/keyboards/vitamins_included/matrix.c +++ b/keyboards/vitamins_included/matrix.c @@ -198,7 +198,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/viterbi/matrix.c b/keyboards/viterbi/matrix.c index 5fbae1150e..c56b49c5ff 100644 --- a/keyboards/viterbi/matrix.c +++ b/keyboards/viterbi/matrix.c @@ -146,7 +146,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else diff --git a/keyboards/zen/matrix.c b/keyboards/zen/matrix.c index 12f22214e1..6e274d3bac 100644 --- a/keyboards/zen/matrix.c +++ b/keyboards/zen/matrix.c @@ -148,7 +148,6 @@ uint8_t _matrix_scan(void) if (matrix_changed) { debouncing = true; debouncing_time = timer_read(); - PORTD ^= (1 << 2); } # else -- cgit v1.2.3 From dfa7a708fef77ac1570face29d7e8413f3e725ee Mon Sep 17 00:00:00 2001 From: Hannes Egler Date: Tue, 29 May 2018 05:18:39 +0200 Subject: Indicator led support for KBD8X (#3064) * Support for indicator LEDs * fixes for backlighting support * more fixes --- keyboards/kbd8x/kbd8x.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'keyboards') diff --git a/keyboards/kbd8x/kbd8x.c b/keyboards/kbd8x/kbd8x.c index 51e7852412..af7ab7a07f 100644 --- a/keyboards/kbd8x/kbd8x.c +++ b/keyboards/kbd8x/kbd8x.c @@ -39,5 +39,26 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) { void led_set_kb(uint8_t usb_led) { // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + if(usb_led & (1< Date: Tue, 29 May 2018 04:22:43 +0100 Subject: Update Canoe ps2avr board (#3066) * Add Percent Canoe keyboard * Fix row of nonus backslash * Update info.json to be correct for canoe * Change LAYOUT_ISO to LAYOUT_iso * Remove bootloader key in info.json --- keyboards/canoe/canoe.c | 28 ++- keyboards/canoe/canoe.h | 25 ++- keyboards/canoe/config.h | 20 +- keyboards/canoe/info.json | 394 +++++++++++++++++++++++++++++++++++ keyboards/canoe/keymaps/iso/keymap.c | 29 +++ keyboards/canoe/readme.md | 2 +- 6 files changed, 482 insertions(+), 16 deletions(-) create mode 100644 keyboards/canoe/info.json create mode 100644 keyboards/canoe/keymaps/iso/keymap.c (limited to 'keyboards') diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c index 6a67562348..bc69df2e5e 100644 --- a/keyboards/canoe/canoe.c +++ b/keyboards/canoe/canoe.c @@ -16,14 +16,33 @@ along with this program. If not, see . */ #include "canoe.h" +#ifdef BACKLIGHT_ENABLE +#include "backlight.h" +#endif +#ifdef RGBLIGHT_ENABLE +#include "i2c.h" #include "rgblight.h" +#endif -#include +#ifdef BACKLIGHT_ENABLE +void backlight_set(uint8_t level) { + if (level == 0) { + // Turn out the lights + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); + } else { + // Turn on the lights + PORTD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + } +} -#include "action_layer.h" -#include "i2c.h" -#include "quantum.h" +void backlight_init_ports(void) { + DDRD |= (1<<0 | 1<<1 | 1<<4 | 1<<6); + PORTD &= ~(1<<0 | 1<<1 | 1<<4 | 1<<6); +} + +#endif +#ifdef RGBLIGHT_ENABLE extern rgblight_config_t rgblight_config; void rgblight_set(void) { @@ -43,3 +62,4 @@ __attribute__ ((weak)) void matrix_scan_user(void) { rgblight_task(); } +#endif diff --git a/keyboards/canoe/canoe.h b/keyboards/canoe/canoe.h index 157aabcf23..5658eb1b4a 100644 --- a/keyboards/canoe/canoe.h +++ b/keyboards/canoe/canoe.h @@ -18,10 +18,25 @@ along with this program. If not, see . #ifndef CANOE_H #define CANOE_H -#define KNO KC_NO - #include "quantum.h" +#define LAYOUT_iso( \ + K0D, K0C, K0B, K0A, K09, K08, K07, K06, K05, K04, K03, K02, K01, K00, K0E, \ + K1D, K1C, K1B, K1A, K19, K18, K17, K16, K15, K14, K13, K12, K11, K1E, \ + K2D, K2C, K2B, K2A, K29, K28, K27, K26, K25, K24, K23, K22, K10, K21, K2E, \ + K3D, K4A, K3C, K3B, K3A, K39, K38, K37, K36, K35, K34, K33, K32, K30, K3E, \ + K4D, K4C, K4B, K48, K44, K43, K42, K40, 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 }, \ + { KC_NO, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, K2D, K2E }, \ + { K30, KC_NO, K32, K33, K34, K35, K36, K37, K38, K39, K3A, K3B, K3C, K3D, K3E }, \ + { K40, KC_NO, K42, K43, K44, KC_NO, KC_NO, KC_NO, K48, KC_NO, K4A, K4B, K4C, K4D, K4E }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ +} + #define LAYOUT( \ KD0, KC0, KB0, KA0, K90, K80, K70, K60, K50, K40, K30, K20, K10, K00, KE0, \ KD1, KC1, KB1, KA1, K91, K81, K71, K61, K51, K41, K31, K21, K11, K01, KE1, \ @@ -31,9 +46,9 @@ along with this program. If not, see . ){ \ { K00, K10, K20, K30, K40, K50, K60, K70, K80, K90, KA0, KB0, KC0, KD0, KE0 }, \ { K01, K11, K21, K31, K41, K51, K61, K71, K81, K91, KA1, KB1, KC1, KD1, KE1 }, \ - { KNO, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KE2 }, \ - { K03, KNO, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KE3 }, \ - { K04, KNO, K24, K34, K44, KNO, KNO, KNO, K84, KNO, KNO, KB4, KC4, KD4, KE4 } \ + { KC_NO, K12, K22, K32, K42, K52, K62, K72, K82, K92, KA2, KB2, KC2, KD2, KE2 }, \ + { K03, KC_NO, K23, K33, K43, K53, K63, K73, K83, K93, KA3, KB3, KC3, KD3, KE3 }, \ + { K04, KC_NO, K24, K34, K44, KC_NO, KC_NO, KC_NO, K84, KC_NO, KC_NO, KB4, KC4, KD4, KE4 } \ } #endif diff --git a/keyboards/canoe/config.h b/keyboards/canoe/config.h index f8e368df25..0e70094ae8 100644 --- a/keyboards/canoe/config.h +++ b/keyboards/canoe/config.h @@ -15,22 +15,30 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#ifndef BMINI_CONFIG_H -#define BMINI_CONFIG_H +#ifndef CANOE_CONFIG_H +#define CANOE_CONFIG_H #include "config_common.h" #define VENDOR_ID 0x20A0 #define PRODUCT_ID 0x422D -#define MANUFACTURER percent -#define PRODUCT canoe +#define MANUFACTURER NotActuallyPercent +#define PRODUCT CANOE #define RGBLED_NUM 2 -/* matrix size */ -#define MATRIX_ROWS 5 +#define MATRIX_ROWS 8 #define MATRIX_COLS 15 +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6, B7 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, C1 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 #define RGBLIGHT_ANIMATIONS #define NO_UART 1 diff --git a/keyboards/canoe/info.json b/keyboards/canoe/info.json new file mode 100644 index 0000000000..ddabae88c4 --- /dev/null +++ b/keyboards/canoe/info.json @@ -0,0 +1,394 @@ +{ + "keyboard_name": "canoe", + "maintainer": "qmk", + "url": "", + "height": 8, + "width": 15, + "layouts": { + "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", + "w": 2, + "x": 13, + "y": 0 + }, + { + "label": "Insert", + "x": 15, + "y": 0 + }, + { + "label": "Tab", + "w": 1.5, + "x": 0, + "y": 1 + }, + { + "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 + }, + { + "ks": [ + [ + 0, + 0 + ], + [ + 1.5, + 0 + ], + [ + 1.5, + 2 + ], + [ + 0.25, + 2 + ], + [ + 0.25, + 1 + ], + [ + 0, + 1 + ], + [ + 0, + 0 + ] + ], + "label": "Enter", + "x": 13.5, + "y": 1 + }, + { + "label": "Delete", + "x": 15, + "y": 1 + }, + { + "label": "Caps Lock", + "w": 1.75, + "x": 0, + "y": 2 + }, + { + "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": "\\", + "x": 12.75, + "y": 2 + }, + { + "label": "Home", + "x": 15, + "y": 2 + }, + { + "label": "Shift", + "w": 1.25, + "x": 0, + "y": 3 + }, + { + "label": "~", + "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", + "w": 1.75, + "x": 12.25, + "y": 3 + }, + { + "label": "Up", + "x": 14, + "y": 3 + }, + { + "label": "Page Down", + "x": 14, + "y": 3 + }, + { + "label": "Control", + "w": 1.25, + "x": 0, + "y": 4 + }, + { + "label": "Win", + "w": 1.25, + "x": 1.25, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 2.5, + "y": 4 + }, + { + "w": 6.25, + "x": 3.75, + "y": 4 + }, + { + "label": "Alt", + "w": 1.25, + "x": 10, + "y": 4 + }, + { + "label": "Fn0", + "w": 1.25, + "x": 11.25, + "y": 4 + }, + { + "label": "Left", + "x": 13, + "y": 4 + }, + { + "label": "Down", + "x": 14, + "y": 4 + }, + { + "label": "Right", + "x": 15, + "y": 4 + } + ] + } + } +} diff --git a/keyboards/canoe/keymaps/iso/keymap.c b/keyboards/canoe/keymaps/iso/keymap.c new file mode 100644 index 0000000000..89af719d12 --- /dev/null +++ b/keyboards/canoe/keymaps/iso/keymap.c @@ -0,0 +1,29 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_iso( + 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_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_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_NUBS, KC_ENT, KC_END, + KC_LSFT, KC_NUHS, 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_SPACE, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT + ), +}; + diff --git a/keyboards/canoe/readme.md b/keyboards/canoe/readme.md index 96cd8007ce..fa2bfbb332 100644 --- a/keyboards/canoe/readme.md +++ b/keyboards/canoe/readme.md @@ -1,7 +1,7 @@ CANOE ======== -A 65% keyboard with RGB +A 65% keyboard with some RGB Keyboard Maintainer: QMK Community -- cgit v1.2.3 From eed6ef09991363a8db18f43bf8304ab917a1e9d5 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 28 May 2018 20:29:14 -0700 Subject: Configurator updates for Atreus/Atreus62 (#3065) --- keyboards/atreus/info.json | 15 +++++++-------- keyboards/atreus62/info.json | 8 ++++---- 2 files changed, 11 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/info.json b/keyboards/atreus/info.json index 34933672f9..73cff2509a 100644 --- a/keyboards/atreus/info.json +++ b/keyboards/atreus/info.json @@ -1,13 +1,12 @@ { - "keyboard_name": "Atreus", - "url": "", - "maintainer": "qmk", - "bootloader": "", - "width": 12.5, - "height": 4.6, + "keyboard_name": "Atreus", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 4.7, "layouts": { "LAYOUT": { - "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":7.5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "h":1.5}, {"x":6.5, "y":3, "h":1.5}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}] + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.35}, {"x":2, "y":0}, {"x":3, "y":0.35}, {"x":4, "y":0.7}, {"x":8, "y":0.7}, {"x":9, "y":0.35}, {"x":10, "y":0}, {"x":11, "y":0.35}, {"x":12, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.35}, {"x":2, "y":1}, {"x":3, "y":1.35}, {"x":4, "y":1.7}, {"x":8, "y":1.7}, {"x":9, "y":1.35}, {"x":10, "y":1}, {"x":11, "y":1.35}, {"x":12, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.35}, {"x":2, "y":2}, {"x":3, "y":2.35}, {"x":4, "y":2.7}, {"x":8, "y":2.7}, {"x":9, "y":2.35}, {"x":10, "y":2}, {"x":11, "y":2.35}, {"x":12, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.35}, {"x":2, "y":3}, {"x":3, "y":3.35}, {"x":4, "y":3.7}, {"x":5, "y":2.95, "h":1.5}, {"x":7, "y":2.95, "h":1.5}, {"x":8, "y":3.7}, {"x":9, "y":3.35}, {"x":10, "y":3}, {"x":11, "y":3.35}, {"x":12, "y":3.6}] } } -} \ No newline at end of file +} diff --git a/keyboards/atreus62/info.json b/keyboards/atreus62/info.json index af2201d5c7..5a7ed3754b 100644 --- a/keyboards/atreus62/info.json +++ b/keyboards/atreus62/info.json @@ -2,11 +2,11 @@ "keyboard_name": "Atreus62", "url": "", "maintainer": "qmk", - "width": 14.5, - "height": 5, + "width": 15, + "height": 5.7, "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":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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":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}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":0, "y":4}, {"x":1, "y":4}, {"x":2, "y":4}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4, "h":1.5}, {"x":7.5, "y":4, "h":1.5}, {"x":8.5, "y":4}, {"x":9.5, "y":4}, {"x":10.5, "y":4}, {"x":11.5, "y":4}, {"x":12.5, "y":4}, {"x":13.5, "y":4}] + "layout": [{"x":0, "y":0.6}, {"x":1, "y":0.6}, {"x":2, "y":0.35}, {"x":3, "y":0}, {"x":4, "y":0.35}, {"x":5, "y":0.7}, {"x":9, "y":0.7}, {"x":10, "y":0.35}, {"x":11, "y":0}, {"x":12, "y":0.35}, {"x":13, "y":0.6}, {"x":14, "y":0.6}, {"x":0, "y":1.6}, {"x":1, "y":1.6}, {"x":2, "y":1.35}, {"x":3, "y":1}, {"x":4, "y":1.35}, {"x":5, "y":1.7}, {"x":9, "y":1.7}, {"x":10, "y":1.35}, {"x":11, "y":1}, {"x":12, "y":1.35}, {"x":13, "y":1.6}, {"x":14, "y":1.6}, {"x":0, "y":2.6}, {"x":1, "y":2.6}, {"x":2, "y":2.35}, {"x":3, "y":2}, {"x":4, "y":2.35}, {"x":5, "y":2.7}, {"x":9, "y":2.7}, {"x":10, "y":2.35}, {"x":11, "y":2}, {"x":12, "y":2.35}, {"x":13, "y":2.6}, {"x":14, "y":2.6}, {"x":0, "y":3.6}, {"x":1, "y":3.6}, {"x":2, "y":3.35}, {"x":3, "y":3}, {"x":4, "y":3.35}, {"x":5, "y":3.7}, {"x":9, "y":3.7}, {"x":10, "y":3.35}, {"x":11, "y":3}, {"x":12, "y":3.35}, {"x":13, "y":3.6}, {"x":14, "y":3.6}, {"x":0, "y":4.6}, {"x":1, "y":4.6}, {"x":2, "y":4.35}, {"x":3, "y":4}, {"x":4, "y":4.35}, {"x":5, "y":4.7}, {"x":6, "y":3.95, "h":1.5}, {"x":8, "y":3.95, "h":1.5}, {"x":9, "y":4.7}, {"x":10, "y":4.35}, {"x":11, "y":4}, {"x":12, "y":4.35}, {"x":13, "y":4.6}, {"x":14, "y":4.6}] } } -} \ No newline at end of file +} -- cgit v1.2.3 From 0f99562992debd98001e5a205735e749f48bd46a Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 29 May 2018 01:13:53 -0700 Subject: Refactor and Configurator updates for Bantam44 (#3071) * Configurator update for Bantam-44 * Refactor for Bantam44 --- keyboards/bantam44/bantam44.h | 18 +++++------ keyboards/bantam44/info.json | 13 ++++++++ keyboards/bantam44/keymaps/default/keymap.c | 49 +++++++++++++++-------------- 3 files changed, 48 insertions(+), 32 deletions(-) create mode 100644 keyboards/bantam44/info.json (limited to 'keyboards') diff --git a/keyboards/bantam44/bantam44.h b/keyboards/bantam44/bantam44.h index 3c01174348..38afbbdde7 100644 --- a/keyboards/bantam44/bantam44.h +++ b/keyboards/bantam44/bantam44.h @@ -7,17 +7,17 @@ // The following is an example using the Planck MIT layout // The first section contains all of the arguements // The second converts the arguments into a two-dimensional array -#define KEYMAP( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ - K30, K31, K32, K33, K34, K35, K36, K37, K38 \ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, \ + K30, K31, K32, K33, K34, K35, K36, K37, K38 \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ - { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 }, \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, KC_NO, K2A }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B }, \ + { K30, K31, K32, KC_NO, K33, KC_NO, K34, KC_NO, K35, K36, K37, K38 } \ } #endif diff --git a/keyboards/bantam44/info.json b/keyboards/bantam44/info.json new file mode 100644 index 0000000000..485d624f55 --- /dev/null +++ b/keyboards/bantam44/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Bantam-44", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 44, + "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":"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, "w":1.5}, {"label":"K20", "x":0, "y":2}, {"label":"K21", "x":1, "y":2}, {"label":"K22", "x":2, "y":2}, {"label":"K23", "x":3, "y":2}, {"label":"K24", "x":4, "y":2}, {"label":"K25", "x":5, "y":2}, {"label":"K26", "x":6, "y":2}, {"label":"K27", "x":7, "y":2}, {"label":"K28", "x":8, "y":2}, {"label":"K29", "x":9, "y":2}, {"label":"K2A", "x":10, "y":2}, {"label":"K2B", "x":11, "y":2}, {"label":"K30", "x":0, "y":3, "w":1.25}, {"label":"K31", "x":1.25, "y":3, "w":1.25}, {"label":"K32", "x":2.5, "y":3, "w":1.25}, {"label":"K33", "x":3.75, "y":3, "w":1.25}, {"label":"K34", "x":5, "y":3, "w":2.75}, {"label":"K35", "x":7.75, "y":3, "w":1.25}, {"label":"K36", "x":9, "y":3}, {"label":"K37", "x":10, "y":3}, {"label":"K38", "x":11, "y":3}] + } + } +} diff --git a/keyboards/bantam44/keymaps/default/keymap.c b/keyboards/bantam44/keymaps/default/keymap.c index ed795eee1b..0e15bebf86 100644 --- a/keyboards/bantam44/keymaps/default/keymap.c +++ b/keyboards/bantam44/keymaps/default/keymap.c @@ -1,30 +1,33 @@ -#include "bantam44.h" - +#include QMK_KEYBOARD_H + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = { /* Base */ - {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_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, MO(1), KC_NO, KC_SPC, KC_NO, MO(2), KC_SCLN, KC_QUOT, KC_SLSH } - }, - [1] = { /* LOWER */ - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT }, - {KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_END, KC_PGDN, KC_EXLM } - }, - [2] = { /* RAISE */ - {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT }, - {KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_NO, KC_ENT }, - {KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT }, - {KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_TRNS, KC_NO, KC_SPC, KC_NO, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT } - } + /* Base */ + [0] = LAYOUT( \ + 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_CAPS, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(2), KC_SCLN, KC_QUOT, KC_SLSH \ + ), + /* LOWER */ + [1] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DELT, \ + KC_TAB, KC_MPRV, KC_MPLY, KC_MNXT, KC_GRV, KC_BSLS, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, KC_HOME, KC_PGUP, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_END, KC_PGDN, KC_EXLM \ + ), + /* RAISE */ + [2] = LAYOUT( \ + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DELT, \ + KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, KC_TILD, KC_PIPE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_ENT, \ + KC_CAPS, KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, KC_UP, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_SPC, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT \ + ) }; - + const uint16_t PROGMEM fn_actions[] = { }; - + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) // MACRODOWN only works in this function { return MACRO_NONE; -}; \ No newline at end of file +}; -- cgit v1.2.3 From edb149fb5a58aea5a8c62f41e3ae90bb7bfed21c Mon Sep 17 00:00:00 2001 From: Hannes Egler Date: Tue, 29 May 2018 10:52:02 +0200 Subject: Kbd8x backlight support (#3069) * added backlighting support * complying to conventions --- .../kbd8x/keymaps/default_backlighting/config.h | 24 ++++++++ .../kbd8x/keymaps/default_backlighting/keymap.c | 71 ++++++++++++++++++++++ .../kbd8x/keymaps/default_backlighting/readme.md | 3 + .../kbd8x/keymaps/default_backlighting/rules.mk | 17 ++++++ 4 files changed, 115 insertions(+) create mode 100644 keyboards/kbd8x/keymaps/default_backlighting/config.h create mode 100644 keyboards/kbd8x/keymaps/default_backlighting/keymap.c create mode 100644 keyboards/kbd8x/keymaps/default_backlighting/readme.md create mode 100644 keyboards/kbd8x/keymaps/default_backlighting/rules.mk (limited to 'keyboards') diff --git a/keyboards/kbd8x/keymaps/default_backlighting/config.h b/keyboards/kbd8x/keymaps/default_backlighting/config.h new file mode 100644 index 0000000000..63bef2a735 --- /dev/null +++ b/keyboards/kbd8x/keymaps/default_backlighting/config.h @@ -0,0 +1,24 @@ +/* Copyright 2017 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/kbd8x/keymaps/default_backlighting/keymap.c b/keyboards/kbd8x/keymaps/default_backlighting/keymap.c new file mode 100644 index 0000000000..6e3950e500 --- /dev/null +++ b/keyboards/kbd8x/keymaps/default_backlighting/keymap.c @@ -0,0 +1,71 @@ +/* Copyright 2017 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 . + */ +#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_BSLS, 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_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, MO(1), 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 uint16_t PROGMEM fn_actions[] = { + +}; + +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; +}; + + +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/kbd8x/keymaps/default_backlighting/readme.md b/keyboards/kbd8x/keymaps/default_backlighting/readme.md new file mode 100644 index 0000000000..773a3dfbae --- /dev/null +++ b/keyboards/kbd8x/keymaps/default_backlighting/readme.md @@ -0,0 +1,3 @@ +# The default keymap for kbd8x + +This keymap uses the LAYOUT_all macro when creating its keymap. \ No newline at end of file diff --git a/keyboards/kbd8x/keymaps/default_backlighting/rules.mk b/keyboards/kbd8x/keymaps/default_backlighting/rules.mk new file mode 100644 index 0000000000..e806a1ca59 --- /dev/null +++ b/keyboards/kbd8x/keymaps/default_backlighting/rules.mk @@ -0,0 +1,17 @@ +#Build 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 +# 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 -- cgit v1.2.3 From eb8388b31e5c0101c1e99e3babb72a47546df156 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 29 May 2018 03:53:03 -0700 Subject: Refactor and Configurator updates for Woodkeys/NovelKeys Big Series (#3073) * Refactor for Woodkeys Big Series * Configurator update for Woodkeys Big Series --- keyboards/bigseries/bigseries.h | 2 +- keyboards/bigseries/info.json | 12 ++++++++++++ keyboards/bigseries/keymaps/8ball/keymap.c | 4 ++-- keyboards/bigseries/keymaps/default/keymap.c | 4 ++-- keyboards/bigseries/keymaps/leddance/keymap.c | 8 ++++---- 5 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 keyboards/bigseries/info.json (limited to 'keyboards') diff --git a/keyboards/bigseries/bigseries.h b/keyboards/bigseries/bigseries.h index 4a8ac1116c..3441407798 100755 --- a/keyboards/bigseries/bigseries.h +++ b/keyboards/bigseries/bigseries.h @@ -19,7 +19,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K00 \ ) { \ { K00 } \ diff --git a/keyboards/bigseries/info.json b/keyboards/bigseries/info.json new file mode 100644 index 0000000000..ff2fd54c57 --- /dev/null +++ b/keyboards/bigseries/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Big Series 1-Key", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "layout": [{"x":0, "y":0, "w":4, "h":4}] + } + } +} diff --git a/keyboards/bigseries/keymaps/8ball/keymap.c b/keyboards/bigseries/keymaps/8ball/keymap.c index df4e3dde8b..1097eb94af 100755 --- a/keyboards/bigseries/keymaps/8ball/keymap.c +++ b/keyboards/bigseries/keymaps/8ball/keymap.c @@ -15,7 +15,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "../../bigseries.h" +#include QMK_KEYBOARD_H static const char * const ANSWERS[] = { // "Yes" answers @@ -51,7 +51,7 @@ static const char * const ANSWERS[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -KEYMAP( +LAYOUT( KC_A), }; diff --git a/keyboards/bigseries/keymaps/default/keymap.c b/keyboards/bigseries/keymaps/default/keymap.c index 67cfb168c2..7ce837357f 100755 --- a/keyboards/bigseries/keymaps/default/keymap.c +++ b/keyboards/bigseries/keymaps/default/keymap.c @@ -15,11 +15,11 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "../../bigseries.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -KEYMAP( +LAYOUT( KC_A), diff --git a/keyboards/bigseries/keymaps/leddance/keymap.c b/keyboards/bigseries/keymaps/leddance/keymap.c index 4cb57f4375..3cd8f1db7f 100755 --- a/keyboards/bigseries/keymaps/leddance/keymap.c +++ b/keyboards/bigseries/keymaps/leddance/keymap.c @@ -15,8 +15,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "../../bigseries.h" -#include "print.h" +#include QMK_KEYBOARD_H + extern rgblight_config_t rgblight_config; @@ -66,9 +66,9 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[BASE] = KEYMAP( +[BASE] = LAYOUT( TD(TD_TOGGLE)), -[LED] = KEYMAP( +[LED] = LAYOUT( TD(TD_TOGGLE) ) -- cgit v1.2.3 From 034a25aedf5e0ddba2b05f4b3534c1522330d5cd Mon Sep 17 00:00:00 2001 From: Danny Date: Tue, 29 May 2018 11:01:24 -0400 Subject: Keymap fixes (#3074) * Fix keymap to use correct macro * Make sure RGBLED_NUM is defined to a value --- keyboards/lets_split/keymaps/mtdjr/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/keymaps/mtdjr/keymap.c b/keyboards/lets_split/keymaps/mtdjr/keymap.c index 36aa517224..4846772edf 100644 --- a/keyboards/lets_split/keymaps/mtdjr/keymap.c +++ b/keyboards/lets_split/keymaps/mtdjr/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Up | Down |Right | * `-----------------------------------------' '-----------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_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, \ TD(TD_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 , \ @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | 0 | . | = | _ | * `-----------------------------------------' '-----------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT( \ KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, KC_4, KC_5, KC_6, KC_ASTR, KC_BSLS, \ _______, XXXXXXX, XXXXXXX, UM_COPY, UM_INSR, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PLUS, KC_MINS, \ @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | * `-----------------------------------------' '-----------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT( \ KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_PIPE,\ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, @@ -103,7 +103,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | Home | | | End | * `-----------------------------------------' '-----------------------------------------' */ -[_ADJUST] = KEYMAP( \ +[_ADJUST] = LAYOUT( \ _______, UM_ROOT, UM_PPLY, UM_PSEF, _______, _______, RESET, _______, _______, _______, _______, KC_DEL, \ _______, _______, _______, AU_ON, AU_OFF, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ _______, KC_UNDO, KC_CUT, UM_COPY, UM_INSR, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ -- cgit v1.2.3 From 8a9c19ee93d38ab7c5cf145472e4e3fc16901fc3 Mon Sep 17 00:00:00 2001 From: Brian Pruitt-Goddard Date: Tue, 29 May 2018 15:55:47 -0700 Subject: Add bpruitt-goddard Ergodox Layout (#3080) * Feat: Create personal ergodox keymap * FEAT: Update bpruitt-goddard keymap with custom layout * Fix: Remove unused pieces from bpruitt-goddard keyboard * Feat: Add QWERTY layer to bpruitt-goddard ergodox keymap * Refactor: Remove unused layers from bpruitt-goddard keymap * Fix: Update base layer for bpruitt-goddard keymap * Fix: Remove un-reachable key combo from FN layer * Fix: Rename FN layer to numpad layer * Feat: Create one-shot modifier layer for mac os use * Doc: Update readme to reflect my keymap * Feat: Add mac desktop space switching * feat: Update keymap layers to use ergodox pretty format --- .../ergodox_ez/keymaps/bpruitt-goddard/config.h | 28 +++ .../ergodox_ez/keymaps/bpruitt-goddard/keymap.c | 234 +++++++++++++++++++++ .../ergodox_ez/keymaps/bpruitt-goddard/readme.md | 23 ++ .../ergodox_ez/keymaps/bpruitt-goddard/rules.mk | 15 ++ 4 files changed, 300 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/readme.md create mode 100644 keyboards/ergodox_ez/keymaps/bpruitt-goddard/rules.mk (limited to 'keyboards') diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h new file mode 100644 index 0000000000..11c81f2eba --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/config.h @@ -0,0 +1,28 @@ +#include "../../config.h" + +// Sets good default for the speed of the mouse. +#undef MOUSEKEY_INTERVAL +#undef MOUSEKEY_DELAY +#undef MOUSEKEY_TIME_TO_MAX +#undef MOUSEKEY_MAX_SPEED + +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_TIME_TO_MAX 60 +#define MOUSEKEY_MAX_SPEED 7 + +#undef MOUSEKEY_WHEEL_MAX_SPEED +#undef MOUSEKEY_WHEEL_TIME_TO_MAX +#undef MOUSEKEY_WHEEL_DELAY + +#define MOUSEKEY_WHEEL_MAX_SPEED 5 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 60 +#define MOUSEKEY_WHEEL_DELAY 100 + +#undef TAPPING_TOGGLE +#undef TAPPING_TERM +#undef IGNORE_MOD_TAP_INTERRUPT + +#define TAPPING_TOGGLE 1 +#define TAPPING_TERM 150 +#define IGNORE_MOD_TAP_INTERRUPT diff --git a/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c new file mode 100644 index 0000000000..ec77b6aa0f --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/bpruitt-goddard/keymap.c @@ -0,0 +1,234 @@ +// An Ergodox EZ keymap mostly following the programmer's dvorak layout. +// There is a standard QWERTY layer as well +// +// See the README.md file for an image of this keymap. + +#include QMK_KEYBOARD_H + +// The layers that we are defining for this keyboards. +#define BASE 0 +#define NUM 1 +#define QWERTY 2 +#define MAC 3 + +// The Tap Dance identifiers, used in the TD keycode and tap_dance_actions array. +#define TAP_MACRO 0 + +// SAFE_RANGE must be used to tag the first element of the enum. +// DYNAMIC_MACRO_RANGE must always be the last element of the enum if other +// values are added (as its value is used to create a couple of other keycodes +// after it). +enum custom_keycodes { + MC_ARROW = SAFE_RANGE, + DYNAMIC_MACRO_RANGE +}; + +// A 'transparent' key code (that falls back to the layers below it). +#define ___ KC_TRANSPARENT + +// A 'blocking' key code. Does nothing but prevent falling back to another layer. +#define XXX KC_NO + +// Some combined keys (one normal keycode when tapped and one modifier or layer +// toggle when held). +#define SPC_RALT MT(MOD_RALT, KC_SPC) // SPACE key and right alt modifier. + +// The most portable copy/paste keys (windows (mostly), linux, and some terminal emulators). +#define MK_CUT LSFT(KC_DEL) // shift + delete +#define MK_COPY LCTL(KC_INS) // ctrl + insert +#define MK_PASTE LSFT(KC_INS) // shift + insert +//Move mac desktop spaces +#define MAC_L LGUI(LSFT(KC_UP)) // cmd + shift + up +#define MAC_R LGUI(LSFT(KC_DOWN)) // cmd + shift + down + +// This file must be included after DYNAMIC_MACRO_RANGE is defined... +#include "dynamic_macro.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Layer 0: basic keys. + [BASE] = LAYOUT_ergodox_pretty( + KC_DLR, KC_AMPR, KC_LBRC, KC_LCBR, KC_RCBR, KC_LPRN, KC_CIRC, KC_F4, KC_EQUAL,KC_ASTR, KC_BSLASH, KC_PLUS, KC_RBRACKET, KC_EXLM, + GUI_T(KC_BSLASH), KC_SCOLON,KC_COMMA, KC_DOT, KC_P, KC_Y, KC_PERC, KC_DELETE, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + MO(NUM), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, + KC_LSPO, KC_QUOTE, KC_Q, KC_J, KC_K, KC_X, KC_LALT, TD(TAP_MACRO),KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, + KC_AT, KC_HASH, KC_GRAVE, KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_HOME, KC_END, TO(QWERTY), + ALT_T(KC_APPLICATION), ALL_T(KC_NO), KC_PGUP, KC_LGUI, + KC_BSLASH, TO(MAC), + KC_ENTER, KC_TAB, CTL_T(KC_ESCAPE), CTL_T(KC_ESCAPE), KC_BSPACE, KC_SPACE), + + // Layer 1: function and numpad keys. + [NUM] = LAYOUT_ergodox_pretty( + ___, 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_COMMA, KC_DOT, KC_MS_BTN1, KC_MS_BTN2, ___, ___, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + XXX, ___, KC_LCBR, KC_RCBR, MC_ARROW, KC_GRAVE, KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_UNDS, + ___, ___, KC_CIRC, KC_LBRACKET, KC_RBRACKET, KC_TILD, ___, ___, KC_0, KC_1, KC_2, KC_3, KC_KP_SLASH, KC_BSLASH, + ___, ___, ___, ___, ___, ___, KC_0, KC_KP_DOT, KC_EQUAL, ___, + ___, ___, KC_KP_ASTERISK, KC_KP_SLASH, + KC_LCTL, ___, + KC_KP_PLUS, KC_KP_MINUS, KC_DLR, KC_DELETE, KC_BSPACE, KC_SPACE), + + // Layer 2: QWERTY control. + [QWERTY] = LAYOUT_ergodox_pretty( + /* left hand */ + KC_EQUAL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_RIGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINUS, + KC_DELETE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, TO(BASE), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + MO(NUM), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, GUI_T(KC_QUOT), + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, ALT_T(KC_NO), MEH_T(KC_NO), KC_N, KC_M, KC_COMMA, KC_DOT, KC_SLASH, KC_RSPC, + KC_GRAVE, KC_QUOTE, LALT(KC_TAB), KC_LEFT, KC_RIGHT, KC_UP, KC_DOWN, KC_LBRACKET, KC_RBRACKET, TO(BASE), + ___, KC_LGUI, ___, KC_ESCAPE, + KC_HOME, KC_PGUP, + KC_ENTER, KC_TAB, KC_END, KC_PGDOWN, KC_BSPACE, KC_SPACE), + + // Layer 3: Mac layer + [MAC] = LAYOUT_ergodox_pretty( + /* left hand */ + ___, KC_1, KC_2, KC_3, KC_4, KC_5, ___, ___, KC_6, KC_7, KC_8, KC_9, KC_0, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, + ___, ___, ___, MAC_L, MAC_R, ___, ___, ___, ___, ___, + ___, ___, ___, ___, + ___, TO(BASE), + KC_LGUI, KC_LALT, KC_LGUI, KC_LGUI, KC_LALT, KC_LGUI), +}; + +// Whether the macro 1 is currently being recorded. +static bool is_macro1_recording = false; + +// The current set of active layers (as a bitmask). +// There is a global 'layer_state' variable but it is set after the call +// to layer_state_set_user(). +static uint32_t current_layer_state = 0; +uint32_t layer_state_set_user(uint32_t state); + +// Method called at the end of the tap dance on the TAP_MACRO key. That key is +// used to start recording a macro (double tap or more), to stop recording (any +// number of tap), or to play the recorded macro (1 tap). +void macro_tapdance_fn(qk_tap_dance_state_t *state, void *user_data) { + uint16_t keycode; + keyrecord_t record; + dprintf("macro_tap_dance_fn %d\n", state->count); + if (is_macro1_recording) { + keycode = DYN_REC_STOP; + is_macro1_recording = false; + layer_state_set_user(current_layer_state); + } else if (state->count == 1) { + keycode = DYN_MACRO_PLAY1; + } else { + keycode = DYN_REC_START1; + is_macro1_recording = true; + layer_state_set_user(current_layer_state); + } + + record.event.pressed = true; + process_record_dynamic_macro(keycode, &record); + record.event.pressed = false; + process_record_dynamic_macro(keycode, &record); +} + +// The definition of the tap dance actions: +qk_tap_dance_action_t tap_dance_actions[] = { + // This Tap dance plays the macro 1 on TAP and records it on double tap. + [TAP_MACRO] = ACTION_TAP_DANCE_FN(macro_tapdance_fn) +}; + +// Runs for each key down or up event. +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (keycode != TD(TAP_MACRO)) { + // That key is processed by the macro_tapdance_fn. Not ignoring it here is + // mostly a no-op except that it is recorded in the macros (and uses space). + // We can't just return false when the key is a tap dance, because + // process_record_user, is called before the tap dance processing (and + // returning false would eat the tap dance). + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + + if(record->event.pressed) { + switch(keycode) { + case MC_ARROW: + SEND_STRING("=>"); + return false; + break; + } + } + } + + return true; // Let QMK send the enter press/release events +} + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + +}; + +// Value to use to switch LEDs on. The default value of 255 is far too bright. +static const uint8_t max_led_value = 20; + +// Whether the given layer (one of the constant defined at the top) is active. +#define LAYER_ON(layer) (current_layer_state & (1< Date: Tue, 29 May 2018 15:58:10 -0700 Subject: Switch to noeeprom variants of rgb fns (#3077) - avoid writing to the eeprom when possible --- keyboards/bigswitch/bigswitch.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/bigswitch/bigswitch.c b/keyboards/bigswitch/bigswitch.c index 3cc11e6026..dfd9710e27 100644 --- a/keyboards/bigswitch/bigswitch.c +++ b/keyboards/bigswitch/bigswitch.c @@ -26,8 +26,8 @@ void matrix_init_user(void) { void matrix_scan_user(void) { if (runonce && timer_elapsed(my_timer) > 1000) { runonce = false; - rgblight_sethsv(0x0, 0xff, 0x80); - rgblight_mode(9); - rgblight_enable(); + rgblight_sethsv_noeeprom(0x0, 0xff, 0x80); + rgblight_mode_noeeprom(9); + rgblight_enable_noeeprom(); } } -- cgit v1.2.3 From 7f5361aedb5a6a74de833a25d0858741e9b8504d Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Tue, 29 May 2018 15:59:34 -0700 Subject: Refactor and Configurator updates for B.mini (#3081) * Refactor for B.mini * Configurator update for B.mini * Updated readme formatting --- keyboards/bmini/bmini.h | 4 ++-- keyboards/bmini/info.json | 13 +++++++++++++ keyboards/bmini/keymaps/default/keymap.c | 6 +++--- keyboards/bmini/readme.md | 6 +++--- 4 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 keyboards/bmini/info.json (limited to 'keyboards') diff --git a/keyboards/bmini/bmini.h b/keyboards/bmini/bmini.h index 65ffbe9479..9a70f92046 100644 --- a/keyboards/bmini/bmini.h +++ b/keyboards/bmini/bmini.h @@ -20,7 +20,7 @@ along with this program. If not, see . #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ @@ -38,7 +38,7 @@ along with this program. If not, see . { K07, K17, K27, K37, K47, K57, K67, K77, KC_NO, KC_NO, KA7, KB7, KC7, KD7, KE7 } \ } -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ K05, K25, K35, K45, K55, K06, KA6, KA7, K07, KB5, KC5, KD5, KE5, KD1, KE1, KE2, \ K04, K14, K24, K34, K44, K54, K16, KB6, KB7, K17, KA4, KB4, KC4, KE4, KD0, \ K03, K13, K23, K33, K43, K53, K26, KC6, KC7, K27, KA3, KB3, KC3, KD3, K67, \ diff --git a/keyboards/bmini/info.json b/keyboards/bmini/info.json new file mode 100644 index 0000000000..a047a3ef58 --- /dev/null +++ b/keyboards/bmini/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "B.mini", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "key_count": 84, + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K10", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":6.25}, {"label":"K57", "x":10, "y":5}, {"label":"KB0", "x":11, "y":5}, {"label":"KC0", "x":12, "y":5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + } + } +} diff --git a/keyboards/bmini/keymaps/default/keymap.c b/keyboards/bmini/keymaps/default/keymap.c index 5c52e1d9b6..1f9e229812 100644 --- a/keyboards/bmini/keymaps/default/keymap.c +++ b/keyboards/bmini/keymaps/default/keymap.c @@ -15,10 +15,10 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "bmini.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [0] = KEYMAP( + [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_PSCR,KC_HOME,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_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, @@ -26,7 +26,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { 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_RGUI,KC_RALT,KC_RCTL,KC_LEFT,KC_DOWN,KC_RGHT ), - [1] = KEYMAP( + [1] = LAYOUT( KC_TRNS,RGB_TOG,RGB_MOD,RGB_HUI,RGB_SAI,RGB_VAI,RGB_HUD,RGB_SAD,RGB_VAD,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_END, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_DEL, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_INS, diff --git a/keyboards/bmini/readme.md b/keyboards/bmini/readme.md index fc39e7c57b..01017e175c 100644 --- a/keyboards/bmini/readme.md +++ b/keyboards/bmini/readme.md @@ -3,9 +3,9 @@ B.mini A 75% keyboard with RGB -Keyboard Maintainer: QMK Community -Hardware Supported: B.mini PCB -Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ +Keyboard Maintainer: QMK Community +Hardware Supported: B.mini PCB +Hardware Availability: http://winkeyless.kr/product/b-mini-x2-pcb/ Make example for this keyboard (after setting up your build environment): -- cgit v1.2.3 From 805b42275b400f7e61a5aa0c6974f00de77dc42d Mon Sep 17 00:00:00 2001 From: Louis Orleans Date: Wed, 30 May 2018 08:06:33 -0700 Subject: board(bigseries): dudeofawesome's layout (#3085) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * ✨ add big series keymap * 👽 update for new keymap format * 🔥 remove unnecesarry code * ✨ add RGB mode reverse * 📝 add README * 📝 change features styling --- .../bigseries/keymaps/dudeofawesome/README.md | 18 ++++++++ keyboards/bigseries/keymaps/dudeofawesome/config.h | 23 ++++++++++ keyboards/bigseries/keymaps/dudeofawesome/keymap.c | 50 ++++++++++++++++++++++ keyboards/bigseries/keymaps/dudeofawesome/rules.mk | 1 + 4 files changed, 92 insertions(+) create mode 100644 keyboards/bigseries/keymaps/dudeofawesome/README.md create mode 100644 keyboards/bigseries/keymaps/dudeofawesome/config.h create mode 100755 keyboards/bigseries/keymaps/dudeofawesome/keymap.c create mode 100644 keyboards/bigseries/keymaps/dudeofawesome/rules.mk (limited to 'keyboards') diff --git a/keyboards/bigseries/keymaps/dudeofawesome/README.md b/keyboards/bigseries/keymaps/dudeofawesome/README.md new file mode 100644 index 0000000000..86b79b4621 --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/README.md @@ -0,0 +1,18 @@ +# DudeOfAwesome's Big Series 1-key layout + +## Features + +### Tap dancing taps: +1. Media Play / Pause +1. Media Next +1. RGB Mode Next +1. RGB Mode Previous + +## Building and flashing + +1. Put your board in DFU mode with the button on the bottom +1. Flash: + ```bash + $ make bigseries:dudeofawesome:dfu + ``` + diff --git a/keyboards/bigseries/keymaps/dudeofawesome/config.h b/keyboards/bigseries/keymaps/dudeofawesome/config.h new file mode 100644 index 0000000000..30b86224c6 --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2018 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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#define TAPPING_TERM 1000 + +#endif diff --git a/keyboards/bigseries/keymaps/dudeofawesome/keymap.c b/keyboards/bigseries/keymaps/dudeofawesome/keymap.c new file mode 100755 index 0000000000..4c3739bbeb --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/keymap.c @@ -0,0 +1,50 @@ +/* +Copyright 2018 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 . +*/ + +#include QMK_KEYBOARD_H + +enum TAP_DANCE { + TD_PLAY = 0, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT(TD(TD_PLAY)), +}; + +void tap_dance (qk_tap_dance_state_t *state, void *user_data) { + switch (state->count) { + case 0 ... 1: + register_code(KC_MEDIA_PLAY_PAUSE); + unregister_code(KC_MEDIA_PLAY_PAUSE); + break; + case 2: + register_code(KC_MEDIA_NEXT_TRACK); + unregister_code(KC_MEDIA_NEXT_TRACK); + break; + case 3: + rgblight_step(); + break; + case 4: default: + rgblight_step_reverse(); + break; + } +} + +//Tap Dance Definitions +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_PLAY] = ACTION_TAP_DANCE_FN(tap_dance), +}; diff --git a/keyboards/bigseries/keymaps/dudeofawesome/rules.mk b/keyboards/bigseries/keymaps/dudeofawesome/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/bigseries/keymaps/dudeofawesome/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes -- cgit v1.2.3 From a75bd221f2b6ca5b67b05b3284389b0721475acd Mon Sep 17 00:00:00 2001 From: Daniel Gordon Date: Wed, 30 May 2018 10:10:22 -0500 Subject: Updates to gordon keymaps (#3082) Added rules.mk for the infinity * Moved tap dance enums to gordon.h * Moved tap dance aliases to gordon.h Moved TD to user space * Added config file with preventing mods sticking * Added a few keys to keymap --- keyboards/ergodox_infinity/keymaps/gordon/config.h | 31 ++ keyboards/ergodox_infinity/keymaps/gordon/keymap.c | 497 ++++++++++++--------- keyboards/ergodox_infinity/keymaps/gordon/rules.mk | 2 + 3 files changed, 323 insertions(+), 207 deletions(-) create mode 100644 keyboards/ergodox_infinity/keymaps/gordon/config.h create mode 100644 keyboards/ergodox_infinity/keymaps/gordon/rules.mk (limited to 'keyboards') diff --git a/keyboards/ergodox_infinity/keymaps/gordon/config.h b/keyboards/ergodox_infinity/keymaps/gordon/config.h new file mode 100644 index 0000000000..88d495b12b --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/gordon/config.h @@ -0,0 +1,31 @@ +/* +Copyright 2018 Daniel Gordon + +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 . +*/ + +#define PREVENT_STUCK_MODIFIERS + +#undef IGNORE_MOD_TAP_INTERRUPT +#define IGNORE_MOD_TAP_INTERRUPT + +#undef PERMISSIVE_HOLD +// #define PERMISSIVE_HOLD + +#define ONESHOT_TAP_TOGGLE 2 + +#undef TAPPING_TERM +#define TAPPING_TERM 200 + +#define FORCE_NKRO diff --git a/keyboards/ergodox_infinity/keymaps/gordon/keymap.c b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c index 7e3e51cdd1..73dd3b325e 100644 --- a/keyboards/ergodox_infinity/keymaps/gordon/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/gordon/keymap.c @@ -10,16 +10,6 @@ #include "keymap_nordic.h" -#define TLSLSH M(TIL_SLASH) -#define F1_F13 TD(F1F13) -#define F2_F14 TD(F2F14) -#define F5_F15 TD(F5F15) -#define F4_ALTF4 TD(ALTF4) -#define END_ESC TD(ENDESC) -#define SHF6_AF7 TD(F6F7) -#define F12_RUN TD(F12ETAPS) -#define COMMA_TD TD(COMMA) - enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here EPRM, @@ -27,129 +17,94 @@ enum custom_keycodes { RGB_SLD, }; -//Tap dance enums -enum { - F12TAP = 0, - F12ETAPS, - CALCCOMP, - REFRESH, //send R, or Control+R if double tapped. - ENDESC, - XESC, //'quad function'. x, control, escape, alt - ALY2, //'quad function': a, Hyper, ctrl+a, layer 2 - PRLOCK, - F6F7, // Shift F6 or Alt F7 - TABCOMBO, - FCTRL, - F3D, - ALTF4, - COMMA, - AT, - HTAB, - F1F13, - F2F14, - F5F15 -}; - - // Custom tapping terms for each key. // Requires changes to action_taping.c -/* uint16_t get_tapping_term(keyevent_t* event) { - uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key); - if (keycode == LT(3,KC_E) ) { - return TAPPING_TERM + 50; - } - return TAPPING_TERM; -} */ - - -// Tap Dance Definitions -qk_tap_dance_action_t tap_dance_actions[] = { - // simple tap dance - [F12ETAPS] = ACTION_TAP_DANCE_DOUBLE(KC_F12,LSFT(LCTL(KC_F10))), - [REFRESH] = ACTION_TAP_DANCE_DOUBLE(KC_R,LCTL(KC_R)), - [ENDESC] = ACTION_TAP_DANCE_DOUBLE(KC_END, KC_ESC), - [CALCCOMP] = ACTION_TAP_DANCE_DOUBLE(KC_CALCULATOR, KC_MY_COMPUTER), - [ALTF4] = ACTION_TAP_DANCE_DOUBLE(KC_F4,LALT(KC_F4)), - [F6F7] = ACTION_TAP_DANCE_DOUBLE(LSFT(KC_F6), LALT(KC_F7)), - [F1F13] = ACTION_TAP_DANCE_DOUBLE(KC_F1, KC_F13), - [F2F14] = ACTION_TAP_DANCE_DOUBLE(KC_F2, KC_F14), - [F5F15] = ACTION_TAP_DANCE_DOUBLE(KC_F5, KC_F15), - [TABCOMBO] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, tab_finished, tab_reset), - [F3D] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, bt_finished, bt_reset), - [COMMA] = ACTION_TAP_DANCE_FN_ADVANCED(NULL, comma_finished, comma_reset), - [HTAB] = ACTION_TAP_DANCE_FN_ADVANCED(NULL,h_finished, h_reset) -}; +// uint16_t get_tapping_term(keyevent_t* event) { +// uint16_t keycode = keymap_key_to_keycode(layer_switch_get_layer(event->key), event->key); +// if (keycode == NAV_E ) { +// return TAPPING_TERM + 50; +// } +// return TAPPING_TERM; +// } + + +// _XXXXXX_ is a symbol that means, "DO NOT ASSIGN THIS KEY TO ANTYING", because the key +// underneath this layer is the key that sends you to/from this layer. +// Meaning, if you were to put something here - then you will be stuck in this layer. +// It is simply a visual reminder not to use that key for this layer. +// Example: On the numpad layer, under the letter `D` is `_XXXXXXX_`, because pressing and holding +// `D` sends you to the numpad layer const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -//**************************FIRST LAYER - LAYER ZERO ************************************** +//**************************FIRST LAYER - LAYER ZERO ************************************** [_QWERTY] = KEYMAP( - SHF6_AF7, F1_F13, F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11, - ________, KC_Q, CTR_SH_W, NAV_E, CTR_AL_R, KC_T, PRINTSCR, - KC_TAB, KC_A, MEH_S, NUMPAD_D, CTRL_F, WIN_G, - ALT_SHFT, CTRL_Z, HYPER_X, MOUSE_C, ALT_V, KC_B, TT(_MOUSE), + SHF6_AF7, F1_F13 , F2_F14, TD(F3D), F4_ALTF4, F5_F15, KC_F11, + SPRK_TCK , Q_ESC , CTR_SH_W, NAV_E, ALT_SH_R, KC_T, PRINTSCR, + KC_TAB , KC_A , MEH_S, NUMPAD_D, CTRL_F, WIN_G, + OSL(_ONESHOT), CTRL_Z , HYPER_X, MOUSE_C, ALT_V, KC_B, OSL(_MOUSE), KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT, - - KC_INSERT, KC_DELETE, - ALT_HOME, - KC_LSHIFT, SYMB_BSP, END_ESC, + + LSFT(KC_INSERT), TT(_QWERTY_KIDS), + ________ , + KC_LSHIFT, SYMB_BSP, KC_INSERT , F12_RUN, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, TD(CALCCOMP), - ________, KC_Y, KC_U, KC_I, KC_O, KC_P, ________, - WIN_H, CTRL_J, KC_K, MEH_L, COL_MOUS, ________, - KC_LEAD, KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, TD(TABCOMBO), - KC_UP, KC_DOWN, KC_ESC, KC_TILD, KC_UNDS, + CALTDEL , KC_Y, KC_U, KC_I, KC_O, KC_P, MODRESET, + WIN_H, CTRL_J, APP_SW_K, MEH_L, COL_MOUS, END_HOME, + OSL(_ONESHOT), KC_N, ALT_M, COMMA_TD, HYPE_DOT, KC_SLASH, ID_MAN_IP, + KC_UP, KC_DOWN,KC_DELETE, KC_TILD, KC_UNDS, - KC_ESCAPE, KC_DELETE, - ALT_T(KC_PGUP), - RCTL_T(KC_PGDOWN), LT(_NAV,KC_ENTER), SPAC_SYM), + TT(_STREET_FIGHTER), ________, + KC_PGUP, + KC_PGDOWN, LT(_NAV,KC_ENTER), SPAC_TXT), //**************************SYMBOLS LAYER************************** [_SYMBOLS] = KEYMAP( ________, ________, ________, ________, ________, ________, ________, - ________, TLSLSH, KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________, - ________, KC_EXLM, KC_PIPE, KC_LPRN, KC_RPRN, M(DEREF), + ________, DEREF , KC_AT, KC_LCBR, KC_RCBR, KC_CIRC, ________, + ________, KC_EXLM, KC_HASH, KC_LPRN, KC_RPRN, ________, ________,KC_DOLLAR, KC_PERC, LSQUIGLY, RSQUIGLY, ________, ________, - ________, M(TICK3), ________, ________, ________, + ________,TICK3 , ________, ________, ________, ________,________, ________, - ________,________,________, + ________,_XXXXXX_,________, ________, ________, ________, ________, ________, ________, NUMLOCK, - ________, TLSLSH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK, - M(EQRIGHT), KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________, - ________, KC_PIPE, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________, - ________,________,________,M(TILD3),________, + ________,TIL_SLASH, KC_PIPE, KC_PLUS, KC_AMPR, ________, CAPLOCK, + EQRIGHT, KC_DQUO, KC_EQUAL, KC_QUOTE,KC_SCOLON, ________, + ________, KC_M, BK_SLASH, ASTERSK, KC_DOT, KC_SLASH, ________, + ________,________ ,________,TILD3,________, ________,________, ________, - ________,________,________), - + ________,________,_XXXXXX_), + //**************************MOUSE MOVEMENT LAYER************************** - [_MOUSE] = KEYMAP(RESET,________,________,________,________,________,________, - RESET,________,________,KC_MS_UP,________,KC_MS_WH_UP,CALTDEL, + [_MOUSE] = KEYMAP(UP_ENTER_RESET,________,________,________,________,________,MODRESET, + RESET,KC_SECRET_5,________,KC_MS_UP,KC_SECRET_4,KC_MS_WH_UP,________, ________,________,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT,KC_MS_WH_DOWN, - KC_SECRET_1,________,HYPR(KC_F13),________,HYPR(KC_F14),KC_SECRET_2,________, + KC_SECRET_5,KC_SECRET_4,KC_SECRET_3,_XXXXXX_,KC_SECRET_2,KC_SECRET_1,_XXXXXX_, ________,________,HYPR(KC_F15),KC_MS_WH_LEFT,KC_MS_WH_RIGHT, - + ________,________, ________, KC_MS_BTN1,KC_MS_BTN2,________, - - + + ________,________,________,________,________,________,________, - KC_MS_WH_UP,________,________,KC_UP,________,________,________, - ________,KC_LEFT,KC_DOWN,KC_RIGHT,________,________, - KC_MS_WH_DOWN,________,KC_PGUP,KC_PGDOWN,KC_MEDIA_NEXT_TRACK,________,________, - KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_AUDIO_MUTE,KC_MEDIA_PLAY_PAUSE,________, + ________,________,________,KC_UP,________,KC_MEDIA_PLAY_PAUSE,________, + ________,KC_LEFT,KC_DOWN,KC_RIGHT,_XXXXXX_,________, + ________,KC_MEDIA_NEXT_TRACK,KC_AUDIO_VOL_UP,KC_AUDIO_VOL_DOWN,KC_MUTE,________,________, + KC_MS_WH_UP,KC_MS_WH_DOWN,________,________,________, ________,________, ________, - ________,________,KC_WWW_BACK), + ________,KC_WWW_BACK,KC_WWW_FORWARD), @@ -157,23 +112,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //**************************WINDOWS NAVIGATION LAYER************************** [_NAV] = KEYMAP(________,________,________,________,________,________,________, - ________,________,SNAPLEFT,________,SNAPRGHT,LALT(KC_LEFT),________, - ________,LCTL(KC_W),PREVTAB,LGUI(KC_D),NEXTTAB,________, - ________,________,WORKLEFT,________,WORKRIGHT,________,________, + ________,________,SNAPLEFT,_XXXXXX_,SNAPRGHT,________,________, + ________,KC_WWW_BACK,PREVTAB,________,NEXTTAB,SNAPUP, + ________,________,WORKLEFT,________,WORKRIGHT,SNAPDOWN,________, ________,________,________,________,________, - + ________,________, ________, - ________,________,________, - - + ________,________,________, + + ________,________,________,________,________,________,________, ________,________,SNAPUP ,KC_UP ,SNAPDOWN,________,________, ________,KC_LEFT ,KC_DOWN ,KC_RIGHT,________,________, ________,________,________,________,________,________,________, ________,________,________,________,________, - - + + ________,________, ________, ________,________,________), @@ -181,95 +136,207 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //****************************NUMPAD LAYER**************************** [_NUMPAD] = KEYMAP(________,________,________,________,________,________,________, ________,________,________,________,________,________,________, - ________,________,________,________,________,________, - ________,________,________,________,________,________,________, + ________,KC_DOT ,KC_SPACE,_XXXXXX_, KC_ESC ,________, + ________,DBMS_OUT,________,________,________,________,________, ________,________,________,________,________, - + ________,________, ________, - ________,________,________, - + KC_PLUS,KC_MINUS,________, + BL_TOGG ,BL_STEP ,________,________,________,________,________, ________,________,KC_7 ,KC_8 ,KC_9 ,________,________, ________,KC_4 ,KC_5 ,KC_6 ,________,________, - ________,________,KC_1 ,KC_2 ,KC_3 ,________,________, - KC_0 ,KC_0 , KC_DOT ,________,________, - + ________,KC_DOT, KC_1 ,KC_2 ,KC_3 ,________,________, + KC_0 ,KC_DOT , KC_DOT ,________,________, + ________,________, ________, ________,________,KC_0), + + //****************************APP SWITCH LAYER**************************** + [_APPSWITCH] = KEYMAP(________,________,________,________,________,________,________, + ________,________ , ________ , ________ ,________ ,________,________, + ________,APP_5,APP_6,APP_7,APP_8,________, + ________,DBMS_OUT,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + KC_PLUS,________,________, + + ________,________,________,________,________,________,________, + ________,________,APP_3 ,________,APP_4 ,________,________, + ________,APP_1 ,_XXXXXX_,APP_2 ,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________), + + + [_ONESHOT] = KEYMAP( UP_ENTER_RESET , ________, ________, ________, ________, ________, ________, + ________, ________, ________, KC_UP , ________, ________, ________, + ________, ________, KC_LEFT , KC_DOWN , KC_RIGHT, ________, + MAGIC_TOGGLE_NKRO, ________, ________, ________, ________, ________, ________, + ________, ________, ________, ________, ________, + + ________, ________, + ________, + ________, ________, ________, + + ________, ________, ________, ________, ________, ________, ________, + ________, ________, KC_7, KC_8, KC_9, KC_PLUS, ________, + ________, KC_4, KC_5, KC_6, KC_EQUAL, ________, + ________, ________, KC_1, KC_2, KC_3, KC_ASTR, ________, + ________, ________, KC_0, ________, ________, + + ________, ________, + ________, + ________, ________, ________), //****************************TEXT/INTELLIJ NAVIGATION LAYER**************************** [_TEXTNAV] = KEYMAP(________,________,________,________,________,________,________, ________,MEH(KC_Q),LSFT(KC_ESCAPE),MEH(KC_D),MEH(KC_2),LALT(LSFT(KC_UP)),________, - ________,LALT(KC_F7),LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)), - ________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________,________,________,________,________,________,________,________,________,________,LCTL(KC_DELETE),________,LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)),________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)),LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________,________) + ________,________,LCTL(KC_LEFT),LCTL(KC_B),LCTL(KC_RIGHT),LALT(LSFT(KC_DOWN)), + ________,________,________,LCTL(LSFT(KC_COMMA)),MEH(KC_DOT),LALT(KC_MS_WH_UP),________, + ________,________,________,________,________, + + ________,________,________,________,________,________, + + LALT(LSFT(KC_F9)),________,________,________,________,________,________,________,MEH(KC_5),LALT(LSFT(KC_Z)), + ________,LALT(KC_Z),________,________,________,LCTL(LSFT(KC_LEFT)),LALT(LCTL(KC_S)),LCTL(LSFT(KC_RIGHT)), + LCTL(LSFT(KC_COMMA)),________,________,________,________,________,________,________,________,________, + ________,________,________,________,________,________,________,________,________,_XXXXXX_), + [_QWERTY_KIDS] = KEYMAP( + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_Q , KC_W, KC_E, KC_R, KC_T, KC_NO , + KC_NO , KC_A , KC_S, KC_D, KC_F, KC_G , + KC_NO , KC_Z , KC_X, KC_C, KC_V, KC_B, KC_NO , + KC_MINUS, KC_GRAVE, KC_DELETE, KC_LEFT, KC_RIGHT, + + KC_NO , TT(_QWERTY_KIDS) , + KC_NO , + KC_LSHIFT, KC_BSPACE, KC_NO , + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_Y, KC_U, KC_I, KC_O, KC_P, KC_NO , + KC_H, KC_J, KC_K, KC_L, KC_SCOLON , KC_NO, + KC_NO , KC_N, KC_M, KC_COMMA , KC_DOT , KC_SLASH, KC_NO , + KC_UP, KC_DOWN, KC_DELETE, KC_TILD, KC_UNDS, + + KC_NO , KC_NO , + KC_NO, + KC_NO, KC_ENTER, KC_SPACE), + + [_STREET_FIGHTER] = KEYMAP( + + KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO , DIE_1000X_LEFT, KC_UP, DIE_1000X_RIGHT, KC_NO, KC_NO , + KC_NO , KC_NO , KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO , + KC_NO , KC_NO , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + + ________ , ________ , + ________ , + ________, ________, ________ , + + KC_NO, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , + KC_NO , KC_NO, KC_G, KC_H, KC_J, KC_NO, KC_NO , + KC_NO, KC_B, KC_N, KC_M, KC_K , KC_NO, + KC_NO , KC_NO, KC_NO, KC_NO , KC_NO , KC_NO, KC_NO , + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + + TT(_STREET_FIGHTER) , ________ , + ________, + ________, ________, ________), + + + //************************Windows navigation to directories************************* + [_DIRNAV] = KEYMAP( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,KC_A,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,_______,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), + + + [_TEXT_MACROS] = KEYMAP( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,KC_A,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,_______,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________) + + +/* FOR FORMATTING FUTURE LAYERS + NO KEY CODES SHOULD BE MORE THAN 8 CHARACTERS + GOES LEFT HAND THEN RIGHT HAND + [_DIRNAV] = KEYMAP( + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + ________,________, + ________, + ________,________,________, + + + ________,________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________,________, + ________,________,________,________,________,________,________, + ________,________,________,________,________, + + + ________,________, + ________, + ________,________,________), */ + + + + }; const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_LAYER_TAP_TOGGLE(1) }; -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - switch(id) { - case INFOQM: { - if (record->event.pressed) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - - case TIL_SLASH: { - if (record->event.pressed) { - SEND_STRING ("~/."); - } - break; - } - - case DEREF: { - if (record->event.pressed) { - SEND_STRING ("->"); - } - break; - } - - case EQRIGHT: { - if (record->event.pressed) { - SEND_STRING ("=>"); - } - break; - } - - case TICK3: { - if (record->event.pressed) { - SEND_STRING ("```"); - } - break; - } - - case TILD3: { - if (record->event.pressed) { - SEND_STRING ("~~~"); - } - break; - } - - case ALTTAB_START: { - register_code(KC_LALT); - layer_on(8); - } - - case ALTTAB_END: { - unregister_code(KC_LALT); - layer_off(8); - } - - - - } - return MACRO_NONE; -}; - void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); @@ -281,35 +348,51 @@ void matrix_scan_user(void) { ergodox_right_led_1_off(); ergodox_right_led_2_off(); ergodox_right_led_3_off(); - switch (layer) { - case _SYMBOLS: - ergodox_right_led_1_on(); - break; - case _MOUSE: - ergodox_right_led_2_on(); - break; - case _NUMPAD: - ergodox_right_led_3_on(); - break; - case _NAV: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - case 5: - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - break; - case 6: - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; - case 7: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); - break; - default: - break; + // _delay_ms(45); + + switch (layer) + { + case _SYMBOLS: + ergodox_right_led_1_on(); + break; + case _MOUSE: + ergodox_right_led_2_on(); + break; + case _NUMPAD: + ergodox_right_led_3_on(); + break; + case _NAV: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case _MACROS: + //layer unused right now + break; + case _FUNCTION: + //layer unused right nowex + break; + case _APPSWITCH: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _ONESHOT: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _TEXTNAV: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + case _QWERTY_KIDS: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + case _STREET_FIGHTER: + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + default: + break; } - }; diff --git a/keyboards/ergodox_infinity/keymaps/gordon/rules.mk b/keyboards/ergodox_infinity/keymaps/gordon/rules.mk new file mode 100644 index 0000000000..9a56408f8e --- /dev/null +++ b/keyboards/ergodox_infinity/keymaps/gordon/rules.mk @@ -0,0 +1,2 @@ +TAP_DANCE_ENABLE = yes + -- cgit v1.2.3 From 835431330c26021b6d3e7c1f4169d8ea075961bc Mon Sep 17 00:00:00 2001 From: Barry Huang Date: Wed, 30 May 2018 23:13:16 +0800 Subject: info.json fix (#3075) * Capslock indicator add * edit * name correction * led_set_user(usb_led); delete * config edit for caps indicator * keymap.c fix * led.h include * pk60.c fix for capslock indicator * info.json fix for LAYOUT_all showing correctly * LAYOUT_all fix --- keyboards/pk60/info.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/pk60/info.json b/keyboards/pk60/info.json index 6c4aecc5f4..20b7728950 100644 --- a/keyboards/pk60/info.json +++ b/keyboards/pk60/info.json @@ -26,7 +26,7 @@ }, "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}, {"x":13, "y":0}, {"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":"|", "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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"label":"Alt", "x":10, "y":4}, {"label":"Win", "x":11, "y":4}, {"label":"Menu", "x":12, "y":4}, {"label":"Ctrl", "x":13, "y":4}, {"x":14, "y":4}] + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"\"", "x":12.75, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25}, {"label":"Shift", "x":0, "y":3.25}, {"x":1, "y":3.25}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"x":8.5, "y":4.25, "w":1.25}, {"label":"Alt", "x":9.75, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] } } -} +} \ No newline at end of file -- cgit v1.2.3 From 258954dc3e884dfa9a057f10f96c4544737e9e81 Mon Sep 17 00:00:00 2001 From: Jarrett Drouillard Date: Wed, 30 May 2018 17:49:20 -0400 Subject: Add kuatsure map to preonic board (#3087) * preonic-keymap: kuatsure keymap * preonic-kuatsure: move arrows and braces and stuffs * preonic-kuatsure: give more time for leader * preonic-kuatsure: move _ to lower o * preonic-kuatsure: tap dance space to enter * preonic-kuatsure: move vol buttons around conflicted with kaleidoscope file navigation * preonic-kuatsure: lower+spc = esc * preonic-kuatsure: add lock key & remove led stuff * preonic-kuatsure: little bit of tmux leadering * preonic-kuatsure: remove colemak and dvorak * preonic-kuatsure: remove lock key and tap dance * preonic-kuatsure: lower space -> enter -- raise space -> esc * preonice-kuatsure: move tmux stuff to homerow keys * preonic-kuatsure: set tmux prefix to a function * preonic-kuatsure: hello game layers * preonic-kuatsure: instead of zelda, ffvii for game mode :) * preonic-kuatsure: mild changes after playing games to game modes * preonice-kuatsure: omg comma dangles and spaces in switch! * preonic-kuatsure: kinda make lower a shift on special characters * preonic-kuatsure: I don't use these * preonic-kuatsure: move vol- to the begining of media row * preonic-kuatsure: more tmux leader stuff ( pane 3 & last pane ) * preonic-kuatsure: abstract out tmux pane zooming * preonic-kuatsure: abstract pane switch * preonic-kuatsure: game_mod is carries over lower positions starting to wonder if I need game_mod ... lol * preonic-kuatsure: switch lwr/rse esc / ent * preonic-kuatsure: add leaders for window switching * preonic-kuatsure: major pruning of adjust layer * preonic-kuatsure: major rework on raise layer * preonic-kuatsure: game mods f layer is raise now * user-kuatsure: hello * various-kuatsure: use layout format + globalize querty / number keys * preonic-kuatsure: don't use tap dance anymore * various-kuatsure: code formatting * various-kuatsure: add function layer vars * preonic-kuatsure: moar formatting * preonic-kuatsure: add home / end keys --- keyboards/preonic/keymaps/kuatsure/config.h | 43 ++++++ keyboards/preonic/keymaps/kuatsure/keymap.c | 216 +++++++++++++++++++++++++++ keyboards/preonic/keymaps/kuatsure/readme.md | 1 + keyboards/preonic/keymaps/kuatsure/rules.mk | 1 + 4 files changed, 261 insertions(+) create mode 100644 keyboards/preonic/keymaps/kuatsure/config.h create mode 100644 keyboards/preonic/keymaps/kuatsure/keymap.c create mode 100644 keyboards/preonic/keymaps/kuatsure/readme.md create mode 100644 keyboards/preonic/keymaps/kuatsure/rules.mk (limited to 'keyboards') diff --git a/keyboards/preonic/keymaps/kuatsure/config.h b/keyboards/preonic/keymaps/kuatsure/config.h new file mode 100644 index 0000000000..ba0ed525e0 --- /dev/null +++ b/keyboards/preonic/keymaps/kuatsure/config.h @@ -0,0 +1,43 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PREONIC_SOUND) + // #define STARTUP_SONG SONG(NO_SOUND) + + #define GAME_SOUND VICTORY_FANFARE_SHORT + + #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ + SONG(GAME_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 + +#endif diff --git a/keyboards/preonic/keymaps/kuatsure/keymap.c b/keyboards/preonic/keymaps/kuatsure/keymap.c new file mode 100644 index 0000000000..63c3937fca --- /dev/null +++ b/keyboards/preonic/keymaps/kuatsure/keymap.c @@ -0,0 +1,216 @@ +/* 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 . + */ + +#include QMK_KEYBOARD_H +#include "kuatsure.h" + +enum preonic_layers { + _QWERTY, + _GAME, + _GAME_MOD, + _LOWER, + _RAISE, + _ADJUST, +}; + +enum preonic_keycodes { + QWERTY = SAFE_RANGE, + GAME, + GAME_MOD, + LOWER, + RAISE, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Leader| Game | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_preonic_grid_wrapper( \ + KC_ESC, _________________NUMBER_L1_________________, _________________NUMBER_R1_________________, KC_BSPC, \ + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \ + KC_LCTL, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, \ + KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, \ + KC_LEAD, GAME, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Game + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Leader|Qwerty| Alt | Spc |Game+ | Space |Game+ | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_GAME] = LAYOUT_preonic_grid_wrapper( \ + KC_ESC, _________________NUMBER_L1_________________, _________________NUMBER_R1_________________, KC_BSPC, \ + KC_TAB, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, \ + KC_LCTL, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, \ + KC_LSFT, _________________QWERTY_L3_________________, _________________QWERTY_R3_________________, KC_ENT, \ + KC_LEAD, QWERTY, KC_LALT, KC_SPC, GAME_MOD, KC_SPC, KC_SPC, GAME_MOD, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Game Modifiers + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | ` | | 7 | 8 | 9 | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | ~ | | 4 | 5 | 6 | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Shift | F1 | F2 | F3 | F4 | | | 1 | 2 | 3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 0 | 0 | | | + * `-----------------------------------------------------------------------------------' + */ +[_GAME_MOD] = LAYOUT_preonic_grid_wrapper( \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, ____________FUNCTION_3____________, KC_GRV, _______, KC_7, KC_8, KC_9, _______, _______, \ + _______, ____________FUNCTION_2____________, KC_TILD, _______, KC_4, KC_5, KC_6, _______, _______, \ + KC_LSFT, ____________FUNCTION_1____________, _______, _______, KC_1, KC_2, KC_3, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_0, _______, _______ \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | < | > | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | Up | | ` | | { | } | _ | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Del | Left | Down | Right| ~ | = | ( | ) | + | : | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | Vol- | Prev | Play | Next | Vol+ | - | [ | ] | | ? | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Mute | | | | Esc | | Home | PgUp | PgDwn| End | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = LAYOUT_preonic_grid_wrapper( \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_LT, KC_GT, _______, _______, _______, \ + _______, _______, _______, KC_UP, _______, KC_GRV, _______, KC_LCBR, KC_RCBR, KC_UNDS, _______, KC_PIPE, \ + _______, KC_DEL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TILD, KC_EQL, KC_LPRN, KC_RPRN, KC_PLUS, KC_COLN, KC_DQT , \ + _______, KC_VOLD, KC_MRWD, KC_MPLY, KC_MFFD, KC_VOLU, KC_MINS, KC_LBRC, KC_RBRC, _______, KC_QUES, _______, \ + _______, KC_MUTE, _______, _______, _______, KC_ESC, KC_ESC, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | E`~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F9 | F10 | F11 | F12 | | | | | | | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F5 | F6 | F7 | F8 | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Enter | | Home | PgUp | PgDwn| End | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = LAYOUT_preonic_grid_wrapper( \ + KC_GESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + _______, ____________FUNCTION_3____________, _______, _______, _______, _______, _______, _______, KC_BSPC, \ + _______, ____________FUNCTION_2____________, _______, _______, _______, _______, _______, _______, _______, \ + _______, ____________FUNCTION_1____________, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, KC_ENT, KC_ENT, _______, KC_HOME, KC_PGUP, KC_PGDN, KC_END \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset| Debug| | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | |Aud on|AudOff| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | |MusMod|Mus on|MusOff| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Qwerty| Game | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_preonic_grid_wrapper( \ + ____________FUNCTION_1____________, ____________FUNCTION_2____________, ____________FUNCTION_3____________, \ + _______, RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, _______, _______, AU_ON, AU_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, MU_MOD, MU_ON, MU_OFF, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, GAME, _______, _______ \ +), + +}; + +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 GAME: + if (record->event.pressed) { + set_single_persistent_default_layer(_GAME); + } + return false; + break; + + case GAME_MOD: + if (record->event.pressed) { + layer_on(_GAME_MOD); + } else { + layer_off(_GAME_MOD); + } + 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; + + } + return true; +}; diff --git a/keyboards/preonic/keymaps/kuatsure/readme.md b/keyboards/preonic/keymaps/kuatsure/readme.md new file mode 100644 index 0000000000..64cf5ae28e --- /dev/null +++ b/keyboards/preonic/keymaps/kuatsure/readme.md @@ -0,0 +1 @@ +# The kuatsure Preonic layout - largely based on the Preonic's & Keyboard Paradise V60's layout diff --git a/keyboards/preonic/keymaps/kuatsure/rules.mk b/keyboards/preonic/keymaps/kuatsure/rules.mk new file mode 100644 index 0000000000..76d73acef7 --- /dev/null +++ b/keyboards/preonic/keymaps/kuatsure/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no -- cgit v1.2.3 From b2398ecbe7047d6bcd39a6c8039b1bfbdcc51ad2 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Wed, 30 May 2018 19:44:52 -0700 Subject: CA66 Backlighting FIx (#3089) * Enable backlighting using pin F0 and changing it in the rules.mk file as well * Change KB_H to CA66_H --- keyboards/ca66/ca66.h | 4 ++-- keyboards/ca66/config.h | 3 +-- keyboards/ca66/rules.mk | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ca66/ca66.h b/keyboards/ca66/ca66.h index 0f91a1238d..0c00125a36 100644 --- a/keyboards/ca66/ca66.h +++ b/keyboards/ca66/ca66.h @@ -1,5 +1,5 @@ -#ifndef KB_H -#define KB_H +#ifndef CA66_H +#define CA66_H #include "quantum.h" diff --git a/keyboards/ca66/config.h b/keyboards/ca66/config.h index f00b5109d7..c35718042a 100644 --- a/keyboards/ca66/config.h +++ b/keyboards/ca66/config.h @@ -25,9 +25,8 @@ /* number of backlight levels */ -#ifdef BACKLIGHT_PIN +#define BACKLIGHT_PIN F0 #define BACKLIGHT_LEVELS 3 -#endif /* Set 0 if debouncing isn't needed */ #define DEBOUNCING_DELAY 5 diff --git a/keyboards/ca66/rules.mk b/keyboards/ca66/rules.mk index d3ad3d20c6..5779b2c8ad 100644 --- a/keyboards/ca66/rules.mk +++ b/keyboards/ca66/rules.mk @@ -51,6 +51,6 @@ 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 +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality AUDIO_ENABLE ?= no RGBLIGHT_ENABLE ?= yes -- cgit v1.2.3 From ee9a7aba396160929604aca54a23ad5534d59940 Mon Sep 17 00:00:00 2001 From: mtdjr Date: Thu, 31 May 2018 11:30:05 -0400 Subject: add not-so-minidox handwire keyboard (#3061) * add not-so-minidox handwire keyboard * corrected keymap * multiple adjustments to not_so_minidox keyboard * remove I2C master left define * update default layer set function * move solenoid code into userspace * minor adjustments to config.h * update keymaps to utilize userspace * move features and config to userspace, correct build issue * correct solenoid pin * adjust defaults for solenoid pin and enable * default solenoid to on for not_so_minidox * disable RGBLIGHT_SLEEP for xd75 * tweaking solenoid enable/disable in userspace and keymaps --- keyboards/handwired/not_so_minidox/config.h | 84 ++++++ keyboards/handwired/not_so_minidox/i2c.c | 162 +++++++++++ keyboards/handwired/not_so_minidox/i2c.h | 49 ++++ .../not_so_minidox/keymaps/default/keymap.c | 121 ++++++++ .../not_so_minidox/keymaps/mtdjr/config.h | 11 + .../not_so_minidox/keymaps/mtdjr/keymap.c | 56 ++++ .../not_so_minidox/keymaps/mtdjr/rules.mk | 1 + keyboards/handwired/not_so_minidox/matrix.c | 307 +++++++++++++++++++++ .../handwired/not_so_minidox/not_so_minidox.c | 1 + .../handwired/not_so_minidox/not_so_minidox.h | 42 +++ keyboards/handwired/not_so_minidox/readme.md | 71 +++++ keyboards/handwired/not_so_minidox/rules.mk | 71 +++++ keyboards/handwired/not_so_minidox/serial.c | 228 +++++++++++++++ keyboards/handwired/not_so_minidox/serial.h | 26 ++ keyboards/handwired/not_so_minidox/split_util.c | 84 ++++++ keyboards/handwired/not_so_minidox/split_util.h | 20 ++ keyboards/iris/keymaps/mtdjr/config.h | 5 +- keyboards/iris/keymaps/mtdjr/keymap.c | 278 ++----------------- keyboards/iris/keymaps/mtdjr/rules.mk | 1 - keyboards/lets_split/keymaps/mtdjr/config.h | 4 +- keyboards/lets_split/keymaps/mtdjr/keymap.c | 263 +++++------------- keyboards/lets_split/keymaps/mtdjr/rules.mk | 1 - keyboards/tada68/keymaps/mtdjr/keymap.c | 57 +--- keyboards/xd75/keymaps/mtdjr/config.h | 3 +- keyboards/xd75/keymaps/mtdjr/keymap.c | 108 +------- 25 files changed, 1457 insertions(+), 597 deletions(-) create mode 100644 keyboards/handwired/not_so_minidox/config.h create mode 100644 keyboards/handwired/not_so_minidox/i2c.c create mode 100644 keyboards/handwired/not_so_minidox/i2c.h create mode 100644 keyboards/handwired/not_so_minidox/keymaps/default/keymap.c create mode 100644 keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h create mode 100644 keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c create mode 100644 keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk create mode 100644 keyboards/handwired/not_so_minidox/matrix.c create mode 100644 keyboards/handwired/not_so_minidox/not_so_minidox.c create mode 100644 keyboards/handwired/not_so_minidox/not_so_minidox.h create mode 100644 keyboards/handwired/not_so_minidox/readme.md create mode 100644 keyboards/handwired/not_so_minidox/rules.mk create mode 100644 keyboards/handwired/not_so_minidox/serial.c create mode 100644 keyboards/handwired/not_so_minidox/serial.h create mode 100644 keyboards/handwired/not_so_minidox/split_util.c create mode 100644 keyboards/handwired/not_so_minidox/split_util.h (limited to 'keyboards') diff --git a/keyboards/handwired/not_so_minidox/config.h b/keyboards/handwired/not_so_minidox/config.h new file mode 100644 index 0000000000..3c0af7bf76 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/config.h @@ -0,0 +1,84 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER mtdjr +#define PRODUCT Not So MiniDox +#define DESCRIPTION A larger version of the MiniDox + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5 } +#define MATRIX_COL_PINS { B6, B2, B3, B1, F7, D4 } + +#define USE_SERIAL + +//#define EE_HANDS + +#define MASTER_LEFT +//#define MASTER_RIGHT + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + + +#endif diff --git a/keyboards/handwired/not_so_minidox/i2c.c b/keyboards/handwired/not_so_minidox/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c new file mode 100644 index 0000000000..8ea36198a1 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/keymaps/default/keymap.c @@ -0,0 +1,121 @@ +#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 _LOWER 1 +#define _RAISE 2 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_RST RESET +#define KC_CAD LCTL(LALT(KC_DEL)) + +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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L,KC_SCLN,KC_QUOT, +// |-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------| + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT,KC_SLSH, KC_ENT, +// '-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------' + KC_LGUI,KC_LOWR, KC_SPC, KC_SPC,KC_RASE,KC_RALT + // `-------+-------+-------` `-------+-------+-------` + ), + + [_LOWER] = LAYOUT( +// ,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + 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_LCBR,KC_RCBR,KC_BSLS, +// |-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, +// '-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------` `-------+-------+-------` + ), + + [_RAISE] = LAYOUT( + // ,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + KC_GRV,KC_EXLM, KC_AT,KC_HASH, KC_DLR,KC_PERC, KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,KC_RPRN, KC_DEL, + // |-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,KC_MINS, KC_EQL, _______, KC_UP,_______,KC_LBRC,KC_RBRC,KC_PIPE, + // |-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, KC_LEFT,KC_DOWN,KC_RGHT,_______,_______,_______, + // '-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------` `-------+-------+-------` + ), + [_ADJUST] = LAYOUT( +// ,-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------. + _______,_______,_______,_______, KC_RST,_______, _______,_______,_______,_______,_______, KC_CAD, +// |-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, +// |-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------| + _______,_______,_______,_______,_______,_______, _______,_______,_______,_______,_______,_______, +// '-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------' + _______,_______,_______, _______,_______,_______ + // `-------+-------+-------` `-------+-------+-------` + ) +}; + + +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); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_ADJUST); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h new file mode 100644 index 0000000000..fa6151e108 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/config.h @@ -0,0 +1,11 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include QMK_KEYBOARD_CONFIG_H + +#define SOLENOID_ENABLE +#define SOLENOID_PIN F6 +#undef SOLENOID_ACTIVE +#define SOLENOID_ACTIVE true + +#endif diff --git a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c new file mode 100644 index 0000000000..01c64d8701 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/keymap.c @@ -0,0 +1,56 @@ +#include QMK_KEYBOARD_H +#include "mtdjr.h" + +extern keymap_config_t keymap_config; + +#define KC_LOCK TD(TD_ALTLOCK) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----, + TAB, Q, W, E, R, T, Y, U, I, O, P, BSPC, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + LCTL, A, S, D, F, G, H, J, K, L, SCLN, QUOT, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, + // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----| + LGUI, LOWR, SPC, SPC, RASE, LOCK + // `----+-----+-----` `----+-----+-----` + ), + + [_LOWER] = LAYOUT_kc( + // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----, + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, DEL, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + , , , , , , , , , LCBR, RCBR, BSLS, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + , , , XCPY, XINS, , , , , , , , + // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----| + , , , , , + // `----+-----+-----` `----+-----+-----` + ), + + [_RAISE] = LAYOUT_kc( + // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----, + GRV, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, DEL, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + , , , , MINS, EQL, , , UP, LBRC, RBRC, PIPE, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + , , , , , , , LEFT, DOWN, RGHT, , , + // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----| + , , , , , + // `----+-----+-----` `----+-----+-----` + ), + [_ADJUST] = LAYOUT_kc( + // ,----+-----+-----+-----+-----+-----, ,----+-----+-----+-----+-----+-----, + STOG, xxxx, xxxx, xxxx, RST, xxxx, ROOT, PPLY, PSEF, xxxx, xxxx, CAD, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + SDM, SDP, SBOF, SBON, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, + // |----+-----+-----+-----+-----+-----| |----+-----+-----+-----+-----+-----| + xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, xxxx, + // |----+-----+-----+-----+-----+-----|-, ,-|----+-----+-----+-----+-----+-----| + xxxx, , xxxx, xxxx, , xxxx + // `----+-----+-----` `----+-----+-----` + ) +}; diff --git a/keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/keymaps/mtdjr/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/handwired/not_so_minidox/matrix.c b/keyboards/handwired/not_so_minidox/matrix.c new file mode 100644 index 0000000000..27a38dca02 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/matrix.c @@ -0,0 +1,307 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int 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]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + + +__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) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + 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) +{ + int 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 : (MATRIX_ROWS / 2); + +#ifdef USE_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+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<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/handwired/not_so_minidox/not_so_minidox.c b/keyboards/handwired/not_so_minidox/not_so_minidox.c new file mode 100644 index 0000000000..898c9eaca8 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/not_so_minidox.c @@ -0,0 +1 @@ +#include "not_so_minidox.h" \ No newline at end of file diff --git a/keyboards/handwired/not_so_minidox/not_so_minidox.h b/keyboards/handwired/not_so_minidox/not_so_minidox.h new file mode 100644 index 0000000000..05e7bc4914 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/not_so_minidox.h @@ -0,0 +1,42 @@ +#ifndef NOSOTMINIDOX_H +#define NOSOTMINIDOX_H + + +#include "quantum.h" + +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, KC_NO, LT1, LT2, LT3 }, \ + { R00, R01, R02, R03, R04, R05 }, \ + { R10, R11, R12, R13, R14, R15 }, \ + { R20, R21, R22, R23, R24, R25 }, \ + { KC_NO, KC_NO, KC_NO, RT1, RT2, RT3 }, \ + } + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, R05, R04, R03, R02, R01, R00, \ + L10, L11, L12, L13, L14, L15, R15, R14, R13, R12, R11, R10, \ + L20, L21, L22, L23, L24, L25, R25, R24, R23, R22, R21, R20, \ + LT1, LT2, LT3, RT3, RT2, RT1 \ + ) \ + { \ + { KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05 }, \ + { KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15 }, \ + { KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25 }, \ + { KC_NO, KC_NO, KC_NO, KC_##LT1, KC_##LT2, KC_##LT3 }, \ + { KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05 }, \ + { KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15 }, \ + { KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25 }, \ + { KC_NO, KC_NO, KC_NO, KC_##RT1, KC_##RT2, KC_##RT3 }, \ + } + +#endif diff --git a/keyboards/handwired/not_so_minidox/readme.md b/keyboards/handwired/not_so_minidox/readme.md new file mode 100644 index 0000000000..fbfa7b7be0 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/readme.md @@ -0,0 +1,71 @@ +not_so_minidox +===== + +![not_so_minidox]() + +A slightly larger version of the MiniDox + +Keyboard Maintainer: mtdjr +Hardware Supported: None yet/ProMicro + +Make example for this keyboard (after setting up your build environment): + + make not_so_minidox/rev1: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. + +Flashing +------- +Note: Most of this is copied from the Let's Split readme, because it is awesome + +From the root directory run `make PROJECT:KEYMAP:avrdude` for automatic serial port resolution and flashing. +Example: `make not_so_minidox/rev1:default:avrdude` + +Choosing which board to plug the USB cable into (choosing Master) +-------- +Because the two boards are identical, the firmware has logic to differentiate the left and right board. + +It uses two strategies to figure things out: look at the EEPROM (memory on the chip) or looks if the current board has the usb cable. + +The EEPROM approach requires additional setup (flashing the eeeprom) but allows you to swap the usb cable to either side. + +The USB cable approach is easier to setup and if you just want the usb cable on the left board, you do not need to do anything extra. + +### Setting the left hand as master +If you always plug the usb cable into the left board, nothing extra is needed as this is the default. Comment out `EE_HANDS` and comment out `I2C_MASTER_RIGHT` or `MASTER_RIGHT` if for some reason it was set. + +### Setting the right hand as master +If you always plug the usb cable into the right board, add an extra flag to your `config.h` +``` + #define MASTER_RIGHT +``` + +### Setting EE_hands to use either hands as master +If you define `EE_HANDS` in your `config.h`, you will need to set the +EEPROM for the left and right halves. + +The EEPROM is used to store whether the +half is left handed or right handed. This makes it so that the same firmware +file will run on both hands instead of having to flash left and right handed +versions of the firmware to each half. To flash the EEPROM file for the left +half run: +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-lefthand.eep +// or the equivalent in dfu-programmer + +``` +and similarly for right half +``` +avrdude -p atmega32u4 -P $(COM_PORT) -c avr109 -U eeprom:w:eeprom-righhand.eep +// or the equivalent in dfu-programmer +``` + +NOTE: replace `$(COM_PORT)` with the port of your device (e.g. `/dev/ttyACM0`) + +After you have flashed the EEPROM, you then need to set `EE_HANDS` in your config.h, rebuild the hex files and reflash. + +Note that you need to program both halves, but you have the option of using +different keymaps for each half. You could program the left half with a QWERTY +layout and the right half with a Colemak layout using bootmagic's default layout option. +Then if you connect the left half to a computer by USB the keyboard will use QWERTY and Colemak when the +right half is connected. diff --git a/keyboards/handwired/not_so_minidox/rules.mk b/keyboards/handwired/not_so_minidox/rules.mk new file mode 100644 index 0000000000..fe4cc014e7 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/rules.mk @@ -0,0 +1,71 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.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) + +# 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 = 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 ?= no # 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 this with audio at the same time. +USE_I2C ?= 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 + +CUSTOM_MATRIX = yes diff --git a/keyboards/handwired/not_so_minidox/serial.c b/keyboards/handwired/not_so_minidox/serial.c new file mode 100644 index 0000000000..74bcbb6bf6 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#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/handwired/not_so_minidox/serial.h b/keyboards/handwired/not_so_minidox/serial.h new file mode 100644 index 0000000000..15fe4db7b4 --- /dev/null +++ b/keyboards/handwired/not_so_minidox/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* 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/handwired/not_so_minidox/split_util.c b/keyboards/handwired/not_so_minidox/split_util.c new file mode 100644 index 0000000000..39639c3b4b --- /dev/null +++ b/keyboards/handwired/not_so_minidox/split_util.c @@ -0,0 +1,84 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.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) { +#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< +#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/iris/keymaps/mtdjr/config.h b/keyboards/iris/keymaps/mtdjr/config.h index 0e8938775f..28109d3ab4 100644 --- a/keyboards/iris/keymaps/mtdjr/config.h +++ b/keyboards/iris/keymaps/mtdjr/config.h @@ -20,6 +20,9 @@ along with this program. If not, see . #include "config_common.h" +#define SOLENOID_ENABLE +#define SOLENOID_PIN C6 + /* Use I2C or Serial, not both */ #define USE_SERIAL @@ -28,7 +31,7 @@ along with this program. If not, see . /* Select hand configuration */ #define MASTER_LEFT -#define TAPPING_TERM 250 + // #define MASTER_RIGHT // #define EE_HANDS diff --git a/keyboards/iris/keymaps/mtdjr/keymap.c b/keyboards/iris/keymaps/mtdjr/keymap.c index ba95d16b23..d6e3ec05e8 100644 --- a/keyboards/iris/keymaps/mtdjr/keymap.c +++ b/keyboards/iris/keymaps/mtdjr/keymap.c @@ -1,145 +1,8 @@ -#include "iris.h" -#include "action_layer.h" -#include "eeconfig.h" -#include "action_macro.h" -#include -#include "pincontrol.h" +#include QMK_KEYBOARD_H +#include "mtdjr.h" extern keymap_config_t keymap_config; -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 -#define _SUPER 3 -#define _ADJUST 16 -#define SOLENOID_DEFAULT_DWELL 12 -#define SOLENOID_MAX_DWELL 100 -#define SOLENOID_MIN_DWELL 4 -#define SOLENOID_PIN C6 - - -bool solenoid_enabled = false; -bool solenoid_on = false; -bool solenoid_buzz = false; -bool solenoid_buzzing = false; -uint16_t solenoid_start = 0; -uint8_t solenoid_dwell = SOLENOID_DEFAULT_DWELL; - - -void solenoid_buzz_on(void) { - solenoid_buzz = true; -} - -void solenoid_buzz_off(void) { - solenoid_buzz = false; -} - -void solenoid_dwell_minus(void) { - if (solenoid_dwell > 0) solenoid_dwell--; -} - -void solenoid_dwell_plus(void) { - if (solenoid_dwell < SOLENOID_MAX_DWELL) solenoid_dwell++; -} - -void solenoid_toggle(void) { - solenoid_enabled = !solenoid_enabled; -} - -void solenoid_stop(void) { - digitalWrite(SOLENOID_PIN, PinLevelLow); - solenoid_on = false; - solenoid_buzzing = false; -} - -void solenoid_fire(void) { - if (!solenoid_enabled) return; - - if (!solenoid_buzz && solenoid_on) return; - if (solenoid_buzz && solenoid_buzzing) return; - - solenoid_on = true; - solenoid_buzzing = true; - solenoid_start = timer_read(); - digitalWrite(SOLENOID_PIN, PinLevelHigh); -} - -void solenoid_check(void) { - uint16_t elapsed = 0; - - if (!solenoid_on) return; - - elapsed = timer_elapsed(solenoid_start); - - //Check if it's time to finish this solenoid click cycle - if (elapsed > solenoid_dwell) { - solenoid_stop(); - return; - } - - //Check whether to buzz the solenoid on and off - if (solenoid_buzz) { - if (elapsed / SOLENOID_MIN_DWELL % 2 == 0){ - if (!solenoid_buzzing) { - solenoid_buzzing = true; - digitalWrite(SOLENOID_PIN, PinLevelHigh); - } - } - else { - if (solenoid_buzzing) { - solenoid_buzzing = false; - digitalWrite(SOLENOID_PIN, PinLevelLow); - } - } - } -} - -void solenoid_setup(void) { - pinMode(SOLENOID_PIN, PinDirectionOutput); -} - -void matrix_init_user(void) { - solenoid_setup(); -} - -void matrix_scan_user(void) { - solenoid_check(); -} - - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - SUPER, - ADJUST, - SOL_TOG, - SOLENOID_DWELL_MINUS, - SOLENOID_DWELL_PLUS, - SOLENOID_BUZZ_ON, - SOLENOID_BUZZ_OFF, - TD_ESC = 0, -}; - -#define KC_ KC_TRNS -#define _______ KC_TRNS - -#define KC_LOWR LOWER -#define KC_RASE RAISE -#define KC_SUPR SUPER -#define KC_RST RESET -#define KC_BL_S BL_STEP -#define KC_EXC TD(TD_ESC) -#define SOLTOG SOLENOID_TOG - -// Macro Declarations -#define UM_ROOT M(0) -#define UM_PPLY M(1) -#define UM_PSEF M(2) -#define KC_XCPY M(3) -#define KC_XINS M(4) -#define UM_CAD M(5) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_kc( @@ -152,7 +15,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| EQL, Z , X , C , V , B ,LGUI, LALT, N , M ,COMM,DOT ,SLSH,MINS, //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' - LCTL,RASE,SPC , SPC ,LOWR,SUPR + LCTL,RASE,SPC , SPC ,LOWR,xxxx // `----+----+----' `----+----+----' ), @@ -178,130 +41,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----| |----+----+----+----+----+----| , F9 ,F10 ,F11 ,F12 , , , , , , , , //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| - , , ,XCPY,XINS, , , , , , , , ,PLUS, + , , ,XCPY,XINS, , , , , , , , , , //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' , , , , , // `----+----+----' `----+----+----' ), - [_SUPER] = LAYOUT( - //,--------+--------+--------+--------+--------+--------. ,--------+--------+--------+--------+--------+--------. - SOL_TOG, UM_ROOT, UM_PPLY, UM_PSEF, _______, _______, _______, _______, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, KC_LBRC, _______, _______, _______, _______, - //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, UM_CAD , - //|--------+--------+--------+--------+--------+--------+--------. ,--------|--------+--------+--------+--------+--------+--------| - _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, - //`--------+--------+--------+----+---+--------+--------+--------/ \--------+--------+--------+---+----+--------+--------+--------' - _______, _______, _______, _______, _______, _______ - // `--------+--------+--------' `--------+--------+--------' -) - -}; - -void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for grave accent, twice for ESC - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_GRV, KC_ESC) -}; - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (record->event.pressed) { - solenoid_fire(); - } - switch (keycode) { - case QWERTY: - if (record->event.pressed) { - persistent_default_layer_set(1UL<<_QWERTY); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case SUPER: - if (record->event.pressed) { - layer_on(_SUPER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_SUPER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case SOLTOG: - if (record->event.pressed) { - solenoid_toggle(); - } - break; - case SOLENOID_DWELL_MINUS: - if (record->event.pressed) { - solenoid_dwell_minus(); - } - break; - case SOLENOID_DWELL_PLUS: - if (record->event.pressed) { - solenoid_dwell_plus(); - } - break; - case SOLENOID_BUZZ_ON: - if (record->event.pressed) { - solenoid_buzz_on(); - } - break; - case SOLENOID_BUZZ_OFF: - if (record->event.pressed) { - solenoid_buzz_off(); - } - break; - } - return true; -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case 0: - SEND_STRING("sudo su -\n"); - return false; break; - case 1: - SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); - return false; break; - case 2: - SEND_STRING("ps -ef | grep "); - return false; break; - case 3: - return MACRO(D(LCTL), T(INS), U(LCTL), END); - break; - case 4: - return MACRO(D(LSFT), T(INS), U(LSFT), END); - break; - case 5: - return MACRO(D(LCTL), D(RALT), T(DEL), END); - break; - } - } - return MACRO_NONE; + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----. ,----+----+----+----+----+----. + STOG,ROOT,PPLY,PSEF,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,BSLS, + //|----+----+----+----+----+----| |----+----+----+----+----+----| + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, + //|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----| + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, + //`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----' + xxxx, ,xxxx, xxxx, , + // `----+----+----' `----+----+----' + ) }; diff --git a/keyboards/iris/keymaps/mtdjr/rules.mk b/keyboards/iris/keymaps/mtdjr/rules.mk index 7c19013e5b..c5e16f1369 100644 --- a/keyboards/iris/keymaps/mtdjr/rules.mk +++ b/keyboards/iris/keymaps/mtdjr/rules.mk @@ -1,6 +1,5 @@ RGBLIGHT_ENABLE = no BACKLIGHT_ENABLE = no -TAP_DANCE_ENABLE = no ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/lets_split/keymaps/mtdjr/config.h b/keyboards/lets_split/keymaps/mtdjr/config.h index 761e9e175d..2b5a193654 100644 --- a/keyboards/lets_split/keymaps/mtdjr/config.h +++ b/keyboards/lets_split/keymaps/mtdjr/config.h @@ -23,11 +23,13 @@ along with this program. If not, see . #include "../../config.h" +#define SOLENOID_ENABLE +#define SOLENOID_PIN F4 + /* Use I2C or Serial, not both */ // #define USE_SERIAL #define USE_I2C - #define TAPPING_TERM 250 /* Select hand configuration */ // #define MASTER_LEFT diff --git a/keyboards/lets_split/keymaps/mtdjr/keymap.c b/keyboards/lets_split/keymaps/mtdjr/keymap.c index 4846772edf..72476c7001 100644 --- a/keyboards/lets_split/keymaps/mtdjr/keymap.c +++ b/keyboards/lets_split/keymaps/mtdjr/keymap.c @@ -1,194 +1,81 @@ -#include "lets_split.h" -#include "action_layer.h" -#include "eeconfig.h" -#include "action_macro.h" +#include QMK_KEYBOARD_H +#include "mtdjr.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 _LOWER 1 -#define _RAISE 2 -#define _ADJUST 16 - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - LOWER, - RAISE, - ADJUST, - TD_ESC = 0 -}; - -// Fillers to make layering more clear -#define _______ KC_TRNS -#define XXXXXXX KC_NO - - -// Macro Declarations -#define UM_ROOT M(0) -#define UM_PPLY M(1) -#define UM_COPY M(2) -#define UM_INSR M(3) -#define UM_PSEF M(4) - const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty - * ,-----------------------------------------. ,-----------------------------------------. - * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Esc/~ | A | S | D | F | G | | H | J | K | L | ; | '/" | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Up | Down |Right | - * `-----------------------------------------' '-----------------------------------------' - */ -[_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, \ - TD(TD_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 , \ - ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ -), - - /* Lower - * ,-----------------------------------------. ,-----------------------------------------. - * | ~ | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | [ | ] | { | } | | | 4 | 5 | 6 | * | \ | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Shift | | | copy |insert| | | | 1 | 2 | 3 | + | - | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | 0 | . | = | _ | - * `-----------------------------------------' '-----------------------------------------' - */ -[_LOWER] = LAYOUT( \ - KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, KC_4, KC_5, KC_6, KC_ASTR, KC_BSLS, \ - _______, XXXXXXX, XXXXXXX, UM_COPY, UM_INSR, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PLUS, KC_MINS, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_UNDS \ -), - - -/* Raise - * ,-----------------------------------------. ,-----------------------------------------. - * | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | | | \ | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Shift | | | | | | | | | | | | | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | - * `-----------------------------------------' '-----------------------------------------' - */ -[_RAISE] = LAYOUT( \ - KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_PIPE,\ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ -), - - /* Adjust (Lower + Raise) - * ,-----------------------------------------. ,-----------------------------------------. - * | | Reset| | | | | | ROOT | PPLY | PSEF | | | Del | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | |Aud on|Audoff| | | F1 | F2 | F3 | F4 | F5 | F6 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | UNDO | CUT | COPY |PASTE | | | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------| |------+------+------+------+------+------| - * | | | | | | | | | | Home | | | End | - * `-----------------------------------------' '-----------------------------------------' - */ -[_ADJUST] = LAYOUT( \ - _______, UM_ROOT, UM_PPLY, UM_PSEF, _______, _______, RESET, _______, _______, _______, _______, KC_DEL, \ - _______, _______, _______, AU_ON, AU_OFF, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ - _______, KC_UNDO, KC_CUT, UM_COPY, UM_INSR, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, KC_END \ -) - - -}; - -#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); -} - -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for nothing, twice for ESC - [TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_NO, KC_ESC) -}; - -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 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; -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case 0: - SEND_STRING("sudo su -\n"); - return false; break; - case 1: - SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); - return false; break; - case 2: - return MACRO(D(LCTL), T(INS), U(LCTL), END); - break; - case 3: - return MACRO(D(LSFT), T(INS), U(LSFT), END); - break; - case 4: - SEND_STRING("ps -ef | grep "); - return false; break; - } - } - return MACRO_NONE; -}; + /* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Esc/~ | A | S | D | F | G | | H | J | K | L | ; | '/" | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Enter | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Left | Up | Down |Right | + * `-----------------------------------------' '-----------------------------------------' + */ + [_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_EXC, 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_UP, KC_DOWN, KC_RGHT \ + ), + + /* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | [ | ] | { | } | | | 4 | 5 | 6 | * | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | copy |insert| | | | 1 | 2 | 3 | + | - | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | 0 | . | = | _ | + * `-----------------------------------------' '-----------------------------------------' + */ + [_LOWER] = LAYOUT( \ + KC_TILD, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + XXXXXXX, XXXXXXX, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, XXXXXXX, KC_4, KC_5, KC_6, KC_ASTR, KC_BSLS, \ + _______, XXXXXXX, XXXXXXX, KC_XCPY, KC_XINS, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_PLUS, KC_MINS, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_0, KC_DOT, KC_EQL, KC_UNDS \ + ), + + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | | | \ | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space | |Space |Raise | Next | Vol- | Vol+ | Play | + * `-----------------------------------------' '-----------------------------------------' + */ + [_RAISE] = LAYOUT( \ + KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSLS, KC_PIPE,\ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Adjust (Lower + Raise) + * ,-----------------------------------------. ,-----------------------------------------. + * | | Reset| | | | | | ROOT | PPLY | PSEF | | | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | |Aud on|Audoff| | | F1 | F2 | F3 | F4 | F5 | F6 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | UNDO | CUT | COPY |PASTE | | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | | | | | | | | | Home | | | End | + * `-----------------------------------------' '-----------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + KC_STOG, KC_ROOT, KC_PPLY, KC_PSEF, _______, _______, RESET, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, \ + _______, KC_UNDO, KC_CUT, KC_XCPY, KC_XINS, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, _______, _______, KC_END \ + ) +}; \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/mtdjr/rules.mk b/keyboards/lets_split/keymaps/mtdjr/rules.mk index f0ed9e8dcc..457a3d01d4 100644 --- a/keyboards/lets_split/keymaps/mtdjr/rules.mk +++ b/keyboards/lets_split/keymaps/mtdjr/rules.mk @@ -1,4 +1,3 @@ -TAP_DANCE_ENABLE = yes ifndef QUANTUM_DIR include ../../../../Makefile endif diff --git a/keyboards/tada68/keymaps/mtdjr/keymap.c b/keyboards/tada68/keymaps/mtdjr/keymap.c index 1b1f6ad4f1..d24bbf956f 100644 --- a/keyboards/tada68/keymaps/mtdjr/keymap.c +++ b/keyboards/tada68/keymaps/mtdjr/keymap.c @@ -1,22 +1,5 @@ -#include "tada68.h" -#include "action_macro.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. -#define _BL 0 -#define _FL 1 - -// Macro Declarations -#define UM_ROOT M(0) -#define UM_PPLY M(1) -#define UM_PSEF M(2) -#define UM_XCPY M(3) -#define UM_XINS M(4) -#define UM_CAD M(5) - -#define _______ KC_TRNS +#include QMK_KEYBOARD_H +#include "mtdjr.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap _BL: (Base Layer) Default Layer @@ -32,12 +15,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Alt |Gui | Space |Alt| FN|Ctrl|Lef|Dow|Rig | * `----------------------------------------------------------------' */ -[_BL] = KEYMAP_ANSI( +[_QWERTY] = KEYMAP_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_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_RSFT,KC_UP, KC_PGDN, \ - KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RALT,MO(_FL), KC_RCTRL, KC_LEFT,KC_DOWN, KC_RGHT), + KC_LCTL,KC_LALT,KC_LGUI, KC_SPC, KC_RALT,KC_LOWR, KC_RCTRL, KC_LEFT,KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer * ,----------------------------------------------------------------. @@ -52,36 +35,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | |MsL|MsD|MsR | * `----------------------------------------------------------------' */ -[_FL] = KEYMAP_ANSI( +[_LOWER] = KEYMAP_ANSI( _______, 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, \ - _______,UM_ROOT,UM_PPLY,UM_PSEF,_______,_______,_______,_______,_______,_______,KC_PSCR,_______,_______,_______, KC_HOME, \ + _______,KC_ROOT,KC_PPLY,KC_PSEF,_______,_______,_______,_______,_______,_______,KC_PSCR,_______,_______,_______, KC_HOME, \ _______,BL_DEC ,BL_TOGG,BL_INC,BL_BRTG,_______,_______,_______,_______,_______,_______,_______, _______, KC_END, \ - _______,_______ ,_______,UM_XCPY,UM_XINS,_______,KC_MPLY,KC_MNXT,KC_MUTE,KC_VOLD,KC_VOLU,KC_BTN1,KC_MS_U,KC_BTN2, \ + _______,_______ ,_______,KC_XCPY,KC_XINS,_______,KC_MPLY,KC_MNXT,KC_MUTE,KC_VOLD,KC_VOLU,KC_BTN1,KC_MS_U,KC_BTN2, \ _______,_______,_______, _______, _______,_______,_______,KC_MS_L,KC_MS_D,KC_MS_R), }; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - if (record->event.pressed) { - switch(id) { - case 0: - SEND_STRING("sudo su -\n"); - return false; break; - case 1: - SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); - return false; break; - case 2: - SEND_STRING("ps -ef | grep "); - return false; break; - case 3: - return MACRO(D(LCTL), T(INS), U(LCTL), END); - break; - case 4: - return MACRO(D(LSFT), T(INS), U(LSFT), END); - break; - case 5: - return MACRO(D(LCTL), D(RALT), T(DEL), END); - break; - } - } - return MACRO_NONE; -}; diff --git a/keyboards/xd75/keymaps/mtdjr/config.h b/keyboards/xd75/keymaps/mtdjr/config.h index aadcaa3875..7e2227c874 100644 --- a/keyboards/xd75/keymaps/mtdjr/config.h +++ b/keyboards/xd75/keymaps/mtdjr/config.h @@ -20,7 +20,8 @@ #include "../../config.h" // place overrides here -#define RGBLIGHT_SLEEP +#undef MANUFACTURER +#undef DESCRIPTION #define MANUFACTURER mtdjr #define PRODUCT XD75 #define DESCRIPTION XD75Re diff --git a/keyboards/xd75/keymaps/mtdjr/keymap.c b/keyboards/xd75/keymaps/mtdjr/keymap.c index 696c82ae4f..28d4b49618 100644 --- a/keyboards/xd75/keymaps/mtdjr/keymap.c +++ b/keyboards/xd75/keymaps/mtdjr/keymap.c @@ -1,68 +1,13 @@ -/* Copyright 2017 Wunder - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation, either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program. If not, see . - */ -#include "xd75.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H +#include "mtdjr.h" - -enum custom_keycodes { - // TD_ESC = 0, - TD_LOCK = 0, -}; - -// Layers -#define _QWERTY 0 -#define _LOWER 1 -#define _RAISE 2 - - - -// Shortcuts -#define KC_____ KC_NO -#define KC_ KC_TRNS -#define KC_RST RESET -#define KC_RASE MO(_RAISE) -#define KC_LOWR MO(_LOWER) - -// RGB and Backlighting -#define KC_RGB RGB_TOG -#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 -#define KC_BLT BL_TOGG -#define KC_BLS BL_STEP -#define KC_BLI BL_INC -#define KC_BLD BL_DEC - -// Tapdance -//#define KC_EXC TD(TD_ESC) -#define KC_LOCK TD(TD_LOCK) - -// Macros -#define KC_ROOT M(0) -#define KC_PPLY M(1) -#define KC_PSEF M(2) +#define KC_LOCK TD(TD_ENDLOCK) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = KC_KEYMAP( // .--------------------------------------------------------------------------. - ESC, 1 , 2 , 3 , 4 , 5 ,PGUP,PSCR,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, + EXC, 1 , 2 , 3 , 4 , 5 ,PGUP,xxxx,PGDN, 6 , 7 , 8 , 9 , 0 ,BSPC, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| TAB, Q , W , E , R , T , INS,BSLS, DEL, Y , U , I , O , P ,QUOT, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -70,44 +15,39 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| LSFT, Z , X , C , V , B ,LBRC,MINS,RBRC, N , M ,COMM, DOT,SLSH,RSFT, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - LOWR,LCTL,LALT,LGUI,____, SPC,RASE, GRV,LOWR, SPC,____,LEFT,DOWN,UP ,RGHT + LOWR,LCTL,LALT,LGUI,xxxx, SPC, SPC,RASE,SPC, SPC,xxxx,LEFT,DOWN,UP ,RGHT // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), [_LOWER] = KC_KEYMAP( // .--------------------------------------------------------------------------. - ____, F1, F2, F3, F4, F5, F6,____, F7, F8, F9, F10, F11, F12,____, + xxxx, F1, F2, F3, F4, F5, F6,xxxx, F7, F8, F9, F10, F11, F12, DEL, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - ____,ROOT,PPLY,PSEF,____,____,____,____,____,____,____,____,____,____,____, + xxxx,ROOT,PPLY,PSEF,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - ____,____,____,____,____,____,____,____,____,____,____,____,____,____,MUTE, + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,MUTE, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - ,____,____,____,____,____, ,____, ,MPLY,____,MPRV,VOLD,VOLU,MNXT + ,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, ,xxxx,MPLY,xxxx,MPRV,VOLD,VOLU,MNXT // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), [_RAISE] = KC_KEYMAP( // .--------------------------------------------------------------------------. - ____,____,____,____,____,____,____,____,____,____,____,____,____,____,____, + xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - ____,____,____,____, RST,____,____,____,____,____,____,____,____,____,____, + xxxx,xxxx,xxxx,xxxx, RST,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - CAPS,____,____,____,____,____,____, BLI,____,____,____,____,____,____,____, + CAPS,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, BLI,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,____,____,____,____,BTN1,BTN2,____, + RGB,RHUI,RHUD,RSAI,RSAD,RVAI,RVAD, BLD,xxxx,xxxx,xxxx,xxxx,BTN1,BTN2,xxxx, // |----+----+----+----+----+----+----+----+----+----+----+----+----+----+----| - ,____,____,____,____,____, ,____, ,____,____,MS_L,MS_D,MS_U,MS_R + ,xxxx,xxxx,xxxx,xxxx,xxxx,xxxx, ,xxxx,xxxx,xxxx,MS_L,MS_D,MS_U,MS_R // '----+----+----+----+----+----+----+----+----+----+----+----+----+----+----' ) }; -qk_tap_dance_action_t tap_dance_actions[] = { - //Tap once for left ctrl, twice for ESC - //[TD_ESC] = ACTION_TAP_DANCE_DOUBLE(KC_LCTL, KC_ESC), - [TD_LOCK] = ACTION_TAP_DANCE_DOUBLE(KC_END, LGUI(KC_L)) -}; void led_set_user(uint8_t usb_led) { if (usb_led & (1<event.pressed) { - switch(id) { - case 0: - SEND_STRING("sudo su -\n"); - return false; break; - case 1: - SEND_STRING("puppet apply /etc/puppetlabs/code/environments/production/manifests/site.pp\n"); - return false; break; - case 2: - SEND_STRING("ps -ef | grep "); - return false; break; - } - } - return MACRO_NONE; -}; -- cgit v1.2.3 From d27855665a349f9afe5c1b457461078f85cf6ffb Mon Sep 17 00:00:00 2001 From: Kenneth Aloysius Date: Fri, 1 Jun 2018 01:32:05 +1000 Subject: Updated matrix.c for some PS2AVRGB boards and templates for new_project script (#2992) * Add M6-A keymap * Update XD60 keymap * Update XD60 keymap readme * Update JJ40 and Let's Split keymaps * Add readme for M6-A * Fix typo, update JJ40 README * Update jj40 readme * Cleanup jj40 keymap * Revert Let's Split QWERTY layer to default before #2010 * Update numpad layers * Fix: Let's Split keymap getting stuck mods due to having keycodes assigned on the Raise layer * Keep ASCII art consistent with keymap * Staryu: initial port * Add personal keymap * Added and updated READMEs * Fix: default keymap for staryu * Rudimentary backlight support. * Enabled mousekeys for default keymap * use QMK_KEYBOARD_H and LAYOUT * Update readme.md for NIU mini: flash using avrdude * Fix missing linebreaks for Staryu README * Update readme.md * Update PS2AVRGB boards with new matrix.c * Update canoe matrix.c; untested * Fix canoe.c for building (needs matrix_scan_user and matrix_init_user) * Add personal Iris keymap * Update keymap * Update keymap * Update keymap, disable backlighting and underglow * Move PrintScreen button * Add README --- keyboards/canoe/canoe.c | 49 ++++++++++++++--- keyboards/canoe/matrix.c | 32 ++++++----- keyboards/iris/keymaps/krusli/README.md | 2 + keyboards/iris/keymaps/krusli/config.h | 43 +++++++++++++++ keyboards/iris/keymaps/krusli/keymap.c | 98 +++++++++++++++++++++++++++++++++ keyboards/iris/keymaps/krusli/rules.mk | 6 ++ keyboards/jj40/matrix.c | 4 +- keyboards/mechmini/v1/matrix.c | 30 ++++++---- keyboards/mechmini/v1/v1.c | 52 +++++++++++++---- keyboards/ps2avrGB/matrix.c | 32 ++++++----- keyboards/ps2avrGB/ps2avrGB.c | 49 ++++++++++++++--- 11 files changed, 330 insertions(+), 67 deletions(-) create mode 100644 keyboards/iris/keymaps/krusli/README.md create mode 100644 keyboards/iris/keymaps/krusli/config.h create mode 100644 keyboards/iris/keymaps/krusli/keymap.c create mode 100644 keyboards/iris/keymaps/krusli/rules.mk (limited to 'keyboards') diff --git a/keyboards/canoe/canoe.c b/keyboards/canoe/canoe.c index bc69df2e5e..a7427e1528 100644 --- a/keyboards/canoe/canoe.c +++ b/keyboards/canoe/canoe.c @@ -42,24 +42,55 @@ void backlight_init_ports(void) { #endif +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + #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; - } + if (!rgblight_config.enable) { + for (uint8_t i=0; i. #include "matrix.h" #ifndef DEBOUNCE -#define DEBOUNCE 5 +# define DEBOUNCE 5 #endif static uint8_t debouncing = DEBOUNCE; @@ -29,6 +29,9 @@ static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +void matrix_set_row_status(uint8_t row); +uint8_t bit_reverse(uint8_t x); + void matrix_init(void) { // all outputs for rows high DDRB = 0xFF; @@ -47,18 +50,8 @@ void matrix_init(void) { matrix[row] = 0x00; matrix_debouncing[row] = 0x00; } -} - -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; + matrix_init_quantum(); } uint8_t matrix_scan(void) { @@ -93,11 +86,24 @@ uint8_t matrix_scan(void) { } } - matrix_scan_user(); + matrix_scan_quantum(); return 1; } +// declarations +void matrix_set_row_status(uint8_t row) { + DDRB = (1 << row); + PORTB = ~(1 << row); +} + +uint8_t bit_reverse(uint8_t x) { + x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } diff --git a/keyboards/iris/keymaps/krusli/README.md b/keyboards/iris/keymaps/krusli/README.md new file mode 100644 index 0000000000..fc02aa01cc --- /dev/null +++ b/keyboards/iris/keymaps/krusli/README.md @@ -0,0 +1,2 @@ +# krusli's Iris keymap +Based off the default and Planck keymaps. diff --git a/keyboards/iris/keymaps/krusli/config.h b/keyboards/iris/keymaps/krusli/config.h new file mode 100644 index 0000000000..a53c746ad9 --- /dev/null +++ b/keyboards/iris/keymaps/krusli/config.h @@ -0,0 +1,43 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// #define PREVENT_STUCK_MODIFIERS + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +// #define USE_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#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/iris/keymaps/krusli/keymap.c b/keyboards/iris/keymaps/krusli/keymap.c new file mode 100644 index 0000000000..4aa076ab16 --- /dev/null +++ b/keyboards/iris/keymaps/krusli/keymap.c @@ -0,0 +1,98 @@ +#include "iris.h" +#include "action_layer.h" +#include "eeconfig.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, +}; + +#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, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_HOME, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, + KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LALT + ), + + [_LOWER] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + 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, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PSCR, + 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_LEFT, KC_DOWN, KC_UP, KC_RGHT, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, + _______, _______, RGB_HUD, RGB_SAD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, + BL_STEP, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), +}; + +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) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/iris/keymaps/krusli/rules.mk b/keyboards/iris/keymaps/krusli/rules.mk new file mode 100644 index 0000000000..c5e16f1369 --- /dev/null +++ b/keyboards/iris/keymaps/krusli/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = no +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/jj40/matrix.c b/keyboards/jj40/matrix.c index 2932976dde..245813dfd2 100644 --- a/keyboards/jj40/matrix.c +++ b/keyboards/jj40/matrix.c @@ -51,7 +51,7 @@ void matrix_init(void) { matrix_debouncing[row] = 0x00; } - matrix_init_quantum(); // missing from original port by Luiz + matrix_init_quantum(); } uint8_t matrix_scan(void) { @@ -86,7 +86,7 @@ uint8_t matrix_scan(void) { } } - matrix_scan_quantum(); // also missing in original PS2AVRGB implementation + matrix_scan_quantum(); return 1; } diff --git a/keyboards/mechmini/v1/matrix.c b/keyboards/mechmini/v1/matrix.c index 140026013f..245813dfd2 100644 --- a/keyboards/mechmini/v1/matrix.c +++ b/keyboards/mechmini/v1/matrix.c @@ -29,6 +29,9 @@ static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +void matrix_set_row_status(uint8_t row); +uint8_t bit_reverse(uint8_t x); + void matrix_init(void) { // all outputs for rows high DDRB = 0xFF; @@ -47,18 +50,8 @@ void matrix_init(void) { matrix[row] = 0x00; matrix_debouncing[row] = 0x00; } -} - -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; + matrix_init_quantum(); } uint8_t matrix_scan(void) { @@ -93,11 +86,24 @@ uint8_t matrix_scan(void) { } } - matrix_scan_user(); + matrix_scan_quantum(); return 1; } +// declarations +void matrix_set_row_status(uint8_t row) { + DDRB = (1 << row); + PORTB = ~(1 << row); +} + +uint8_t bit_reverse(uint8_t x) { + x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } diff --git a/keyboards/mechmini/v1/v1.c b/keyboards/mechmini/v1/v1.c index 24c74c6cfd..508d60c784 100644 --- a/keyboards/mechmini/v1/v1.c +++ b/keyboards/mechmini/v1/v1.c @@ -22,23 +22,55 @@ along with this program. If not, see . #include "quantum.h" #include "rgblight.h" -// custom RGB driver +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#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; - } + if (!rgblight_config.enable) { + for (uint8_t i=0; i. #include "matrix.h" #ifndef DEBOUNCE -#define DEBOUNCE 5 +# define DEBOUNCE 5 #endif static uint8_t debouncing = DEBOUNCE; @@ -29,6 +29,9 @@ static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +void matrix_set_row_status(uint8_t row); +uint8_t bit_reverse(uint8_t x); + void matrix_init(void) { // all outputs for rows high DDRB = 0xFF; @@ -47,18 +50,8 @@ void matrix_init(void) { matrix[row] = 0x00; matrix_debouncing[row] = 0x00; } -} - -void matrix_set_row_status(uint8_t row) { - DDRB = (1 << row); - PORTB = ~(1 << row); -} -uint8_t bit_reverse(uint8_t x) { - x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); - x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); - x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; + matrix_init_quantum(); } uint8_t matrix_scan(void) { @@ -93,11 +86,24 @@ uint8_t matrix_scan(void) { } } - matrix_scan_user(); + matrix_scan_quantum(); return 1; } +// declarations +void matrix_set_row_status(uint8_t row) { + DDRB = (1 << row); + PORTB = ~(1 << row); +} + +uint8_t bit_reverse(uint8_t x) { + x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } diff --git a/keyboards/ps2avrGB/ps2avrGB.c b/keyboards/ps2avrGB/ps2avrGB.c index 701c5847f5..45ba37bffe 100644 --- a/keyboards/ps2avrGB/ps2avrGB.c +++ b/keyboards/ps2avrGB/ps2avrGB.c @@ -24,22 +24,55 @@ along with this program. If not, see . #include "i2c.h" #include "quantum.h" +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +#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; - } + if (!rgblight_config.enable) { + for (uint8_t i=0; i Date: Thu, 31 May 2018 21:52:53 -0400 Subject: Palleiko's Keymap (#3096) * cloned default layout to palleiko * Added NAV layer, removed steno * Added WM layout & Readme * forgot comma * Specify bootloader * Fixed Mod Tap / Layer Tap bugs and updated readme * Removed Layer Tap functionality * KC_NO * Updated Readme --- keyboards/planck/keymaps/palleiko/config.h | 42 ++++ keyboards/planck/keymaps/palleiko/keymap.c | 300 ++++++++++++++++++++++++++++ keyboards/planck/keymaps/palleiko/readme.md | 63 ++++++ keyboards/planck/keymaps/palleiko/rules.mk | 2 + 4 files changed, 407 insertions(+) create mode 100644 keyboards/planck/keymaps/palleiko/config.h create mode 100644 keyboards/planck/keymaps/palleiko/keymap.c create mode 100644 keyboards/planck/keymaps/palleiko/readme.md create mode 100644 keyboards/planck/keymaps/palleiko/rules.mk (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/palleiko/config.h b/keyboards/planck/keymaps/palleiko/config.h new file mode 100644 index 0000000000..a1635f2bab --- /dev/null +++ b/keyboards/planck/keymaps/palleiko/config.h @@ -0,0 +1,42 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#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 + +#endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/palleiko/keymap.c b/keyboards/planck/keymaps/palleiko/keymap.c new file mode 100644 index 0000000000..603a6edbab --- /dev/null +++ b/keyboards/planck/keymaps/palleiko/keymap.c @@ -0,0 +1,300 @@ +/* Copyright 2015-2018 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 . + * + * Palleiko Layout + */ + +#include "planck.h" +#include "action_layer.h" + +extern keymap_config_t keymap_config; + +enum planck_layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _NAV, + _NUM, + _WM, + _ADJUST +}; + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + NAV, + WM, + NUM +}; + +// i3 Binds +#define WM_1 LALT(KC_1) +#define WM_2 LALT(KC_2) +#define WM_3 LALT(KC_3) +#define WM_4 LALT(KC_4) +#define WM_5 LALT(KC_5) +#define WM_6 LALT(KC_6) +#define WM_7 LALT(KC_7) +#define WM_8 LALT(KC_8) +#define WM_9 LALT(KC_9) +#define WM_0 LALT(KC_0) + +// Transparent Key +#define _______ KC_TRNS +// NOP +#define ___x___ KC_NO + +// MT Shift & Enter +#define S_ENT MT(MOD_RSFT, KC_ENT) + +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 | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_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, S_ENT }, + {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM} +}, + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {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, S_ENT }, + {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM} +}, + +/* 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM | + * `----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {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 }, + {KC_LCTL, NUM, NAV, KC_LALT, LOWER, KC_SPC, KC_SPC, RAISE, NAV, KC_RGUI, NUM, WM} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC}, + {KC_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} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 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 / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 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_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} +}, + +/* Hex Numpad + * ,-----------------------------------------------------------------------------------. + * | | | | { | } | A | B | 7 | 8 | 9 | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | NUM | | | ( | ) | C | D | 4 | 5 | 6 | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | [ | ] | E | F | 1 | 2 | 3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | 0 | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NUM] = { + {_______, ___x___, ___x___, KC_LCBR, KC_RCBR, KC_A, KC_B, KC_7, KC_8, KC_9, ___x___, _______}, + {_______, ___x___, ___x___, KC_LPRN, KC_RPRN, KC_C, KC_D, KC_4, KC_5, KC_6, ___x___, _______}, + {_______, ___x___, ___x___, KC_LBRC, KC_RBRC, KC_E, KC_F, KC_1, KC_2, KC_3, ___x___, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_0, _______, _______, _______} +}, + +/* WM (i3 window binds) + * ,-----------------------------------------------------------------------------------. + * | | WM1 | WM2 | WM3 | WM4 | WM5 | WM6 | WM7 | WM8 | WM9 | WM0 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | WM6 | WM5 | WM4 | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | WM1 | WM2 | WM3 | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | WM0 | | | | + * `-----------------------------------------------------------------------------------' + */ +[_WM] = { + {_______, WM_1, WM_2, WM_3, WM_4, WM_5, WM_6, WM_7, WM_8, WM_9, WM_0, _______}, + {_______, _______, _______, _______, _______, _______, _______, WM_4, WM_5, WM_6, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, WM_1, WM_2 , WM_3, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, WM_0, _______, _______, _______} +}, + +/* Navigation Layer (Vim-like arrow binds & i3 binds) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | LEFT | DOWN | UP | RIGHT| NAV | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_NAV] = { + {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, + {___x___, ___x___, ___x___, ___x___, ___x___, ___x___, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, ___x___, ___x___}, + {_______, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___, ___x___}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | |Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Reset| Debug| | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + {_______, _______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______}, + {_______, _______, _______, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {RESET, DEBUG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + +}; + +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 NUM: + if (record->event.pressed) { + layer_on(_NUM); + } else { + layer_off(_NUM); + } + return false; + break; + case NAV: + if (record->event.pressed) { + layer_on(_NAV); + } else { + layer_off(_NAV); + } + return false; + break; + case WM: + if (record->event.pressed) { + layer_on(_WM); + } else { + layer_off(_WM); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/palleiko/readme.md b/keyboards/planck/keymaps/palleiko/readme.md new file mode 100644 index 0000000000..d8c70a6526 --- /dev/null +++ b/keyboards/planck/keymaps/palleiko/readme.md @@ -0,0 +1,63 @@ +# Palleiko's Layout +--- + +This layout is mostly stock with a increased functionality for my usage. + +Changes over stock keymap: +1. Altered R1 +1. Home row navigation layer +1. Hexadecimal numpad layer +1. Window manager layer for my i3 setup + +All-in-all, anyone used to the standard map would have no problem using this. + +### QWERTY Keymap & Addded Layers +##### Qwerty +``` +Hold Enter for Right Shift +,-----------------------------------------------------------------------------------. +| 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 | NUM | NAV | Alt |Lower | Space |Raise | NAV | GUI | NUM | WM | +`-----------------------------------------------------------------------------------' +``` +##### Hex Numpad +``` +,-----------------------------------------------------------------------------------. +| | | | { | } | A | B | 7 | 8 | 9 | | | +|------+------+------+------+------+-------------+------+------+------+------+------| +| _NUM | | | ( | ) | C | D | 4 | 5 | 6 | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | [ | ] | E | F | 1 | 2 | 3 | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | 0 | | | | +`-----------------------------------------------------------------------------------' +``` +##### WM (i3 window binds) +``` +,-----------------------------------------------------------------------------------. +| | WM1 | WM2 | WM3 | WM4 | WM5 | WM6 | WM7 | WM8 | WM9 | WM0 | | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | WM6 | WM5 | WM4 | | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | WM1 | WM2 | WM3 | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | WM0 | | | _WM | +`-----------------------------------------------------------------------------------' +``` +##### Navigation Layer (Vim-like arrow binds & i3 binds) +``` +,-----------------------------------------------------------------------------------. +| | | | | | | | | | | | | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | | | | | | LEFT | DOWN | UP | RIGHT| | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | | | | | | | | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | _NAV | | | | | | | | _NAV | | +`-----------------------------------------------------------------------------------' +``` diff --git a/keyboards/planck/keymaps/palleiko/rules.mk b/keyboards/planck/keymaps/palleiko/rules.mk new file mode 100644 index 0000000000..d5ff6cd3ba --- /dev/null +++ b/keyboards/planck/keymaps/palleiko/rules.mk @@ -0,0 +1,2 @@ +# Atmel ATMEGA23U4 Bootloader +BOOTLOADER = atmel-dfu -- cgit v1.2.3 From 8eaf23ae8146766615cc1cec3fc8e04111e8ef49 Mon Sep 17 00:00:00 2001 From: Batuhan Baserdem Date: Thu, 31 May 2018 21:55:45 -0400 Subject: User space fixed (#3095) * Put in my keymaps * Fixed all but weird lets split issue * Organized and tried to trobleshoot lets split * Organized and tried to trobleshoot lets split * Added bbaserdem keymaps * Added bbaserdem keymaps * Fixed stuff * FIxed a filename error --- keyboards/gherkin/keymaps/bbaserdem/README.md | 11 + keyboards/gherkin/keymaps/bbaserdem/config.h | 13 + keyboards/gherkin/keymaps/bbaserdem/keymap.c | 36 ++ keyboards/gherkin/keymaps/bbaserdem/rules.mk | 14 + keyboards/lets_split/keymaps/bbaserdem/README.md | 27 ++ keyboards/lets_split/keymaps/bbaserdem/config.h | 27 ++ keyboards/lets_split/keymaps/bbaserdem/keymap.c | 37 ++ keyboards/lets_split/keymaps/bbaserdem/rules.mk | 11 + .../lets_split/keymaps/bbaserdem_right/README.md | 5 + .../lets_split/keymaps/bbaserdem_right/config.h | 9 + .../lets_split/keymaps/bbaserdem_right/keymap.c | 35 ++ .../lets_split/keymaps/bbaserdem_right/rules.mk | 24 ++ keyboards/planck/keymaps/bbaserdem/README.md | 38 +- keyboards/planck/keymaps/bbaserdem/config.h | 50 +-- keyboards/planck/keymaps/bbaserdem/keymap.c | 430 ++------------------- keyboards/planck/keymaps/bbaserdem/rules.mk | 22 +- keyboards/xd75/keymaps/bbaserdem/config.h | 22 ++ keyboards/xd75/keymaps/bbaserdem/keymap.c | 80 ++++ keyboards/xd75/keymaps/bbaserdem/readme.md | 12 + keyboards/xd75/keymaps/bbaserdem/rules.mk | 10 + 20 files changed, 424 insertions(+), 489 deletions(-) create mode 100644 keyboards/gherkin/keymaps/bbaserdem/README.md create mode 100644 keyboards/gherkin/keymaps/bbaserdem/config.h create mode 100644 keyboards/gherkin/keymaps/bbaserdem/keymap.c create mode 100644 keyboards/gherkin/keymaps/bbaserdem/rules.mk create mode 100644 keyboards/lets_split/keymaps/bbaserdem/README.md create mode 100755 keyboards/lets_split/keymaps/bbaserdem/config.h create mode 100755 keyboards/lets_split/keymaps/bbaserdem/keymap.c create mode 100755 keyboards/lets_split/keymaps/bbaserdem/rules.mk create mode 100644 keyboards/lets_split/keymaps/bbaserdem_right/README.md create mode 100755 keyboards/lets_split/keymaps/bbaserdem_right/config.h create mode 100755 keyboards/lets_split/keymaps/bbaserdem_right/keymap.c create mode 100755 keyboards/lets_split/keymaps/bbaserdem_right/rules.mk mode change 100644 => 100755 keyboards/planck/keymaps/bbaserdem/config.h mode change 100644 => 100755 keyboards/planck/keymaps/bbaserdem/keymap.c mode change 100644 => 100755 keyboards/planck/keymaps/bbaserdem/rules.mk create mode 100644 keyboards/xd75/keymaps/bbaserdem/config.h create mode 100644 keyboards/xd75/keymaps/bbaserdem/keymap.c create mode 100644 keyboards/xd75/keymaps/bbaserdem/readme.md create mode 100644 keyboards/xd75/keymaps/bbaserdem/rules.mk (limited to 'keyboards') diff --git a/keyboards/gherkin/keymaps/bbaserdem/README.md b/keyboards/gherkin/keymaps/bbaserdem/README.md new file mode 100644 index 0000000000..3c9a5e98b3 --- /dev/null +++ b/keyboards/gherkin/keymaps/bbaserdem/README.md @@ -0,0 +1,11 @@ +# Gherkin Layout +This is my gherkin layout. +It is used as a game pad, and key layout is inspired by spare keys I had lying around. +The firmware is very simple, and only includes one layer keymap, and RGB effects. + +# Flashing +The following command should be used from the main qmk directory. +``` +make gherkin:bbaserdem +sudo avrdude -p atmgea34u4 -P `ls /dev/ttyACM*` -c avr109 -U flash:.build/gherkin_bbaserdem.hex +``` diff --git a/keyboards/gherkin/keymaps/bbaserdem/config.h b/keyboards/gherkin/keymaps/bbaserdem/config.h new file mode 100644 index 0000000000..2bd89e8ece --- /dev/null +++ b/keyboards/gherkin/keymaps/bbaserdem/config.h @@ -0,0 +1,13 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" +#define RGB_DI_PIN F6 +#define RGBLED_NUM 10 +#define RGBLIGHT_ANIMATIONS +#ifdef BACKLIGHT_LEVELS +#undef BACKLIGHT_LEVELS +#endif +#define BACKLIGHT_LEVELS 3 + +#endif diff --git a/keyboards/gherkin/keymaps/bbaserdem/keymap.c b/keyboards/gherkin/keymaps/bbaserdem/keymap.c new file mode 100644 index 0000000000..6e9898a277 --- /dev/null +++ b/keyboards/gherkin/keymaps/bbaserdem/keymap.c @@ -0,0 +1,36 @@ +// This is a game-pad gherkin layout with RGB and LED lights + +#include "gherkin.h" + +backlight_config_t backlight_config; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Game pad + * ,-----------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | Ctl | Alt | ~ | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | Tab | Q | W | E | R | T | |^| | ; | ' | / | + * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| + * | Shf | A | S | D | F | <-- | |v| | --> | , | . | + * `-----------------------------------------------------------' + */ + KEYMAP( + KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_LCTRL, KC_LALT, KC_GRAVE, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, KC_SCLN, KC_QUOTE, KC_SLASH, + KC_LSHIFT, KC_A, KC_S, KC_D, KC_F, KC_LEFT, KC_DOWN, KC_RIGHT, KC_COMMA, KC_DOT + ) +}; + +void matrix_init_user(void) { + // Set LED's to max + _delay_us(300); + backlight_config.level = 2; + backlight_config.enable = 1; + eeconfig_update_backlight(backlight_config.raw); + backlight_set(backlight_config.level); + // Set RGB to rainbow mood light + rgblight_enable(); + rgblight_mode(1); + rgblight_sethsv(120,255,255); + rgblight_mode(6); +} diff --git a/keyboards/gherkin/keymaps/bbaserdem/rules.mk b/keyboards/gherkin/keymaps/bbaserdem/rules.mk new file mode 100644 index 0000000000..4e3a41820b --- /dev/null +++ b/keyboards/gherkin/keymaps/bbaserdem/rules.mk @@ -0,0 +1,14 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +STENO_ENABLE = no # Additional protocols for Stenography(+1700), requires VIRTSER +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 +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 +AUDIO_ENABLE = no # Enable audio output from keyboard +RGBLIGHT_ENABLE = yes # Enable RBG light strips +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/lets_split/keymaps/bbaserdem/README.md b/keyboards/lets_split/keymaps/bbaserdem/README.md new file mode 100644 index 0000000000..4b37d73555 --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem/README.md @@ -0,0 +1,27 @@ +# Lets Split Layout + +Check out [user readme](../../../../users/bbaserdem/README.md) for more info. + +# Usage + +**These commands depend on there being no other arduino connected!** +Also udev rules can be set instead of using sudo. +Please unplug all other usb devices. + +To make the hex files; +``` +make lets_split/rev2:bbaserdem +make lets_split/rev2:bbaserdem_right +``` + +For the left half, after plugging in and resetting; (from repo main directory) +``` +sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:.build/lets_split_rev2_bbaserdem.hex +sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-lefthand.eep +``` + +For the right half; +``` +sudo avrdude -p atmgea34u4 -P "$(ls /dev/ttyACM*)" -c avr109 -D -U flash:w:.build/lets_split_rev2_bbaserdem_right.hex +sudo avrdude -p atmega32u4 -P "$(ls /dev/ttyACM*)" -c avr109 -U eeprom:w:keyboards/lets_split/eeprom-righhand.eep +``` diff --git a/keyboards/lets_split/keymaps/bbaserdem/config.h b/keyboards/lets_split/keymaps/bbaserdem/config.h new file mode 100755 index 0000000000..f908e6d9a8 --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem/config.h @@ -0,0 +1,27 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define USE_SERIAL +#define EE_HANDS + +// LED strip stuff +#ifdef RGBLIGHT_ENABLE + +// Who thought it was a good idea to predefine these in the rev2/config.h ??? +#ifdef RGBLED_NUM +#undef RGBLED_NUM +#endif +#define RGBLED_NUM 12 + +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 20 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 6 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 2000 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 +#endif + +#endif diff --git a/keyboards/lets_split/keymaps/bbaserdem/keymap.c b/keyboards/lets_split/keymaps/bbaserdem/keymap.c new file mode 100755 index 0000000000..09da67a69f --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem/keymap.c @@ -0,0 +1,37 @@ +/* + * Let's Split - Dvorak turkish + * Keymap by @bbaserdem + * Dvorak layout with multiple features + * Most of the code is in the "user" directory. + * Check qmk_firmware/users/bbaserdem for the main part of the code + */ +#define KEYMAP(...) LAYOUT_ortho_4x12(__VA_ARGS__) + +#include "lets_split.h" +#include "bbaserdem.h" + + +void matrix_init_keymap (void) { +} + +uint32_t layer_state_set_keymap(uint32_t state) { + return state; +} + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + // Main Dvorak layer + [_DV] = DVORAK, + // Turkish and special character overlay + [_AL] = ALTCHAR, + // Gaming layer + [_GA] = GAME, + // Numbers layer + [_NU] = NUMBERS, + // Settings layer + [_SE] = SETTINGS, + // Mouse emulation layer + [_MO] = MOUSE, +#ifdef AUDIO_ENABLE + [_MU] = MUSIC, +#endif +}; diff --git a/keyboards/lets_split/keymaps/bbaserdem/rules.mk b/keyboards/lets_split/keymaps/bbaserdem/rules.mk new file mode 100755 index 0000000000..4159db3fee --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem/rules.mk @@ -0,0 +1,11 @@ +# Build options + +BACKLIGHT_ENABLE = no # Switch LEDs +MOUSEKEY_ENABLE = yes # Emulates mouse key using keypresses +RGBLIGHT_ENABLE = yes # LED strips +TAP_DANCE_ENABLE = no # Use multi-tap features +AUDIO_ENABLE = no # Audio stuff + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/README.md b/keyboards/lets_split/keymaps/bbaserdem_right/README.md new file mode 100644 index 0000000000..8608f23f79 --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem_right/README.md @@ -0,0 +1,5 @@ +# Lets Split - Right Half + +Keymap for my right half, to be used as a numpad. +Check [main readme](../bbaserdem/README.md) for flashing info. + diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/config.h b/keyboards/lets_split/keymaps/bbaserdem_right/config.h new file mode 100755 index 0000000000..9b6527db23 --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem_right/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define USE_SERIAL +#define EE_HANDS + +#endif diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/keymap.c b/keyboards/lets_split/keymaps/bbaserdem_right/keymap.c new file mode 100755 index 0000000000..c7a81ecb5a --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem_right/keymap.c @@ -0,0 +1,35 @@ +/* + * Let's Split - Dvorak turkish + * Keymap by @bbaserdem + * Dvorak layout with multiple features + * Most of the code is in the "user" directory. + * Check qmk_firmware/users/bbaserdem for the main part of the code + */ + +#include "lets_split.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* Navigation All Supered) Numpad + * ,-----------------------. ,-----------------------. + * | F4| ` | Q |Alt| L | > | | ) | - | + | = |Ent|Bkp| + * |---+---+---+---+---+---| |---+---+---+---+---+---| + * | F3| M |Ent|Ctl| K | ^ | | ( | * | 9 | 6 | 3 | . | + * |---+---+---+---+---+---| |---+---+---+---+---+---| + * | F2| T |Spc|Shf| J | v | | % | / | 8 | 5 | 2 | , | + * |---+---+---+---+---+---| |---+---+---+---+---+---| + * | F1| F | P |Tab| H | < | |Nlc|Tab| 7 | 4 | 1 | 0 | + * `-----------------------' `-----------------------' + */ + // Main Dvorak layer + [0] = KEYMAP( + LGUI(KC_F4), LGUI(KC_GRV), LGUI(KC_Q), LGUI(KC_LALT), LGUI(KC_L), LGUI(KC_RGHT), + KC_RPRN, KC_PMNS, KC_PPLS, KC_PEQL, KC_PENT, KC_BSPC, + LGUI(KC_F3), LGUI(KC_M), LGUI(KC_ENT), LGUI(KC_LCTL), LGUI(KC_K), LGUI(KC_UP), + KC_LPRN, KC_PAST, KC_P9, KC_P6, KC_P3, KC_PDOT, + LGUI(KC_F2), LGUI(KC_T), LGUI(KC_SPC), LGUI(KC_LSFT), LGUI(KC_J), LGUI(KC_DOWN), + KC_PERC, KC_PSLS, KC_P8, KC_P5, KC_P2, KC_PCMM, + LGUI(KC_F1), LGUI(KC_F), LGUI(KC_P), LGUI(KC_TAB), LGUI(KC_H), LGUI(KC_LEFT), + KC_NLCK, KC_TAB, KC_P7, KC_P4, KC_P1, KC_P0 ) +}; diff --git a/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk new file mode 100755 index 0000000000..65a64c94f2 --- /dev/null +++ b/keyboards/lets_split/keymaps/bbaserdem_right/rules.mk @@ -0,0 +1,24 @@ +# Build options + +BACKLIGHT_ENABLE = no # Switch LEDs +MOUSEKEY_ENABLE = no # Emulates mouse key using keypresses +RGBLIGHT_ENABLE = no # LED strips +TAP_DANCE_ENABLE = no # Use multi-tap features +AUDIO_ENABLE = no # Audio stuff +BLUETOOTH_ENABLE = no # No bluetooth +COMMAND_ENABLE = no # Some bootmagic thing +BOOTMAGIC_ENABLE = no # Access to EEPROM settings, not needed +CONSOLE_ENABLE = no # Allows console output with a command +SLEEP_LED_ENABLE = no # Breathes LED's when computer is asleep. Untested. +NKRO_ENABLE = no # Default is 6KRO which is plenty +MIDI_ENABLE = no # Untested feature +FAUXCLICKY_ENABLE = no # Emulates clicks using speaker +KEY_LOCK_ENABLE = no # Allows locking any key. Not used +API_SYSEX_ENABLE = no # Allows OS to send signals. +KEY_LOCK_ENABLE = no # Allows locking any key. Not used +UNICODE_ENABLE = no # Used for unicode character emulation +EXTRAKEY_ENABLE = no # OS signals like volume control + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/bbaserdem/README.md b/keyboards/planck/keymaps/bbaserdem/README.md index 8813075662..c8e8c3963c 100644 --- a/keyboards/planck/keymaps/bbaserdem/README.md +++ b/keyboards/planck/keymaps/bbaserdem/README.md @@ -1,35 +1,15 @@ # Planck Layout -Built this planck layout to use DVORAK with an unorthodox Turkish layout. -If you used a previous layout with a persistent base layer change, -change it to 0 before proceeding. -The layout has the following functionality +Current keymap is for rev4. +Audio is disabled in favor of RGB. +Check out [user readme](../../../../users/bbaserdem/README.md) for more info. -* **QWERTY** can be toggled on/off from **Function** layer. -* **Mouse** layer allows manipulation of the mouse. -* **Function** layer has F and special keys. -* **Symbol** layer has numericals and symbols. -* **Game** layout can be toggled on/off from **Function** layer. -* **Music** layer allows playing sounds like a keyboard. +# Build -Double tapping **Mouse**, **Function** and **Symbol** layers activate them until deacivation. -Topleftmost key turns off **Function**, **Symbol**, **Game** and **Music** layers, -and puts the board into *reset* mode from the **Mouse** layer. +Get keyboard into reset mode, and then; -# Using Turkish letters +``` +make planck/rev4:bbaserdem:dfu +``` -Instead of a turkish F keyboard layout (very inconvenient to code in), -I opted to modulate characters like an *AltGr* impleentation. -Tap and holding *Alt* on **DVORAK** and **QWERTY** layer will change some letters -to Turkish equivelants. -Shifting these letters will work. -The keycodes should transmit the correct unicode characters combined with shift. -The turkish letters are sent via the unicode implementation. -No software layout change is neccessary (hence making coding easier). -By default, the unicode is set to Linux mode. Switch to windows (non-persistent) -can be done from the associated key in **Function** layer. -**Symbol** layer also has the symbol for Turkish Lira. - -# To improve - -I want to write a couple pieces of my own music for layer switching. +Either use sudo or set up udev rules. diff --git a/keyboards/planck/keymaps/bbaserdem/config.h b/keyboards/planck/keymaps/bbaserdem/config.h old mode 100644 new mode 100755 index d7632aecda..2edb45673c --- a/keyboards/planck/keymaps/bbaserdem/config.h +++ b/keyboards/planck/keymaps/bbaserdem/config.h @@ -3,42 +3,20 @@ #include "../../config.h" -#ifdef AUDIO_ENABLE - // Compose own song in future - #define STARTUP_SONG SONG(PLANCK_SOUND) - - #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ - SONG(COLEMAK_SOUND), \ - SONG(DVORAK_SOUND) \ - } +// LED strip stuff +#ifdef RGBLIGHT_ENABLE +#define RGB_DI_PIN B2 +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 6 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 20 +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 6 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_KNIGHT_OFFSET 6 +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 6 +#define RGBLIGHT_EFFECT_CHRISTMAS_INTERVAL 2000 +#define RGBLIGHT_EFFECT_CHRISTMAS_STEP 1 #endif -// Enables tap magic -#define TAPPING_TERM 300 -#define TAPPING_TOGGLE 1 - -/* - * 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 - #endif diff --git a/keyboards/planck/keymaps/bbaserdem/keymap.c b/keyboards/planck/keymaps/bbaserdem/keymap.c old mode 100644 new mode 100755 index 74dfabdecf..063e9a98ef --- a/keyboards/planck/keymaps/bbaserdem/keymap.c +++ b/keyboards/planck/keymaps/bbaserdem/keymap.c @@ -1,413 +1,29 @@ -/* 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 . +/* + * PLANCK - Dvorak turkish + * Keymap by @bbaserdem + * Dvorak layout with multiple features + * Most of the code is in the "user" directory. + * Check qmk_firmware/users/bbaserdem for the main part of the code */ #include "planck.h" - -#define _______ KC_TRNS -#define XXX KC_NO - -#define _DV 0 -#define _TD 1 -#define _GM 2 -#define _MO 3 -#define _SY 4 -#define _FN 5 -#define _MS 6 - -#define PARAN TD(PAR) -#define CURLY TD(CUR) -#define SQUAR TD(SQU) -#define ANGUL TD(ANG) - -#define UNDO LCTL(KC_Z) -#define REDO LCTL(KC_Y) -#define COPYCUT TD(CPC) -#define PASTE LCTL(KC_V) - -#define MO_SC_U KC_MS_WH_UP -#define MO_SC_D KC_MS_WH_DOWN -#define MO_SC_L KC_MS_WH_LEFT -#define MO_SC_R KC_MS_WH_RIGHT -#define MO_U KC_MS_UP -#define MO_D KC_MS_DOWN -#define MO_L KC_MS_LEFT -#define MO_R KC_MS_RIGHT -#define MO_CL_L KC_MS_BTN1 -#define MO_CL_R KC_MS_BTN2 -#define MO_CL_M KC_MS_BTN3 -#define MO_CL_1 KC_MS_BTN4 -#define MO_CL_2 KC_MS_BTN5 -#define MO_AC_0 KC_MS_ACCEL0 -#define MO_AC_1 KC_MS_ACCEL1 -#define MO_AC_2 KC_MS_ACCEL2 - -#define PHY_HB UC(0x0127) -#define PHY_DE UC(0xc2b0) -#define TUR_TL UC(0x20ba) -#define EUR_ER UC(0x20ac) -#define EUR_PN UC(0x00a3) - -enum custom_keycodes { - TUR_A = SAFE_RANGE, - TUR_C, - TUR_G, - TUR_I, - TUR_O, - TUR_S, - TUR_U, - UNI_LI, - UNI_WN -}; - -// Tap dance -enum { - ATD = 0, - CLS, - SCL, - QUO, - PAR, - CUR, - SQU, - ANG, - CPC -}; +#include "bbaserdem.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - -/* Dvorak - * ,------------------------------------------------------------------------. - * | Blt | " | , | . | P | Y || F | G | C | R | L | Bkp | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Esc | A | O | E | U | I || D | H | T | N | S | Del | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |Sh\CL| ; : | Q | J | K | X || B | M | W | V | Z |MOUSE| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Ctl | Alt | Meta| Tab | SYM | Spc || Ent | FUN | Lft | Dwn | Up | Rgt | - * `------------------------------------------------------------------------' - */ -[_DV] = { - {BL_STEP,TD(QUO),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_DEL }, - {TD(CLS),TD(SCL),KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, TT(_MO)}, - {KC_LCTL,TD(ATD),KC_LGUI,KC_TAB, TT(_SY),KC_SPC, KC_ENT, TT(_FN),KC_LEFT,KC_DOWN,KC_UP, KC_RGHT} -}, -[_TD] = { - {_______,_______,_______,_______,_______,_______,_______, TUR_G, TUR_C, _______,_______,_______}, - {_______, TUR_A, TUR_O, _______, TUR_U, TUR_I, _______, PHY_HB,_______,_______, TUR_S, _______}, - {_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______}, - {_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______} -}, - -/* Game layer - * ,------------------------------------------------------------------------. - * | OFF | Q | W | E | R | T || F1 | F2 | Ctrl| ^ |Shift| Esc | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | ~ | A | S | D | F | G || F3 | F4 | < | v | > |Enter| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Shf | Z | X | C | V | B || F5 | F6 | , | . | / ? | Alt | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | Alt | Ctrl| ` ~ | - _ | | Spc || Spc | | 1 | 2 | 3 | 4 | - * `------------------------------------------------------------------------' - */ -[_GM] = { - {TG(_GM),KC_Q, KC_W, KC_E, KC_R, KC_T, KC_F1, KC_F2, KC_RCTL,KC_UP, KC_RSFT,KC_ESC }, - {KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F3, KC_F4, KC_LEFT,KC_DOWN,KC_RGHT,KC_ENT }, - {KC_LSFT,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F5, KC_F6, KC_COMM,KC_DOT, KC_SLSH,KC_RALT}, - {KC_LALT,KC_LCTL,KC_GRV, KC_MINS,_______,KC_SPC, KC_SPC, _______,KC_1, KC_2, KC_3, KC_4 } -}, - -/* Mouse control layer - * ,------------------------------------------------------------------------. - * | |.....| ^ |.....|.....|Acc 2||.....|.....|.....| |^| |.....| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | < | v | > |.....|Acc 1||.....|.....| <-- | |v| | --> | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | Left| Mid |Right|.....|Acc 0||.....|.....|Btn 4|.....|Btn 5| | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | | || | | | | | | - * `------------------------------------------------------------------------' - */ -[_MO] = { - {TG(_MO),XXX, MO_U, XXX, XXX, MO_AC_2,XXX, XXX, XXX, MO_SC_U,XXX, _______}, - {_______,MO_L, MO_D, MO_R, XXX, MO_AC_1,XXX, XXX, MO_SC_L,MO_SC_D,MO_SC_R,_______}, - {_______,MO_CL_L,MO_CL_M,MO_CL_R,XXX, MO_AC_0,XXX, XXX, MO_CL_1,XXX, MO_CL_2,_______}, - {_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______} -}, - -/* Symbols layer - * ,------------------------------------------------------------------------. - * | OFF | ! | 1 | 2 | 3 | & || = | + | - | * | % | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | _ | ( ) | 4 | 5 | 6 | \ || / | [ ] | { } | < > | | | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * |degre| ? | 7 | 8 | 9 | ~ || ` | @ | # | $ | ^ | | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | 0 | | || | |TLira| Euro|Pound| | - * `------------------------------------------------------------------------' - */ - -[_SY] = { - {TG(_SY),KC_EXLM,KC_1, KC_2, KC_3, KC_AMPR,KC_EQL, KC_PLUS,KC_MINS,KC_ASTR,KC_PERC,_______}, - {KC_UNDS,PARAN, KC_4, KC_5, KC_6, KC_BSLS,KC_SLSH,SQUAR, CURLY, ANGUL, KC_PIPE,_______}, - {PHY_DE, KC_QUES,KC_7, KC_8, KC_9, KC_TILD,KC_GRV, KC_AT, KC_HASH,KC_DLR, KC_CIRC,_______}, - {_______,_______,_______,KC_0, _______,_______,_______,_______,TUR_TL, EUR_ER, EUR_PN, _______} -}, - -/* Function layer - * ,------------------------------------------------------------------------. - * | OFF | game|music| | |RESET||RESET| win | lin | wake|sleep|power| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | F1 | F2 | F3 | F4 | F5 | F6 || F7 | F8 | F9 | F10 | F11 | F12 | - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | undo| redo|cutcp|paste|vol 0||prtsc| ins | rev.| stop| play| next| - * |-----+-----+-----+-----+-----+-----++-----+-----+-----+-----+-----+-----| - * | | | | | |vol -||vol +| | home|pg dn|pg up| end | - * `------------------------------------------------------------------------' - */ - -[_FN] = { - {TG(_FN),TG(_GM),MU_ON, _______,_______,RESET, RESET, UNI_LI, UNI_WN ,KC_WAKE,KC_SLEP,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 }, - {_______,UNDO, REDO, COPYCUT,PASTE, KC_MUTE,KC_PSCR,KC_INS, KC_MPRV,KC_MSTP,KC_MPLY,KC_MNXT}, - {_______,_______,_______,_______,_______,KC_VOLD,KC_VOLU,_______,KC_HOME,KC_PGDN,KC_PGUP,KC_END } -}, - -/* Music layer - * ,-----------------------------------------------------------------------. - * | OFF |rec S| stop| play|sped^|spedv|cycle|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....| - * |-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----+-----| - * |.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....|.....| - * `-----------------------------------------------------------------------' - */ -[_MS] = { - { MU_OFF, KC_LCTL, KC_LALT, KC_LGUI, KC_UP, KC_DOWN, MU_MOD, XXX, XXX, XXX, XXX, XXX }, - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, - { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX } -} -}; - -// Set unicode method to linux. -void matrix_init_user(){ - set_unicode_input_mode(UC_LNX); -} - -// User defined keys -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - // This section is a bit tedious in VIM, so I shortened lines - // Check for shift letter - bool is_capital = ( keyboard_report->mods & - (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) ) ^ - ( keyboard_report->mods & MOD_BIT(KC_CAPS) ); - switch (keycode) { - // Add music layer to music functionality - case MU_ON: - if (record->event.pressed) { layer_on(_MS); } - return true; break; - case MU_OFF: - if (record->event.pressed) { layer_off(_MS); } - return true; break; - // Turkish letters keycodes - case TUR_A: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); register_hex(0x00c2); unicode_input_finish(); - } else { - unicode_input_start(); register_hex(0x00e2); unicode_input_finish(); - } - } - return false; break; - case TUR_U: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); register_hex(0x00dc); unicode_input_finish(); - } else { - unicode_input_start(); register_hex(0x00fc); unicode_input_finish(); - } - } - return false; break; - case TUR_I: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); register_hex(0x0130); unicode_input_finish(); - } else { - unicode_input_start(); register_hex(0x0131); unicode_input_finish(); - } - } - return false; break; - case TUR_O: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); register_hex(0x00d6); unicode_input_finish(); - } else { - unicode_input_start(); register_hex(0x00f6); unicode_input_finish(); - } - } - return false; break; - case TUR_S: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); register_hex(0x015e); unicode_input_finish(); - } else { - unicode_input_start(); register_hex(0x015f); unicode_input_finish(); - } - } - return false; break; - case TUR_G: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); register_hex(0x011e); unicode_input_finish(); - } else { - unicode_input_start(); register_hex(0x011f); unicode_input_finish(); - } - } - return false; break; - case TUR_C: - if (record->event.pressed) { - if ( is_capital ) { - unicode_input_start(); register_hex(0x00c7); unicode_input_finish(); - } else { - unicode_input_start(); register_hex(0x00e7); unicode_input_finish(); - } - } - return false; break; - // Keys to change unicode mode - case UNI_LI: - if( record->event.pressed ) { - set_unicode_input_mode(UC_LNX); - } - return false; break; - case UNI_WN: - if( record->event.pressed ) { - set_unicode_input_mode(UC_WIN); - } - return false; break; - } - return true; -} - -// Tap dance feature for the altgr implementation -void altgr_dvo_tap (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_RALT); - } else if (state->count == 2) { - unregister_code (KC_RALT); - layer_on(_TD); - } else if (state->count == 3) { - layer_off(_TD); - } -} -void altgr_dvo_end (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_RALT); - } else if (state->count == 2) { - layer_off(_TD); - } -} - -// Shift vs capslock function -void caps_tap (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_LSFT); - } else if (state->count == 2) { - unregister_code (KC_LSFT); - register_code (KC_CAPS); - } -} -void caps_tap_end (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_LSFT); - } else { - unregister_code (KC_CAPS); - } -} - -// Parantheses -void paranthesis_dance (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - SEND_STRING("()"); register_code(KC_LEFT); unregister_code(KC_LEFT); - } else if (state->count == 2) { - SEND_STRING("("); - } else if (state->count == 3) { - SEND_STRING(")"); - } -} -void curly_dance (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - SEND_STRING("{}"); register_code(KC_LEFT); unregister_code(KC_LEFT); - } else if (state->count == 2) { - SEND_STRING("{"); - } else if (state->count == 3) { - SEND_STRING("}"); - } -} - -void square_dance (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - SEND_STRING("[]"); register_code(KC_LEFT); unregister_code(KC_LEFT); - } else if (state->count == 2) { - SEND_STRING("["); - } else if (state->count == 3) { - SEND_STRING("]"); - } -} - -void angular_dance (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - SEND_STRING("<>"); register_code(KC_LEFT); unregister_code(KC_LEFT); - } else if (state->count == 2) { - SEND_STRING("<"); - } else if (state->count == 3) { - SEND_STRING(">"); - } -} - -// Copy or cut feature -void copy_cut (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_LCTL); - register_code (KC_C); - unregister_code (KC_C); - unregister_code (KC_LCTL); - } else if (state->count == 2) { - register_code (KC_LCTL); - register_code (KC_X); - unregister_code (KC_X); - unregister_code (KC_LCTL); - } -} - -// Tap dance feature -qk_tap_dance_action_t tap_dance_actions[] = { - // Tap once for Left Ctrl, second one is momentory switch to layer TUR - [ATD] = ACTION_TAP_DANCE_FN_ADVANCED( altgr_dvo_tap, NULL, altgr_dvo_end ) - // Advanced tap dance feature allows for immediate response to shift - ,[CLS] = ACTION_TAP_DANCE_FN_ADVANCED( caps_tap, NULL, caps_tap_end ) - // Shifting for double quote and semicolon - ,[SCL] = ACTION_TAP_DANCE_DOUBLE( KC_SCLN, KC_COLN ) - ,[QUO] = ACTION_TAP_DANCE_DOUBLE( KC_QUOT, KC_DQUO ) - // Tap dances for paranthesis, which sends macros - ,[PAR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, paranthesis_dance ) - ,[CUR] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, curly_dance ) - ,[SQU] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, square_dance ) - ,[ANG] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, NULL, angular_dance ) - // Tap dance for copy/cutting - ,[CPC] = ACTION_TAP_DANCE_FN( copy_cut ) + // Main Dvorak layer + [_DV] = DVORAK, + // Turkish and special character overlay + [_AL] = ALTCHAR, + // Gaming layer + [_GA] = GAME, + // Numbers layer + [_NU] = NUMBERS, + // Settings layer + [_SE] = SETTINGS, + // Mouse emulation layer + [_MO] = MOUSE, +#ifdef MUSIC_ENABLE + // Music mode + [_MU] = MUSIC, +#endif }; diff --git a/keyboards/planck/keymaps/bbaserdem/rules.mk b/keyboards/planck/keymaps/bbaserdem/rules.mk old mode 100644 new mode 100755 index 9c6bd8e19b..e2b5eb3c36 --- a/keyboards/planck/keymaps/bbaserdem/rules.mk +++ b/keyboards/planck/keymaps/bbaserdem/rules.mk @@ -1,22 +1,10 @@ # Build options -# ENABLE -TAP_DANCE_ENABLE = yes -UNICODE_ENABLE = yes -MOUSEKEY_ENABLE = yes -EXTRAKEY_ENABLE = yes -NKRO_ENABLE = yes -BACKLIGHT_ENABLE = yes -AUDIO_ENABLE = yes - -# DISABLE -BOOTMAGIC_ENABLE = no -MIDI_ENABLE = no - -# Not for planck -RGBLIGHT_ENABLE = no #Clashes with audio -BLUETOOTH_ENABLE = no #No bluetooth -SLEEP_LED_ENABLE = no #Uses BACKLIGHT_ENABLE rimer +BACKLIGHT_ENABLE = yes # Switch LEDs +MOUSEKEY_ENABLE = yes # Emulates mouse key using keypresses +RGBLIGHT_ENABLE = yes # LED strips +TAP_DANCE_ENABLE = no # Use multi-tap features +AUDIO_ENABLE = no # Audio stuff ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/xd75/keymaps/bbaserdem/config.h b/keyboards/xd75/keymaps/bbaserdem/config.h new file mode 100644 index 0000000000..2c24bb7673 --- /dev/null +++ b/keyboards/xd75/keymaps/bbaserdem/config.h @@ -0,0 +1,22 @@ +/* Copyright 2017 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#endif diff --git a/keyboards/xd75/keymaps/bbaserdem/keymap.c b/keyboards/xd75/keymaps/bbaserdem/keymap.c new file mode 100644 index 0000000000..0b8ab6235a --- /dev/null +++ b/keyboards/xd75/keymaps/bbaserdem/keymap.c @@ -0,0 +1,80 @@ +#include "xd75.h" +#include "bbaserdem.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Layout + * ,-----------------------------------------------------------. + * |Blt|Lck| ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | + * |---+---+-----------------------------------------------+---| + * |Int|Trm| |Cps| + * |---+---| |---| + * |Clc|Psw| | \ | + * |---+---| PLANCK |---| + * |Rev|Ffw| | [ | + * |---+---| |---| + * |Tog|Mut| | ] | + * `-----------------------------------------------------------' + */ +[_DV] = KM( + BL_STEP, LGUI(KC_ESC), 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_WHOM, LGUI(KC_ENT), DVORAK_1, KC_CAPS, + KC_CALC, LGUI(KC_P), DVORAK_2, KC_BSLS, + KC_MPRV, KC_MNXT, DVORAK_3, KC_LBRC, + KC_MPLY, KC_MUTE, DVORAK_4, KC_RBRC ), + +[_AL] = KM( + _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,_______,_______, + _______,_______, ALTCHAR_1, _______, + _______,_______, ALTCHAR_2, _______, + _______,_______, ALTCHAR_3, _______, + _______,_______, ALTCHAR_4, _______ ), + +[_GA] = KM( + _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,_______,_______, + _______,_______, GAME_1, _______, + _______,_______, GAME_2, _______, + _______,_______, GAME_3, _______, + _______,_______, GAME_4, _______ ), + +[_NU] = KM( + _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,_______,_______, + _______,_______, NUMBERS_1, _______, + _______,_______, NUMBERS_2, _______, + _______,_______, NUMBERS_3, _______, + _______,_______, NUMBERS_4, _______ ), + +[_SE] = KM( + _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,_______,_______, + _______,_______, SETTINGS_1, _______, + _______,_______, SETTINGS_2, _______, + _______,_______, SETTINGS_3, _______, + _______,_______, SETTINGS_4, _______ ), + +[_MO] = KM( + _______,_______,_______,_______,_______,_______, + _______,_______,_______,_______,_______,_______, + _______,_______,_______, + _______,_______, MOUSE_1, _______, + _______,_______, MOUSE_2, _______, + _______,_______, MOUSE_3, _______, + _______,_______, MOUSE_4, _______ ), + +#ifdef AUDIO_ENABLE +[_MU] = KM( + XXX, XXX, MASK, XXX, + XXX, XXX, MASK, XXX, + XXX, XXX, MASK, XXX, + XXX, XXX, MASK, XXX, + XXX, XXX, MUSIC_4, XXX ), +#endif + +}; + diff --git a/keyboards/xd75/keymaps/bbaserdem/readme.md b/keyboards/xd75/keymaps/bbaserdem/readme.md new file mode 100644 index 0000000000..68a05b0305 --- /dev/null +++ b/keyboards/xd75/keymaps/bbaserdem/readme.md @@ -0,0 +1,12 @@ +# XD75RE Setup + +This layout is the xd75re layout, inspired by my planck keymap. +Contains some code from the original keymap here, but had to be modded. + +# Make + +Take the board into reset mode, then +``` +make xd75:bbaserdem:dfu +``` +Either sudo it or set permissions in udev. diff --git a/keyboards/xd75/keymaps/bbaserdem/rules.mk b/keyboards/xd75/keymaps/bbaserdem/rules.mk new file mode 100644 index 0000000000..4839c644f8 --- /dev/null +++ b/keyboards/xd75/keymaps/bbaserdem/rules.mk @@ -0,0 +1,10 @@ +# Build options +BACKLIGHT_ENABLE = yes # Switch LEDs +MOUSEKEY_ENABLE = yes # Emulates mouse key using keypresses +RGBLIGHT_ENABLE = no # LED strips +TAP_DANCE_ENABLE = no # Use multi-tap features +AUDIO_ENABLE = no # Audio stuff + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif -- cgit v1.2.3 From 3d1349b280d9c0a57e37b5347a405426de6dba10 Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Thu, 31 May 2018 22:11:06 -0700 Subject: Big overhaul to Drashna keymaps and userspace (#3097) * Optimize secrets code * Orthodox tweaks * rules.mk features * Minor cleanup * Revert mod bits * Force Hold breaks One Shot Tap Toggle * Cleanup * Moke keymaps more consistent * minor ergodox tweak * More OSM for the Orthodox * Cleanup of userspace * Toggle Secrets * Add hidden process record for super secret macros * Make sure secret macros always compiles * finish up making them super secret * Add ColinTA's rgb twinkle as WIP * Optimize RGB Twinkling for typing Also, tweak RGB indicators. AND WTF, I HAVE NO IDEA WHY THE INDICATORS ONLY WORK AS IS. The logical method for getting them working doesn't ... and it's beyond bizarre * Make console logging more configurable * Indicator travisty * Clean up userspace rgb code * Optimize RGB Twinking to work on default layer only, and to base it's color on the curent hue * Eff it... rgblight_sethsv_at runs at every matrix scan * RGB Twinkle cleanup * Update Iris code for new board * Move RGB Indicator and RGB Twinkle into userspace * Move RGB Indicator code to rgb_stuff.c * Major cleanup of RGB Code in userspace * Additional cleanup of RGB code in userspace * Use noeeprom functions to save my boards! * Enable RGB Sleep on all boards now * Add old iris board * tapping tweak * Use byte 19 for eeprom to prepare for possible merge of eeconfig function pr * Add code to fix default layer after eeprom reset --- keyboards/iris/keymaps/drashna/config.h | 11 ++- keyboards/iris/keymaps/drashna/keymap.c | 108 ++++---------------------- keyboards/iris/keymaps/drashna/rules.mk | 7 +- keyboards/iris/keymaps/drashna_old/config.h | 70 +++++++++++++++++ keyboards/iris/keymaps/drashna_old/keymap.c | 89 +++++++++++++++++++++ keyboards/iris/keymaps/drashna_old/rules.mk | 17 ++++ keyboards/orthodox/keymaps/drashna/config.h | 10 +++ keyboards/orthodox/keymaps/drashna/keymap.c | 116 ++++++---------------------- keyboards/orthodox/keymaps/drashna/rules.mk | 3 + keyboards/viterbi/keymaps/drashna/rules.mk | 7 +- 10 files changed, 252 insertions(+), 186 deletions(-) create mode 100644 keyboards/iris/keymaps/drashna_old/config.h create mode 100644 keyboards/iris/keymaps/drashna_old/keymap.c create mode 100644 keyboards/iris/keymaps/drashna_old/rules.mk (limited to 'keyboards') diff --git a/keyboards/iris/keymaps/drashna/config.h b/keyboards/iris/keymaps/drashna/config.h index bfdd0022be..d2c1129239 100644 --- a/keyboards/iris/keymaps/drashna/config.h +++ b/keyboards/iris/keymaps/drashna/config.h @@ -33,7 +33,7 @@ along with this program. If not, see . #ifdef RGBLIGHT_ENABLE #undef RGBLED_NUM -#define RGBLED_NUM 16 // Number of LEDs +#define RGBLED_NUM 18 // Number of LEDs #define RGBLIGHT_ANIMATIONS #define RGBLIGHT_HUE_STEP 12 #define RGBLIGHT_SAT_STEP 12 @@ -58,4 +58,13 @@ along with this program. If not, see . #define PRODUCT Drashna Hacked Iris Rev.2 #endif +#define SHFT_LED1 6 +#define SHFT_LED2 11 + +#define CTRL_LED1 7 +#define CTRL_LED2 10 + +#define GUI_LED1 8 +#define GUI_LED2 9 + #endif diff --git a/keyboards/iris/keymaps/drashna/keymap.c b/keyboards/iris/keymaps/drashna/keymap.c index b24e5fe533..bc3cd38ad9 100644 --- a/keyboards/iris/keymaps/drashna/keymap.c +++ b/keyboards/iris/keymaps/drashna/keymap.c @@ -2,15 +2,6 @@ #include QMK_KEYBOARD_H #include "drashna.h" -#ifdef INDICATOR_LIGHTS -extern userspace_config_t userspace_config; - -uint8_t last_mod; -uint8_t last_led; -uint8_t last_osm; -bool has_mods_changed = false; -#endif - #define KC_ALAP ALT_T(KC_APP) #define KC_OSLG OSM(MOD_LGUI) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -55,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LOWER] = LAYOUT_wrapper( _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + 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_LCBR, KC_RCBR, KC_PIPE, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______ @@ -63,7 +54,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = LAYOUT_wrapper( _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, _______, _______, _______, _______, _______ @@ -71,93 +62,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = LAYOUT_wrapper( KC_MAKE, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST, - VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, _______, _______, _______, _______, _______, EPRM, - _______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, _______, - TG(_MODS),RGB_SMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, + VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_NUKE, _______, _______, _______, _______, EPRM, + _______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN, TG(_MODS), + _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, _______, _______, _______, _______, _______, _______ ) }; -void matrix_init_keymap(void) { +bool indicator_is_this_led_used(uint8_t index) { + switch (index) { #ifdef INDICATOR_LIGHTS - last_mod = get_mods(); - last_led = host_keyboard_leds(); - last_osm =get_oneshot_mods(); + case SHFT_LED1: + case SHFT_LED2: + case CTRL_LED1: + case CTRL_LED2: + case GUI_LED1: + case GUI_LED2: + return true; + break; #endif -} - -uint32_t layer_state_set_keymap (uint32_t state) { -#ifdef INDICATOR_LIGHTS - uint8_t modifiders = get_mods(); - uint8_t led_usb_state = host_keyboard_leds(); - uint8_t one_shot = get_oneshot_mods(); - - - if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1< + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +/* Use I2C or Serial, not both */ + +#define USE_SERIAL +#undef USE_I2C + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#ifdef RGBLIGHT_ENABLE +#undef RGBLED_NUM +#define RGBLED_NUM 16 // Number of LEDs +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_HUE_STEP 12 +#define RGBLIGHT_SAT_STEP 12 +#define RGBLIGHT_VAL_STEP 12 +#define RGBLIGHT_EFFECT_KNIGHT_LENGTH 2 +#define RGBLIGHT_EFFECT_SNAKE_LENGTH 2 +#define RGBLIGHT_EFFECT_BREATHE_CENTER 1 + +#define RGBLIGHT_LIMIT_VAL 225 +#endif // RGBLIGHT_ENABLE + +#ifdef AUDIO_ENABLE +#define C6_AUDIO +#ifdef RGBLIGHT_ENABLE +#define NO_MUSIC_MODE +#endif //RGBLIGHT_ENABLE +#endif //AUDIO_ENABLE + + +#undef PRODUCT +#ifdef KEYBOARD_iris_rev2 +#define PRODUCT Drashna Hacked Iris Rev.2 +#endif + +#define SHFT_LED1 5 +#define SHFT_LED2 10 + +#define CTRL_LED1 6 +#define CTRL_LED2 9 + +#define GUI_LED1 7 +#define GUI_LED2 8 + +#endif diff --git a/keyboards/iris/keymaps/drashna_old/keymap.c b/keyboards/iris/keymaps/drashna_old/keymap.c new file mode 100644 index 0000000000..bc3cd38ad9 --- /dev/null +++ b/keyboards/iris/keymaps/drashna_old/keymap.c @@ -0,0 +1,89 @@ + +#include QMK_KEYBOARD_H +#include "drashna.h" + +#define KC_ALAP ALT_T(KC_APP) +#define KC_OSLG OSM(MOD_LGUI) +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_wrapper( + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_TAB , _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSLS, + KC_CCCV, _________________QWERTY_L2_________________, _________________QWERTY_R2_________________, KC_QUOT, + KC_MLSF, _________________QWERTY_L3_________________, KC_ALAP, KC_OSLG, _________________QWERTY_R3_________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + ), + [_COLEMAK] = LAYOUT_wrapper( + KC_ESC , ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_TAB , _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSLS, + KC_CCCV, _________________COLEMAK_L2________________, _________________COLEMAK_R2________________, KC_QUOT, + KC_MLSF, _________________COLEMAK_L3________________, KC_ALAP, KC_OSLG, _________________COLEMAK_R3________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + ), + [_DVORAK] = LAYOUT_wrapper( + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_TAB , _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSLS, + KC_CCCV, _________________DVORAK_L2_________________, _________________DVORAK_R2_________________, KC_QUOT, + KC_MLSF, _________________DVORAK_L3_________________, KC_ALAP, KC_OSLG, _________________DVORAK_R3_________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + ), + [_WORKMAN] = LAYOUT_wrapper( + KC_ESC, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_MINS, + KC_TAB , _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSLS, + KC_CCCV, _________________WORKMAN_L2________________, _________________WORKMAN_R2________________, KC_QUOT, + KC_MLSF, _________________WORKMAN_L3________________, KC_ALAP, KC_OSLG, _________________WORKMAN_R3________________, KC_MRSF, + LT(_LOWER,KC_GRV), KC_SPC, KC_BSPC, KC_DEL, KC_ENT, RAISE + ), + + [_MODS] = LAYOUT_wrapper( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + KC_LSFT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT, + _______, _______, _______, _______, _______, _______ + ), + + + [_LOWER] = LAYOUT_wrapper( + _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, + 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_LCBR, KC_RCBR, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_RAISE] = LAYOUT_wrapper( + _______, _________________FUNC_LEFT_________________, _________________FUNC_RIGHT________________, _______, + KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, _______, + _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_ADJUST] = LAYOUT_wrapper( + KC_MAKE, _______, _______, _______, _______, _______, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RST, + VRSN, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_NUKE, _______, _______, _______, _______, EPRM, + _______, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN, TG(_MODS), + _______, RGB_SMOD,RGB_HUD, RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY, + _______, _______, _______, _______, _______, _______ + ) + +}; + + +bool indicator_is_this_led_used(uint8_t index) { + switch (index) { +#ifdef INDICATOR_LIGHTS + case SHFT_LED1: + case SHFT_LED2: + case CTRL_LED1: + case CTRL_LED2: + case GUI_LED1: + case GUI_LED2: + return true; + break; +#endif + default: + return false; + } +} diff --git a/keyboards/iris/keymaps/drashna_old/rules.mk b/keyboards/iris/keymaps/drashna_old/rules.mk new file mode 100644 index 0000000000..1a6b63f16f --- /dev/null +++ b/keyboards/iris/keymaps/drashna_old/rules.mk @@ -0,0 +1,17 @@ +USER_NAME := drashna + +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 +BACKLIGHT_ENABLE = no +SWAP_HANDS_ENABLE = no + +INDICATOR_LIGHTS = yes +MACROS_ENABLED = no +RGBLIGHT_TWINKLE = yes diff --git a/keyboards/orthodox/keymaps/drashna/config.h b/keyboards/orthodox/keymaps/drashna/config.h index 1c3620616c..8c283e7ca4 100644 --- a/keyboards/orthodox/keymaps/drashna/config.h +++ b/keyboards/orthodox/keymaps/drashna/config.h @@ -76,4 +76,14 @@ along with this program. If not, see . #define QMK_LED B0 #define QMK_SPEAKER C6 + +#define SHFT_LED1 5 +#define SHFT_LED2 10 + +#define CTRL_LED1 6 +#define CTRL_LED2 9 + +#define GUI_LED1 7 +#define GUI_LED2 8 + #endif diff --git a/keyboards/orthodox/keymaps/drashna/keymap.c b/keyboards/orthodox/keymaps/drashna/keymap.c index bcc59268c0..c65e21cb0e 100644 --- a/keyboards/orthodox/keymaps/drashna/keymap.c +++ b/keyboards/orthodox/keymaps/drashna/keymap.c @@ -28,7 +28,6 @@ extern userspace_config_t userspace_config; uint8_t last_mod; uint8_t last_led; uint8_t last_osm; -bool has_mods_changed = false; #endif // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -46,25 +45,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT_wrapper(\ KC_ESC, _________________QWERTY_L1_________________, _________________QWERTY_R1_________________, KC_BSPC, - KC_TAB, _________________QWERTY_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________QWERTY_R2_________________, KC_QUOT, - KC_MLSF, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_LGUI + KC_TAB, _________________QWERTY_L2_________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________QWERTY_R2_________________, KC_QUOT, + KC_MLSF, _________________QWERTY_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________QWERTY_R3_________________, KC_MRSF ), [_COLEMAK] = LAYOUT_wrapper(\ KC_ESC, _________________COLEMAK_L1________________, _________________COLEMAK_R1________________, KC_BSPC, - KC_TAB, _________________COLEMAK_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________COLEMAK_R2________________, KC_QUOT, - KC_MLSF, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_LGUI + KC_TAB, _________________COLEMAK_L2________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________COLEMAK_R2________________, KC_QUOT, + KC_MLSF, _________________COLEMAK_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________COLEMAK_R3________________, KC_MRSF ), [_DVORAK] = LAYOUT_wrapper(\ KC_ESC, _________________DVORAK_L1_________________, _________________DVORAK_R1_________________, KC_BSPC, - KC_TAB, _________________DVORAK_L2_________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________DVORAK_R2_________________, KC_MINS, - KC_MLSF, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_LGUI + KC_TAB, _________________DVORAK_L2_________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________DVORAK_R2_________________, KC_MINS, + KC_MLSF, _________________DVORAK_L3_________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________DVORAK_R3_________________, KC_MRSF ), [_WORKMAN] = LAYOUT_wrapper(\ KC_ESC, _________________WORKMAN_L1________________, _________________WORKMAN_R1________________, KC_BSPC, - KC_TAB, _________________WORKMAN_L2________________, KC_UP, KC_DOWN, KC_LEFT, KC_RIGHT, _________________WORKMAN_R2________________, KC_MINS, - KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_LGUI + KC_TAB, _________________WORKMAN_L2________________, ALT_APP, OS_LGUI, KC_LALT, OS_RGUI, _________________WORKMAN_R2________________, KC_MINS, + KC_MLSF, _________________WORKMAN_L3________________, LOWER, KC_SPACE,KC_BSPC, KC_DEL, KC_ENT, RAISE, _________________WORKMAN_R3________________, KC_MRSF ), [_MODS] = LAYOUT_wrapper(\ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, @@ -73,105 +72,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_LOWER] = LAYOUT_wrapper(\ - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, - _______, _________________FUNC_LEFT_________________, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ + 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_F11, _________________FUNC_LEFT_________________, _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_F12, _________________FUNC_RIGHT________________, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______ ), [_RAISE] = LAYOUT_wrapper(\ KC_GRV, ________________NUMBER_LEFT________________, ________________NUMBER_RIGHT_______________, KC_BSPC, - _______, _______, _______, _______, _______, _______, KC_PGUP, KC_PGDN, KC_HOME, KC_END, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______ ), [_ADJUST] = LAYOUT_wrapper(\ KC_MAKE, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG, KC_SEC1, KC_SEC2, KC_SEC3, KC_SEC4, KC_SEC5, KC_RESET, - VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, _______, AG_SWAP, KC_QWERTY, KC_COLEMAK, KC_DVORAK, KC_WORKMAN, EPRM, + VRSN, _______, CK_TOGG, AU_ON, AU_OFF, AG_NORM, _______, _______, _______, KC_NUKE, AG_SWAP, QWERTY, COLEMAK, DVORAK, WORKMAN, EPRM, TG(_MODS),RGB_RMOD,RGB_HUD,RGB_SAD, RGB_VAD, KC_RGB_T,_______, _______, _______, _______, _______, _______, MG_NKRO, KC_MUTE, KC_VOLD, KC_VOLU, KC_MNXT, KC_MPLY ) }; -void matrix_init_keymap(void) { -#ifdef INDICATOR_LIGHTS - last_mod = get_mods(); - last_led = host_keyboard_leds(); - last_osm =get_oneshot_mods(); -#endif -} -uint32_t layer_state_set_keymap (uint32_t state) { +bool indicator_is_this_led_used(uint8_t index) { + switch (index) { #ifdef INDICATOR_LIGHTS - uint8_t modifiders = get_mods(); - uint8_t led_usb_state = host_keyboard_leds(); - uint8_t one_shot = get_oneshot_mods(); - - - if (modifiders & MODS_SHIFT_MASK || led_usb_state & (1< Date: Fri, 1 Jun 2018 01:22:44 -0400 Subject: keylorean ca66 keymap for hhkb layout with split spacebar (#3098) --- keyboards/ca66/keymaps/kelorean/keymap.c | 56 +++++++++++++++++++++++++++++ keyboards/ca66/keymaps/kelorean/layers.json | 1 + 2 files changed, 57 insertions(+) create mode 100644 keyboards/ca66/keymaps/kelorean/keymap.c create mode 100644 keyboards/ca66/keymaps/kelorean/layers.json (limited to 'keyboards') diff --git a/keyboards/ca66/keymaps/kelorean/keymap.c b/keyboards/ca66/keymaps/kelorean/keymap.c new file mode 100644 index 0000000000..5d104b8b41 --- /dev/null +++ b/keyboards/ca66/keymaps/kelorean/keymap.c @@ -0,0 +1,56 @@ +/* +*KeLorean CA66 keymap. +*Made for HHKB layout with CA66 badge in lower left corner and split spacebars. +*Left Spacebar - tap for backspace, hold for Layer1 +*Right Spacebar - tap for space, hold for Layer2 +*Cap Locks has been replaced with Momentary Toggle to Layer3 +*Layer 4 can be reached only by Layer3 in the '\' key +*Layer 4 tab is the soft reset. +*/ + +#include QMK_KEYBOARD_H + +// Helpful defines +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Base Layer + [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_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_BSLS, KC_DEL, + MO(3), 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_PGDN, KC_UP, + KC_NO, KC_LCTL, KC_LALT, LT(1, KC_BSPC), LT(2, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + //Layer1 Functions and Gaming Arrows over WASD + [1] = LAYOUT( + KC_NO, 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_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_UP, 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_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), + + //Layer2 Same as Layer1, for easy use of layers...you'll see. + [2] = LAYOUT( + KC_NO, 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_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), + + //Layer3, Lighting Function keys, media keys and '\' is now Momentary Toggle to Layer 4, which has the soft reset. + [3] = LAYOUT( + 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, RGB_HUD, RGB_HUI, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_NO, KC_NO, + MO(4), KC_NO, KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, 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), + + //Layer4, soft reset on Tab + [4] = LAYOUT( + 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, + RESET, 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_TRNS, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_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) +}; diff --git a/keyboards/ca66/keymaps/kelorean/layers.json b/keyboards/ca66/keymaps/kelorean/layers.json new file mode 100644 index 0000000000..9d7caa327d --- /dev/null +++ b/keyboards/ca66/keymaps/kelorean/layers.json @@ -0,0 +1 @@ +[["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_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_BSLS", "KC_DEL", "MO(3)", "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_PGDN", "KC_UP", "KC_NO", "KC_LCTL", "KC_LALT", "KC_BSPC", "KC_SPC", "KC_RALT", "KC_RGUI", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["KC_NO", "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_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_UP", "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_TRNS", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_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_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_UP", "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_LEFT", "KC_DOWN", "KC_RGHT", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], ["KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RGB_HUD", "RGB_HUI", "KC_NO", "KC_NO", "KC_NO", "BL_TOGG", "BL_DEC", "BL_INC", "BL_STEP", "KC_NO", "KC_NO", "MO(4)", "KC_NO", "KC_TRNS", "RGB_TOG", "RGB_RMOD", "RGB_MOD", "RGB_VAD", "RGB_VAI", "KC_MSTP", "KC_MPLY", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RGB_SAD", "RGB_SAI", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], ["KC_NO", "KC_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", "RESET", "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_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_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"]] \ No newline at end of file -- cgit v1.2.3 From 0aaff74b39554a4278997c13a25d60f9708ecd01 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 1 Jun 2018 08:56:39 -0700 Subject: Refactor and Configurator update for Christmas Tree (#3100) * Refactor * Configurator update --- keyboards/christmas_tree/christmas_tree.h | 2 +- keyboards/christmas_tree/info.json | 21 +++++----- keyboards/christmas_tree/keymaps/default/keymap.c | 50 +++++++++++++---------- 3 files changed, 41 insertions(+), 32 deletions(-) (limited to 'keyboards') diff --git a/keyboards/christmas_tree/christmas_tree.h b/keyboards/christmas_tree/christmas_tree.h index 1d77fa7135..11063c9152 100644 --- a/keyboards/christmas_tree/christmas_tree.h +++ b/keyboards/christmas_tree/christmas_tree.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ k00, k01, k02, k03, k04, k05 \ ) \ { \ diff --git a/keyboards/christmas_tree/info.json b/keyboards/christmas_tree/info.json index d33f9cc46c..bb223b0e01 100644 --- a/keyboards/christmas_tree/info.json +++ b/keyboards/christmas_tree/info.json @@ -1,13 +1,14 @@ { - "keyboard_name": "Christmas Tree", - "keyboard_folder": "christmas_tree", - "url": "https://www.reddit.com/r/MechanicalKeyboards/comments/7cqxpf/gb_christmas_tree_pcb_gb_now_live/", - "maintainer": "That-Canadian", - "width": 3, - "height": 3, - "layouts": { - "2017": { - "key_count": 6 - } + "keyboard_name": "Christmas Tree", + "keyboard_folder": "christmas_tree", + "url": "https://www.reddit.com/r/MechanicalKeyboards/comments/7cqxpf/gb_christmas_tree_pcb_gb_now_live/", + "maintainer": "That-Canadian", + "width": 3, + "height": 3, + "layouts": { + "2017": { + "key_count": 6, + "layout": [{"x":1, "y":0}, {"x":0.5, "y":1}, {"x":1.5, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}] } + } } diff --git a/keyboards/christmas_tree/keymaps/default/keymap.c b/keyboards/christmas_tree/keymaps/default/keymap.c index 38da326285..7880fd6254 100644 --- a/keyboards/christmas_tree/keymaps/default/keymap.c +++ b/keyboards/christmas_tree/keymaps/default/keymap.c @@ -14,7 +14,7 @@ * along with this program. If not, see . */ -#include "christmas_tree.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -32,27 +32,35 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Base - * ,------. - * | 1 | - * ,------+------. - * | 2 | 3 | - * ,------+------+------. - * | 4 | FUNC | 6 | - * `--------------------' - */ -[_BASE] = KEYMAP(KC_1, KC_2, KC_3, KC_4, MO(_FUNC), KC_6), + /* Base + * ,------. + * | 1 | + * ,------+------. + * | 2 | 3 | + * ,------+------+------. + * | 4 | FUNC | 6 | + * `--------------------' + */ + [_BASE] = LAYOUT( + KC_1, + KC_2, KC_3, + KC_4, MO(_FUNC), KC_6 + ), -/* Func - * ,------. - * |BCKLIT| - * ,------+------. - * | 8 | 9 | - * ,------+------+------. - * | 0 | FUNC | RESET| - * `--------------------' - */ -[_FUNC] = KEYMAP(BACKLIT, KC_8, KC_9, KC_0, _______, RESET) + /* Func + * ,------. + * |BCKLIT| + * ,------+------. + * | 8 | 9 | + * ,------+------+------. + * | 0 | FUNC | RESET| + * `--------------------' + */ + [_FUNC] = LAYOUT( + BACKLIT, + KC_8, KC_9, + KC_0, _______, RESET + ) }; -- cgit v1.2.3 From 74d86832c3ff5107daa015bdb7709af6256a462c Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 1 Jun 2018 08:58:30 -0700 Subject: Put CA66 and PK60 under a playkbtw directory (#3102) * Add playkbtw directory to put ca66 and pk60 in * delete old references * edit readmes for links --- keyboards/ca66/ca66.c | 30 -------- keyboards/ca66/ca66.h | 20 ----- keyboards/ca66/config.h | 57 -------------- keyboards/ca66/info.json | 12 --- keyboards/ca66/keymaps/default/keymap.c | 36 --------- keyboards/ca66/keymaps/kelorean/keymap.c | 56 -------------- keyboards/ca66/keymaps/kelorean/layers.json | 1 - keyboards/ca66/keymaps/olivia/keymap.c | 36 --------- keyboards/ca66/readme.md | 13 ---- keyboards/ca66/rules.mk | 56 -------------- keyboards/pk60/config.h | 58 -------------- keyboards/pk60/info.json | 32 -------- keyboards/pk60/keymaps/default/keymap.c | 59 -------------- keyboards/pk60/keymaps/default/readme.md | 3 - keyboards/pk60/pk60.c | 35 --------- keyboards/pk60/pk60.h | 90 ---------------------- keyboards/pk60/readme.md | 13 ---- keyboards/pk60/rules.mk | 56 -------------- keyboards/playkbtw/ca66/ca66.c | 30 ++++++++ keyboards/playkbtw/ca66/ca66.h | 20 +++++ keyboards/playkbtw/ca66/config.h | 57 ++++++++++++++ keyboards/playkbtw/ca66/info.json | 12 +++ keyboards/playkbtw/ca66/keymaps/default/keymap.c | 36 +++++++++ keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c | 56 ++++++++++++++ .../playkbtw/ca66/keymaps/kelorean/layers.json | 1 + keyboards/playkbtw/ca66/keymaps/olivia/keymap.c | 36 +++++++++ keyboards/playkbtw/ca66/readme.md | 15 ++++ keyboards/playkbtw/ca66/rules.mk | 56 ++++++++++++++ keyboards/playkbtw/pk60/config.h | 58 ++++++++++++++ keyboards/playkbtw/pk60/info.json | 32 ++++++++ keyboards/playkbtw/pk60/keymaps/default/keymap.c | 59 ++++++++++++++ keyboards/playkbtw/pk60/keymaps/default/readme.md | 3 + keyboards/playkbtw/pk60/pk60.c | 35 +++++++++ keyboards/playkbtw/pk60/pk60.h | 90 ++++++++++++++++++++++ keyboards/playkbtw/pk60/readme.md | 16 ++++ keyboards/playkbtw/pk60/rules.mk | 56 ++++++++++++++ keyboards/playkbtw/readme.md | 5 ++ 37 files changed, 673 insertions(+), 663 deletions(-) delete mode 100644 keyboards/ca66/ca66.c delete mode 100644 keyboards/ca66/ca66.h delete mode 100644 keyboards/ca66/config.h delete mode 100644 keyboards/ca66/info.json delete mode 100644 keyboards/ca66/keymaps/default/keymap.c delete mode 100644 keyboards/ca66/keymaps/kelorean/keymap.c delete mode 100644 keyboards/ca66/keymaps/kelorean/layers.json delete mode 100644 keyboards/ca66/keymaps/olivia/keymap.c delete mode 100644 keyboards/ca66/readme.md delete mode 100644 keyboards/ca66/rules.mk delete mode 100644 keyboards/pk60/config.h delete mode 100644 keyboards/pk60/info.json delete mode 100644 keyboards/pk60/keymaps/default/keymap.c delete mode 100644 keyboards/pk60/keymaps/default/readme.md delete mode 100644 keyboards/pk60/pk60.c delete mode 100644 keyboards/pk60/pk60.h delete mode 100644 keyboards/pk60/readme.md delete mode 100644 keyboards/pk60/rules.mk create mode 100644 keyboards/playkbtw/ca66/ca66.c create mode 100644 keyboards/playkbtw/ca66/ca66.h create mode 100644 keyboards/playkbtw/ca66/config.h create mode 100644 keyboards/playkbtw/ca66/info.json create mode 100644 keyboards/playkbtw/ca66/keymaps/default/keymap.c create mode 100644 keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c create mode 100644 keyboards/playkbtw/ca66/keymaps/kelorean/layers.json create mode 100644 keyboards/playkbtw/ca66/keymaps/olivia/keymap.c create mode 100644 keyboards/playkbtw/ca66/readme.md create mode 100644 keyboards/playkbtw/ca66/rules.mk create mode 100644 keyboards/playkbtw/pk60/config.h create mode 100644 keyboards/playkbtw/pk60/info.json create mode 100644 keyboards/playkbtw/pk60/keymaps/default/keymap.c create mode 100644 keyboards/playkbtw/pk60/keymaps/default/readme.md create mode 100644 keyboards/playkbtw/pk60/pk60.c create mode 100644 keyboards/playkbtw/pk60/pk60.h create mode 100644 keyboards/playkbtw/pk60/readme.md create mode 100644 keyboards/playkbtw/pk60/rules.mk create mode 100644 keyboards/playkbtw/readme.md (limited to 'keyboards') diff --git a/keyboards/ca66/ca66.c b/keyboards/ca66/ca66.c deleted file mode 100644 index 6f24a895f5..0000000000 --- a/keyboards/ca66/ca66.c +++ /dev/null @@ -1,30 +0,0 @@ -#include "ca66.h" -#include "config.h" - -void bootmagic_lite(void) -{ - // The lite version of TMK's bootmagic. - // 100% less potential for accidentally making the - // keyboard do stupid things. - - // We need multiple scans because debouncing can't be turned off. - matrix_scan(); - wait_ms(DEBOUNCING_DELAY); - matrix_scan(); - - // If the Esc (matrix 0,0) is held down on power up, - // reset the EEPROM valid state and jump to bootloader. - if ( matrix_get_row(0) & (1<<0) ) - { - // Set the TMK/QMK EEPROM state as invalid. - eeconfig_disable(); - // Jump to bootloader. - bootloader_jump(); - } -} - -void matrix_init_kb(void) -{ - bootmagic_lite(); - matrix_init_user(); -} diff --git a/keyboards/ca66/ca66.h b/keyboards/ca66/ca66.h deleted file mode 100644 index 0c00125a36..0000000000 --- a/keyboards/ca66/ca66.h +++ /dev/null @@ -1,20 +0,0 @@ -#ifndef CA66_H -#define CA66_H - -#include "quantum.h" - -#define LAYOUT( \ - K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, K114, \ - K100, K101, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K214, \ - K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K314, \ - K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K414, \ - K401, K402, K403, K404, K406, K408, K409, K410, K411, K412, K413 \ -) { \ - { 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, KC_NO, K214 }, \ - { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ - { KC_NO, K401, K402, K403, K404, KC_NO, K406, KC_NO, K408, K409, K410, K411, K412, K413, K414 } \ -} - -#endif diff --git a/keyboards/ca66/config.h b/keyboards/ca66/config.h deleted file mode 100644 index c35718042a..0000000000 --- a/keyboards/ca66/config.h +++ /dev/null @@ -1,57 +0,0 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Barry -#define PRODUCT CA66 -#define DESCRIPTION CA66 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { F5, F4, F1, B0, B3 } -#define MATRIX_COL_PINS { F7, C7, C6, B6, B5, B4, D7, D6, D4, D5, D3, D2, F6, B7, E6 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* number of backlight levels */ - -#define BACKLIGHT_PIN F0 -#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE - -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* prevent stuck modifiers */ -#define PREVENT_STUCK_MODIFIERS - -#define RGB_DI_PIN B1 -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 6 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif - -#endif diff --git a/keyboards/ca66/info.json b/keyboards/ca66/info.json deleted file mode 100644 index 906709ef1b..0000000000 --- a/keyboards/ca66/info.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "keyboard_name": "CA66", - "url": "", - "maintainer": "qmk", - "width": 16.5, - "height": 5.25, - "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.5, "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.5, "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.5, "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":15.5, "y":3}, {"x":14.25, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4, "w":1.25}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4, "w":2.75}, {"x":9.5, "y":4, "w":1.25}, {"x":10.75, "y":4}, {"x":11.75, "y":4, "w":1.25}, {"x":13.25, "y":4.25}, {"x":14.25, "y":4.25}, {"x":15.25, "y":4.25}] - } - } -} diff --git a/keyboards/ca66/keymaps/default/keymap.c b/keyboards/ca66/keymaps/default/keymap.c deleted file mode 100644 index 5a3c4c8623..0000000000 --- a/keyboards/ca66/keymaps/default/keymap.c +++ /dev/null @@ -1,36 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - 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_BSPC, 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_BSLS, KC_DEL, - 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_GRV, 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, LT(1, KC_SPC), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - 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_DEL, RGB_TOG, - KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, RGB_MOD, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_INS, KC_HOME, - KC_LSFT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_HUI, KC_END, - KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_SAI), -}; - -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_CAPS_LOCK)) { - DDRD |= (1 << 1); PORTD &= ~(1 << 1); - } else { - DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); - } -} diff --git a/keyboards/ca66/keymaps/kelorean/keymap.c b/keyboards/ca66/keymaps/kelorean/keymap.c deleted file mode 100644 index 5d104b8b41..0000000000 --- a/keyboards/ca66/keymaps/kelorean/keymap.c +++ /dev/null @@ -1,56 +0,0 @@ -/* -*KeLorean CA66 keymap. -*Made for HHKB layout with CA66 badge in lower left corner and split spacebars. -*Left Spacebar - tap for backspace, hold for Layer1 -*Right Spacebar - tap for space, hold for Layer2 -*Cap Locks has been replaced with Momentary Toggle to Layer3 -*Layer 4 can be reached only by Layer3 in the '\' key -*Layer 4 tab is the soft reset. -*/ - -#include QMK_KEYBOARD_H - -// Helpful defines -#define _______ KC_TRNS - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - //Base Layer - [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_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_BSLS, KC_DEL, - MO(3), 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_PGDN, KC_UP, - KC_NO, KC_LCTL, KC_LALT, LT(1, KC_BSPC), LT(2, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - //Layer1 Functions and Gaming Arrows over WASD - [1] = LAYOUT( - KC_NO, 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_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_UP, 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_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), - - //Layer2 Same as Layer1, for easy use of layers...you'll see. - [2] = LAYOUT( - KC_NO, 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_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), - - //Layer3, Lighting Function keys, media keys and '\' is now Momentary Toggle to Layer 4, which has the soft reset. - [3] = LAYOUT( - 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, RGB_HUD, RGB_HUI, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_NO, KC_NO, - MO(4), KC_NO, KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, 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), - - //Layer4, soft reset on Tab - [4] = LAYOUT( - 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, - RESET, 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_TRNS, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_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) -}; diff --git a/keyboards/ca66/keymaps/kelorean/layers.json b/keyboards/ca66/keymaps/kelorean/layers.json deleted file mode 100644 index 9d7caa327d..0000000000 --- a/keyboards/ca66/keymaps/kelorean/layers.json +++ /dev/null @@ -1 +0,0 @@ -[["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_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_BSLS", "KC_DEL", "MO(3)", "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_PGDN", "KC_UP", "KC_NO", "KC_LCTL", "KC_LALT", "KC_BSPC", "KC_SPC", "KC_RALT", "KC_RGUI", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["KC_NO", "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_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_UP", "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_TRNS", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_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_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_UP", "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_LEFT", "KC_DOWN", "KC_RGHT", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], ["KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RGB_HUD", "RGB_HUI", "KC_NO", "KC_NO", "KC_NO", "BL_TOGG", "BL_DEC", "BL_INC", "BL_STEP", "KC_NO", "KC_NO", "MO(4)", "KC_NO", "KC_TRNS", "RGB_TOG", "RGB_RMOD", "RGB_MOD", "RGB_VAD", "RGB_VAI", "KC_MSTP", "KC_MPLY", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RGB_SAD", "RGB_SAI", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], ["KC_NO", "KC_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", "RESET", "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_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_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"]] \ No newline at end of file diff --git a/keyboards/ca66/keymaps/olivia/keymap.c b/keyboards/ca66/keymaps/olivia/keymap.c deleted file mode 100644 index f27824e57a..0000000000 --- a/keyboards/ca66/keymaps/olivia/keymap.c +++ /dev/null @@ -1,36 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - 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_BSLS, KC_GRV, 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_DEL, - 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, MO(1), - KC_NO, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), - - LAYOUT( - 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, RESET, - KC_CAPS, RGB_RMOD,RGB_SMOD,RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), -}; - -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_CAPS_LOCK)) { - DDRD |= (1 << 1); PORTD &= ~(1 << 1); - } else { - DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); - } -} diff --git a/keyboards/ca66/readme.md b/keyboards/ca66/readme.md deleted file mode 100644 index f8464fdd19..0000000000 --- a/keyboards/ca66/readme.md +++ /dev/null @@ -1,13 +0,0 @@ -CA66 -== - -Custom 65% - -Keyboard Maintainer: QMK Community -Hardware Supported: CA66 - -Make example for this keyboard (after setting up your build environment): - - make ca66: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/ca66/rules.mk b/keyboards/ca66/rules.mk deleted file mode 100644 index 5779b2c8ad..0000000000 --- a/keyboards/ca66/rules.mk +++ /dev/null @@ -1,56 +0,0 @@ -# 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 ?= no -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/pk60/config.h b/keyboards/pk60/config.h deleted file mode 100644 index 06101349cc..0000000000 --- a/keyboards/pk60/config.h +++ /dev/null @@ -1,58 +0,0 @@ -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Play Keyboard -#define PRODUCT pk60 -#define DESCRIPTION A 60% keyboard PCB - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 15 - -/* key matrix pins */ -#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* number of backlight levels */ -#define BACKLIGHT_PIN B7 -#ifdef BACKLIGHT_PIN -#define BACKLIGHT_LEVELS 5 -#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 - -/* 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 - -#define RGB_DI_PIN E2 -#ifdef RGB_DI_PIN -#define RGBLIGHT_ANIMATIONS -#define RGBLED_NUM 12 -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif - -#endif \ No newline at end of file diff --git a/keyboards/pk60/info.json b/keyboards/pk60/info.json deleted file mode 100644 index 20b7728950..0000000000 --- a/keyboards/pk60/info.json +++ /dev/null @@ -1,32 +0,0 @@ -{ - "keyboard_name": "pk60", - "url": "", - "maintainer": "qmk", - "width": 15, - "height": 5, - "layouts": { - "LAYOUT_ansi": { - "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":"Del", "x":13, "y":0}, {"label":"Bs", "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":"|", "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}, {"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, "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_iso": { - "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"Enter", "x":13.75, "y":1.25, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"@", "x":11.75, "y":2.25}, {"label":"~", "x":12.75, "y":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":1.25}, {"label":"|", "x":1.25, "y":3.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"?", "x":11.25, "y":3.25}, {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25, "w":1.25}, {"label":"Win", "x":11.25, "y":4.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4.25, "w":1.25}] - }, - - "LAYOUT_225u_arrow": { - "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"Shift", "x":11.25, "y":3.25, "w":1.75}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] - }, - - "LAYOUT_2u_arrow": { - "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] - }, - - "LAYOUT_minila": { - "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"label":"Alt", "x":8.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":9.75, "y":4.25, "w":1.25}, {"x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] - }, - - "LAYOUT_all": { - "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"\"", "x":12.75, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25}, {"label":"Shift", "x":0, "y":3.25}, {"x":1, "y":3.25}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"x":8.5, "y":4.25, "w":1.25}, {"label":"Alt", "x":9.75, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] - } - } -} \ No newline at end of file diff --git a/keyboards/pk60/keymaps/default/keymap.c b/keyboards/pk60/keymaps/default/keymap.c deleted file mode 100644 index c96499b0e4..0000000000 --- a/keyboards/pk60/keymaps/default/keymap.c +++ /dev/null @@ -1,59 +0,0 @@ -#include QMK_KEYBOARD_H - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - 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_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_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_NO, KC_RSFT, MO(1), - KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), - - 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_TRNS, KC_DEL, - RESET, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PSCR, KC_CALC, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_SLCK, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - -}; - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -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)) { - DDRF |= (1 << 4); PORTF &= ~(1 << 4); - } else { - DDRF &= ~(1 << 4); PORTF &= ~(1 << 4); - } - - 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 { - - } - -} \ No newline at end of file diff --git a/keyboards/pk60/keymaps/default/readme.md b/keyboards/pk60/keymaps/default/readme.md deleted file mode 100644 index 911cb37c59..0000000000 --- a/keyboards/pk60/keymaps/default/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Default Play Keyboard60 Layout - -This is the default layout that comes flashed on every Play Keyboard60. All key pins are shown in the file. \ No newline at end of file diff --git a/keyboards/pk60/pk60.c b/keyboards/pk60/pk60.c deleted file mode 100644 index a9da0ff229..0000000000 --- a/keyboards/pk60/pk60.c +++ /dev/null @@ -1,35 +0,0 @@ -#include "pk60.h" -#include "led.h" - -void matrix_init_kb (void) { - - matrix_init_user(); - led_init_ports(); - -} - -void matrix_scan_kb(void) { - - matrix_scan_user(); - -}; - -void led_init_ports(void) { - // Set capslock LED pin as pinout - DDRF |= (1 << 4); - PORTF |= (1 << 4); - -} - -void led_set_kb(uint8_t usb_led) { - - if (usb_led & (1<mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* prevent stuck modifiers */ +#define PREVENT_STUCK_MODIFIERS + +#define RGB_DI_PIN B1 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 6 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/playkbtw/ca66/info.json b/keyboards/playkbtw/ca66/info.json new file mode 100644 index 0000000000..906709ef1b --- /dev/null +++ b/keyboards/playkbtw/ca66/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "CA66", + "url": "", + "maintainer": "qmk", + "width": 16.5, + "height": 5.25, + "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.5, "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.5, "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.5, "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":15.5, "y":3}, {"x":14.25, "y":3.25}, {"x":0, "y":4, "w":1.25}, {"x":2.25, "y":4}, {"x":3.25, "y":4, "w":1.25}, {"x":4.5, "y":4, "w":2.25}, {"x":6.75, "y":4, "w":2.75}, {"x":9.5, "y":4, "w":1.25}, {"x":10.75, "y":4}, {"x":11.75, "y":4, "w":1.25}, {"x":13.25, "y":4.25}, {"x":14.25, "y":4.25}, {"x":15.25, "y":4.25}] + } + } +} diff --git a/keyboards/playkbtw/ca66/keymaps/default/keymap.c b/keyboards/playkbtw/ca66/keymaps/default/keymap.c new file mode 100644 index 0000000000..5a3c4c8623 --- /dev/null +++ b/keyboards/playkbtw/ca66/keymaps/default/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_BSPC, 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_BSLS, KC_DEL, + 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_GRV, 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, LT(1, KC_SPC), KC_SPC, KC_RALT, MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + 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_DEL, RGB_TOG, + KC_CAPS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, RGB_MOD, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_INS, KC_HOME, + KC_LSFT, KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_TRNS, RGB_HUI, KC_END, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SAD, RGB_HUD, RGB_SAI), +}; + +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_CAPS_LOCK)) { + DDRD |= (1 << 1); PORTD &= ~(1 << 1); + } else { + DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); + } +} diff --git a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c new file mode 100644 index 0000000000..5d104b8b41 --- /dev/null +++ b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c @@ -0,0 +1,56 @@ +/* +*KeLorean CA66 keymap. +*Made for HHKB layout with CA66 badge in lower left corner and split spacebars. +*Left Spacebar - tap for backspace, hold for Layer1 +*Right Spacebar - tap for space, hold for Layer2 +*Cap Locks has been replaced with Momentary Toggle to Layer3 +*Layer 4 can be reached only by Layer3 in the '\' key +*Layer 4 tab is the soft reset. +*/ + +#include QMK_KEYBOARD_H + +// Helpful defines +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + //Base Layer + [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_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_BSLS, KC_DEL, + MO(3), 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_PGDN, KC_UP, + KC_NO, KC_LCTL, KC_LALT, LT(1, KC_BSPC), LT(2, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + //Layer1 Functions and Gaming Arrows over WASD + [1] = LAYOUT( + KC_NO, 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_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_UP, 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_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), + + //Layer2 Same as Layer1, for easy use of layers...you'll see. + [2] = LAYOUT( + KC_NO, 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_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), + + //Layer3, Lighting Function keys, media keys and '\' is now Momentary Toggle to Layer 4, which has the soft reset. + [3] = LAYOUT( + 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, RGB_HUD, RGB_HUI, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_NO, KC_NO, + MO(4), KC_NO, KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, 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), + + //Layer4, soft reset on Tab + [4] = LAYOUT( + 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, + RESET, 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_TRNS, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_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) +}; diff --git a/keyboards/playkbtw/ca66/keymaps/kelorean/layers.json b/keyboards/playkbtw/ca66/keymaps/kelorean/layers.json new file mode 100644 index 0000000000..9d7caa327d --- /dev/null +++ b/keyboards/playkbtw/ca66/keymaps/kelorean/layers.json @@ -0,0 +1 @@ +[["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_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_BSLS", "KC_DEL", "MO(3)", "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_PGDN", "KC_UP", "KC_NO", "KC_LCTL", "KC_LALT", "KC_BSPC", "KC_SPC", "KC_RALT", "KC_RGUI", "KC_RCTL", "KC_LEFT", "KC_DOWN", "KC_RGHT"], ["KC_NO", "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_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_UP", "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_TRNS", "KC_LEFT", "KC_DOWN", "KC_RGHT", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_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_F1", "KC_F2", "KC_F3", "KC_F4", "KC_F5", "KC_F6", "KC_F7", "KC_F8", "KC_F9", "KC_F10", "KC_F11", "KC_F12", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_UP", "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_LEFT", "KC_DOWN", "KC_RGHT", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], ["KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RGB_HUD", "RGB_HUI", "KC_NO", "KC_NO", "KC_NO", "BL_TOGG", "BL_DEC", "BL_INC", "BL_STEP", "KC_NO", "KC_NO", "MO(4)", "KC_NO", "KC_TRNS", "RGB_TOG", "RGB_RMOD", "RGB_MOD", "RGB_VAD", "RGB_VAI", "KC_MSTP", "KC_MPLY", "KC_MPRV", "KC_MNXT", "KC_VOLD", "KC_VOLU", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "RGB_SAD", "RGB_SAI", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO"], ["KC_NO", "KC_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", "RESET", "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_TRNS", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_NO", "KC_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"]] \ No newline at end of file diff --git a/keyboards/playkbtw/ca66/keymaps/olivia/keymap.c b/keyboards/playkbtw/ca66/keymaps/olivia/keymap.c new file mode 100644 index 0000000000..f27824e57a --- /dev/null +++ b/keyboards/playkbtw/ca66/keymaps/olivia/keymap.c @@ -0,0 +1,36 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_BSLS, KC_GRV, 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_DEL, + 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, MO(1), + KC_NO, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, KC_RGUI, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + LAYOUT( + 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, RESET, + KC_CAPS, RGB_RMOD,RGB_SMOD,RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, RGB_TOG, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_EJCT, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), +}; + +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_CAPS_LOCK)) { + DDRD |= (1 << 1); PORTD &= ~(1 << 1); + } else { + DDRD &= ~(1 << 1); PORTD &= ~(1 << 1); + } +} diff --git a/keyboards/playkbtw/ca66/readme.md b/keyboards/playkbtw/ca66/readme.md new file mode 100644 index 0000000000..74f0606043 --- /dev/null +++ b/keyboards/playkbtw/ca66/readme.md @@ -0,0 +1,15 @@ +CA66 +== + +Custom 65% + +Keyboard Maintainer: QMK Community +Hardware Supported: CA66 +Hardware Availability: [Play Keyboard](http://playkeyboard.qdm.com.tw/) + + +Make example for this keyboard (after setting up your build environment): + + make playkbtw/ca66: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/playkbtw/ca66/rules.mk b/keyboards/playkbtw/ca66/rules.mk new file mode 100644 index 0000000000..5779b2c8ad --- /dev/null +++ b/keyboards/playkbtw/ca66/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 ?= no +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/playkbtw/pk60/config.h b/keyboards/playkbtw/pk60/config.h new file mode 100644 index 0000000000..06101349cc --- /dev/null +++ b/keyboards/playkbtw/pk60/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Play Keyboard +#define PRODUCT pk60 +#define DESCRIPTION A 60% keyboard PCB + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +#define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, F7, B5, B4, D7, D6, B3, B2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* number of backlight levels */ +#define BACKLIGHT_PIN B7 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#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 + +/* 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 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 12 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/playkbtw/pk60/info.json b/keyboards/playkbtw/pk60/info.json new file mode 100644 index 0000000000..20b7728950 --- /dev/null +++ b/keyboards/playkbtw/pk60/info.json @@ -0,0 +1,32 @@ +{ + "keyboard_name": "pk60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT_ansi": { + "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":"Del", "x":13, "y":0}, {"label":"Bs", "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":"|", "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}, {"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, "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_iso": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"Enter", "x":13.75, "y":1.25, "w":1.25, "h":2}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"@", "x":11.75, "y":2.25}, {"label":"~", "x":12.75, "y":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":1.25}, {"label":"|", "x":1.25, "y":3.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"?", "x":11.25, "y":3.25}, {"label":"Shift", "x":12.25, "y":3.25, "w":1.75}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25, "w":1.25}, {"label":"Win", "x":11.25, "y":4.25, "w":1.25}, {"label":"Menu", "x":12.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":13.75, "y":4.25, "w":1.25}] + }, + + "LAYOUT_225u_arrow": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2.25}, {"label":"Z", "x":2.25, "y":3.25}, {"label":"X", "x":3.25, "y":3.25}, {"label":"C", "x":4.25, "y":3.25}, {"label":"V", "x":5.25, "y":3.25}, {"label":"B", "x":6.25, "y":3.25}, {"label":"N", "x":7.25, "y":3.25}, {"label":"M", "x":8.25, "y":3.25}, {"label":"<", "x":9.25, "y":3.25}, {"label":">", "x":10.25, "y":3.25}, {"label":"Shift", "x":11.25, "y":3.25, "w":1.75}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + }, + + "LAYOUT_2u_arrow": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.25}, {"label":"Win", "x":1.25, "y":4.25, "w":1.25}, {"label":"Alt", "x":2.5, "y":4.25, "w":1.25}, {"x":3.75, "y":4.25, "w":6.25}, {"label":"Alt", "x":10, "y":4.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + }, + + "LAYOUT_minila": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"Enter", "x":12.75, "y":2.25, "w":2.25}, {"label":"Shift", "x":0, "y":3.25, "w":2}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"label":"Alt", "x":8.5, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":9.75, "y":4.25, "w":1.25}, {"x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + }, + + "LAYOUT_all": { + "layout": [{"label":"~", "x":0, "y":0.25}, {"label":"!", "x":1, "y":0.25}, {"label":"@", "x":2, "y":0.25}, {"label":"#", "x":3, "y":0.25}, {"label":"$", "x":4, "y":0.25}, {"label":"%", "x":5, "y":0.25}, {"label":"^", "x":6, "y":0.25}, {"label":"&", "x":7, "y":0.25}, {"label":"*", "x":8, "y":0.25}, {"label":"(", "x":9, "y":0.25}, {"label":")", "x":10, "y":0.25}, {"label":"_", "x":11, "y":0.25}, {"label":"+", "x":12, "y":0.25}, {"label":"Del", "x":13, "y":0.25}, {"label":"Bs", "x":14, "y":0.25}, {"label":"Tab", "x":0, "y":1.25, "w":1.5}, {"label":"Q", "x":1.5, "y":1.25}, {"label":"W", "x":2.5, "y":1.25}, {"label":"E", "x":3.5, "y":1.25}, {"label":"R", "x":4.5, "y":1.25}, {"label":"T", "x":5.5, "y":1.25}, {"label":"Y", "x":6.5, "y":1.25}, {"label":"U", "x":7.5, "y":1.25}, {"label":"I", "x":8.5, "y":1.25}, {"label":"O", "x":9.5, "y":1.25}, {"label":"P", "x":10.5, "y":1.25}, {"label":"{", "x":11.5, "y":1.25}, {"label":"}", "x":12.5, "y":1.25}, {"label":"|", "x":13.5, "y":1.25, "w":1.5}, {"label":"Caps Lock", "x":0, "y":2.25, "w":1.75}, {"label":"A", "x":1.75, "y":2.25}, {"label":"S", "x":2.75, "y":2.25}, {"label":"D", "x":3.75, "y":2.25}, {"label":"F", "x":4.75, "y":2.25}, {"label":"G", "x":5.75, "y":2.25}, {"label":"H", "x":6.75, "y":2.25}, {"label":"J", "x":7.75, "y":2.25}, {"label":"K", "x":8.75, "y":2.25}, {"label":"L", "x":9.75, "y":2.25}, {"label":":", "x":10.75, "y":2.25}, {"label":"\"", "x":11.75, "y":2.25}, {"label":"\"", "x":12.75, "y":2.25}, {"label":"Enter", "x":13.75, "y":2.25, "w":1.25}, {"label":"Shift", "x":0, "y":3.25}, {"x":1, "y":3.25}, {"label":"Z", "x":2, "y":3.25}, {"label":"X", "x":3, "y":3.25}, {"label":"C", "x":4, "y":3.25}, {"label":"V", "x":5, "y":3.25}, {"label":"B", "x":6, "y":3.25}, {"label":"N", "x":7, "y":3.25}, {"label":"M", "x":8, "y":3.25}, {"label":"<", "x":9, "y":3.25}, {"label":">", "x":10, "y":3.25}, {"label":"?", "x":11, "y":3.25}, {"label":"Shift", "x":12, "y":3.25}, {"label":"Up", "x":13, "y":3.25}, {"x":14, "y":3.25}, {"label":"Ctrl", "x":0, "y":4.25, "w":1.75}, {"label":"Win", "x":1.75, "y":4.25, "w":1.25}, {"label":"Alt", "x":3, "y":4.25, "w":1.25}, {"x":4.25, "y":4.25, "w":1.25}, {"x":5.5, "y":4.25, "w":3}, {"x":8.5, "y":4.25, "w":1.25}, {"label":"Alt", "x":9.75, "y":4.25, "w":1.25}, {"label":"Ctrl", "x":11, "y":4.25}, {"label":"Left", "x":12, "y":4.25}, {"label":"Down", "x":13, "y":4.25}, {"label":"Right", "x":14, "y":4.25}] + } + } +} \ No newline at end of file diff --git a/keyboards/playkbtw/pk60/keymaps/default/keymap.c b/keyboards/playkbtw/pk60/keymaps/default/keymap.c new file mode 100644 index 0000000000..c96499b0e4 --- /dev/null +++ b/keyboards/playkbtw/pk60/keymaps/default/keymap.c @@ -0,0 +1,59 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_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_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_NO, KC_RSFT, MO(1), + KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, MO(1), KC_RALT, MO(1), KC_NO, KC_APP, KC_RCTL), + + 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_TRNS, KC_DEL, + RESET, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_PSCR, KC_CALC, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_SLCK, 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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + +}; + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +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)) { + DDRF |= (1 << 4); PORTF &= ~(1 << 4); + } else { + DDRF &= ~(1 << 4); PORTF &= ~(1 << 4); + } + + 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 { + + } + +} \ No newline at end of file diff --git a/keyboards/playkbtw/pk60/keymaps/default/readme.md b/keyboards/playkbtw/pk60/keymaps/default/readme.md new file mode 100644 index 0000000000..911cb37c59 --- /dev/null +++ b/keyboards/playkbtw/pk60/keymaps/default/readme.md @@ -0,0 +1,3 @@ +# Default Play Keyboard60 Layout + +This is the default layout that comes flashed on every Play Keyboard60. All key pins are shown in the file. \ No newline at end of file diff --git a/keyboards/playkbtw/pk60/pk60.c b/keyboards/playkbtw/pk60/pk60.c new file mode 100644 index 0000000000..a9da0ff229 --- /dev/null +++ b/keyboards/playkbtw/pk60/pk60.c @@ -0,0 +1,35 @@ +#include "pk60.h" +#include "led.h" + +void matrix_init_kb (void) { + + matrix_init_user(); + led_init_ports(); + +} + +void matrix_scan_kb(void) { + + matrix_scan_user(); + +}; + +void led_init_ports(void) { + // Set capslock LED pin as pinout + DDRF |= (1 << 4); + PORTF |= (1 << 4); + +} + +void led_set_kb(uint8_t usb_led) { + + if (usb_led & (1< Date: Sat, 2 Jun 2018 00:37:49 +0530 Subject: YMD96 complete QMK port (#3105) * readded code for YMD96 full working * added jj50 layout back --- keyboards/ymd96/README.md | 2 + keyboards/ymd96/backlight.c | 213 ++++++++++++++++++++++++++++++ keyboards/ymd96/backlight_custom.h | 15 +++ keyboards/ymd96/breathing_custom.h | 140 ++++++++++++++++++++ keyboards/ymd96/config.h | 26 +++- keyboards/ymd96/keymaps/default/keymap.c | 2 + keyboards/ymd96/keymaps/hgoel89/config.h | 9 ++ keyboards/ymd96/keymaps/hgoel89/keymap.c | 67 ++++++++++ keyboards/ymd96/keymaps/hgoel89/readme.md | 2 + keyboards/ymd96/keymaps/hgoel89/rules.mk | 1 + keyboards/ymd96/matrix.c | 28 +++- keyboards/ymd96/rules.mk | 24 ++-- keyboards/ymd96/tools/README.md | 16 +++ keyboards/ymd96/tools/usb_detach.c | 33 +++++ keyboards/ymd96/usbconfig.h | 3 +- keyboards/ymd96/ymd96.c | 72 ++++++++-- keyboards/ymd96/ymd96.h | 34 +++-- 17 files changed, 647 insertions(+), 40 deletions(-) create mode 100644 keyboards/ymd96/backlight.c create mode 100644 keyboards/ymd96/backlight_custom.h create mode 100644 keyboards/ymd96/breathing_custom.h create mode 100644 keyboards/ymd96/keymaps/hgoel89/config.h create mode 100644 keyboards/ymd96/keymaps/hgoel89/keymap.c create mode 100644 keyboards/ymd96/keymaps/hgoel89/readme.md create mode 100644 keyboards/ymd96/keymaps/hgoel89/rules.mk create mode 100644 keyboards/ymd96/tools/README.md create mode 100644 keyboards/ymd96/tools/usb_detach.c (limited to 'keyboards') diff --git a/keyboards/ymd96/README.md b/keyboards/ymd96/README.md index 5de5062ecd..7a950223b6 100644 --- a/keyboards/ymd96/README.md +++ b/keyboards/ymd96/README.md @@ -17,6 +17,8 @@ Keyboard maintainer: [Andrew](https://github.com/sparkyman215) Hardware Supported: YMD96 with the ATmega32a chip. Hardware Availability: The GB was run June 2017, [in this thread](https://www.reddit.com/r/mechmarket/comments/6hu3yx/vendor_ymd96_gb_is_now_live_68_an_universal_and/). The vendor has stated that they plan on selling more rounds. +A very big thanks to @krusli for making the RGB underglow, Backlight, CapsLock and NumLock LEDs working correctly. + ## Finding your specific matrix This firmware was modified from [ps2avrGB](https://github.com/qmk/qmk_firmware/tree/master/keyboards/ps2avrGB), also found on this qmk repo, to work with the YMD96 keyboard. However, I only have one board to test with, which might have a different layout than yours. To get qmk working with your specific layout, you'll need to follow these steps: diff --git a/keyboards/ymd96/backlight.c b/keyboards/ymd96/backlight.c new file mode 100644 index 0000000000..36c5563875 --- /dev/null +++ b/keyboards/ymd96/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 +#include + +#include "backlight_custom.h" +#include "breathing_custom.h" + +// DEBUG +#include +#include + +// Port D: digital pins of the AVR chipset +#define NUMLOCK_PORT (1 << 0) // 0th pin of Port D (digital) +#define CAPSLOCK_PORT (1 << 1) // 1st pin +#define BACKLIGHT_PORT (1 << 4) // 4th pin +//#define SCROLLLOCK_PORT (1 << 6) // 6th pin + +#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. +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; + } + + /* YMD96 does not have scroll lock led + 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/ymd96/backlight_custom.h b/keyboards/ymd96/backlight_custom.h new file mode 100644 index 0000000000..7210be840e --- /dev/null +++ b/keyboards/ymd96/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 +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/ymd96/breathing_custom.h b/keyboards/ymd96/breathing_custom.h new file mode 100644 index 0000000000..71416b1b45 --- /dev/null +++ b/keyboards/ymd96/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/ymd96/config.h b/keyboards/ymd96/config.h index 8a0668ac98..3122c694eb 100644 --- a/keyboards/ymd96/config.h +++ b/keyboards/ymd96/config.h @@ -1,7 +1,7 @@ /* Base Copyright 2017 Luiz Ribeiro Modified 2017 Andrew Novak - +Modified 2018 Harshit Goel 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 @@ -16,6 +16,8 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ +#include "config_common.h" + #ifndef CONFIG_H #define CONFIG_H @@ -29,15 +31,29 @@ along with this program. If not, see . /* matrix size */ #define MATRIX_ROWS 8 #define MATRIX_COLS 15 -#define DIODE_DIRECTION ROW2COL +//#define DIODE_DIRECTION ROW2COL + +//#define RGB_DI_PIN C4 +/* 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 -#define RGB_DI_PIN C4 +/* 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 18 +#define RGB_DI_PIN E2 // NOTE: for PS2AVRGB boards, underglow commands are sent via I2C to 0xB0. #define RGBLIGHT_ANIMATIONS -#define RGBLIGHT_VAL_STEP 20 +/*#define RGBLIGHT_VAL_STEP 20 #define NO_UART 1 -#define BOOTLOADHID_BOOTLOADER 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/ymd96/keymaps/default/keymap.c b/keyboards/ymd96/keymaps/default/keymap.c index 1ca3d22a34..9d0a8261dc 100644 --- a/keyboards/ymd96/keymaps/default/keymap.c +++ b/keyboards/ymd96/keymaps/default/keymap.c @@ -24,6 +24,8 @@ along with this program. If not, see . #define _DEFLT 0 #define _RAISE 1 +#define KEYMAP KEYMAP_DEFAULT + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Layer 0, default layer diff --git a/keyboards/ymd96/keymaps/hgoel89/config.h b/keyboards/ymd96/keymaps/hgoel89/config.h new file mode 100644 index 0000000000..52aaa8f24d --- /dev/null +++ b/keyboards/ymd96/keymaps/hgoel89/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_TERM 300 + +#endif diff --git a/keyboards/ymd96/keymaps/hgoel89/keymap.c b/keyboards/ymd96/keymaps/hgoel89/keymap.c new file mode 100644 index 0000000000..81addf69f4 --- /dev/null +++ b/keyboards/ymd96/keymaps/hgoel89/keymap.c @@ -0,0 +1,67 @@ +#include "ymd96.h" +#include "action_layer.h" + +/* +#define _QWERTY 0 +#define _LOWER 1 +#define _RAISE 2*/ +/* +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, +};*/ + +void matrix_scan_user(void) { + // runs at every matrix scan. +} + +enum { + TD_H_E = 0 +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_H_E] = ACTION_TAP_DANCE_DOUBLE(KC_HOME, KC_END) +}; +#define ______ KC_TRNS +#define _DEFLT 0 +#define _RAISE 1 + +#define KEYMAP KEYMAP_CUSTOM + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer + * | Esc | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |Print | Home | End |Insert|Delete| PgUp | 19 keys + * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BkSpc |NumLck| / | * | PgDn | 18 keys + * | Tab | Q | W | E | R | T | Y | U | I | O | P | { | } | \ | 7 | 8 | 9 | - | 18 keys + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Return | 4 | 5 | 6 | + | 17 keys + * | LShft | Z | X | C | V | B | N | M | , | . | / | RShft | 1 | 2 | 3 | En | 16 keys + * | Ctrl | Win | Alt | Space | Fn | Win | Left | Down | Up | Right| 0 | . | | 12 keys + */ + + [_DEFLT] = KEYMAP( + 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_HOME, KC_END, KC_INSERT, KC_DELETE, KC_PGUP, \ + 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_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, 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, 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_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + 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_P1, KC_P2, KC_P3, KC_PENT, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RGUI , KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, MO(_RAISE), KC_P0, KC_PDOT \ + ), + /* Layer 1, raise layer + * | | | | | | | | | | | | | | | | | | | | + * | | | | | | | | | | | | | | | | | | | + * | | |rgb_up|rgb_dn|rgb_mo| | | | | | F22 | F23 | F24 | | | | | | + * | | | | | | | | | | | | | | | | | | + * | | | | | | | | | VolDn| VolUp| Mute | Play/Pause | | | | | + * | | | | | | |MPrev | | | MNext| | | | + */ + [_RAISE] = KEYMAP( + RESET,RGB_TOG, BL_TOGG, BL_STEP, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, BL_INC, BL_DEC, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_F22, KC_F23, KC_F24, ______, ______, ______, ______, ______, \ + ______, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MODE_FORWARD , ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, RGB_HUD, RGB_SAD, RGB_VAD, ______, ______, ______, ______, KC_VOLD,KC_VOLU, KC_MUTE, KC_MPLY, ______, ______, ______, ______, \ + ______, ______, BL_OFF, BL_ON, ______, ______, ______, ______, ______, ______, ______, ______ \ + ) +}; diff --git a/keyboards/ymd96/keymaps/hgoel89/readme.md b/keyboards/ymd96/keymaps/hgoel89/readme.md new file mode 100644 index 0000000000..05488df990 --- /dev/null +++ b/keyboards/ymd96/keymaps/hgoel89/readme.md @@ -0,0 +1,2 @@ +# Harshit +Modified the layout according to me. Full 2u NumPad 0, 5 * 1u modifiers on right of space. Split right shift. \ No newline at end of file diff --git a/keyboards/ymd96/keymaps/hgoel89/rules.mk b/keyboards/ymd96/keymaps/hgoel89/rules.mk new file mode 100644 index 0000000000..e5ddcae8d9 --- /dev/null +++ b/keyboards/ymd96/keymaps/hgoel89/rules.mk @@ -0,0 +1 @@ +TAP_DANCE_ENABLE = yes diff --git a/keyboards/ymd96/matrix.c b/keyboards/ymd96/matrix.c index 140026013f..f2ecf4d33c 100644 --- a/keyboards/ymd96/matrix.c +++ b/keyboards/ymd96/matrix.c @@ -29,6 +29,9 @@ static uint8_t debouncing = DEBOUNCE; static matrix_row_t matrix[MATRIX_ROWS]; static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +void matrix_set_row_status(uint8_t row); +uint8_t bit_reverse(uint8_t x); + void matrix_init(void) { // all outputs for rows high DDRB = 0xFF; @@ -47,18 +50,20 @@ void matrix_init(void) { matrix[row] = 0x00; matrix_debouncing[row] = 0x00; } -} +/*} + matrix_init_quantum(); // missing from original port by Luiz void matrix_set_row_status(uint8_t row) { DDRB = (1 << row); PORTB = ~(1 << row); -} +}*/ -uint8_t bit_reverse(uint8_t x) { + +/*uint8_t bit_reverse(uint8_t x) { x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); - return x; + return x;*/ } uint8_t matrix_scan(void) { @@ -93,11 +98,24 @@ uint8_t matrix_scan(void) { } } - matrix_scan_user(); + matrix_scan_quantum(); // also missing in original PS2AVRGB implementation return 1; } +// declarations +void matrix_set_row_status(uint8_t row) { + DDRB = (1 << row); + PORTB = ~(1 << row); +} + +uint8_t bit_reverse(uint8_t x) { + x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + inline matrix_row_t matrix_get_row(uint8_t row) { return matrix[row]; } diff --git a/keyboards/ymd96/rules.mk b/keyboards/ymd96/rules.mk index c7c12dcf17..42b3d11551 100644 --- a/keyboards/ymd96/rules.mk +++ b/keyboards/ymd96/rules.mk @@ -26,25 +26,33 @@ 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 +# different sizes, comment this out, and the correct address will be loaded # automatically (+60). See bootloader.mk for all options. -BOOTLOADER = atmel-dfu +BOOTLOADER = bootloadHID # build options -BOOTMAGIC_ENABLE = yes -MOUSEKEY_ENABLE = yes +BOOTMAGIC_ENABLE = no +MOUSEKEY_ENABLE = no EXTRAKEY_ENABLE = yes -CONSOLE_ENABLE = yes +CONSOLE_ENABLE = no COMMAND_ENABLE = yes -BACKLIGHT_ENABLE = no + +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 # custom matrix setup CUSTOM_MATRIX = yes -SRC = matrix.c i2c.c +SRC = matrix.c i2c.c backlight.c # programming options -PROGRAM_CMD = ./keyboards/ps2avrGB/program $(TARGET).hex +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/ymd96/tools/README.md b/keyboards/ymd96/tools/README.md new file mode 100644 index 0000000000..081984ed44 --- /dev/null +++ b/keyboards/ymd96/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//`. +3. Build and program the firmware as normal. diff --git a/keyboards/ymd96/tools/usb_detach.c b/keyboards/ymd96/tools/usb_detach.c new file mode 100644 index 0000000000..c21e47a7a4 --- /dev/null +++ b/keyboards/ymd96/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 +#include +#include +#include +#include +#include + +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/ymd96/usbconfig.h b/keyboards/ymd96/usbconfig.h index d2d848fcdc..50fe4ed113 100644 --- a/keyboards/ymd96/usbconfig.h +++ b/keyboards/ymd96/usbconfig.h @@ -118,7 +118,8 @@ section at the end of this file). /* Define this to 1 if the device has its own power supply. Set it to 0 if the * device is powered from the USB bus. */ -#define USB_CFG_MAX_BUS_POWER 500 +// 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.] diff --git a/keyboards/ymd96/ymd96.c b/keyboards/ymd96/ymd96.c index fa786dc3cd..b0bf6128fa 100644 --- a/keyboards/ymd96/ymd96.c +++ b/keyboards/ymd96/ymd96.c @@ -1,5 +1,6 @@ /* Copyright 2017 Luiz Ribeiro +Modified 2018 Kenneth A. 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,30 +17,81 @@ along with this program. If not, see . */ #include "ymd96.h" -#include "rgblight.h" #include #include "action_layer.h" -#include "i2c.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; - } + if (!rgblight_config.enable) { + for (uint8_t i=0; i Modified 2017 Andrew Novak - +Modified 2018 harshit goel 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 @@ -19,11 +19,14 @@ along with this program. If not, see . #ifndef KEYMAP_COMMON_H #define KEYMAP_COMMON_H +#include "quantum.h" #include "quantum_keycodes.h" #include "keycode.h" #include "action.h" -#define KEYMAP( \ +void matrix_init_user(void); // TODO port this to other PS2AVRGB boards + +#define KEYMAP_DEFAULT( \ K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \ K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \ K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \ @@ -41,6 +44,24 @@ along with this program. If not, see . { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ } +#define KEYMAP_CUSTOM( \ + K500, K502, K503, K504, K505, K600, K610, K710, K700, K511, K512, K513, K514, K113, K214, K013, K706, K709, K708, \ + K400, K401, K402, K403, K404, K405, K601, K611, K711, K701, K410, K411, K412, K414, K406, K407, K408, K409, \ + K300, K301, K302, K303, K304, K305, K602, K612, K712, K702, K310, K311, K312, K313, K306, K307, K308, K309, \ + K200, K201, K202, K203, K204, K205, K603, K613, K713, K703, K210, K211, K213, K206, K207, K208, K209, \ + K100, K101, K102, K103, K104, K105, K604, K614, K714, K704, K110, K111, K106, K107, K108, K009, \ + K000, K001, K002, K605, K705, K010, K011, K606, K607, KC_NO, K006, K008 \ +) { \ + { K000, K001, K002, KC_NO, KC_NO, KC_NO, K006, KC_NO, K008, K009, K010, K011, KC_NO, K013, KC_NO, }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108, KC_NO, K110, K111, KC_NO, K113, KC_NO, }, \ + { K200, K201, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, KC_NO, K213, K214, }, \ + { K300, K301, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, KC_NO, }, \ + { K400, K401, K402, K403, K404, K405, K406, K407, K408, K409, K410, K411, K412, KC_NO, K414, }, \ + { K500, KC_NO, K502, K503, K504, K505, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, K511, K512, K513, K514, }, \ + { K600, K601, K602, K603, K604, K605, K606, K607, KC_NO, KC_NO, K610, K611, K612, K613, K614, }, \ + { K700, K701, K702, K703, K704, K705, K706, KC_NO, K708, K709, K710, K711, K712, K713, K714 } \ +} + #define LAYOUT_jj50( \ K011, K010, K009, K008, K004, K005, K006, K007, K003, K002, K201, K000, \ K111, K110, K109, K108, K104, K105, K106, K107, K103, K102, K001, K100, \ @@ -57,12 +78,3 @@ K411, K410, K409, K408, K404, K405, K406, K407, K403, K402, K401, K400 \ #endif - - - - - - - - - -- cgit v1.2.3 From b5da3b53b3bcf86df193e61d8b2796b5488f41a9 Mon Sep 17 00:00:00 2001 From: MechMerlin <30334081+mechmerlin@users.noreply.github.com> Date: Fri, 1 Jun 2018 12:08:12 -0700 Subject: enable RGB underglow in rules (#3101) --- keyboards/kbd8x/rules.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards') diff --git a/keyboards/kbd8x/rules.mk b/keyboards/kbd8x/rules.mk index 3bb473ba8f..46e9732ea7 100644 --- a/keyboards/kbd8x/rules.mk +++ b/keyboards/kbd8x/rules.mk @@ -62,6 +62,7 @@ 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 -- cgit v1.2.3 From 3364334bfd6d1ea1c8ea6010163341c7618f9d53 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 1 Jun 2018 12:08:41 -0700 Subject: Refactor and Configurator update for Chocopad (#3099) * Refactor for Chocopad * Configurator update --- keyboards/chocopad/chocopad.h | 6 +-- keyboards/chocopad/info.json | 12 ++++++ keyboards/chocopad/keymaps/default/keymap.c | 63 ++++++++--------------------- 3 files changed, 31 insertions(+), 50 deletions(-) create mode 100644 keyboards/chocopad/info.json (limited to 'keyboards') diff --git a/keyboards/chocopad/chocopad.h b/keyboards/chocopad/chocopad.h index 329e2d56f6..a0c0baaf65 100644 --- a/keyboards/chocopad/chocopad.h +++ b/keyboards/chocopad/chocopad.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT( \ A1, A2, A3, A4, \ B1, B2, B3, B4, \ C1, C2, C3, C4, \ @@ -16,13 +16,13 @@ } // Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ A1, A2, A3, A4, \ B1, B2, B3, B4, \ C1, C2, C3, C4, \ D1, D2, D3, D4 \ ) \ - KEYMAP( \ + LAYOUT( \ KC_##A1, KC_##A2, KC_##A3, KC_##A4, \ KC_##B1, KC_##B2, KC_##B3, KC_##B4, \ KC_##C1, KC_##C2, KC_##C3, KC_##C4, \ diff --git a/keyboards/chocopad/info.json b/keyboards/chocopad/info.json new file mode 100644 index 0000000000..3459c0829d --- /dev/null +++ b/keyboards/chocopad/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Chocopad", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 4, + "layouts": { + "LAYOUT": { + "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}] + } + } +} diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/chocopad/keymaps/default/keymap.c index c4536a1b41..e60bc5d379 100644 --- a/keyboards/chocopad/keymaps/default/keymap.c +++ b/keyboards/chocopad/keymaps/default/keymap.c @@ -1,61 +1,30 @@ -#include "chocopad.h" +#include QMK_KEYBOARD_H #define _BASE 0 #define _FN1 1 #define _FN2 2 -#define KC_ KC_TRNS #define _______ KC_TRNS -#define KC_X1 MO(_FN1) -#define KC_X2 MO(_FN2) -#define KC_RST RESET -#define KC_BSTP BL_STEP -#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] = KC_KEYMAP( - //,----+----+----+----. - PGUP,HOME, UP ,END , - //|----+----+----+----| - PGDN,LEFT,DOWN,RGHT, - //|----+----+----+----| - X2 ,VOLU,MPLY,MPRV, - //|----+----+----+----| - X1 ,VOLD,MUTE,MNXT - //`----+----+----+----' + [_BASE] = LAYOUT( + KC_PGUP, KC_HOME, KC_UP, KC_END , \ + KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \ + MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \ + MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \ ), - - [_FN1] = KC_KEYMAP( - //,----+----+----+----. - ESC , P7 , P8 , P9 , - //|----+----+----+----| - TAB , P4 , P5 , P6 , - //|----+----+----+----| - ENT , P1 , P2 , P3 , - //|----+----+----+----| - , P0 , P0 ,DOT - //`----+----+----+----' + [_FN1] = LAYOUT( + KC_ESC, KC_P7, KC_P8, KC_P9, \ + KC_TAB, KC_P4, KC_P5, KC_P6, \ + KC_ENT, KC_P1, KC_P2, KC_P3, \ + _______, KC_P0, KC_P0, KC_DOT \ ), - - [_FN2] = KC_KEYMAP( - //,----+----+----+----. - RTOG,RHUI,RSAI,RVAI, - //|----+----+----+----| - RMOD,RHUD,RSAD,RVAD, - //|----+----+----+----| - , , ,RST , - //|----+----+----+----| - BSTP, , , - //`----+----+----+----' + [_FN2] = LAYOUT( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ + _______, _______, _______, RESET, \ + BL_STEP, _______, _______, _______ \ ) }; -- cgit v1.2.3 From 2196dc9f868334beabd8c3585127a74bf42ce6b7 Mon Sep 17 00:00:00 2001 From: Pekaso Date: Sun, 3 Jun 2018 00:48:34 +0900 Subject: Add support for staggerd column layout KB "Fortitude60" (#3090) * modifying fortitude for working * add accurate keymap * backlight fix * Fix slave LED Backlight * Add readme.md * modified readme.md * Fixed make error * Commit including suggestions * Add dvorak and colemak layout and some fix --- keyboards/fortitude60/config.h | 23 ++ keyboards/fortitude60/fortitude60.c | 1 + keyboards/fortitude60/fortitude60.h | 26 ++ keyboards/fortitude60/keymaps/default/config.h | 39 +++ keyboards/fortitude60/keymaps/default/keymap.c | 189 +++++++++++ keyboards/fortitude60/keymaps/default/rules.mk | 1 + keyboards/fortitude60/matrix.c | 423 +++++++++++++++++++++++++ keyboards/fortitude60/readme.md | 15 + keyboards/fortitude60/rev1/config.h | 91 ++++++ keyboards/fortitude60/rev1/rev1.c | 22 ++ keyboards/fortitude60/rev1/rev1.h | 44 +++ keyboards/fortitude60/rev1/rules.mk | 1 + keyboards/fortitude60/rules.mk | 72 +++++ keyboards/fortitude60/serial.c | 235 ++++++++++++++ keyboards/fortitude60/serial.h | 32 ++ keyboards/fortitude60/split_util.c | 85 +++++ keyboards/fortitude60/split_util.h | 18 ++ 17 files changed, 1317 insertions(+) create mode 100644 keyboards/fortitude60/config.h create mode 100644 keyboards/fortitude60/fortitude60.c create mode 100644 keyboards/fortitude60/fortitude60.h create mode 100644 keyboards/fortitude60/keymaps/default/config.h create mode 100644 keyboards/fortitude60/keymaps/default/keymap.c create mode 100644 keyboards/fortitude60/keymaps/default/rules.mk create mode 100644 keyboards/fortitude60/matrix.c create mode 100644 keyboards/fortitude60/readme.md create mode 100644 keyboards/fortitude60/rev1/config.h create mode 100644 keyboards/fortitude60/rev1/rev1.c create mode 100644 keyboards/fortitude60/rev1/rev1.h create mode 100644 keyboards/fortitude60/rev1/rules.mk create mode 100644 keyboards/fortitude60/rules.mk create mode 100644 keyboards/fortitude60/serial.c create mode 100644 keyboards/fortitude60/serial.h create mode 100644 keyboards/fortitude60/split_util.c create mode 100644 keyboards/fortitude60/split_util.h (limited to 'keyboards') diff --git a/keyboards/fortitude60/config.h b/keyboards/fortitude60/config.h new file mode 100644 index 0000000000..863722d7d0 --- /dev/null +++ b/keyboards/fortitude60/config.h @@ -0,0 +1,23 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#endif // CONFIG_H diff --git a/keyboards/fortitude60/fortitude60.c b/keyboards/fortitude60/fortitude60.c new file mode 100644 index 0000000000..d35b286d11 --- /dev/null +++ b/keyboards/fortitude60/fortitude60.c @@ -0,0 +1 @@ +#include "fortitude60.h" diff --git a/keyboards/fortitude60/fortitude60.h b/keyboards/fortitude60/fortitude60.h new file mode 100644 index 0000000000..db2ce07a68 --- /dev/null +++ b/keyboards/fortitude60/fortitude60.h @@ -0,0 +1,26 @@ +#ifndef FORTITUDE60_H +#define FORTITUDE60_H + +#ifdef KEYBOARD_fortitude60_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, LT5, RT5, R30, R31, R32, R33, R34, R35, \ + LT0, LT1, LT2, LT3, LT4, RT4, RT3, RT2, RT1, RT0 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##LT5, KC_##RT5, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, \ + KC_##LT0, KC_##LT1, KC_##LT2, KC_##LT3, KC_##LT4, KC_##RT4, KC_##RT3, KC_##RT2, KC_##RT1, KC_##RT0 \ + ) + +#endif diff --git a/keyboards/fortitude60/keymaps/default/config.h b/keyboards/fortitude60/keymaps/default/config.h new file mode 100644 index 0000000000..b356791fc8 --- /dev/null +++ b/keyboards/fortitude60/keymaps/default/config.h @@ -0,0 +1,39 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +#define USE_SERIAL + +/* Select hand configuration */ + +// #define MASTER_LEFT +// #define MASTER_RIGHT +#define EE_HANDS + +#define USE_SERIAL_PD2 +/* #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/fortitude60/keymaps/default/keymap.c b/keyboards/fortitude60/keymaps/default/keymap.c new file mode 100644 index 0000000000..18d2527e45 --- /dev/null +++ b/keyboards/fortitude60/keymaps/default/keymap.c @@ -0,0 +1,189 @@ +#include QMK_KEYBOARD_H +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | 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 | + * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' + * | GUI | Ctrl |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI | + * `---------------------------------------------------------------------' + */ +[_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_DEL, \ + 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_LBRC, KC_RBRC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LCTL, KC_ENT, KC_SPC, RAISE, KC_RALT, KC_RGUI\ +), + +/* Colemak + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | 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 | + * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' + * | GUI | Ctrl |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI | + * `---------------------------------------------------------------------' + */ +[_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_DEL, \ + 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_LBRC, KC_RBRC, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LCTL, KC_ENT, KC_SPC, RAISE, KC_RALT, KC_RGUI\ +), + +/* Dvorak + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | 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 | + * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' + * | GUI | Ctrl |Lower |Space | Ctrl |Enter |Space |Raise | Alt | GUI | + * `---------------------------------------------------------------------' + */ +[_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_DEL, \ + 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_LBRC, KC_RBRC, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_LCTL, KC_ENT, KC_SPC, RAISE, KC_RALT, KC_RGUI\ +), + +/* Lower + * ,-----------------------------------------. ,-----------------------------------------. + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | ~ | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 |ISO ~ |ISO | | | | | + * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' + * | | | | | | | | | | | + * `---------------------------------------------------------------------' + */ +[_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_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),_______, _______, _______,\ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ +), + +/* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------. ,------+------+------+------+------+------| + * | ` | 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 / | | | | + * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' + * | | | | | | | | | | | + * `---------------------------------------------------------------------' + */ +[_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_DEL, \ + KC_GRV, KC_1, KC_UP, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ + KC_DEL, KC_LEFT, KC_DOWN, KC_RGHT, 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, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ +), + +/* 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| | Bksp | + * |------+------+------+------+------+------. ,------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm| |AGswap| |BL TOG|BL STP| | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * |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_BSPC, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, BL_TOGG, BL_STEP, _______, _______, \ + QWERTY, COLEMAK, DVORAK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______\ +) + + +}; + +uint32_t layer_state_set_user(uint32_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} + +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 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; + } + return true; +} diff --git a/keyboards/fortitude60/keymaps/default/rules.mk b/keyboards/fortitude60/keymaps/default/rules.mk new file mode 100644 index 0000000000..e0ed6f0c2d --- /dev/null +++ b/keyboards/fortitude60/keymaps/default/rules.mk @@ -0,0 +1 @@ +RGBLIGHT_ENABLE = no diff --git a/keyboards/fortitude60/matrix.c b/keyboards/fortitude60/matrix.c new file mode 100644 index 0000000000..565f417d85 --- /dev/null +++ b/keyboards/fortitude60/matrix.c @@ -0,0 +1,423 @@ +/* +Copyright 2017 Danny Nguyen + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#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 BACKLIGHT_ENABLE +#include "backlight.h" +extern backlight_config_t backlight_config; +#endif + +#include "serial.h" + +#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 SERIAL_LED_ADDR 0x00 + +#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; +} + +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]; + } + +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_master_buffer[SERIAL_LED_ADDR] = backlight_config.enable ? backlight_config.level : 0; +#endif + return 0; +} + + +uint8_t matrix_scan(void) +{ + uint8_t ret = _matrix_scan(); + + if( serial_transaction() ) { + // 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; + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } + +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(serial_master_buffer[SERIAL_LED_ADDR]); +#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<> 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/fortitude60/readme.md b/keyboards/fortitude60/readme.md new file mode 100644 index 0000000000..58453ccc47 --- /dev/null +++ b/keyboards/fortitude60/readme.md @@ -0,0 +1,15 @@ +# Fortitude60 + +![Fortitude60](https://i.imgur.com/Tbznwgg.jpg) + +👊A 60% (12x5) split keyboard with staggerd column layout.👊 + +Keyboard Maintainer: [Pekaso](https://github.com/Pekaso) [@Pekaso](https://twitter.com/Pekaso) +Hardware Supported: Fortitude60 PCB, Beetle 32u4 +Hardware Availability: [plustk2s.com](http://plustk2s.com) + +Make example for this keyboard (after setting up your build environment): + + make fortitude60/rev1: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. \ No newline at end of file diff --git a/keyboards/fortitude60/rev1/config.h b/keyboards/fortitude60/rev1/config.h new file mode 100644 index 0000000000..4ba195ff8e --- /dev/null +++ b/keyboards/fortitude60/rev1/config.h @@ -0,0 +1,91 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCB10 +#define PRODUCT_ID 0x1156 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Pekaso +#define PRODUCT The Fortitude60 Keyboard +#define DESCRIPTION Split 60 keyboard. + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { D1, D0, D3, B7, B6 } +#define MATRIX_COL_PINS { F7, F6, F5, B3, B2, B1 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#ifdef BACKLIGHT_ENABLE + #define BACKLIGHT_PIN B5 + #define BACKLIGHT_LEVELS 9 +// #define BACKLIGHT_BREATHING +#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 + +/* 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 */ +/* #define RGBLED_NUM 16 // Number of LEDs */ +/* #define ws2812_PORTREG PORTD */ +/* #define ws2812_DDRREG DDRD */ + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/fortitude60/rev1/rev1.c b/keyboards/fortitude60/rev1/rev1.c new file mode 100644 index 0000000000..5f4cd32f69 --- /dev/null +++ b/keyboards/fortitude60/rev1/rev1.c @@ -0,0 +1,22 @@ +#include "rev1.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/fortitude60/rev1/rev1.h b/keyboards/fortitude60/rev1/rev1.h new file mode 100644 index 0000000000..b941a60354 --- /dev/null +++ b/keyboards/fortitude60/rev1/rev1.h @@ -0,0 +1,44 @@ +#ifndef REV1_H +#define REV1_H + +#include "fortitude60.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +// Standard Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, LT5, RT5, R30, R31, R32, R33, R34, R35, \ + LT0, LT1, LT2, LT3, LT4, RT4, RT3, RT2, RT1, RT0 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { LT0, LT1, LT2, LT3, LT4, LT5 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { RT0, RT1, RT2, RT3, RT4, RT5 } \ + } + +#define LAYOUT_ortho_5x12 LAYOUT + +#endif diff --git a/keyboards/fortitude60/rev1/rules.mk b/keyboards/fortitude60/rev1/rules.mk new file mode 100644 index 0000000000..bd518d8f27 --- /dev/null +++ b/keyboards/fortitude60/rev1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = yes diff --git a/keyboards/fortitude60/rules.mk b/keyboards/fortitude60/rules.mk new file mode 100644 index 0000000000..7b2557b701 --- /dev/null +++ b/keyboards/fortitude60/rules.mk @@ -0,0 +1,72 @@ +SRC += matrix.c \ + split_util.c \ + serial.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) + +# 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 = 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 this with audio at the same time. +USE_SERIAL = yes # Serial support only on fortitude60 +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes + +DEFAULT_FOLDER = fortitude60/rev1 diff --git a/keyboards/fortitude60/serial.c b/keyboards/fortitude60/serial.c new file mode 100644 index 0000000000..46dfad021d --- /dev/null +++ b/keyboards/fortitude60/serial.c @@ -0,0 +1,235 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#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(); + +#ifndef USE_SERIAL_PD2 + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +#else + // Enable INT2 + EIMSK |= _BV(INT2); + // Trigger on falling edge of INT2 + EICRA &= ~(_BV(ISC20) | _BV(ISC21)); +#endif +} + +// 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 2; + } + + 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/fortitude60/serial.h b/keyboards/fortitude60/serial.h new file mode 100644 index 0000000000..361f1881b6 --- /dev/null +++ b/keyboards/fortitude60/serial.h @@ -0,0 +1,32 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND + +#ifndef USE_SERIAL_PD2 +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect +#else +#define SERIAL_PIN_MASK _BV(PD2) +#define SERIAL_PIN_INTERRUPT INT2_vect +#endif + +#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/fortitude60/split_util.c b/keyboards/fortitude60/split_util.c new file mode 100644 index 0000000000..1adae7844b --- /dev/null +++ b/keyboards/fortitude60/split_util.c @@ -0,0 +1,85 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" +#include "timer.h" + +#include "serial.h" + +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) { + /* return (UDADDR & _BV(ADDEN)); */ + USBCON |= (1 << OTGPADE); //enables VBUS pad + _delay_us(5); + return (USBSTA & (1< +#include "eeconfig.h" + +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 -- cgit v1.2.3 From d8478351d74d378dd7abd90f7ac0770ad3827d27 Mon Sep 17 00:00:00 2001 From: Dan Hertz Date: Sat, 2 Jun 2018 16:50:01 +0100 Subject: Dhertz' keymaps (#3094) * Port my keymap to QMK * Add Percent Canoe keyboard * Fix row of nonus backslash * Update info.json to be correct for canoe * fix alignment * Use qmk shortcuts rather than tmk functions * Move over first macro * Move rest of macros over * clean up unused functions * Move files to userspace for HHKB * Add keymaps for hhkb * Change LAYOUT_ISO to LAYOUT_iso * Remove bootloader key in info.json * Remove tilde remap from Karabiner * Add country_iso_alpha2_code to macros * Add my keymap for canoe * Add layer colour indicator * Fix bad rebase * Fix naming of keymap from rebase * Add GRV to function layer * Fix keymap to use new LAYOUT_JP * Update keymaps to use process_record_* rather than action functions * Update hhkb imports to be just what is needed * Update whitefox to use LAYOUT macro instead of KEYMAP * Remove redundant imports from user definition * Move TAPPING_TERM to config.h * Use layer change events to change RGB LED colour * temp * Fix layer switching to iPad on HHKB * Fix Canoe pictures --- keyboards/canoe/keymaps/dhertz/keymap.c | 62 +++++++++++++++++ keyboards/hhkb/keymaps/dhertz/config.h | 1 + keyboards/hhkb/keymaps/dhertz/keymap.c | 84 +++++++++++++++++++++++ keyboards/hhkb/keymaps/dhertz/keymap.h | 7 ++ keyboards/hhkb/keymaps/dhertz/rules.mk | 2 + keyboards/whitefox/keymaps/default/keymap.c | 4 +- keyboards/whitefox/keymaps/dhertz/keymap.c | 58 ++++++++++++++++ keyboards/whitefox/keymaps/dudeofawesome/keymap.c | 10 +-- keyboards/whitefox/keymaps/jetpacktuxedo/keymap.c | 4 +- keyboards/whitefox/keymaps/kim-kim/keymap.c | 4 +- keyboards/whitefox/keymaps/matt3o/keymap.c | 6 +- keyboards/whitefox/whitefox.h | 36 +++++++++- 12 files changed, 262 insertions(+), 16 deletions(-) create mode 100644 keyboards/canoe/keymaps/dhertz/keymap.c create mode 100644 keyboards/hhkb/keymaps/dhertz/config.h create mode 100644 keyboards/hhkb/keymaps/dhertz/keymap.c create mode 100644 keyboards/hhkb/keymaps/dhertz/keymap.h create mode 100644 keyboards/hhkb/keymaps/dhertz/rules.mk create mode 100644 keyboards/whitefox/keymaps/dhertz/keymap.c (limited to 'keyboards') diff --git a/keyboards/canoe/keymaps/dhertz/keymap.c b/keyboards/canoe/keymaps/dhertz/keymap.c new file mode 100644 index 0000000000..bc8a4bca20 --- /dev/null +++ b/keyboards/canoe/keymaps/dhertz/keymap.c @@ -0,0 +1,62 @@ +#include QMK_KEYBOARD_H +#include "dhertz.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| -| =| Backsp|Del| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter|Hom| + * |------------------------------------------------------` |---| + * |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| |End| + * |---------------------------------------------------------------| + * |Shif| #| Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |NcCtl| Alt| CTab| LyrSpc | CGv| Alt|Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [0] = LAYOUT_iso( + 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_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_HOME, + SRCH_CTL, 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_END, + KC_LSFT, HSH_TLD, 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, + NC_CTL, KC_LALT, CMD_TAB_CMD, LYR_SPC, CMD_GRV_CMD, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT + ), + /* Layer 1: Special + * ,---------------------------------------------------------------. + * | §| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| |Iso| + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |------------------------------------------------------` |---| + * | | | | | | | | | |CSL| | | `| | | + * |---------------------------------------------------------------| + * | | `| | |CAC| | | | | | | | |PgU| | + * |---------------------------------------------------------------| + * | | | | | | |Hom|PgD|End| + * `---------------------------------------------------------------' + */ + [1] = LAYOUT_iso( + KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F10, KC_F11, KC_TRNS, ISO_COUNTRY_CODE, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, CMD_SFT_L, KC_TRNS, KC_TRNS, KC_NUBS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_NUBS, KC_TRNS, KC_TRNS, CMD_ALT_C, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDOWN, KC_END + ), +}; + +void matrix_init_keymap(void) { + rgblight_enable_noeeprom(); + rgblight_sethsv_teal(); +} + +uint32_t layer_state_set_keymap(uint32_t state) { + switch (biton32(state)) { + case 1: + rgblight_sethsv_noeeprom_magenta(); + break; + default: // for any other layers, or the default layer + rgblight_sethsv_noeeprom_cyan(); + break; + } + return state; +} diff --git a/keyboards/hhkb/keymaps/dhertz/config.h b/keyboards/hhkb/keymaps/dhertz/config.h new file mode 100644 index 0000000000..af2fb9d8a5 --- /dev/null +++ b/keyboards/hhkb/keymaps/dhertz/config.h @@ -0,0 +1 @@ +#define USB_MAX_POWER_CONSUMPTION 100 diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.c b/keyboards/hhkb/keymaps/dhertz/keymap.c new file mode 100644 index 0000000000..951af069b0 --- /dev/null +++ b/keyboards/hhkb/keymaps/dhertz/keymap.c @@ -0,0 +1,84 @@ +#include QMK_KEYBOARD_H +#include "keymap.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| -| =|Del|Bsp| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter | + * |------------------------------------------------------` | + * |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /| `|Up |Shi| + * |-----------------------------------------------------------| + * |NCt|| #|Alt|CmT|CmT| LyrSpc |CGv|Iso|Gui|CSL||Rig|Dow|Lef| + * `-----------------------------------------------------------' + */ + [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, + SRCH_CTL, 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_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M,KC_COMM, KC_DOT, KC_SLSH,KC_NUBS, KC_UP, KC_RSFT, + NC_CTL, HSH_TLD,KC_LALT,CMD_TAB_CMD,CMD_TAB_CMD, LT(2, KC_SPC) , CMD_GRV_CMD, ISO_COUNTRY_CODE,KC_RGUI, CMD_SFT_L, KC_LEFT,KC_DOWN,KC_RGHT + ), + + /* Layer 1: iPad mode (Fixed) + * ,-----------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |------------------------------------------------------` | + * |CmdSpc| | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------| + * | || ~| |CAD| | |CmH| | | || | | | + * `-----------------------------------------------------------' + */ + [1] = LAYOUT_JP( + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, + CMD_SPC,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_D,KC_TRNS, KC_TRNS ,CMD_H,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS + ), + + /* Layer 2: HHKB mode (Space) + * ,-----------------------------------------------------------. + * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Caps |DL0|DL1| | | | | |Psc|Slk|Pus|Up | | | + * |------------------------------------------------------` | + * | |VoD|VoU|Mut| | | |Bsp|Del|CSL|Lef|Rig| | | + * |-----------------------------------------------------------| + * | | | |CAC| | | | | | |Dow| |PgU| | + * |-----------------------------------------------------------| + * | || ~| | | | | | | | ||Hom|PgD|End| + * `-----------------------------------------------------------' + */ + [2] = 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, DF(0), DF(1),KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP,KC_TRNS, + KC_TRNS, KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_TRNS,KC_BSPC, KC_DEL,CMD_SFT_L,KC_LEFT,KC_RGHT,KC_TRNS,KC_PENT, + KC_TRNS, KC_TRNS,KC_TRNS,CMD_ALT_C,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DOWN,KC_TRNS,KC_PGUP,KC_TRNS, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN, KC_END + ), +}; + +bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { + switch(keycode) { + case CMD_SPC: + mod_or_mod_with_macro(record, KC_LGUI, " "); + break; + case CMD_H: + mod_or_mod_with_macro(record, KC_RGUI, "H"); + break; + case CMD_ALT_D: + mod_or_mod_with_macro(record, KC_LGUI, SS_LALT("D")); + break; + default: + return true; + } + return false; +} diff --git a/keyboards/hhkb/keymaps/dhertz/keymap.h b/keyboards/hhkb/keymaps/dhertz/keymap.h new file mode 100644 index 0000000000..dbefc63800 --- /dev/null +++ b/keyboards/hhkb/keymaps/dhertz/keymap.h @@ -0,0 +1,7 @@ +#include "dhertz.h" + +enum dhertz_keycodes { + CMD_SPC = NEW_SAFE_RANGE, + CMD_H, + CMD_ALT_D, +}; diff --git a/keyboards/hhkb/keymaps/dhertz/rules.mk b/keyboards/hhkb/keymaps/dhertz/rules.mk new file mode 100644 index 0000000000..5656057b43 --- /dev/null +++ b/keyboards/hhkb/keymaps/dhertz/rules.mk @@ -0,0 +1,2 @@ +OPT_DEFS += -DHHKB_JP + diff --git a/keyboards/whitefox/keymaps/default/keymap.c b/keyboards/whitefox/keymaps/default/keymap.c index 714f90659f..37cc5a803e 100644 --- a/keyboards/whitefox/keymaps/default/keymap.c +++ b/keyboards/whitefox/keymaps/default/keymap.c @@ -30,14 +30,14 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| * `---------------------------------------------------------------' */ - [0] = KEYMAP( \ + [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_BSLS,KC_GRV, KC_INS, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ KC_CAPS,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN0, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), - [1] = KEYMAP( \ + [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_TRNS, KC_VOLU,\ diff --git a/keyboards/whitefox/keymaps/dhertz/keymap.c b/keyboards/whitefox/keymaps/dhertz/keymap.c new file mode 100644 index 0000000000..1d3bd224de --- /dev/null +++ b/keyboards/whitefox/keymaps/dhertz/keymap.c @@ -0,0 +1,58 @@ +/* +Copyright 2015 Jun Wako +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ +#include QMK_KEYBOARD_H +#include "dhertz.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Del| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter|PgU| + * |------------------------------------------------------` |---| + * |SrCtl | A| S| D| F| G| H| J| K| L| ;| '| \| |PgD| + * |---------------------------------------------------------------| + * |Shif| #| Z| X| C| V| B| N| M| ,| .| /|Shift |Up |Hom| + * |---------------------------------------------------------------| + * |NcCtl| Alt| CTab| LyrSpc |CGv|Iso|CSL|Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + [0] = LAYOUT_iso( \ + 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_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_PGUP,\ + SRCH_CTL,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_PGDN,\ + KC_LSFT,HSH_TLD,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_HOME,\ + NC_CTL, KC_LALT,CMD_TAB_CMD, LYR_SPC, CMD_GRV_CMD,ISO_COUNTRY_CODE,CMD_SFT_L, KC_LEFT,KC_DOWN,KC_RGHT \ + ), + /* Layer 1: HHKB mode (Space) + * ,---------------------------------------------------------------. + * | §| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Backsp|Ins| + * |---------------------------------------------------------------| + * |Caps | | | | | | | |Psc|Slk|Pus| Up| | |Del| + * |------------------------------------------------------` |---| + * | |VoD|VoU|Mut| | | |Bsp|Del|CSL|Lef|Rig| `| |PgU| + * |---------------------------------------------------------------| + * | | `| | |CAC| | | | | | |Dow| |PgU|PgD| + * |---------------------------------------------------------------| + * | | | | | | | |Hom|PgD|End| + * `---------------------------------------------------------------' + */ + [1] = LAYOUT_iso( \ + 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_BSPC, KC_INS, \ + KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,BL_INC, KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_TRNS,KC_PAUS, KC_UP, KC_DEL, \ + KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,BL_TOGG,KC_TRNS,KC_BSPC,KC_DEL, CMD_SFT_L,KC_LEFT,KC_RGHT,KC_NUBS, KC_PENT,KC_PGUP,\ + KC_TRNS,KC_NUBS,KC_TRNS,KC_TRNS,CMD_ALT_C, BL_DEC, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DOWN,KC_TRNS,KC_TRNS, KC_PGUP,KC_PGDN,\ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ + ), +}; diff --git a/keyboards/whitefox/keymaps/dudeofawesome/keymap.c b/keyboards/whitefox/keymaps/dudeofawesome/keymap.c index 59102c3ebe..774882cc5a 100644 --- a/keyboards/whitefox/keymaps/dudeofawesome/keymap.c +++ b/keyboards/whitefox/keymaps/dudeofawesome/keymap.c @@ -30,7 +30,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| * `---------------------------------------------------------------' */ - [_QWERTY] = KEYMAP( \ + [_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_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, \ LT(_FUNC,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,\ @@ -50,7 +50,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| * `---------------------------------------------------------------' */ - [_WORKMAN] = KEYMAP( \ + [_WORKMAN] = 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_BSLS,KC_GRV, KC_PSCR, \ KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN,KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ LT(_FUNC,KC_CAPS),KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ @@ -70,7 +70,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| * `---------------------------------------------------------------' */ - [_DVORAK] = KEYMAP( \ + [_DVORAK] = 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_BSLS,KC_GRV, KC_PSCR, \ 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_EQL, KC_BSPC, KC_DEL, \ LT(_FUNC,KC_CAPS),KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS,KC_NUHS,KC_ENT, KC_PGUP,\ @@ -90,7 +90,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Alt |Gui | Space |Gui |Alt |Ctrl| |Lef|Dow|Rig| * `---------------------------------------------------------------' */ - [_COLEMAK] = KEYMAP( \ + [_COLEMAK] = 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_BSLS,KC_GRV, KC_PSCR, \ 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_BSPC, KC_DEL, \ LT(_FUNC,KC_CAPS),KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ @@ -110,7 +110,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `---------------------------------------------------------------' */ - [_FUNC] = KEYMAP( \ + [_FUNC] = 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_WH_D,KC_BTN2,KC_MS_U,KC_BTN1,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,\ _______,KC_WH_U,KC_MS_L,KC_MS_D,KC_MS_R,AG_NORM,AG_SWAP,QWERTY, WORKMAN,DVORAK, COLEMAK,_______,_______,_______, _______,\ diff --git a/keyboards/whitefox/keymaps/jetpacktuxedo/keymap.c b/keyboards/whitefox/keymaps/jetpacktuxedo/keymap.c index 82de171733..d31362a43c 100644 --- a/keyboards/whitefox/keymaps/jetpacktuxedo/keymap.c +++ b/keyboards/whitefox/keymaps/jetpacktuxedo/keymap.c @@ -30,7 +30,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Alt |Ctrl| |Lef|Dow|Rig| * `---------------------------------------------------------------' */ - [0] = KEYMAP( \ + [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_NO,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, \ 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_NUHS, KC_ENT, KC_PGUP,\ @@ -50,7 +50,7 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | |hom|pdn|end| * `---------------------------------------------------------------' */ - [1] = KEYMAP( \ + [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_TRNS,KC_TRNS,KC_MUTE,\ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,BL_TOGG,KC_TRNS,KC_TRNS,BL_INC, KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS,KC_TRNS, KC_TRNS,\ KC_TRNS,KC_TRNS,KC_TRNS,BL_DEC, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_VOLU,\ diff --git a/keyboards/whitefox/keymaps/kim-kim/keymap.c b/keyboards/whitefox/keymaps/kim-kim/keymap.c index 94ef0e7a6b..1fc3683c22 100644 --- a/keyboards/whitefox/keymaps/kim-kim/keymap.c +++ b/keyboards/whitefox/keymaps/kim-kim/keymap.c @@ -38,14 +38,14 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Alt|Fn0 |Gui | Space |Gui |Alt | | |Lef|Dow|Rght| * `----------------------------------------------------------------' */ - [0] = KEYMAP( \ + [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_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, \ 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_NUHS,KC_ENT, KC_PGUP,\ 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, KC_UP, KC_PGDN,\ KC_LALT,KC_FN0,KC_LGUI, KC_SPC, KC_RGUI,KC_RALT, XXXXXXX, KC_LEFT,KC_DOWN,KC_RGHT \ ), - [1] = KEYMAP( \ + [1] = 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_MPRV,KC_MNXT,KC_VOLU,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______ , BL_TOGG ,\ _______,KC_MPLY,KC_MSTP,KC_VOLD,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET, BL_INC,\ diff --git a/keyboards/whitefox/keymaps/matt3o/keymap.c b/keyboards/whitefox/keymaps/matt3o/keymap.c index 4455886a50..bef15195d3 100644 --- a/keyboards/whitefox/keymaps/matt3o/keymap.c +++ b/keyboards/whitefox/keymaps/matt3o/keymap.c @@ -30,21 +30,21 @@ const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| * `---------------------------------------------------------------' */ - [0] = KEYMAP( \ + [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_BSLS,KC_GRV, KC_MUTE,\ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, KC_DEL, \ KC_FN0, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,KC_NUHS,KC_ENT, KC_PGUP,\ KC_LSFT,KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_RSFT, KC_UP, KC_PGDN,\ KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_FN1, KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT \ ), - [1] = KEYMAP( \ + [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_TRNS,\ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_DEL , KC_INS ,\ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_VOLU,\ KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_PGUP,KC_VOLD,\ KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, KC_HOME,KC_PGDN,KC_END \ ), - [2] = KEYMAP( \ + [2] = LAYOUT( \ KC_SLEP,KC_P1, KC_P2, KC_P3, KC_P4, KC_P5, KC_P6, KC_P7, KC_P8, KC_P9, KC_P0, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN2, \ KC_TRNS,KC_TRNS,KC_FN5 ,KC_FN6 ,KC_TRNS,KC_FN7 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_TRNS,KC_TRNS,KC_TRNS, KC_FN3, \ KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_FN4 ,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,\ diff --git a/keyboards/whitefox/whitefox.h b/keyboards/whitefox/whitefox.h index e141e77304..2724aad5a2 100644 --- a/keyboards/whitefox/whitefox.h +++ b/keyboards/whitefox/whitefox.h @@ -33,7 +33,7 @@ along with this program. If not, see . * `---------------------------------------------------------------' */ -#define KEYMAP( \ +#define LAYOUT( \ K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \ K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \ @@ -52,7 +52,7 @@ along with this program. If not, see . } /* Keymap for truefox layout */ -#define KEYMAP_TRUEFOX( \ +#define LAYOUT_truefox( \ K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, K61, \ K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K23, K33, \ K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K84, K05, \ @@ -70,4 +70,36 @@ along with this program. If not, see . { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ } +/* ISO WhiteFox + * ,---------------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backsp|Ins| + * |---------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]|Enter|Del| + * |------------------------------------------------------` |---| + * |CapsLo| A| S| D| F| G| H| J| K| L| ;| '| \| |PgU| + * |---------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift |Up |PgD| + * |---------------------------------------------------------------| + * |Ctrl|Gui |Alt | Space |Fn0 |Alt |Gui | |Lef|Dow|Rig| + * `---------------------------------------------------------------' + */ + +#define LAYOUT_iso( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K51, K61, \ + K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, K33, \ + K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, K64, K74, K84, K05, \ + K15, K25, K35, K45, K55, K65, K75, K85, K06, K16, K26, K36, K46, K56, K66, \ + K76, K86, K07, K17, K27, K37, K47, K57, K67, K77 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, K07 }, \ + { K10, K11, K12, K13, K14, K15, K16, K17 }, \ + { K20, K21, K22, KC_NO, K24, K25, K26, K27 }, \ + { K30, K31, K32, K33, K34, K35, K36, K37 }, \ + { K40, KC_NO, K42, K43, K44, K45, K46, K47 }, \ + { K50, K51, K52, K53, K54, K55, K56, K57 }, \ + { K60, K61, K62, K63, K64, K65, K66, K67 }, \ + { K70, K71, K72, K73, K74, K75, K76, K77 }, \ + { K80, K81, K82, K83, K84, K85, K86, KC_NO } \ +} + #endif -- cgit v1.2.3 From d554d9633492d2334e0b3b591adc406e07e35ad0 Mon Sep 17 00:00:00 2001 From: KeLorean Date: Sat, 2 Jun 2018 12:00:40 -0400 Subject: Fixed mistake to kelorean keymap for ca66 (#3109) --- keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c | 50 +++++++++++------------ 1 file changed, 25 insertions(+), 25 deletions(-) (limited to 'keyboards') diff --git a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c index 5d104b8b41..165681ea75 100644 --- a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c +++ b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c @@ -16,41 +16,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //Base Layer [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_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_BSLS, KC_DEL, - MO(3), 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_PGDN, KC_UP, - KC_NO, KC_LCTL, KC_LALT, LT(1, KC_BSPC), LT(2, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL, 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_BSPC, KC_BSPC, 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_BSLS, KC_DEL, + MO(3), 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_NO, KC_LCTL, KC_LALT, LT(1, KC_BSPC), LT(2, KC_SPC), KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), //Layer1 Functions and Gaming Arrows over WASD [1] = LAYOUT( - KC_NO, 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_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_UP, 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_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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_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_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_UP, 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_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), //Layer2 Same as Layer1, for easy use of layers...you'll see. [2] = LAYOUT( - KC_NO, 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_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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_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_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), //Layer3, Lighting Function keys, media keys and '\' is now Momentary Toggle to Layer 4, which has the soft reset. [3] = LAYOUT( - 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, RGB_HUD, RGB_HUI, KC_NO, KC_NO, KC_NO, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_NO, KC_NO, - MO(4), KC_NO, KC_TRNS, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), + KC_NO, KC_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, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, KC_NO, BL_TOGG, BL_DEC, BL_INC, BL_STEP, KC_NO, KC_NO, MO(4), KC_NO, + KC_TRNS, KC_NO, RGB_RMOD, RGB_MOD, RGB_TOG, KC_NO, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_VOLD, KC_VOLU, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, RGB_SAD, RGB_SAI, 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), //Layer4, soft reset on Tab [4] = LAYOUT( - 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, - RESET, 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_TRNS, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO) + KC_NO, KC_NO, KC_NO, KC_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, + RESET, 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_TRNS, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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), }; -- cgit v1.2.3 From 8707bdd509b56e07c0398c2d14ff41b7675e02f4 Mon Sep 17 00:00:00 2001 From: Takeshi ISHII <2170248+mtei@users.noreply.github.com> Date: Sun, 3 Jun 2018 01:07:32 +0900 Subject: Fix helix:led_test build break (#3110) * copy new rgblight.[ch] from quantum/ into keyboards/helix/rev2/keymaps/led_test/ and add mode 35 RGB cyclic mode * force RGB light mode 25 --- keyboards/helix/rev2/keymaps/led_test/keymap.c | 8 +- keyboards/helix/rev2/keymaps/led_test/rgblight.c | 185 +++++++++++++++++------ keyboards/helix/rev2/keymaps/led_test/rgblight.h | 22 ++- 3 files changed, 168 insertions(+), 47 deletions(-) (limited to 'keyboards') diff --git a/keyboards/helix/rev2/keymaps/led_test/keymap.c b/keyboards/helix/rev2/keymaps/led_test/keymap.c index b8a9baee34..d597020d87 100644 --- a/keyboards/helix/rev2/keymaps/led_test/keymap.c +++ b/keyboards/helix/rev2/keymaps/led_test/keymap.c @@ -32,7 +32,7 @@ extern uint8_t is_master; #define _DVORAK 2 #define _LOWER 3 #define _RAISE 4 -#define _ADJUST 16 +#define _ADJUST 6 enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -513,6 +513,12 @@ void music_scale_user(void) #ifdef SSD1306OLED void matrix_scan_user(void) { + static int scan_count = 0; + if( scan_count == 2 ) { + rgblight_enable(); + rgblight_mode(35); + } + if( scan_count < 3 ) scan_count ++; iota_gfx_task(); // this is what updates the display continuously } diff --git a/keyboards/helix/rev2/keymaps/led_test/rgblight.c b/keyboards/helix/rev2/keymaps/led_test/rgblight.c index fee614db05..e0ca585e0e 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rgblight.c +++ b/keyboards/helix/rev2/keymaps/led_test/rgblight.c @@ -23,8 +23,15 @@ #include "debug.h" #include "led_tables.h" +#ifndef RGBLIGHT_LIMIT_VAL +#define RGBLIGHT_LIMIT_VAL 255 +#endif + +#define MIN(a,b) (((a)<(b))?(a):(b)) +#define MAX(a,b) (((a)>(b))?(a):(b)) + __attribute__ ((weak)) -const uint16_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {1024, 20, 10, 5}; //modify for led_test +const uint8_t RGBLED_BREATHING_INTERVALS[] PROGMEM = {30, 20, 10, 5}; __attribute__ ((weak)) const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[] PROGMEM = {120, 60, 30}; __attribute__ ((weak)) @@ -35,9 +42,10 @@ __attribute__ ((weak)) const uint8_t RGBLED_KNIGHT_INTERVALS[] PROGMEM = {127, 63, 31}; __attribute__ ((weak)) const uint16_t RGBLED_GRADIENT_RANGES[] PROGMEM = {360, 240, 180, 120, 90}; +__attribute__ ((weak)) +const uint16_t RGBLED_RGBCYCLIC_INTERVALS[] PROGMEM = {1024}; rgblight_config_t rgblight_config; -rgblight_config_t inmem_config; LED_TYPE led[RGBLED_NUM]; uint8_t rgblight_inited = 0; @@ -46,11 +54,9 @@ bool rgblight_timer_enabled = false; void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1) { uint8_t r = 0, g = 0, b = 0, base, color; - #ifdef RGBLIGHT_LIMIT_VAL - if (val > RGBLIGHT_LIMIT_VAL) { + if (val > RGBLIGHT_LIMIT_VAL) { val=RGBLIGHT_LIMIT_VAL; // limit the val - } - #endif + } if (sat == 0) { // Acromatic color (gray). Hue doesn't mind. r = val; @@ -119,7 +125,8 @@ void eeconfig_update_rgblight_default(void) { rgblight_config.mode = 1; rgblight_config.hue = 0; rgblight_config.sat = 255; - rgblight_config.val = 255; + rgblight_config.val = RGBLIGHT_LIMIT_VAL; + rgblight_config.speed = 0; eeconfig_update_rgblight(rgblight_config.raw); } void eeconfig_debug_rgblight(void) { @@ -129,6 +136,7 @@ void eeconfig_debug_rgblight(void) { dprintf("rgblight_config.hue = %d\n", rgblight_config.hue); dprintf("rgblight_config.sat = %d\n", rgblight_config.sat); dprintf("rgblight_config.val = %d\n", rgblight_config.val); + dprintf("rgblight_config.speed = %d\n", rgblight_config.speed); } void rgblight_init(void) { @@ -154,7 +162,7 @@ void rgblight_init(void) { #endif if (rgblight_config.enable) { - rgblight_mode(rgblight_config.mode); + rgblight_mode_noeeprom(rgblight_config.mode); } } @@ -211,7 +219,7 @@ uint32_t rgblight_get_mode(void) { return rgblight_config.mode; } -void rgblight_mode(uint8_t mode) { +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom) { if (!rgblight_config.enable) { return; } @@ -222,13 +230,18 @@ void rgblight_mode(uint8_t mode) { } else { rgblight_config.mode = mode; } - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight mode: %u\n", rgblight_config.mode); + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight mode [EEPROM]: %u\n", rgblight_config.mode); + } else { + xprintf("rgblight mode [NOEEPROM]: %u\n", rgblight_config.mode); + } if (rgblight_config.mode == 1) { #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); #endif - } else if (rgblight_config.mode >= 2 && rgblight_config.mode <= 24) { + } else if ((rgblight_config.mode >= 2 && rgblight_config.mode <= 24) || + rgblight_config.mode == 35 ) { // MODE 2-5, breathing // MODE 6-8, rainbow mood // MODE 9-14, rainbow swirl @@ -236,6 +249,7 @@ void rgblight_mode(uint8_t mode) { // MODE 21-23, knight // MODE 24, xmas // MODE 25-34, static rainbow + // MODE 35 RGB cyclic #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_enable(); @@ -247,11 +261,20 @@ void rgblight_mode(uint8_t mode) { rgblight_timer_disable(); #endif } - rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); +} + +void rgblight_mode(uint8_t mode) { + rgblight_mode_eeprom_helper(mode, true); +} + +void rgblight_mode_noeeprom(uint8_t mode) { + rgblight_mode_eeprom_helper(mode, false); } + void rgblight_toggle(void) { - xprintf("rgblight toggle: rgblight_config.enable = %u\n", !rgblight_config.enable); + xprintf("rgblight toggle [EEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); if (rgblight_config.enable) { rgblight_disable(); } @@ -260,17 +283,34 @@ void rgblight_toggle(void) { } } +void rgblight_toggle_noeeprom(void) { + xprintf("rgblight toggle [NOEEPROM]: rgblight_config.enable = %u\n", !rgblight_config.enable); + if (rgblight_config.enable) { + rgblight_disable_noeeprom(); + } + else { + rgblight_enable_noeeprom(); + } +} + void rgblight_enable(void) { rgblight_config.enable = 1; - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight enable: rgblight_config.enable = %u\n", rgblight_config.enable); + // No need to update EEPROM here. rgblight_mode() will do that, actually + //eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight enable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); rgblight_mode(rgblight_config.mode); } +void rgblight_enable_noeeprom(void) { + rgblight_config.enable = 1; + xprintf("rgblight enable [NOEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + rgblight_mode_noeeprom(rgblight_config.mode); +} + void rgblight_disable(void) { rgblight_config.enable = 0; eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight disable: rgblight_config.enable = %u\n", rgblight_config.enable); + xprintf("rgblight disable [EEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); #ifdef RGBLIGHT_ANIMATIONS rgblight_timer_disable(); #endif @@ -278,6 +318,29 @@ void rgblight_disable(void) { rgblight_set(); } +void rgblight_disable_noeeprom(void) { + rgblight_config.enable = 0; + xprintf("rgblight disable [noEEPROM]: rgblight_config.enable = %u\n", rgblight_config.enable); + #ifdef RGBLIGHT_ANIMATIONS + rgblight_timer_disable(); + #endif + _delay_ms(50); + rgblight_set(); +} + + +// Deals with the messy details of incrementing an integer +uint8_t increment( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { + int16_t new_value = value; + new_value += step; + return MIN( MAX( new_value, min ), max ); +} + +uint8_t decrement( uint8_t value, uint8_t step, uint8_t min, uint8_t max ) { + int16_t new_value = value; + new_value -= step; + return MIN( MAX( new_value, min ), max ); +} void rgblight_increase_hue(void) { uint16_t hue; @@ -313,8 +376,8 @@ void rgblight_decrease_sat(void) { } void rgblight_increase_val(void) { uint8_t val; - if (rgblight_config.val + RGBLIGHT_VAL_STEP > 255) { - val = 255; + if (rgblight_config.val + RGBLIGHT_VAL_STEP > RGBLIGHT_LIMIT_VAL) { + val = RGBLIGHT_LIMIT_VAL; } else { val = rgblight_config.val + RGBLIGHT_VAL_STEP; } @@ -329,24 +392,32 @@ void rgblight_decrease_val(void) { } rgblight_sethsv(rgblight_config.hue, rgblight_config.sat, val); } +void rgblight_increase_speed(void) { + rgblight_config.speed = increment( rgblight_config.speed, 1, 0, 3 ); + eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this +} -void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { - inmem_config.raw = rgblight_config.raw; +void rgblight_decrease_speed(void) { + rgblight_config.speed = decrement( rgblight_config.speed, 1, 0, 3 ); + eeconfig_update_rgblight(rgblight_config.raw);//EECONFIG needs to be increased to support this +} + +void rgblight_sethsv_noeeprom_old(uint16_t hue, uint8_t sat, uint8_t val) { if (rgblight_config.enable) { LED_TYPE tmp_led; sethsv(hue, sat, val, &tmp_led); - inmem_config.hue = hue; - inmem_config.sat = sat; - inmem_config.val = val; // dprintf("rgblight set hue [MEMORY]: %u,%u,%u\n", inmem_config.hue, inmem_config.sat, inmem_config.val); rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); } } -void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { + +void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom) { if (rgblight_config.enable) { if (rgblight_config.mode == 1) { // same static color - rgblight_sethsv_noeeprom(hue, sat, val); + LED_TYPE tmp_led; + sethsv(hue, sat, val, &tmp_led); + rgblight_setrgb(tmp_led.r, tmp_led.g, tmp_led.b); } else { // all LEDs in same color if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { @@ -371,11 +442,23 @@ void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { rgblight_config.hue = hue; rgblight_config.sat = sat; rgblight_config.val = val; - eeconfig_update_rgblight(rgblight_config.raw); - xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + if (write_to_eeprom) { + eeconfig_update_rgblight(rgblight_config.raw); + xprintf("rgblight set hsv [EEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } else { + xprintf("rgblight set hsv [NOEEPROM]: %u,%u,%u\n", rgblight_config.hue, rgblight_config.sat, rgblight_config.val); + } } } +void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_eeprom_helper(hue, sat, val, true); +} + +void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val) { + rgblight_sethsv_eeprom_helper(hue, sat, val, false); +} + uint16_t rgblight_get_hue(void) { return rgblight_config.hue; } @@ -480,18 +563,11 @@ void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b) { } void rgblight_task(void) { - if (rgblight_inited == 1) { //modify for led_test - /* first call */ - rgblight_inited = 2; - rgblight_enable(); - rgblight_mode(2); - } if (rgblight_timer_enabled) { // mode = 1, static light, do nothing here if (rgblight_config.mode >= 2 && rgblight_config.mode <= 5) { // mode = 2 to 5, breathing mode rgblight_effect_breathing(rgblight_config.mode - 2); -#if 0 } else if (rgblight_config.mode >= 6 && rgblight_config.mode <= 8) { // mode = 6 to 8, rainbow mood mod rgblight_effect_rainbow_mood(rgblight_config.mode - 6); @@ -507,7 +583,9 @@ void rgblight_task(void) { } else if (rgblight_config.mode == 24) { // mode = 24, christmas mode rgblight_effect_christmas(); -#endif + } else if (rgblight_config.mode == 35) { + // mode = 35, RGB cyclic + rgblight_effect_rgbcyclic(); } } } @@ -516,19 +594,19 @@ void rgblight_task(void) { void rgblight_effect_breathing(uint8_t interval) { static uint8_t pos = 0; static uint16_t last_timer = 0; + float val; - if (timer_elapsed(last_timer) < pgm_read_word(&RGBLED_BREATHING_INTERVALS[interval])) {//modify for led_test + if (timer_elapsed(last_timer) < pgm_read_byte(&RGBLED_BREATHING_INTERVALS[interval])) { return; } last_timer = timer_read(); - //modify for led_test - rgblight_config.hue = (pos*120)%360; - rgblight_sethsv_noeeprom(rgblight_config.hue, rgblight_config.sat, rgblight_config.val); - pos = (pos + 1) % 3; + // http://sean.voisen.org/blog/2011/10/breathing-led-with-arduino/ + val = (exp(sin((pos/255.0)*M_PI)) - RGBLIGHT_EFFECT_BREATHE_CENTER/M_E)*(RGBLIGHT_EFFECT_BREATHE_MAX/(M_E-1/M_E)); + rgblight_sethsv_noeeprom_old(rgblight_config.hue, rgblight_config.sat, val); + pos = (pos + 1) % 256; } -#if 0 void rgblight_effect_rainbow_mood(uint8_t interval) { static uint16_t current_hue = 0; static uint16_t last_timer = 0; @@ -537,7 +615,7 @@ void rgblight_effect_rainbow_mood(uint8_t interval) { return; } last_timer = timer_read(); - rgblight_sethsv_noeeprom(current_hue, rgblight_config.sat, rgblight_config.val); + rgblight_sethsv_noeeprom_old(current_hue, rgblight_config.sat, rgblight_config.val); current_hue = (current_hue + 1) % 360; } void rgblight_effect_rainbow_swirl(uint8_t interval) { @@ -662,5 +740,24 @@ void rgblight_effect_christmas(void) { } rgblight_set(); } -#endif /* 0 */ + +void rgblight_effect_rgbcyclic(void) { + static uint8_t pos = 0; + static uint16_t last_timer = 0; + uint8_t g; uint8_t r; uint8_t b; + + if (timer_elapsed(last_timer) < pgm_read_word(&RGBLED_RGBCYCLIC_INTERVALS[0])) { + return; + } + last_timer = timer_read(); + g = r = b = 0; + switch( pos ) { + case 0: r = RGBLIGHT_LIMIT_VAL; break; + case 1: g = RGBLIGHT_LIMIT_VAL; break; + case 2: b = RGBLIGHT_LIMIT_VAL; break; + } + rgblight_setrgb(r, g, b); + pos = (pos + 1) % 3; +} + #endif /* RGBLIGHT_ANIMATIONS */ diff --git a/keyboards/helix/rev2/keymaps/led_test/rgblight.h b/keyboards/helix/rev2/keymaps/led_test/rgblight.h index 9c1c0add23..965a1bbf63 100644 --- a/keyboards/helix/rev2/keymaps/led_test/rgblight.h +++ b/keyboards/helix/rev2/keymaps/led_test/rgblight.h @@ -17,7 +17,7 @@ #define RGBLIGHT_H #ifdef RGBLIGHT_ANIMATIONS - #define RGBLIGHT_MODES 5 + #define RGBLIGHT_MODES 35 #else #define RGBLIGHT_MODES 1 #endif @@ -74,14 +74,16 @@ #include "ws2812.h" #endif #include "rgblight_types.h" +#include "rgblight_list.h" extern LED_TYPE led[RGBLED_NUM]; -extern const uint16_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; //modify for led_test +extern const uint8_t RGBLED_BREATHING_INTERVALS[4] PROGMEM; extern const uint8_t RGBLED_RAINBOW_MOOD_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_RAINBOW_SWIRL_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_SNAKE_INTERVALS[3] PROGMEM; extern const uint8_t RGBLED_KNIGHT_INTERVALS[3] PROGMEM; +extern const uint16_t RGBLED_RGBCYCLIC_INTERVALS[1] PROGMEM; typedef union { uint32_t raw; @@ -91,6 +93,7 @@ typedef union { uint16_t hue :9; uint8_t sat :8; uint8_t val :8; + uint8_t speed :8;//EECONFIG needs to be increased to support this }; } rgblight_config_t; @@ -112,6 +115,8 @@ void rgblight_increase_sat(void); void rgblight_decrease_sat(void); void rgblight_increase_val(void); void rgblight_decrease_val(void); +void rgblight_increase_speed(void); +void rgblight_decrease_speed(void); void rgblight_sethsv(uint16_t hue, uint8_t sat, uint8_t val); uint16_t rgblight_get_hue(void); uint8_t rgblight_get_sat(void); @@ -125,9 +130,21 @@ void eeconfig_update_rgblight(uint32_t val); void eeconfig_update_rgblight_default(void); void eeconfig_debug_rgblight(void); +void rgb_matrix_increase(void); +void rgb_matrix_decrease(void); + void sethsv(uint16_t hue, uint8_t sat, uint8_t val, LED_TYPE *led1); void setrgb(uint8_t r, uint8_t g, uint8_t b, LED_TYPE *led1); + void rgblight_sethsv_noeeprom(uint16_t hue, uint8_t sat, uint8_t val); +void rgblight_mode_noeeprom(uint8_t mode); +void rgblight_toggle_noeeprom(void); +void rgblight_enable_noeeprom(void); +void rgblight_disable_noeeprom(void); + +void rgblight_sethsv_eeprom_helper(uint16_t hue, uint8_t sat, uint8_t val, bool write_to_eeprom); +void rgblight_mode_eeprom_helper(uint8_t mode, bool write_to_eeprom); + #define EZ_RGB(val) rgblight_show_solid_color((val >> 16) & 0xFF, (val >> 8) & 0xFF, val & 0xFF) void rgblight_show_solid_color(uint8_t r, uint8_t g, uint8_t b); @@ -144,5 +161,6 @@ void rgblight_effect_rainbow_swirl(uint8_t interval); void rgblight_effect_snake(uint8_t interval); void rgblight_effect_knight(uint8_t interval); void rgblight_effect_christmas(void); +void rgblight_effect_rgbcyclic(void); #endif -- cgit v1.2.3 From 5ce0d64027fb1537dee49d8b5481fcfaed52040a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emek=20Vyhnal?= Date: Sat, 2 Jun 2018 18:10:34 +0200 Subject: planck/premek layout - thumb shift, mouse middleclick (#3111) * Update readme.md updated links, hope those are the correct ones * planck premek - left thumb shift * middleclick key * mod tap thumb-shift, space * update layout description --- keyboards/planck/keymaps/premek/config.h | 3 ++- keyboards/planck/keymaps/premek/keymap.c | 10 +++++----- keyboards/planck/keymaps/premek/readme.md | 2 +- keyboards/planck/readme.md | 2 +- 4 files changed, 9 insertions(+), 8 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/premek/config.h b/keyboards/planck/keymaps/premek/config.h index 4c61581993..37be38c905 100644 --- a/keyboards/planck/keymaps/premek/config.h +++ b/keyboards/planck/keymaps/premek/config.h @@ -3,6 +3,7 @@ #include "../../config.h" + /* * MIDI options */ @@ -26,4 +27,4 @@ /* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */ //#define MIDI_TONE_KEYCODE_OCTAVES 2 -#endif \ No newline at end of file +#endif diff --git a/keyboards/planck/keymaps/premek/keymap.c b/keyboards/planck/keymaps/premek/keymap.c index 2ceadda5ed..43f5cb6433 100644 --- a/keyboards/planck/keymaps/premek/keymap.c +++ b/keyboards/planck/keymaps/premek/keymap.c @@ -38,10 +38,10 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P }, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, - {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, - {KC_LGUI, _______, _______, KC_LALT, LOWER, KC_SPC, KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI} + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_DEL, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_TAB, KC_H, KC_J, KC_K, KC_L, KC_SCLN}, + {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_BSPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, + {KC_LGUI, _______, _______, KC_LALT, LOWER, MT(MOD_LSFT, KC_SPC), KC_ENT, KC_SPC, RAISE, KC_RALT, _______, KC_RGUI} }, [_COLEMAK] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, @@ -65,7 +65,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_QUOT, KC_MINS, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, _______, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MS_BTN3} }, [_PLOVER] = { diff --git a/keyboards/planck/keymaps/premek/readme.md b/keyboards/planck/keymaps/premek/readme.md index 16debdd632..98ca55be43 100644 --- a/keyboards/planck/keymaps/premek/readme.md +++ b/keyboards/planck/keymaps/premek/readme.md @@ -1,4 +1,4 @@ # Split Layout Inspired by TECK -[Layout](http://www.keyboard-layout-editor.com/##@_switchMount=cherry&switchBrand=gateron&switchType=KS-3-Tea&pcb:true%3B&@_c=%23e6e6e6&t=%23757575&a:7&fa@:5%3B%3B&=Esc&_a:4&fa@:5&:0&:0&:0&:0&:0&:0&:0&:0&:5%3B%3B&=%0A%0A!%0A1%0A%0A%0A%0A%0A%0AQ&=%0A%0A%2F@%0A2%0A%0A%0A%0A%0A%0AW&=%0A%0A%23%0A3%0A%0A%0A%0A%0A%0AE&=%0A%0A$%0A4%0A%0A%0A%0A%0A%0AR&=%0A%0A%25%0A5%0A%0A%0A%0A%0A%0AT&_c=%23e3b02d&a:7%3B&=Del&_c=%23e6e6e6&a:4%3B&=%0A%0A%5E%0A6%0A%0A%0A%0A%0A%0AY&=%0A%0A%2F&%0A7%0A%0A%0A%0A%0A%0AU&=%0A%0A*%0A8%0A%0A%0A%0A%0A%0AI&=%0A%0A(%0A9%0A%0A%0A%0A%0A%0AO&=%0A%0A)%0A0%0A%0A%0A%0A%0A%0AP%3B&@_a:7%3B&=Shift&_a:4%3B&=%0A%0A%0AF1%0A%0A%0A%0A%0A%0AA&=%0A%0A%0AF2%0A%0A%0A%0A%0A%0AS&=%0A%0A'%0AF3%0A%0A%0A%0A%0A%0AD&_c=%23e3b02d&n:true%3B&=%0A%0A-%0AF4%0A%0A%0A%0A%0A%0AF&_c=%23e6e6e6%3B&=%0A%0A%0AF5%0A%0A%0A%0A%0A%0AG&_c=%23e3b02d&a:7%3B&=Tab&_c=%23e6e6e6&a:4%3B&=%0A%0A%0AF6%0A%0A%0A%0A%0A%0AH&_c=%23e3b02d&n:true%3B&=%0A%0A%2F&larr%2F%3B%0AHom%0A%0A%0A%0A%0A%0AJ&_c=%23e6e6e6%3B&=%0A%0A%2F&darr%2F%3B%0APgD%0A%0A%0A%0A%0A%0AK&=%0A%0A%2F&uarr%2F%3B%0APgU%0A%0A%0A%0A%0A%0AL&=%0A%0A%2F&rarr%2F%3B%0AEnd%0A%0A%0A%0A%0A%0A%2F%3B%3B&@_a:7%3B&=Ctrl&_a:4%3B&=%0A%0A~%0AF7%0A%0A%0A%0A%0A%0AZ&=%0A%0A%60%0AF8%0A%0A%0A%0A%0A%0AX&=%0A%0A+%0AF9%0A%0A%0A%0A%0A%0AC&=%0A%0A%2F=%0AF10%0A%0A%0A%0A%0A%0AV&=%0A%0A%7C%0AF11%0A%0A%0A%0A%0A%0AB&_c=%23e3b02d&a:7%3B&=BSp&_c=%23e6e6e6&a:4%3B&=%0A%0A%5C%0AF12%0A%0A%0A%0A%0A%0AN&=%0A%0A%5B%0A%0A%0A%0A%0A%0A%0AM&=%0A%0A%5D%0A%0A%0A%0A%0A%0A%0A,&=%0A%0A%7B%0A%0A%0A%0A%0A%0A%0A.&=%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%2F%2F%3B&@_a:7%3B&=&=&=&=Alt&_c=%23e3b02d%3B&=%2F&dArr%2F%3B&_c=%23e6e6e6%3B&=spc&_c=%23e3b02d%3B&=%2F&crarr%2F%3B&_c=%23e6e6e6%3B&=spc&_c=%23e3b02d%3B&=%2F&uArr%2F%3B&_c=%23e6e6e6%3B&=Alt&=&=) +[Layout](http://www.keyboard-layout-editor.com/##@_switchMount=cherry&switchBrand=gateron&switchType=KS-3-Tea&pcb:true%3B&@_c=%23e6e6e6&t=%23757575&a:7&fa@:5%3B%3B&=Esc&_a:4&fa@:5&:0&:0&:0&:0&:0&:0&:0&:0&:5%3B%3B&=%0A%0A!%0A1%0A%0A%0A%0A%0A%0AQ&=%0A%0A%2F@%0A2%0A%0A%0A%0A%0A%0AW&=%0A%0A%23%0A3%0A%0A%0A%0A%0A%0AE&=%0A%0A$%0A4%0A%0A%0A%0A%0A%0AR&=%0A%0A%25%0A5%0A%0A%0A%0A%0A%0AT&_c=%23e3b02d&a:7%3B&=Del&_c=%23e6e6e6&a:4%3B&=%0A%0A%5E%0A6%0A%0A%0A%0A%0A%0AY&=%0A%0A%2F&%0A7%0A%0A%0A%0A%0A%0AU&=%0A%0A*%0A8%0A%0A%0A%0A%0A%0AI&=%0A%0A(%0A9%0A%0A%0A%0A%0A%0AO&=%0A%0A)%0A0%0A%0A%0A%0A%0A%0AP%3B&@_a:7%3B&=Shift&_a:4%3B&=%0A%0A%0AF1%0A%0A%0A%0A%0A%0AA&=%0A%0A%0AF2%0A%0A%0A%0A%0A%0AS&=%0A%0A'%0AF3%0A%0A%0A%0A%0A%0AD&_c=%23e3b02d&n:true%3B&=%0A%0A-%0AF4%0A%0A%0A%0A%0A%0AF&_c=%23e6e6e6%3B&=%0A%0A%0AF5%0A%0A%0A%0A%0A%0AG&_c=%23e3b02d&a:7%3B&=Tab&_c=%23e6e6e6&a:4%3B&=%0A%0A%0AF6%0A%0A%0A%0A%0A%0AH&_c=%23e3b02d&fa@:5&:0&:4&:0&:0&:0&:0&:0&:0&:5%3B&n:true%3B&=%0A%0A%2F&larr%2F%3B%0AHom%0A%0A%0A%0A%0A%0AJ&_c=%23e6e6e6%3B&=%0A%0A%2F&darr%2F%3B%0APgD%0A%0A%0A%0A%0A%0AK&_fa@:5&:0&:5&:0&:0&:0&:0&:0&:0&:5%3B%3B&=%0A%0A%2F&uarr%2F%3B%0APgU%0A%0A%0A%0A%0A%0AL&=%0A%0A%2F&rarr%2F%3B%0AEnd%0A%0A%0A%0A%0A%0A%2F%3B%3B&@_a:7%3B&=Ctrl&_a:4&fa@:5&:0&:0&:0&:0&:0&:0&:0&:0&:5%3B%3B&=%0A%0A~%0AF7%0A%0A%0A%0A%0A%0AZ&=%0A%0A%60%0AF8%0A%0A%0A%0A%0A%0AX&=%0A%0A+%0AF9%0A%0A%0A%0A%0A%0AC&=%0A%0A%2F=%0AF10%0A%0A%0A%0A%0A%0AV&=%0A%0A%7C%0AF11%0A%0A%0A%0A%0A%0AB&_c=%23e3b02d&a:7%3B&=BSp&_c=%23e6e6e6&a:4%3B&=%0A%0A%5C%0AF12%0A%0A%0A%0A%0A%0AN&=%0A%0A%5B%0A%0A%0A%0A%0A%0A%0AM&=%0A%0A%5D%0A%0A%0A%0A%0A%0A%0A,&=%0A%0A%7B%0A%0A%0A%0A%0A%0A%0A.&=%0A%0A%7D%0A%0A%0A%0A%0A%0A%0A%2F%2F%3B&@_a:7%3B&=Alt&=&=&=Super&_c=%23e3b02d%3B&=%2F&dArr%2F%3B&_c=%23e6e6e6%3B&=Shift&_c=%23e3b02d%3B&=%2F&crarr%2F%3B&_c=%23e6e6e6%3B&=spc&_c=%23e3b02d%3B&=%2F&uArr%2F%3B&_c=%23e6e6e6&a:4%3B&=%0A%0AVolUp&=%0A%0AVolDn&_fa@:5&:0&:2%3B%3B&=%0A%0AMdlClick) diff --git a/keyboards/planck/readme.md b/keyboards/planck/readme.md index 2d76a312a0..08617322e3 100644 --- a/keyboards/planck/readme.md +++ b/keyboards/planck/readme.md @@ -13,4 +13,4 @@ Make example for this keyboard (after setting up your build environment): make planck/rev4: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. \ 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. -- cgit v1.2.3 From a055a45b1319d08cd19fd397ac86a3daa200adda Mon Sep 17 00:00:00 2001 From: kaylanm <1063516+kaylanm@users.noreply.github.com> Date: Sat, 2 Jun 2018 12:14:06 -0400 Subject: Melody96 QMK Support (#3108) * Initial melody96 keyboard definition. * Fixes for Melody96 keyboard definition. --- keyboards/melody96/config.h | 58 ++++++++++++++++++++++++ keyboards/melody96/keymaps/default/keymap.c | 70 +++++++++++++++++++++++++++++ keyboards/melody96/melody96.c | 1 + keyboards/melody96/melody96.h | 28 ++++++++++++ keyboards/melody96/readme.md | 15 +++++++ keyboards/melody96/rules.mk | 57 +++++++++++++++++++++++ 6 files changed, 229 insertions(+) create mode 100644 keyboards/melody96/config.h create mode 100644 keyboards/melody96/keymaps/default/keymap.c create mode 100644 keyboards/melody96/melody96.c create mode 100644 keyboards/melody96/melody96.h create mode 100644 keyboards/melody96/readme.md create mode 100644 keyboards/melody96/rules.mk (limited to 'keyboards') diff --git a/keyboards/melody96/config.h b/keyboards/melody96/config.h new file mode 100644 index 0000000000..6083dcf751 --- /dev/null +++ b/keyboards/melody96/config.h @@ -0,0 +1,58 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER YMDK +#define PRODUCT Melody96 +#define DESCRIPTION Melody96 + +/* key matrix size */ +#define MATRIX_ROWS 12 +#define MATRIX_COLS 9 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B7, B3, B2, B1, B0, E6, F0, F1, F4, F5, F6, F7 } +#define MATRIX_COL_PINS { D0, D1, D2, D3, D5, D4, D6, D7, B4 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION ROW2COL + +/* number of backlight levels */ +#define BACKLIGHT_PIN B6 +#ifdef BACKLIGHT_PIN +#define BACKLIGHT_LEVELS 5 +#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 + +/* 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 + +#define RGB_DI_PIN E2 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 18 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/melody96/keymaps/default/keymap.c b/keyboards/melody96/keymaps/default/keymap.c new file mode 100644 index 0000000000..85b12ced11 --- /dev/null +++ b/keyboards/melody96/keymaps/default/keymap.c @@ -0,0 +1,70 @@ +#include QMK_KEYBOARD_H + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, 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_BSPC, 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, KC_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +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)) { + DDRC |= (1 << 6); PORTC &= ~(1 << 6); + } else { + DDRC &= ~(1 << 6); PORTC &= ~(1 << 6); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRC |= (1 << 7); PORTC &= ~(1 << 7); + } else { + DDRC &= ~(1 << 7); PORTC &= ~(1 << 7); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} diff --git a/keyboards/melody96/melody96.c b/keyboards/melody96/melody96.c new file mode 100644 index 0000000000..44e813586b --- /dev/null +++ b/keyboards/melody96/melody96.c @@ -0,0 +1 @@ +#include "melody96.h" diff --git a/keyboards/melody96/melody96.h b/keyboards/melody96/melody96.h new file mode 100644 index 0000000000..f60f054cae --- /dev/null +++ b/keyboards/melody96/melody96.h @@ -0,0 +1,28 @@ +#ifndef MELODY96_H +#define MELODY96_H + +#include "quantum.h" + +#define LAYOUT( \ + K050, K051, K052, K053, K054, K055, K056, K057, K058, K118, K117, K115, K114, K113, K116, K112, K111, K110, K063, \ + K040, K041, K042, K043, K044, K045, K046, K047, K048, K108, K107, K105, K104, K103, K106, K102, K101, K100, K064, \ + K030, K031, K032, K033, K034, K035, K036, K037, K038, K098, K097, K095, K094, K084, K096, K092, K091, K090, \ + K020, K021, K022, K023, K024, K025, K026, K027, K028, K088, K087, K085, K093, K086, K082, K081, K080, \ + K010, K011, K012, K013, K014, K015, K016, K017, K018, K078, K077, K075, K074, K073, K076, K072, K071, K070, \ + K000, K001, K002, K006, K008, K007, K005, K004, K003, K066, K062, K061, K060 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008 }, \ + { K010, K011, K012, K013, K014, K015, K016, K017, K018 }, \ + { K020, K021, K022, K023, K024, K025, K026, K027, K028 }, \ + { K030, K031, K032, K033, K034, K035, K036, K037, K038 }, \ + { K040, K041, K042, K043, K044, K045, K046, K047, K048 }, \ + { K050, K051, K052, K053, K054, K055, K056, K057, K058 }, \ + { K060, K061, K062, K063, K064, KC_NO, K066, KC_NO, KC_NO }, \ + { K070, K071, K072, K073, K074, K075, K076, K077, K078 }, \ + { K080, K081, K082, KC_NO, K084, K085, K086, K087, K088 }, \ + { K090, K091, K092, K093, K094, K095, K096, K097, K098 }, \ + { K100, K101, K102, K103, K104, K105, K106, K107, K108 }, \ + { K110, K111, K112, K113, K114, K115, K116, K117, K118 } \ +} + +#endif diff --git a/keyboards/melody96/readme.md b/keyboards/melody96/readme.md new file mode 100644 index 0000000000..b43398dd35 --- /dev/null +++ b/keyboards/melody96/readme.md @@ -0,0 +1,15 @@ +# YMDK Melody96 + +![melody96](https://i.imgur.com/9o0a6XF.png) + +96-key Keyboard from YMDK + +Keyboard Maintainer: [superuser41](https://github.com/kaylanm) +Hardware Supported: melody96 +Hardware Availability: [YMDK, group buy closed](https://geekhack.org/index.php?topic=93614.0) + +Make example for this keyboard (after setting up your build environment): + + make melody96: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/melody96/rules.mk b/keyboards/melody96/rules.mk new file mode 100644 index 0000000000..be0f84b170 --- /dev/null +++ b/keyboards/melody96/rules.mk @@ -0,0 +1,57 @@ +# 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 +BOOTLOADER = atmel-dfu + + +# 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 -- cgit v1.2.3 From 82500842f6bae2ced179fe03348cbd91604bc09f Mon Sep 17 00:00:00 2001 From: Andrew Dunai Date: Sat, 2 Jun 2018 19:14:59 +0300 Subject: Add ability to write additional code in matrix scann loop on slave. (#3072) --- keyboards/lets_split/matrix.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'keyboards') diff --git a/keyboards/lets_split/matrix.c b/keyboards/lets_split/matrix.c index 904850d4d3..f753d234a1 100644 --- a/keyboards/lets_split/matrix.c +++ b/keyboards/lets_split/matrix.c @@ -101,6 +101,10 @@ __attribute__ ((weak)) void matrix_scan_user(void) { } +__attribute__ ((weak)) +void matrix_slave_scan_user(void) { +} + inline uint8_t matrix_rows(void) { @@ -286,6 +290,7 @@ void matrix_slave_scan(void) { serial_slave_buffer[i] = matrix[offset+i]; } #endif + matrix_slave_scan_user(); } bool matrix_is_modified(void) -- cgit v1.2.3 From 692a77c2dd8a369f6ae6efa22270d1bdeb551f0b Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sat, 2 Jun 2018 09:15:52 -0700 Subject: Refactor Chocopad to support LAYOUT_ortho_4x4 macro (#3106) * Refactor for Chocopad * Configurator update * Chocopad refactor for LAYOUT_ortho_4x4 * info.json update --- keyboards/chocopad/chocopad.h | 4 ++-- keyboards/chocopad/info.json | 2 +- keyboards/chocopad/keymaps/default/keymap.c | 6 +++--- keyboards/chocopad/rules.mk | 2 ++ 4 files changed, 8 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/chocopad/chocopad.h b/keyboards/chocopad/chocopad.h index a0c0baaf65..ec73b1465b 100644 --- a/keyboards/chocopad/chocopad.h +++ b/keyboards/chocopad/chocopad.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define LAYOUT( \ +#define LAYOUT_ortho_4x4( \ A1, A2, A3, A4, \ B1, B2, B3, B4, \ C1, C2, C3, C4, \ @@ -22,7 +22,7 @@ C1, C2, C3, C4, \ D1, D2, D3, D4 \ ) \ - LAYOUT( \ + LAYOUT_ortho_4x4( \ KC_##A1, KC_##A2, KC_##A3, KC_##A4, \ KC_##B1, KC_##B2, KC_##B3, KC_##B4, \ KC_##C1, KC_##C2, KC_##C3, KC_##C4, \ diff --git a/keyboards/chocopad/info.json b/keyboards/chocopad/info.json index 3459c0829d..c5a7d42bbc 100644 --- a/keyboards/chocopad/info.json +++ b/keyboards/chocopad/info.json @@ -5,7 +5,7 @@ "width": 4, "height": 4, "layouts": { - "LAYOUT": { + "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}] } } diff --git a/keyboards/chocopad/keymaps/default/keymap.c b/keyboards/chocopad/keymaps/default/keymap.c index e60bc5d379..df22e8b1fb 100644 --- a/keyboards/chocopad/keymaps/default/keymap.c +++ b/keyboards/chocopad/keymaps/default/keymap.c @@ -8,19 +8,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = LAYOUT( + [_BASE] = LAYOUT_ortho_4x4( KC_PGUP, KC_HOME, KC_UP, KC_END , \ KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, \ MO(_FN2), KC_VOLU, KC_MPLY, KC_MPRV, \ MO(_FN1), KC_VOLD, KC_MUTE, KC_MNXT \ ), - [_FN1] = LAYOUT( + [_FN1] = LAYOUT_ortho_4x4( KC_ESC, KC_P7, KC_P8, KC_P9, \ KC_TAB, KC_P4, KC_P5, KC_P6, \ KC_ENT, KC_P1, KC_P2, KC_P3, \ _______, KC_P0, KC_P0, KC_DOT \ ), - [_FN2] = LAYOUT( + [_FN2] = LAYOUT_ortho_4x4( RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, \ RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, \ _______, _______, _______, RESET, \ diff --git a/keyboards/chocopad/rules.mk b/keyboards/chocopad/rules.mk index cd9222a154..39ce38e100 100644 --- a/keyboards/chocopad/rules.mk +++ b/keyboards/chocopad/rules.mk @@ -54,3 +54,5 @@ NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https:/ BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality AUDIO_ENABLE = no RGBLIGHT_ENABLE = yes + +LAYOUTS = ortho_4x4 -- cgit v1.2.3 From b05c15363326e3d79b5effcd0135e825de6553c6 Mon Sep 17 00:00:00 2001 From: KeLorean Date: Mon, 4 Jun 2018 11:11:17 -0400 Subject: change to ca66 kelorean layout (#3116) --- keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c index 165681ea75..3506efe804 100644 --- a/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c +++ b/keyboards/playkbtw/ca66/keymaps/kelorean/keymap.c @@ -3,6 +3,7 @@ *Made for HHKB layout with CA66 badge in lower left corner and split spacebars. *Left Spacebar - tap for backspace, hold for Layer1 *Right Spacebar - tap for space, hold for Layer2 +*Layer 2 is same as Layer 1 except Left Spacebar is now delete *Cap Locks has been replaced with Momentary Toggle to Layer3 *Layer 4 can be reached only by Layer3 in the '\' key *Layer 4 tab is the soft reset. @@ -36,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_NO, KC_NO, KC_UP, 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_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_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_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO), //Layer3, Lighting Function keys, media keys and '\' is now Momentary Toggle to Layer 4, which has the soft reset. [3] = LAYOUT( -- cgit v1.2.3 From e354e36ece9bb96a453ca92db74290a410fa8b60 Mon Sep 17 00:00:00 2001 From: fordmustang5l <39848351+fordmustang5l@users.noreply.github.com> Date: Mon, 4 Jun 2018 11:12:13 -0400 Subject: Added ASCII legend to melody96 to help visualize the layouts (#3117) --- keyboards/melody96/keymaps/default/keymap.c | 50 +++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) (limited to 'keyboards') diff --git a/keyboards/melody96/keymaps/default/keymap.c b/keyboards/melody96/keymaps/default/keymap.c index 85b12ced11..507a5f8d7d 100644 --- a/keyboards/melody96/keymaps/default/keymap.c +++ b/keyboards/melody96/keymaps/default/keymap.c @@ -3,6 +3,30 @@ #define _______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Layer 0, default layer +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | | | | | | +| ESC* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | P SCN | HOME | END | P UP | P DOWN | DEL | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | | BACK | NUM | | | | +| ~` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | _ - | = + | \ | SPACE | LOCK | / | * | - | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | [ | ] | | | | | | +| TAB | Q | W | E | R | T | Y | U | I | O | P | { | } | | \ | 7 | 8 | 9 | - | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|_____________|________|________|________|________| +| | | | | | | | | | | ; | ' | | | | | | +| CAPS LOCK | A | S | D | F | G | H | J | K | L | : | " | ENTER | 4 | 5 | 6 | + | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | | | | | | | , | . | / | | | | | | | +| SHIFT | NUBS | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | 1 | 2 | 3 | ENTER | +|_________|________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________|________| +| | | | | | MO | MO | | | | | | | +| CTRL | LGUI | L ALT | SPACE | R ALT | _LOWER | _LOWER | LEFT | DOWN | RIGHT | 0 | . | ENTER | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| +*/ + + 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_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, @@ -12,6 +36,32 @@ 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_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + + /* Layer 1, led layer +____________________________________________________________________________________________________________________________________________________________________________ +| | | | | | | | | | | | | | | VOL | VOL | | | | +| RESET | | | | | | | | | | | | | MUTE | DOWN | UP | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | | | | | | | | | | | | | | | | | | | +| | | | | | | | | | | | | | | | | | | | +|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| +| | RGB | RGB | HUE | HUE | SATUR. | SATUR. | VALUE | VALUE | | | | | | | | | | +| | TOGGLE | MOD |INCREASE| DCRESE |INCREASE| DCRSE |INCREASE| DCRSE | | | | | | | | | | +|____________|________|________|________|________|________|________|________|________|________|________|________|________|_____________|________|________|________|________| +| BACKLIGHT | | | | | | | | | | | | | | | | | +| TOGGLE | | | | | | | | | | | | | | | | | +|______________|________|________|________|________|________|________|________|________|________|________|________|____________________|________|________|________|________| +| | | | |BACKLHT |BACKLHT |BACKLHT | | | | | | | | | | | | +| | | | | DCRSE |TOGGLE |INCREASE| | | | | | | | | | | | +|_________|________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________|________| +| | | | | | | | | | | | | | +| | | | | | | | | | | | | | +|__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| +BL_TOGG, BL_DEC, BL_INC changes the in-switch LEDs +*/ + + LAYOUT( RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, -- cgit v1.2.3 From 7498b184b74c90f94b79f7835852aa54b0134f5c Mon Sep 17 00:00:00 2001 From: MakotoKurauchi Date: Tue, 5 Jun 2018 00:14:35 +0900 Subject: Support ios to default keymap (#3118) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * add some comment about Helix customize and auto-setup RGBLIGHT_LIMIT_VAL * add define USB_MAX_POWER_CONSUMPTION * Helix keyboard OLED, RGBLIGHT enable/disable control integrate into rules.mk rules.mk: add 4 Variables for compile control. # Helix keyboard customize # you can edit follows 4 Variables # jp: 以下の4つの変数を必要に応じて編集します。 OLED_ENABLE = no # OLED_ENABLE LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations config.h: auto set RGBLED_NUM by HELIX_ROWS and rules.mk's define * HELIX_ROWS define move from config.h to rules.mk * add readme.md * rename readme.md to readme_jp.md * add readme.md and modify readme_jp.md * change helix/ssd1306.c for select glcdfont.c position * add variable LOCAL_GLCDFONT into each keymaps rules.mk * Add iPhone/iPad LED support to Helix default keymap * add Freggy keymap * adjust the delay of serial.c * change readme * renumber _ADJUST for shrink program size --- keyboards/helix/rev2/keymaps/default/config.h | 32 +- keyboards/helix/rev2/keymaps/default/keymap.c | 27 +- keyboards/helix/rev2/keymaps/default/readme.md | 6 +- keyboards/helix/rev2/keymaps/default/readme_jp.md | 15 +- keyboards/helix/rev2/keymaps/default/rules.mk | 39 +- keyboards/helix/rev2/keymaps/froggy/config.h | 123 ++++ keyboards/helix/rev2/keymaps/froggy/helixfont.h | 244 ++++++++ keyboards/helix/rev2/keymaps/froggy/keymap.c | 650 ++++++++++++++++++++++ keyboards/helix/rev2/keymaps/froggy/readme.md | 83 +++ keyboards/helix/rev2/keymaps/froggy/rules.mk | 123 ++++ keyboards/helix/serial.c | 2 +- 11 files changed, 1313 insertions(+), 31 deletions(-) create mode 100644 keyboards/helix/rev2/keymaps/froggy/config.h create mode 100644 keyboards/helix/rev2/keymaps/froggy/helixfont.h create mode 100644 keyboards/helix/rev2/keymaps/froggy/keymap.c create mode 100644 keyboards/helix/rev2/keymaps/froggy/readme.md create mode 100644 keyboards/helix/rev2/keymaps/froggy/rules.mk (limited to 'keyboards') diff --git a/keyboards/helix/rev2/keymaps/default/config.h b/keyboards/helix/rev2/keymaps/default/config.h index 66c9b9e8bd..17c4a30b34 100644 --- a/keyboards/helix/rev2/keymaps/default/config.h +++ b/keyboards/helix/rev2/keymaps/default/config.h @@ -78,30 +78,44 @@ along with this program. If not, see . #define RGBLED_NUM 6 #endif -#if RGBLED_NUM <= 6 - #define RGBLIGHT_LIMIT_VAL 255 +#ifndef IOS_DEVICE_ENABLE + #if RGBLED_NUM <= 6 + #define RGBLIGHT_LIMIT_VAL 255 + #else + #if HELIX_ROWS == 5 + #define RGBLIGHT_LIMIT_VAL 120 + #else + #define RGBLIGHT_LIMIT_VAL 130 + #endif + #endif + #define RGBLIGHT_VAL_STEP 17 #else - #if HELIX_ROWS == 5 - #define RGBLIGHT_LIMIT_VAL 120 + #if RGBLED_NUM <= 6 + #define RGBLIGHT_LIMIT_VAL 90 #else - #define RGBLIGHT_LIMIT_VAL 130 + #if HELIX_ROWS == 5 + #define RGBLIGHT_LIMIT_VAL 35 + #else + #define RGBLIGHT_LIMIT_VAL 45 + #endif #endif + #define RGBLIGHT_VAL_STEP 4 #endif #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 -#endif -#ifdef RGBLIGHT_ENABLE +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) // USB_MAX_POWER_CONSUMPTION value for Helix keyboard // 120 RGBoff, OLEDoff // 120 OLED // 330 RGB 6 // 300 RGB 32 // 310 OLED & RGB 32 - #define USB_MAX_POWER_CONSUMPTION 330 + #define USB_MAX_POWER_CONSUMPTION 400 #else // fix iPhone and iPad power adapter issue // iOS device need lessthan 100 #define USB_MAX_POWER_CONSUMPTION 100 #endif + +#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/default/keymap.c b/keyboards/helix/rev2/keymaps/default/keymap.c index b8a9baee34..1a268b32d5 100644 --- a/keyboards/helix/rev2/keymaps/default/keymap.c +++ b/keyboards/helix/rev2/keymaps/default/keymap.c @@ -27,12 +27,14 @@ extern uint8_t is_master; // 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 layer_number { + _QWERTY = 0, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _ADJUST +}; enum custom_keycodes { QWERTY = SAFE_RANGE, @@ -526,15 +528,10 @@ void matrix_update(struct CharacterMatrix *dest, //assign the right code to your layers for OLED display #define L_BASE 0 -#define L_LOWER 8 -#define L_RAISE 16 -#define L_FNLAYER 64 -#define L_NUMLAY 128 -#define L_NLOWER 136 -#define L_NFNLAYER 192 -#define L_MOUSECURSOR 256 -#define L_ADJUST 65536 -#define L_ADJUST_TRI 65560 +#define L_LOWER (1<<_LOWER) +#define L_RAISE (1<<_RAISE) +#define L_ADJUST (1<<_ADJUST) +#define L_ADJUST_TRI (L_ADJUST|L_RAISE|L_LOWER) static void render_logo(struct CharacterMatrix *matrix) { diff --git a/keyboards/helix/rev2/keymaps/default/readme.md b/keyboards/helix/rev2/keymaps/default/readme.md index 307e5c30b9..2cdc5506ca 100644 --- a/keyboards/helix/rev2/keymaps/default/readme.md +++ b/keyboards/helix/rev2/keymaps/default/readme.md @@ -109,13 +109,15 @@ see `qmk_firmware/keyboards/helix/rev2/keymaps/default/rules.mk` ``` # Helix keyboard customize -# you can edit follows 5 Variables -# jp: 以下の5つの変数を必要に応じて編集します。 +# you can edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集します。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` ## Compile diff --git a/keyboards/helix/rev2/keymaps/default/readme_jp.md b/keyboards/helix/rev2/keymaps/default/readme_jp.md index 88ffc02ff3..3eaeab48ec 100644 --- a/keyboards/helix/rev2/keymaps/default/readme_jp.md +++ b/keyboards/helix/rev2/keymaps/default/readme_jp.md @@ -52,13 +52,15 @@ RGB バックライトまたは、RGB Underglow をつけた場合は、 ``` # Helix keyboard customize -# you can edit follows 5 Variables -# jp: 以下の5つの変数を必要に応じて編集します。 +# you can edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集します。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 OLED_ENABLE = no # OLED_ENABLE +LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) ``` @@ -92,6 +94,15 @@ rules.mk の下記の部分を編集して no を yes に変更してくださ OLED_ENABLE = yes # OLED_ENABLE ``` +## iPad/iPhoneサポートを有効にする。 + +rules.mk の下記の部分を編集して no を yes に変更してください。 +RBG Underglow や RGBバックライトの輝度を抑えて、iPad, iPhone にも接続できるようになります。 + +``` +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) +``` + ## リンク * さらに詳細は、[こちら helix/Doc/firmware_jp.md](https://github.com/MakotoKurauchi/helix/blob/master/Doc/firmware_jp.md)をご覧ください。 diff --git a/keyboards/helix/rev2/keymaps/default/rules.mk b/keyboards/helix/rev2/keymaps/default/rules.mk index d407dfb5eb..4174a30457 100644 --- a/keyboards/helix/rev2/keymaps/default/rules.mk +++ b/keyboards/helix/rev2/keymaps/default/rules.mk @@ -23,21 +23,52 @@ define HELIX_CUSTOMISE_MSG $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) $(info - LED_ANIMATION=$(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) endef # Helix keyboard customize -# you can edit follows 6 Variables -# jp: 以下の6つの変数を必要に応じて編集します。 +# you can edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集します。 HELIX_ROWS = 5 # Helix Rows is 4 or 5 OLED_ENABLE = no # OLED_ENABLE LOCAL_GLCDFONT = no # use each keymaps "helixfont.h" insted of "common/glcdfont.c" LED_BACK_ENABLE = no # LED backlight (Enable WS2812 RGB underlight.) LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) #### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. #### Do not enable these with audio at the same time. +### Helix keyboard 'default' keymap: convenient command line option +## make HELIX= helix:defualt +## option= oled | back | under | na | ios +## ex. +## make HELIX=oled helix:defualt +## make HELIX=oled,back helix:defualt +## make HELIX=oled,under helix:defualt +## make HELIX=oled,back,na helix:defualt +## make HELIX=oled,back,ios helix:defualt +## +ifneq ($(strip $(HELIX)),) + ifeq ($(findstring oled,$(HELIX)), oled) + OLED_ENABLE = yes + endif + ifeq ($(findstring back,$(HELIX)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(HELIX)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(HELIX)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(HELIX)), ios) + IOS_DEVICE_ENABLE = yes + endif + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(info ) +endif + # Uncomment these for checking # jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 # $(eval $(call HELIX_CUSTOMISE_MSG)) @@ -63,6 +94,10 @@ else RGBLIGHT_ENABLE = no endif +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + ifeq ($(strip $(LED_ANIMATIONS)), yes) OPT_DEFS += -DRGBLIGHT_ANIMATIONS endif diff --git a/keyboards/helix/rev2/keymaps/froggy/config.h b/keyboards/helix/rev2/keymaps/froggy/config.h new file mode 100644 index 0000000000..19718a458d --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy/config.h @@ -0,0 +1,123 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial */ + +#define USE_I2C +#define USE_SERIAL +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +// Helix keyboard OLED support +// see ./rules.mk: OLED_ENABLE=yes or no +#ifdef OLED_ENABLE + #define SSD1306OLED +#endif + +/* Select rows configuration */ +// Rows are 4 or 5 +// #define HELIX_ROWS 5 see ./rules.mk + +/* key matrix size */ +// Rows are doubled-up +#if HELIX_ROWS == 4 + #define MATRIX_ROWS 8 + #define MATRIX_COLS 7 + #define MATRIX_ROW_PINS { D4, C6, D7, E6 } +#elif HELIX_ROWS == 5 + #define MATRIX_ROWS 10 + #define MATRIX_COLS 7 + #define MATRIX_ROW_PINS { D4, C6, D7, E6, B4 } +#else + #error "expected HELIX_ROWS 4 or 5" +#endif + +#define USE_SERIAL_PD2 + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 200 +#define ONESHOT_TAP_TOGGLE 5 /* Tapping this number of times holds the key until tapped this number of times again. */ +#define ONESHOT_TIMEOUT 5000 /* Time (in ms) before the one shot key is released */ + +// Helix keyboard RGB LED support +//#define RGBLIGHT_ANIMATIONS : see ./rules.mk: LED_ANIMATIONS = yes or no +// see ./rules.mk: LED_BACK_ENABLE or LED_UNDERGLOW_ENABLE set yes +#ifdef RGBLED_BACK + #if HELIX_ROWS == 4 + #define RGBLED_NUM 25 + #elif HELIX_ROWS == 5 + #define RGBLED_NUM 32 + #endif +#else + #define RGBLED_NUM 6 +#endif + +#ifndef IOS_DEVICE_ENABLE + #if RGBLED_NUM <= 6 + #define RGBLIGHT_LIMIT_VAL 255 + #else + #if HELIX_ROWS == 5 + #define RGBLIGHT_LIMIT_VAL 120 + #else + #define RGBLIGHT_LIMIT_VAL 130 + #endif + #endif + #define RGBLIGHT_VAL_STEP 17 +#else + #if RGBLED_NUM <= 6 + #define RGBLIGHT_LIMIT_VAL 90 + #else + #if HELIX_ROWS == 5 + #define RGBLIGHT_LIMIT_VAL 35 + #else + #define RGBLIGHT_LIMIT_VAL 45 + #endif + #endif + #define RGBLIGHT_VAL_STEP 4 +#endif +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 + +#if defined(RGBLIGHT_ENABLE) && !defined(IOS_DEVICE_ENABLE) +// USB_MAX_POWER_CONSUMPTION value for Helix keyboard +// 120 RGBoff, OLEDoff +// 120 OLED +// 330 RGB 6 +// 300 RGB 32 +// 310 OLED & RGB 32 + #define USB_MAX_POWER_CONSUMPTION 400 +#else + // fix iPhone and iPad power adapter issue + // iOS device need lessthan 100 + #define USB_MAX_POWER_CONSUMPTION 100 +#endif + +#endif /* CONFIG_USER_H */ diff --git a/keyboards/helix/rev2/keymaps/froggy/helixfont.h b/keyboards/helix/rev2/keymaps/froggy/helixfont.h new file mode 100644 index 0000000000..7f54748151 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy/helixfont.h @@ -0,0 +1,244 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font + +static const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0xFC, 0xFE, 0x02, 0x82, 0x82, 0x82, +0x82, 0x82, 0x82, 0xC2, 0x82, 0x02, +0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0x02, 0x62, 0x62, 0x62, 0x62, 0xE2, +0x62, 0x62, 0xE2, 0x02, 0x02, 0xFC, +0x00, 0x00, 0x00, 0x00, 0x00, 0xF0, +0x30, 0x40, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x40, 0x00, 0x00, 0x24, 0xA4, +0xA4, 0xBC, 0xA4, 0x24, 0x24, 0x00, +0x00, 0x00, 0x24, 0xA4, 0x24, 0x24, +0x3C, 0x04, 0x04, 0x00, 0x00, 0x00, +0xB8, 0xA4, 0xA4, 0xA4, 0xBC, 0x00, +0x00, 0x00, 0x00, 0xFC, 0x00, 0xFC, +0x00, 0x44, 0x44, 0x44, 0xDC, 0x44, +0x04, 0x3C, 0x00, 0x00, 0x00, 0x00, +0xFC, 0xFE, 0xFE, 0x7E, 0x7E, 0x7E, +0x7E, 0x7E, 0x7E, 0x3E, 0x7E, 0xFE, +0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0xFE, 0x9E, 0x9E, 0x9E, 0x9E, 0x1E, +0x9E, 0x9E, 0x1E, 0xFE, 0xFE, 0xFC, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x7F, 0x7F, 0x40, 0x41, 0x41, 0x41, +0x41, 0x41, 0x41, 0x41, 0x41, 0x40, +0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x40, 0x40, 0x40, 0x40, 0x40, 0x41, +0x40, 0x40, 0x43, 0x40, 0x40, 0x7F, +0x00, 0x00, 0x00, 0xF0, 0xFB, 0xFB, +0x00, 0x50, 0x60, 0xFF, 0xFC, 0x3C, +0x1E, 0x0E, 0x0C, 0xFC, 0xF8, 0xE8, +0xE8, 0xE8, 0x30, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x02, 0x02, 0x0D, 0x02, +0x02, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x57, 0x50, +0x57, 0x54, 0x57, 0x10, 0x50, 0x00, +0x00, 0x00, 0x97, 0x94, 0x97, 0x94, +0xF7, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE4, 0x14, 0xF4, 0x94, 0xF7, 0x00, +0x00, 0x00, 0x00, 0xFF, 0x00, 0xFF, +0x00, 0x38, 0xA4, 0xA4, 0xA5, 0x3C, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x7F, 0x7F, 0x7F, 0x7E, 0x7E, 0x7E, +0x7E, 0x7E, 0x7E, 0x7E, 0x7E, 0x7F, +0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x7F, 0x7F, 0x7F, 0x7F, 0x7F, 0x7E, +0x7F, 0x7F, 0x7C, 0x7F, 0x7F, 0x7F, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xFE, 0xFE, 0x02, 0x62, 0x62, 0x62, +0xE2, 0x62, 0x62, 0x62, 0xC2, 0x02, +0x02, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0x02, 0x82, 0xC2, 0xE2, 0xF2, 0x82, +0x82, 0x82, 0x82, 0x02, 0x02, 0xFE, +0x00, 0x00, 0x00, 0x07, 0x7F, 0xDF, +0x00, 0x05, 0x03, 0x7F, 0x1F, 0x1E, +0x3C, 0x38, 0x18, 0x1F, 0x0F, 0x0D, +0x0D, 0x0D, 0x06, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x20, 0x20, 0x50, +0x8C, 0x50, 0x20, 0x20, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x80, 0x80, +0x40, 0x30, 0x40, 0x80, 0x89, 0x09, +0x06, 0x09, 0x09, 0x00, 0x00, 0x00, +0x00, 0x00, 0x1C, 0x12, 0x12, 0x12, +0x1E, 0x10, 0x10, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0xFF, 0x00, 0x73, +0x84, 0xE7, 0x94, 0x94, 0x94, 0x67, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xFE, 0xFE, 0xFE, 0x9E, 0x9E, 0x9E, +0x1E, 0x9E, 0x9E, 0x9E, 0x3E, 0xFE, +0xFE, 0xFE, 0x00, 0x00, 0xFE, 0xFE, +0xFE, 0x7E, 0x3E, 0x1E, 0x0E, 0x7E, +0x7E, 0x7E, 0x7E, 0xFE, 0xFE, 0xFE, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3F, 0x7F, 0x40, 0x46, 0x46, 0x46, +0x47, 0x46, 0x46, 0x46, 0x43, 0x40, +0x40, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x40, 0x41, 0x43, 0x47, 0x4F, 0x41, +0x41, 0x41, 0x41, 0x40, 0x40, 0x3F, +0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x06, 0x01, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x04, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x01, 0x06, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x08, 0x08, +0x36, 0x08, 0x08, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x1F, 0x00, 0x0E, +0x10, 0x1C, 0x12, 0x12, 0x12, 0x12, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3F, 0x7F, 0x7F, 0x79, 0x79, 0x79, +0x78, 0x79, 0x79, 0x79, 0x7C, 0x7F, +0x7F, 0x7F, 0x00, 0x00, 0x7F, 0x7F, +0x7F, 0x7E, 0x7C, 0x78, 0x70, 0x7E, +0x7E, 0x7E, 0x7E, 0x7F, 0x7F, 0x3F, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00 +}; +#endif // FONT5X7_H diff --git a/keyboards/helix/rev2/keymaps/froggy/keymap.c b/keyboards/helix/rev2/keymaps/froggy/keymap.c new file mode 100644 index 0000000000..69c41856b5 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy/keymap.c @@ -0,0 +1,650 @@ +#include "helix.h" +#include "bootloader.h" +#include "action_layer.h" +#include "eeconfig.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#include "LUFA/Drivers/Peripheral/TWI.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +#define DELAY_TIME 75 +static uint16_t key_timer; +static uint16_t tap_timer; +static uint16_t delay_registered_code; +static uint8_t delay_mat_row; +static uint8_t delay_mat_col; +static bool delay_key_stat; +static bool delay_key_pressed; +static bool tapping_key; + +// 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 _OPT 1 +#define _FUNC 2 +#define _SYM 3 +#define _NUM 4 + +bool RGBAnimation = false; //Flag for LED Layer color Refresh. + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + EISU, + KANA, + RGBRST, + RGBOFF, + RGB1, + RGB2, + RGB3, + OPT_TAP_SP, + DESKTOP, + MAC, + WIN, +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +//Macros +#define M_SAMPLE M(KC_SAMPLEMACRO) + +#if HELIX_ROWS == 5 +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + /* Base + * ,-----------------------------------------. ,-----------------------------------------. + * | C+z | ; | [ | ( | < | { | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | KANA | P | K | R | A | F | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | BS | D | T | H | E | O | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Y | S | N | I | U |Space | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | win | Sym | Num | OPT | Ent | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_BASE] = KEYMAP( \ + LCTL(KC_Z), KC_SCLN, KC_LBRC, KC_LPRN, KC_LT, KC_LCBR, _______, _______, _______, _______, _______, _______, \ + KANA, KC_P, KC_K, KC_R, KC_A, KC_F, _______, _______, _______, _______, _______, _______, \ + KC_BSPC, KC_D, KC_T, KC_H, KC_E, KC_O, _______, _______, _______, _______, _______, _______, \ + OSM(MOD_LSFT), KC_Y, KC_S, KC_N, KC_I, KC_U, KC_SPC, _______, _______, _______, _______, _______, _______, _______, \ + OSM(MOD_LCTL), OSM(MOD_LALT), OSM(MOD_LGUI), MO(_SYM), MO(_NUM), OPT_TAP_SP, KC_ENT, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Opt + * ,-----------------------------------------. ,-----------------------------------------. + * | Esc | : | ] | ) | > | } | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | EISU| J | M | B | ' | Tab | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | . | V | C | L | Z | Q | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | X | G | W | - | Del | Esc | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | , | DTOP | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_OPT] = KEYMAP( \ + KC_ESC, KC_COLN,KC_RBRC, KC_RPRN,KC_GT, KC_RCBR, _______, _______, _______, _______, _______, _______, \ + EISU, KC_J, KC_M, KC_B, KC_QUOT, KC_TAB, _______, _______, _______, _______, _______, _______, \ + KC_DOT, KC_V, KC_C, KC_L, KC_Z, KC_Q, _______, _______, _______, _______, _______, _______, \ + _______, KC_X, KC_G, KC_W, KC_MINUS, KC_DEL, KC_ESC, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______,_______, KC_COMM,DESKTOP, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Func + * ,-----------------------------------------. ,-----------------------------------------. + * |RGBRST| Hue | | RST | Mac | Win | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | RGB1 | VAL+ | F7 | F8 | F9 | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | RGB2 | VAL- | F4 | F5 | F6 | F12 | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | RGB3 | F10 | F1 | F2 | F3 | F11 | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |RGBOFF| | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_FUNC] = KEYMAP( \ + RGBRST,RGB_HUI, _______, RESET, MAC, WIN, _______, _______, _______, _______, _______, _______, \ + RGB1, RGB_VAI, KC_F7, KC_F8, KC_F9, _______, _______, _______, _______, _______, _______, _______, \ + RGB2, RGB_VAD, KC_F4, KC_F5, KC_F6, KC_F12, _______, _______, _______, _______, _______, _______, \ + RGB3, KC_F10, KC_F1, KC_F2, KC_F3, KC_F11, _______, _______, _______, _______, _______, _______, _______, _______, \ + RGBOFF,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Sym + * ,-----------------------------------------. ,-----------------------------------------. + * | Ins | GRV | | PU | PD | ^ | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | \ | # | = | ? | % | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | $ | upA | @ | ! | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | CL | <- | dwA | -> | _ | & | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | PS | | ~ | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_SYM] = KEYMAP( \ + KC_INS, KC_GRV, _______, KC_PGUP, KC_PGDN, KC_CIRC, _______, _______, _______, _______, _______, _______, \ + _______, KC_BSLS, KC_HASH, KC_EQL, KC_QUES, KC_PERC, _______, _______, _______, _______, _______, _______, \ + _______, KC_DLR, KC_UP, KC_AT, KC_EXLM, KC_PIPE, _______, _______, _______, _______, _______, _______, \ + KC_CAPS, KC_LEFT, KC_DOWN, KC_RIGHT,KC_UNDS, KC_AMPR, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_PSCR, _______, KC_TILD, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + + /* Raise + * ,-----------------------------------------. ,-----------------------------------------. + * | | | Func | home | End | | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | | * | 7 | 8 | 9 | - | | | | | | | | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | . | / | 4 | 5 | 6 | + | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | LN | 0 | 1 | 2 | 3 |C+S+F1| | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | , | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_NUM] = KEYMAP( \ + _______, _______, OSL(_FUNC), KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, \ + _______, KC_ASTR, KC_P7, KC_P8, KC_P9, KC_MINS, _______, _______, _______, _______, _______, _______, \ + KC_PDOT, KC_SLSH, KC_P4, KC_P5, KC_P6, KC_PLUS, _______, _______, _______, _______, _______, _______, \ + KC_NLCK, KC_P0, KC_P1, KC_P2, KC_P3, LCTL(S(KC_F1)), _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, KC_PDOT, KC_COMM, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) +}; +#else +#error "undefined keymaps" +#endif + + +#ifdef AUDIO_ENABLE + +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); +#endif + +// define variables for reactive RGB +//bool TOG_STATUS = false; +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool find_mairix(uint16_t keycode, uint8_t *row, uint8_t *col){ + for(uint8_t i=0; ievent.pressed){ + unregister_delay_code(); + } + } + + switch (keycode) { + case KC_SCLN: + case KC_LBRC: + case KC_LPRN: + case KC_LT: + case KC_LCBR: + case KC_P: + case KC_K: + case KC_R: + case KC_A: + case KC_F: + case KC_BSPC: + case KC_D: + case KC_T: + case KC_H: + case KC_E: + case KC_O: + case KC_Y: + case KC_S: + case KC_N: + case KC_I: + case KC_U: + case LCTL(KC_Z): + case KC_SPC: + if (record->event.pressed) { + register_delay_code(_BASE); + if(find_mairix(keycode, &delay_mat_row, &delay_mat_col)){ + key_timer = timer_read(); + delay_key_stat = true; + delay_key_pressed = true; + } + }else{ + delay_key_pressed = false; + } + return false; + break; + case OPT_TAP_SP: + if (record->event.pressed) { + tapping_key = false; + register_delay_code(_OPT); + layer_on(_OPT); + tap_timer = timer_read(); + }else{ + layer_off(_OPT); + if(tapping_key==false && timer_elapsed(tap_timer) < TAPPING_TERM){ + SEND_STRING(" "); + } + tap_timer = 0; + } + return false; + break; + case EISU: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG2); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG2); + } + return false; + break; + case KANA: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_LANG1); + }else{ + SEND_STRING(SS_LALT("`")); + } + } else { + unregister_code(KC_LANG1); + } + return false; + break; + case DESKTOP: + if (record->event.pressed) { + if(keymap_config.swap_lalt_lgui==false){ + register_code(KC_F11); + }else{ + SEND_STRING(SS_LGUI("d")); + } + } else { + unregister_code(KC_F11); + } + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + RGBAnimation = false; + } + #endif + break; + case RGBOFF: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_disable(); + } + #endif + break; + case RGB1: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + RGBAnimation = true; + rgblight_mode(6); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + case RGB2: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + RGBAnimation = true; + rgblight_mode(10); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + case RGB3: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + RGBAnimation = true; + rgblight_mode(21); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + case MAC: + if (record->event.pressed) { + keymap_config.swap_lalt_lgui = false; + keymap_config.swap_ralt_rgui = false; + #ifdef AUDIO_ENABLE + PLAY_SONG(ag_norm_song); + #endif + } + break; + case WIN: + if (record->event.pressed) { + keymap_config.swap_lalt_lgui = true; + keymap_config.swap_ralt_rgui = true; + #ifdef AUDIO_ENABLE + PLAY_SONG(ag_swap_song); + #endif + } + break; + } + return true; +} + + +//keyboard start-up code. Runs once when the firmware starts up. +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick +} + +void shutdown_user() +{ + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_SONG(music_scale); +} + +#endif + + +//assign the right code to your layers for OLED display +#define L_BASE 0 +#define L_OPT 2 +#define L_FUNC 4 +#define L_SYM 8 +#define L_NUM 16 +#define L_FNLAYER 64 +#define L_NUMLAY 128 +#define L_NLOWER 136 +#define L_NFNLAYER 192 +#define L_MOUSECURSOR 256 + + +uint8_t layer_state_old; + +//runs every scan cycle (a lot) +void matrix_scan_user(void) { + #ifdef SSD1306OLED + iota_gfx_task(); // this is what updates the display continuously + #endif + + if(delay_key_stat && (timer_elapsed(key_timer) > DELAY_TIME)){ + register_delay_code(_BASE); + if(!delay_key_pressed){ + unregister_delay_code(); + } + } + + if(layer_state_old != layer_state){ + switch (layer_state) { + case L_BASE: + #ifdef RGBLIGHT_ENABLE + if (!RGBAnimation){ + rgblight_sethsv(187,255,255); + rgblight_mode(1); + }else{ + rgblight_mode(RGB_current_mode); + } + #endif + break; + case L_OPT: + register_delay_code(_OPT); + break; + case L_NUM: + register_delay_code(_NUM); + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv(25,255,255); + rgblight_mode(1); + #endif + break; + case L_SYM: + register_delay_code(_SYM); + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv(96,255,255); + rgblight_mode(1); + #endif + break; + case L_FUNC: + register_delay_code(_FUNC); + #ifdef RGBLIGHT_ENABLE + rgblight_sethsv(331,255,255); + rgblight_mode(1); + #endif + break; + } + layer_state_old = layer_state; + } +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +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; + } +} + +// Render to OLED +void render_status(struct CharacterMatrix *matrix) { + + // froggy logo + static char logo[4][1][17]= + { + { + {0x65,0x66,0x67,0x68,0x69,0x6a,0x6b,0x6c,0x6d,0x6e,0x6f,0x70,0x71,0x72,0x73,0x74,0} + }, + { + {0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94,0} + }, + { + {0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4,0} + }, + { + {0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0} + } + }; + + static char indctr[8][2][4]= + { + // white icon + { + {0x60,0x61,0x62,0}, + {0x63,0x64,0} + }, + { + {0x80,0x81,0x82,0}, + {0x83,0x84,0} + }, + { + {0xa0,0xa1,0xa2,0}, + {0xa3,0xa4,0} + }, + { + {0xc0,0xc1,0xc2,0}, + {0xc3,0xc4,0} + }, + // Black icon + { + {0x75,0x76,0x77,0}, + {0x78,0x79,0} + }, + { + {0x95,0x96,0x97,0}, + {0x98,0x99,0} + }, + { + {0xb5,0xb6,0xb7,0}, + {0xb8,0xb9,0} + }, + { + {0xd5,0xd6,0xd7,0}, + {0xd8,0xd9,0} + }, + }; + + int rown = 0; + int rowf = 0; + int rowa = 0; + int rows = 0; + + //Set Indicator icon + if (host_keyboard_leds() & (1< | } | +|------+------+------+------+------+------| +| EISU | J | M | B | ' | Tab | +|------+------+------+------+------+------| +| . | V | C | L | Z | Q | +|------+------+------+------+------+------+------. +| | X | G | W | - | Del | Esc | +|------+------+------+------+------+------+------| +| | | | , | DTOP | | | +`------------------------------------------------' +``` + +### Num +``` +,-----------------------------------------. +| | | Func | home | End | | +|------+------+------+------+------+------| +| | * | 7 | 8 | 9 | - | +|------+------+------+------+------+------| +| . | / | 4 | 5 | 6 | + | +|------+------+------+------+------+------+------. +| LN | 0 | 1 | 2 | 3 |C+S+F1| | +|------+------+------+------+------+------+------| +| | | | , | | | | +`------------------------------------------------' +``` + +### Sym +``` +,-----------------------------------------. +| Ins | GRV | | PU | PD | ^ | +|------+------+------+------+------+------| +| | \ | # | = | ? | % | +|------+------+------+------+------+------| +| | $ | upA | @ | ! | | | +|------+------+------+------+------+------+------. +| CL | <- | dwA | -> | _ | & | | +|------+------+------+------+------+------+------| +| | | PS | | ~ | | | + `-----------------------------------------------' +``` + +### Func +``` +,-----------------------------------------. +|RGBRST| Hue | | RST | Mac | Win | +|------+------+------+------+------+------| +| RGB1 | VAL+ | F7 | F8 | F9 | | +|------+------+------+------+------+------| +| RGB2 | VAL- | F4 | F5 | F6 | F12 | +|------+------+------+------+------+------+------. +| RGB3 | F10 | F1 | F2 | F3 | F11 | | +|------+------+------+------+------+------+------| +|RGBOFF| | | | | | | +`------------------------------------------------' +``` diff --git a/keyboards/helix/rev2/keymaps/froggy/rules.mk b/keyboards/helix/rev2/keymaps/froggy/rules.mk new file mode 100644 index 0000000000..2052b8f4e3 --- /dev/null +++ b/keyboards/helix/rev2/keymaps/froggy/rules.mk @@ -0,0 +1,123 @@ + +# 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 = 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 = 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. +SWAP_HANDS_ENABLE = no # Enable one-hand typing + +define HELIX_CUSTOMISE_MSG + $(info Helix customize) + $(info - OLED_ENABLE=$(OLED_ENABLE)) + $(info - LED_BACK_ENABLE=$(LED_BACK_ENABLE)) + $(info - LED_UNDERGLOW_ENABLE=$(LED_UNDERGLOW_ENABLE)) + $(info - LED_ANIMATION=$(LED_ANIMATIONS)) + $(info - IOS_DEVICE_ENABLE=$(IOS_DEVICE_ENABLE)) +endef + +# Helix keyboard customize +# you can edit follows 7 Variables +# jp: 以下の7つの変数を必要に応じて編集します。 +HELIX_ROWS = 5 # Helix Rows is 4 or 5 +OLED_ENABLE = yes # OLED_ENABLE +LOCAL_GLCDFONT = yes # use each keymaps "helixfont.h" insted of "common/glcdfont.c" +LED_BACK_ENABLE = yes # LED backlight (Enable WS2812 RGB underlight.) +LED_UNDERGLOW_ENABLE = no # LED underglow (Enable WS2812 RGB underlight.) +LED_ANIMATIONS = yes # LED animations +IOS_DEVICE_ENABLE = no # connect to IOS device (iPad,iPhone) + +#### LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE. +#### Do not enable these with audio at the same time. + +### Helix keyboard 'default' keymap: convenient command line option +## make HELIX= helix:defualt +## option= oled | back | under | na | ios +## ex. +## make HELIX=oled helix:defualt +## make HELIX=oled,back helix:defualt +## make HELIX=oled,under helix:defualt +## make HELIX=oled,back,na helix:defualt +## make HELIX=oled,back,ios helix:defualt +## +ifneq ($(strip $(HELIX)),) + ifeq ($(findstring oled,$(HELIX)), oled) + OLED_ENABLE = yes + endif + ifeq ($(findstring back,$(HELIX)), back) + LED_BACK_ENABLE = yes + else ifeq ($(findstring under,$(HELIX)), under) + LED_UNDERGLOW_ENABLE = yes + endif + ifeq ($(findstring na,$(HELIX)), na) + LED_ANIMATIONS = no + endif + ifeq ($(findstring ios,$(HELIX)), ios) + IOS_DEVICE_ENABLE = yes + endif + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(info ) +endif + +# Uncomment these for checking +# jp: コンパイル時にカスタマイズの状態を表示したい時はコメントをはずします。 +# $(eval $(call HELIX_CUSTOMISE_MSG)) +# $(info ) + +ifneq ($(strip $(HELIX_ROWS)), 4) + ifneq ($(strip $(HELIX_ROWS)), 5) + $(error HELIX_ROWS = $(strip $(HELIX_ROWS)) is unexpected value) + endif +endif +OPT_DEFS += -DHELIX_ROWS=$(strip $(HELIX_ROWS)) + +ifeq ($(strip $(LED_BACK_ENABLE)), yes) + RGBLIGHT_ENABLE = yes + OPT_DEFS += -DRGBLED_BACK + ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + $(eval $(call HELIX_CUSTOMISE_MSG)) + $(error LED_BACK_ENABLE and LED_UNDERGLOW_ENABLE both 'yes') + endif +else ifeq ($(strip $(LED_UNDERGLOW_ENABLE)), yes) + RGBLIGHT_ENABLE = yes +else + RGBLIGHT_ENABLE = no +endif + +ifeq ($(strip $(IOS_DEVICE_ENABLE)), yes) + OPT_DEFS += -DIOS_DEVICE_ENABLE +endif + +ifeq ($(strip $(LED_ANIMATIONS)), yes) + OPT_DEFS += -DRGBLIGHT_ANIMATIONS +endif + +ifeq ($(strip $(OLED_ENABLE)), yes) + OPT_DEFS += -DOLED_ENABLE +endif + +ifeq ($(strip $(LOCAL_GLCDFONT)), yes) + OPT_DEFS += -DLOCAL_GLCDFONT +endif + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +# Uncomment these for debugging +# $(info -- RGBLIGHT_ENABLE=$(RGBLIGHT_ENABLE)) +# $(info -- OPT_DEFS=$(OPT_DEFS)) +# $(info ) diff --git a/keyboards/helix/serial.c b/keyboards/helix/serial.c index e918ab6ee6..51ab67fb3d 100644 --- a/keyboards/helix/serial.c +++ b/keyboards/helix/serial.c @@ -16,7 +16,7 @@ // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. -#define SERIAL_DELAY 24 +#define SERIAL_DELAY 30 uint8_t volatile serial_slave_buffer[SERIAL_SLAVE_BUFFER_LENGTH] = {0}; uint8_t volatile serial_master_buffer[SERIAL_MASTER_BUFFER_LENGTH] = {0}; -- cgit v1.2.3 From c69ed8a14d7338ee02f8d19c4b76430fb47691c0 Mon Sep 17 00:00:00 2001 From: crilith Date: Mon, 4 Jun 2018 11:30:31 -0400 Subject: Keymap with dynamic macro (#3121) * Add files via upload Added dynamic macro support * Delete keymap.c --- keyboards/melody96/keymaps/crilith/keymap.c | 83 +++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) create mode 100644 keyboards/melody96/keymaps/crilith/keymap.c (limited to 'keyboards') diff --git a/keyboards/melody96/keymaps/crilith/keymap.c b/keyboards/melody96/keymaps/crilith/keymap.c new file mode 100644 index 0000000000..3335de0502 --- /dev/null +++ b/keyboards/melody96/keymaps/crilith/keymap.c @@ -0,0 +1,83 @@ +#include QMK_KEYBOARD_H + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +#define _______ KC_TRNS +#define KC_REC DYN_REC_START1 +#define KC_DONE DYN_REC_STOP +#define KC_PLAY DYN_MACRO_PLAY1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, 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_BSPC, 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, KC_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_PLAY, _______, KC_REC, KC_DONE, _______, _______, _______, _______, _______, _______), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + DDRC |= (1 << 6); PORTC &= ~(1 << 6); + } else { + DDRC &= ~(1 << 6); PORTC &= ~(1 << 6); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRC |= (1 << 7); PORTC &= ~(1 << 7); + } else { + DDRC &= ~(1 << 7); PORTC &= ~(1 << 7); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} -- cgit v1.2.3 From 68d5e364fc6d3ffed6901d0354ac01482cecd63a Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 4 Jun 2018 12:15:14 -0700 Subject: CU75: Refactor and Configurator updates (#3123) * Refactor * Configurator: LAYOUT_iso fix * Readme formatting cleanup --- keyboards/cu75/cu75.h | 10 ++--- keyboards/cu75/info.json | 33 ++++++++++------- keyboards/cu75/keymaps/default/keymap.c | 42 +++++++++++---------- keyboards/cu75/keymaps/iso/keymap.c | 65 +++++++++++++++++---------------- keyboards/cu75/readme.md | 4 +- 5 files changed, 82 insertions(+), 72 deletions(-) (limited to 'keyboards') diff --git a/keyboards/cu75/cu75.h b/keyboards/cu75/cu75.h index eaa22a3866..5abce8fcd4 100644 --- a/keyboards/cu75/cu75.h +++ b/keyboards/cu75/cu75.h @@ -109,11 +109,11 @@ void click(uint16_t freq, uint16_t duration); #define LAYOUT_iso( \ k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ - k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ - k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, k1G, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k2A, k2B, k2C, k2D, k2E, k2F, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, k3F, \ + k41, k42, k43, k44, k45, k46, k47, k48, k49, k4A, k4B, k4C, k4D, k4E, k4F, \ + k51, k52, k53, k54, k57, k59, k5A, k5B, k5C, k5D, k5E, k5F \ ) { \ {k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, k0E, k0F, k0G}, \ {k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, k1E, KC_NO, k1G}, \ diff --git a/keyboards/cu75/info.json b/keyboards/cu75/info.json index 08f7815bf0..7a8e360ab1 100644 --- a/keyboards/cu75/info.json +++ b/keyboards/cu75/info.json @@ -1,16 +1,23 @@ { - "keyboard_name": "cu75", - "url": "", - "maintainer": "qmk", - "width": 16, - "height": 6, - "layouts": { - "LAYOUT": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"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":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":2.75}, {"x":6.5, "y":5}, {"x":7.5, "y":5, "w":2.5}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] - }, + "keyboard_name": "cu75", + "url": "", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "key_count": 86, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"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":"+", "x":12, "y":1}, {"label":"Backspace", "x":13, "y":1, "w":2}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"label":"Enter", "x":12.75, "y":3, "w":2.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":2.75}, {"x":6.5, "y":5}, {"x":7.5, "y":5, "w":2.5}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + }, - "LAYOUT_all": { - "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"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":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":2.75}, {"x":6.5, "y":5}, {"x":7.5, "y":5, "w":2.5}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] - } + "LAYOUT_all": { + "key_count": 89, + "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":7, "y":0}, {"label":"F8", "x":8, "y":0}, {"label":"F9", "x":9, "y":0}, {"label":"F10", "x":10, "y":0}, {"label":"F11", "x":11, "y":0}, {"label":"F12", "x":12, "y":0}, {"label":"PrtSc", "x":13, "y":0}, {"label":"Pause", "x":14, "y":0}, {"label":"Delete", "x":15, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"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":"+", "x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1}, {"label":"Home", "x":15, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":6.5, "y":2}, {"label":"U", "x":7.5, "y":2}, {"label":"I", "x":8.5, "y":2}, {"label":"O", "x":9.5, "y":2}, {"label":"P", "x":10.5, "y":2}, {"label":"{", "x":11.5, "y":2}, {"label":"}", "x":12.5, "y":2}, {"label":"|", "x":13.5, "y":2, "w":1.5}, {"label":"Page Up", "x":15, "y":2}, {"label":"Caps Lock", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":6.75, "y":3}, {"label":"J", "x":7.75, "y":3}, {"label":"K", "x":8.75, "y":3}, {"label":"L", "x":9.75, "y":3}, {"label":":", "x":10.75, "y":3}, {"label":"\"", "x":11.75, "y":3}, {"x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":1.25}, {"label":"Page Down", "x":15, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"N", "x":7.25, "y":4}, {"label":"M", "x":8.25, "y":4}, {"label":"<", "x":9.25, "y":4}, {"label":">", "x":10.25, "y":4}, {"label":"?", "x":11.25, "y":4}, {"label":"Shift", "x":12.25, "y":4, "w":1.75}, {"label":"\u2191", "x":14, "y":4}, {"label":"End", "x":15, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"x":3.75, "y":5, "w":2.75}, {"x":6.5, "y":5}, {"x":7.5, "y":5, "w":2.5}, {"label":"Alt", "x":10, "y":5}, {"label":"Fn", "x":11, "y":5}, {"label":"Ctrl", "x":12, "y":5}, {"label":"\u2190", "x":13, "y":5}, {"label":"\u2193", "x":14, "y":5}, {"label":"\u2192", "x":15, "y":5}] + }, + + "LAYOUT_iso": { + "key_count": 87, + "layout": [{"label":"k01", "x":0, "y":0}, {"label":"k02", "x":1, "y":0}, {"label":"k03", "x":2, "y":0}, {"label":"k04", "x":3, "y":0}, {"label":"k05", "x":4, "y":0}, {"label":"k06", "x":5, "y":0}, {"label":"k07", "x":6, "y":0}, {"label":"k08", "x":7, "y":0}, {"label":"k09", "x":8, "y":0}, {"label":"k0A", "x":9, "y":0}, {"label":"k0B", "x":10, "y":0}, {"label":"k0C", "x":11, "y":0}, {"label":"k0D", "x":12, "y":0}, {"label":"k0E", "x":13, "y":0}, {"label":"k0F", "x":14, "y":0}, {"label":"k0G", "x":15, "y":0}, {"label":"k11", "x":0, "y":1}, {"label":"k12", "x":1, "y":1}, {"label":"k13", "x":2, "y":1}, {"label":"k14", "x":3, "y":1}, {"label":"k15", "x":4, "y":1}, {"label":"k16", "x":5, "y":1}, {"label":"k17", "x":6, "y":1}, {"label":"k18", "x":7, "y":1}, {"label":"k19", "x":8, "y":1}, {"label":"k1A", "x":9, "y":1}, {"label":"k1B", "x":10, "y":1}, {"label":"k1C", "x":11, "y":1}, {"label":"k1D", "x":12, "y":1}, {"label":"k1E", "x":13, "y":1, "w":2}, {"label":"k1G", "x":15, "y":1}, {"label":"k21", "x":0, "y":2, "w":1.5}, {"label":"k22", "x":1.5, "y":2}, {"label":"k23", "x":2.5, "y":2}, {"label":"k24", "x":3.5, "y":2}, {"label":"k25", "x":4.5, "y":2}, {"label":"k26", "x":5.5, "y":2}, {"label":"k27", "x":6.5, "y":2}, {"label":"k28", "x":7.5, "y":2}, {"label":"k29", "x":8.5, "y":2}, {"label":"k2A", "x":9.5, "y":2}, {"label":"k2B", "x":10.5, "y":2}, {"label":"k2C", "x":11.5, "y":2}, {"label":"k2D", "x":12.5, "y":2}, {"label":"k2E", "x":13.75, "y":2, "w":1.25, "h":2}, {"label":"k2F", "x":15, "y":2}, {"label":"k31", "x":0, "y":3, "w":1.75}, {"label":"k32", "x":1.75, "y":3}, {"label":"k33", "x":2.75, "y":3}, {"label":"k34", "x":3.75, "y":3}, {"label":"k35", "x":4.75, "y":3}, {"label":"k36", "x":5.75, "y":3}, {"label":"k37", "x":6.75, "y":3}, {"label":"k38", "x":7.75, "y":3}, {"label":"k39", "x":8.75, "y":3}, {"label":"k3A", "x":9.75, "y":3}, {"label":"k3B", "x":10.75, "y":3}, {"label":"k3C", "x":11.75, "y":3}, {"label":"k3D", "x":12.75, "y":3}, {"label":"k3F", "x":15, "y":3}, {"label":"k41", "x":0, "y":4, "w":1.25}, {"label":"k42", "x":1.25, "y":4}, {"label":"k43", "x":2.25, "y":4}, {"label":"k44", "x":3.25, "y":4}, {"label":"k45", "x":4.25, "y":4}, {"label":"k46", "x":5.25, "y":4}, {"label":"k47", "x":6.25, "y":4}, {"label":"k48", "x":7.25, "y":4}, {"label":"k49", "x":8.25, "y":4}, {"label":"k4A", "x":9.25, "y":4}, {"label":"k4B", "x":10.25, "y":4}, {"label":"k4C", "x":11.25, "y":4}, {"label":"k4D", "x":12.25, "y":4, "w":1.75}, {"label":"k4E", "x":14, "y":4}, {"label":"k4F", "x":15, "y":4}, {"label":"k51", "x":0, "y":5, "w":1.25}, {"label":"k52", "x":1.25, "y":5, "w":1.25}, {"label":"k53", "x":2.5, "y":5, "w":1.25}, {"label":"k54", "x":3.75, "y":5, "w":2.25}, {"label":"k57", "x":6, "y":5, "w":1.25}, {"label":"k59", "x":7.25, "y":5, "w":2.75}, {"label":"k5A", "x":10, "y":5}, {"label":"k5B", "x":11, "y":5}, {"label":"k5C", "x":12, "y":5}, {"label":"k5D", "x":13, "y":5}, {"label":"k5E", "x":14, "y":5}, {"label":"k5F", "x":15, "y":5}] } -} \ No newline at end of file + } +} diff --git a/keyboards/cu75/keymaps/default/keymap.c b/keyboards/cu75/keymaps/default/keymap.c index 7d13e9237d..9fbd41089b 100644 --- a/keyboards/cu75/keymaps/default/keymap.c +++ b/keyboards/cu75/keymaps/default/keymap.c @@ -1,8 +1,7 @@ -#include "cu75.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H -//Define a shorter 'transparent' key code to make the keymaps more compact -#define KC_TR KC_TRNS +//Define a clearer 'transparent' key code +#define _______ KC_TRNS enum keymap_layout { VANILLA = 0, @@ -12,7 +11,6 @@ enum keymap_layout { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[VANILLA] = LAYOUT( /* Keymap VANILLA: (Base Layer) Default Layer * ,------------------------------------------------------------.----. * |Esc | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|F13|F14| F15| @@ -28,14 +26,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt |Space| Space |Space|Alt |Ctrl|Func|Lft| Dn |Rig | * `-----------------------------------------------------------------' */ - 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_F13, KC_F14, KC_F15, - 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_RSFT, KC_UP, KC_PGDN, - KC_LCTL, KC_LGUI, KC_LALT,KC_SPC, KC_SPC, KC_SPC,KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT), - -[FUNC] = LAYOUT( + [VANILLA] = 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_F13, KC_F14, KC_F15, \ + 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_RSFT, KC_UP, KC_PGDN, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \ + + ), + /* Keymap VANILLA: Function Layer * ,-------------------------------------------------------------------. * | | | | | | | | | | | | | | | | | @@ -46,17 +46,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------------------------------------------------------------------| * | | | | | | | | | | | | |RESET |RGB_MODE| * |-------------------------------------------------------------------| - * | | | | | | | | | | | | |RGB_HUI| | + * | | | | | | | | | |VAD|VAI| |RGB_HUI| | * |-------------------------------------------------------------------| * | | | | | | | |RGB_SAD|RGB_HUD|RGB_SAI| * `-------------------------------------------------------------------' */ - KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, - KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,KC_TR, RGB_TOG, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RESET, RGB_MOD, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_VAD, RGB_VAI, KC_TR, KC_TR, RGB_HUI, KC_TR, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI), + [FUNC] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD, \ + _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI \ + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/cu75/keymaps/iso/keymap.c b/keyboards/cu75/keymaps/iso/keymap.c index baf85b92e5..7f5952c1c2 100644 --- a/keyboards/cu75/keymaps/iso/keymap.c +++ b/keyboards/cu75/keymaps/iso/keymap.c @@ -1,8 +1,7 @@ -#include "cu75.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H -//Define a shorter 'transparent' key code to make the keymaps more compact -#define KC_TR KC_TRNS +//Define a clearer 'transparent' key code +#define _______ KC_TRNS enum keymap_layout { VANILLA = 0, @@ -12,7 +11,6 @@ enum keymap_layout { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[VANILLA] = LAYOUT_iso( /* Keymap VANILLA: (Base Layer) Default Layer * ,------------------------------------------------------------.----. * |Esc | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|F13|F14| F15| @@ -28,35 +26,38 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |Ctrl|Win |Alt | Space |Alt |Ctrl|Func|Lft| Dn |Rig | * `-----------------------------------------------------------------' */ - 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_F13, KC_F14, KC_F15, - 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_ENT, 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_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_SPC, KC_SPC,KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT), - -[FUNC] = LAYOUT( + [VANILLA] = LAYOUT_iso( + 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_F13, KC_F14, KC_F15, \ + 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_ENT, 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_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_SPC, KC_SPC, KC_RALT, KC_RCTL, MO(FUNC), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + /* Keymap VANILLA: Function Layer - * ,-------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------| - * | | | | | | | | | | | | | | | | - * |-------------------------------------------------------------------| - * | | | | | | | | | | | | | | | RGB_TOG| - * |-------------------------------------------------------------------| - * | | | | | | | | | | | | |RESET |RGB_MODE| - * |-------------------------------------------------------------------| - * | | | | | | | | | | | | |RGB_HUI| | - * |-------------------------------------------------------------------| - * | | | | | | | |RGB_SAD|RGB_HUD|RGB_SAI| - * `-------------------------------------------------------------------' + * ,-----------------------------------------------------------.---. + * | | | | | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | | | | + * |---------------------------------------------------------------| + * | | | | | | | | | | | | | | |TOG| + * |------------------------------------------------------. |---| + * | | | | | | | | | | | | |RST| |MOD| + * |---------------------------------------------------------------| + * | | | | | | | | | |VAD|VAI| | |HUI| | + * |---------------------------------------------------------------| + * | | | | | | | |SAD|HUD|SAI| + * `---------------------------------------------------------------' */ - KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, - KC_TR,KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR,KC_TR, RGB_TOG, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RESET, RGB_MOD, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_VAD, RGB_VAI, KC_TR, KC_TR, RGB_HUI, KC_TR, - KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, KC_TR, RGB_SAD, RGB_HUD, RGB_SAI), + [FUNC] = LAYOUT_iso( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, RGB_MOD, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAD, RGB_VAI, _______, _______, RGB_HUI, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAD, RGB_HUD, RGB_SAI \ + ), }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/cu75/readme.md b/keyboards/cu75/readme.md index 6c3029a3f2..a5193bd707 100644 --- a/keyboards/cu75/readme.md +++ b/keyboards/cu75/readme.md @@ -4,8 +4,8 @@ A luxurious 75% keyboard with various layouts. Includes RGB underglow, backlight and an aluminium, brass and nylon case. -Keyboard Maintainer: [Yiancar](https://github.com/yiancar) and [LFKeyboards](https://github.com/lfkeyboards) -Hardware Supported: PCB v1.0 (uses a 32u4) +Keyboard Maintainer: [Yiancar](https://github.com/yiancar) and [LFKeyboards](https://github.com/lfkeyboards) +Hardware Supported: PCB v1.0 (uses a 32u4) Hardware Availability: [caps-unlocked.com](http://caps-unlocked.com/) This PCB uses lighting libraries from LFKeyboards -- cgit v1.2.3 From 6b1350d764a0caf16bcf9c175a5c7867d8cd4fcb Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Mon, 4 Jun 2018 14:50:30 -0700 Subject: [WIP] [Help Needed] Daisy 40%: Refactor and Configurator update (#3124) * Refactor KEYMAP to LAYOUT * Configurator update * info.json update * Refactor daisy.h: White space update --- keyboards/daisy/daisy.h | 20 ++--- keyboards/daisy/info.json | 18 ++++ keyboards/daisy/keymaps/default/keymap.c | 150 +++++++++++++++---------------- 3 files changed, 102 insertions(+), 86 deletions(-) create mode 100644 keyboards/daisy/info.json (limited to 'keyboards') diff --git a/keyboards/daisy/daisy.h b/keyboards/daisy/daisy.h index 7e45bee2b5..15483e3a3a 100644 --- a/keyboards/daisy/daisy.h +++ b/keyboards/daisy/daisy.h @@ -3,17 +3,17 @@ #include "quantum.h" -#define KEYMAP( \ - K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \ - K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ - K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ - K30, K31, K32, K34, K35, K37, K38, K39 \ +#define LAYOUT( \ + K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K3A, \ + K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K30, K31, K32, K34, K35, K37, K38, K39 \ ) \ { \ - { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ - { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ - { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \ - { K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \ + { K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A }, \ + { K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A }, \ + { K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A }, \ + { K30, K31, K32, KC_NO, K34, K35, KC_NO, K37, K38, K39, K3A } \ } -#endif \ No newline at end of file +#endif diff --git a/keyboards/daisy/info.json b/keyboards/daisy/info.json new file mode 100644 index 0000000000..4005757932 --- /dev/null +++ b/keyboards/daisy/info.json @@ -0,0 +1,18 @@ +{ + "keyboard_name": "Daisy", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 42, + "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": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"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, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3, "w": 1.25}, {"label": "K34", "x": 3.5, "y": 3, "w": 2.25}, {"label": "K35", "x": 5.75, "y": 3, "w": 2.75}, {"label": "K37", "x": 8.5, "y": 3, "w": 1.25}, {"label": "K38", "x": 9.75, "y": 3}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}] + }, + + "LAYOUT_625_space": { + "key_count": 40, + "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": "K3A", "x": 11, "y": 0}, {"label": "K10", "x": 0, "y": 1, "w": 1.25}, {"label": "K11", "x": 1.25, "y": 1}, {"label": "K12", "x": 2.25, "y": 1}, {"label": "K13", "x": 3.25, "y": 1}, {"label": "K14", "x": 4.25, "y": 1}, {"label": "K15", "x": 5.25, "y": 1}, {"label": "K16", "x": 6.25, "y": 1}, {"label": "K17", "x": 7.25, "y": 1}, {"label": "K18", "x": 8.25, "y": 1}, {"label": "K19", "x": 9.25, "y": 1}, {"label": "K1A", "x": 10.25, "y": 1, "w": 1.75}, {"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, "w": 1.25}, {"label": "K30", "x": 0, "y": 3, "w": 1.25}, {"label": "K31", "x": 1.25, "y": 3}, {"label": "K32", "x": 2.25, "y": 3}, {"x": 3.25, "y": 3, "w": 6.25}, {"label": "K38", "x": 9.5, "y": 3, "w": 1.25}, {"label": "K39", "x": 10.75, "y": 3, "w": 1.25}] + } + } +} diff --git a/keyboards/daisy/keymaps/default/keymap.c b/keyboards/daisy/keymaps/default/keymap.c index ff08cf0a8f..833620b01f 100644 --- a/keyboards/daisy/keymaps/default/keymap.c +++ b/keyboards/daisy/keymaps/default/keymap.c @@ -1,5 +1,4 @@ - #include "daisy.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -9,67 +8,66 @@ extern keymap_config_t keymap_config; #define _RS 2 enum layer_keycodes { - QWERTY = SAFE_RANGE, LOWER, RAISE + QWERTY = SAFE_RANGE, LOWER, RAISE }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Base Layer - * .-----------------------------------------------------------------------. - * | ESC | Q | W | E | R | T | Y | U | I | O | P | \| | - * |-----------------------------------------------------------------------| - * | TAB | A | S | D | F | G | H | J | K | L | ENTER | - * |-----------------------------------------------------------------------| - * | LSHIFT | Z | X | C | V | B | N | M | ,< | .> | /? | - * |-----------------------------------------------------------------------| - * | LCTRL | LGUI | LALT | SPACE | BACKSPACE | LW | RS | RALT | - * '-----------------------------------------------------------------------' - */ + /* Base Layer + * .-----------------------------------------------------------------------. + * | ESC | Q | W | E | R | T | Y | U | I | O | P | \| | + * |-----------------------------------------------------------------------| + * | TAB | A | S | D | F | G | H | J | K | L | ENTER | + * |-----------------------------------------------------------------------| + * | LSHIFT | Z | X | C | V | B | N | M | ,< | .> | /? | + * |-----------------------------------------------------------------------| + * | LCTRL | LGUI | LALT | SPACE | BACKSPACE | LW | RS | RALT | + * '-----------------------------------------------------------------------' + */ + [_BL] = LAYOUT( + GRAVE_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + 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, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT + ), - [_BL] = KEYMAP( - GRAVE_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - 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, KC_SPC, KC_BSPC, LOWER, RAISE, KC_RALT ), - + /* Function Layer + * .-----------------------------------------------------------------------. + * | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -_ | + * |-----------------------------------------------------------------------| + * | | =+ | UP | | | | [{ | ]} | ;: | '" | | + * |-----------------------------------------------------------------------| + * | | LEFT| DOWN |RIGHT| | | | | | | | + * |-----------------------------------------------------------------------| + * | | | | | DELETE | | | | + * '-----------------------------------------------------------------------' + */ + + [_LW] = 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_TRNS, KC_EQL, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS, + KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS + ), + + /* Second Function Layer + * .-----------------------------------------------------------------------. + * | RST | F1 | F2 | F3 | F4 | F5 | F6 | | HOME| PGUP| | | + * |-----------------------------------------------------------------------| + * | | F7 | F8 | F9 | F10 | F11 | F12 | | END | PGDN| | + * |-----------------------------------------------------------------------| + * | |RGBtog|RGBmod|RGBhud|RGBhui|RGBvad|RGBvai|RGBsad|RGBsai|BL| | + * |-----------------------------------------------------------------------| + * | | | | | | | | | + * '-----------------------------------------------------------------------' + */ + [_RS] = LAYOUT( + RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_END, KC_PGDN, KC_TRNS, + KC_TRNS, RGB_TOG, RGB_SMOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ), -/* Function Layer - * .-----------------------------------------------------------------------. - * | GRV | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -_ | - * |-----------------------------------------------------------------------| - * | | =+ | UP | | | | [{ | ]} | ;: | '" | | - * |-----------------------------------------------------------------------| - * | | LEFT| DOWN |RIGHT| | | | | | | | - * |-----------------------------------------------------------------------| - * | | | | | DELETE | | | | - * '-----------------------------------------------------------------------' - */ - - [_LW] = KEYMAP( - 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_TRNS, KC_EQL, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_SCLN, KC_QUOT, KC_TRNS, - KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_LCTL, KC_LGUI, KC_LALT, KC_TRNS, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS ), - - - /* Second Function Layer - * .-----------------------------------------------------------------------. - * | RST | F1 | F2 | F3 | F4 | F5 | F6 | | HOME| PGUP| | | - * |-----------------------------------------------------------------------| - * | | F7 | F8 | F9 | F10 | F11 | F12 | | END | PGDN| | - * |-----------------------------------------------------------------------| - * | |RGBtog|RGBmod|RGBhud|RGBhui|RGBvad|RGBvai|RGBsad|RGBsai|BL| | - * |-----------------------------------------------------------------------| - * | | | | | | | | | - * '-----------------------------------------------------------------------' - */ - - [_RS] = KEYMAP( - RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS, - KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_END, KC_PGDN, KC_TRNS, - KC_TRNS, RGB_TOG, RGB_SMOD, RGB_HUD, RGB_HUI, RGB_VAD, RGB_VAI, RGB_SAD, RGB_SAI, BL_STEP, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), - }; const uint16_t PROGMEM fn_actions[] = { @@ -77,23 +75,23 @@ const uint16_t PROGMEM fn_actions[] = { }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - case LOWER: - if(record->event.pressed){ - layer_on(_LW); - } else { - layer_off(_LW); - } - return false; - break; - case RAISE: - if(record->event.pressed){ - layer_on(_RS); - } else { - layer_off(_RS); - } - return false; - break; - } + switch (keycode) { + case LOWER: + if(record->event.pressed){ + layer_on(_LW); + } else { + layer_off(_LW); + } + return false; + break; + case RAISE: + if(record->event.pressed){ + layer_on(_RS); + } else { + layer_off(_RS); + } + return false; + break; + } return true; -}; \ No newline at end of file +}; -- cgit v1.2.3 From c5b9533312443b78b152385d267cb19a87189478 Mon Sep 17 00:00:00 2001 From: Pierre Constantineau Date: Tue, 5 Jun 2018 19:15:19 +0300 Subject: adding all ErgoTravel Files (#3129) * adding all ErgoTravel Files * fixing KC_KEYMAP to LAYOUT_kc on Viet's keymap.c --- keyboards/ergotravel/config.h | 90 ++++ keyboards/ergotravel/ergotravel.c | 1 + keyboards/ergotravel/ergotravel.h | 24 + keyboards/ergotravel/i2c.c | 162 +++++++ keyboards/ergotravel/i2c.h | 49 +++ keyboards/ergotravel/info.json | 15 + keyboards/ergotravel/keymaps/ckofy/config.h | 46 ++ keyboards/ergotravel/keymaps/ckofy/keymap.c | 202 +++++++++ keyboards/ergotravel/keymaps/ckofy/rules.mk | 3 + keyboards/ergotravel/keymaps/default/config.h | 41 ++ keyboards/ergotravel/keymaps/default/keymap.c | 134 ++++++ keyboards/ergotravel/keymaps/default/rules.mk | 3 + keyboards/ergotravel/keymaps/ian/config.h | 41 ++ keyboards/ergotravel/keymaps/ian/keymap.c | 95 ++++ keyboards/ergotravel/keymaps/ian/rules.mk | 3 + .../ergotravel/keymaps/jpconstantineau/config.h | 41 ++ .../ergotravel/keymaps/jpconstantineau/keymap.c | 129 ++++++ .../ergotravel/keymaps/jpconstantineau/rules.mk | 3 + keyboards/ergotravel/keymaps/viet/config.h | 42 ++ keyboards/ergotravel/keymaps/viet/keymap.c | 327 ++++++++++++++ keyboards/ergotravel/keymaps/viet/rules.mk | 7 + keyboards/ergotravel/matrix.c | 482 +++++++++++++++++++++ keyboards/ergotravel/readme.md | 28 ++ keyboards/ergotravel/rev1/config.h | 90 ++++ keyboards/ergotravel/rev1/rev1.c | 22 + keyboards/ergotravel/rev1/rev1.h | 37 ++ keyboards/ergotravel/rev1/rules.mk | 1 + keyboards/ergotravel/rules.mk | 74 ++++ keyboards/ergotravel/serial.c | 228 ++++++++++ keyboards/ergotravel/serial.h | 26 ++ keyboards/ergotravel/split_util.c | 86 ++++ keyboards/ergotravel/split_util.h | 20 + keyboards/melody96/keymaps/crilith/keymap.c | 166 +++---- 33 files changed, 2635 insertions(+), 83 deletions(-) create mode 100644 keyboards/ergotravel/config.h create mode 100644 keyboards/ergotravel/ergotravel.c create mode 100644 keyboards/ergotravel/ergotravel.h create mode 100644 keyboards/ergotravel/i2c.c create mode 100644 keyboards/ergotravel/i2c.h create mode 100644 keyboards/ergotravel/info.json create mode 100644 keyboards/ergotravel/keymaps/ckofy/config.h create mode 100644 keyboards/ergotravel/keymaps/ckofy/keymap.c create mode 100644 keyboards/ergotravel/keymaps/ckofy/rules.mk create mode 100644 keyboards/ergotravel/keymaps/default/config.h create mode 100644 keyboards/ergotravel/keymaps/default/keymap.c create mode 100644 keyboards/ergotravel/keymaps/default/rules.mk create mode 100644 keyboards/ergotravel/keymaps/ian/config.h create mode 100644 keyboards/ergotravel/keymaps/ian/keymap.c create mode 100644 keyboards/ergotravel/keymaps/ian/rules.mk create mode 100644 keyboards/ergotravel/keymaps/jpconstantineau/config.h create mode 100644 keyboards/ergotravel/keymaps/jpconstantineau/keymap.c create mode 100644 keyboards/ergotravel/keymaps/jpconstantineau/rules.mk create mode 100644 keyboards/ergotravel/keymaps/viet/config.h create mode 100644 keyboards/ergotravel/keymaps/viet/keymap.c create mode 100644 keyboards/ergotravel/keymaps/viet/rules.mk create mode 100644 keyboards/ergotravel/matrix.c create mode 100644 keyboards/ergotravel/readme.md create mode 100644 keyboards/ergotravel/rev1/config.h create mode 100644 keyboards/ergotravel/rev1/rev1.c create mode 100644 keyboards/ergotravel/rev1/rev1.h create mode 100644 keyboards/ergotravel/rev1/rules.mk create mode 100644 keyboards/ergotravel/rules.mk create mode 100644 keyboards/ergotravel/serial.c create mode 100644 keyboards/ergotravel/serial.h create mode 100644 keyboards/ergotravel/split_util.c create mode 100644 keyboards/ergotravel/split_util.h (limited to 'keyboards') diff --git a/keyboards/ergotravel/config.h b/keyboards/ergotravel/config.h new file mode 100644 index 0000000000..beda546a04 --- /dev/null +++ b/keyboards/ergotravel/config.h @@ -0,0 +1,90 @@ +/* +Copyright 2018 Pierre Constantineau + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1256 +#define DEVICE_VER 0x0100 +#define MANUFACTURER JPConstantineau.com +#define PRODUCT ErgoTravel Keyboard +#define DESCRIPTION Split 45 percent ergonomic keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/ergotravel/ergotravel.c b/keyboards/ergotravel/ergotravel.c new file mode 100644 index 0000000000..2ada434c19 --- /dev/null +++ b/keyboards/ergotravel/ergotravel.c @@ -0,0 +1 @@ +#include "ergotravel.h" diff --git a/keyboards/ergotravel/ergotravel.h b/keyboards/ergotravel/ergotravel.h new file mode 100644 index 0000000000..353000061a --- /dev/null +++ b/keyboards/ergotravel/ergotravel.h @@ -0,0 +1,24 @@ +#ifndef ERGOTRAVEL_H +#define ERGOTRAVEL_H + +#ifdef KEYBOARD_ergotravel_rev1 + #include "rev1.h" +#endif + +#include "quantum.h" + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + 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, R30, R31, R32, R33, R34, R35 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35 \ + ) + +#endif \ No newline at end of file diff --git a/keyboards/ergotravel/i2c.c b/keyboards/ergotravel/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/ergotravel/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 100000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/ergotravel/info.json b/keyboards/ergotravel/info.json new file mode 100644 index 0000000000..c92ea720cb --- /dev/null +++ b/keyboards/ergotravel/info.json @@ -0,0 +1,15 @@ +{ + "keyboard_name": "ErgoTravel", + "manufacturer": "jpconstantineau", + "identifier": "0x1256", + "url": "https://github.com/jpconstantineau/ErgoTravel", + "maintainer": "qmk", + "processor": "atmega32u4", + "width": 14.5, + "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":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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":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}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":8.5, "y":2}, {"x":9.5, "y":2}, {"x":10.5, "y":2}, {"x":11.5, "y":2}, {"x":12.5, "y":2}, {"x":13.5, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7.5, "y":3}, {"x":8.5, "y":3}, {"x":9.5, "y":3}, {"x":10.5, "y":3}, {"x":11.5, "y":3}, {"x":12.5, "y":3}, {"x":13.5, "y":3}, {"x":4, "y":4}, {"x":5, "y":4}, {"x":6, "y":4}, {"x":7.5, "y":4}, {"x":8.5, "y":4}, {"x":9.5, "y":4}] + } + } +} diff --git a/keyboards/ergotravel/keymaps/ckofy/config.h b/keyboards/ergotravel/keymaps/ckofy/config.h new file mode 100644 index 0000000000..caae080d70 --- /dev/null +++ b/keyboards/ergotravel/keymaps/ckofy/config.h @@ -0,0 +1,46 @@ +/* +Copyright 2017 Pierre Constantineau + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.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_TOGGLE 2 + +// required if modifiers are defined in layers besided the default one. +#define PREVENT_STUCK_MODIFIERS + +#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/ergotravel/keymaps/ckofy/keymap.c b/keyboards/ergotravel/keymaps/ckofy/keymap.c new file mode 100644 index 0000000000..cc2c33cca3 --- /dev/null +++ b/keyboards/ergotravel/keymaps/ckofy/keymap.c @@ -0,0 +1,202 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +#define _COLEMAK 0 +#define _QWERTY 1 +#define _NUMPAD 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + NUMPAD, + LOWER, + RAISE, + ADJUST, +}; + +/* Fn keys */ + +enum { + + F_SFT = 0, + F_ALT, + F_CTRL, + F_NUMPAD +// F_LOWER, +// F_RAISE, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS +#define KC_XXXX KC_NO + +#define KC_CMK COLEMAK +#define KC_QWE QWERTY +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_QRAS QRAISE +#define KC_ADJT ADJUST +#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 +//#define KC_CATDEL LCTL(LALT(KC_DEL)) // Ctrl alt del +#define KC_CPY LCTL(KC_C) +#define KC_PST LCTL(KC_V) +#define KC_SELA LCTL(KC_A) +#define KC_UDO LCTL(KC_Z) +#define KC_CUT LCTL(KC_X) +#define KC_SVE LCTL(KC_S) +#define KC_OSH F(F_SFT) +#define KC_OCTL F(F_CTRL) +#define KC_NUMP F(F_NUMPAD) +#define KC_SHESC MT(MOD_LSFT,KC_ESC) +#define KC_SHENT MT(MOD_RSFT,KC_ENT) +//#define KC_NUMP TG(_NUMPAD) // Toggle layer NUMPAD for use in KC_keymaps +//#define KC_RST RESET + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +// Colemak Mod-DH is used. https://colemakmods.github.io/mod-dh/ + [_COLEMAK] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + TAB , Q , W , F , P , B ,LPRN, RPRN, J , L , U , Y ,SCLN,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + BSPC, A , R , S , T , G ,EQL , MINS, K , N , E , I , O ,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + SHESC, Z , X , C , D , V ,NUMP, ENT, M , H ,COMM,DOT ,SLSH,SHENT, + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + OCTL,LALT,LGUI,DEL ,LOWR, SPC, OSH, RASE,LEFT,RIGHT,RALT,RCTL + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , Q , W , E , R , T ,LBRC, RBRC, Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , A , S , D , F , G ,LPRN, RPRN, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , , , N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,DEL , , SPC, SPC , ,LEFT,DOWN, UP ,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_NUMPAD] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , , , , , ,ASTR, P7 , P8 , P9 ,SLSH, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , ,PIPE, P4 , P5 , P6 ,MINS, , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , ,COMM, P1 , P2 , P3 ,PLUS, , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , P0 ,NLCK, , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ,XXXX,XXXX,XXXX,XXXX,CAPS, , ,PGUP,HOME, UP ,END ,DEL , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,SELA,LALT,LSFT,LCTL,SVE , , ,PGDN,LEFT,DOWN,RGHT,BSPC,INS , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,UDO ,CUT ,CPY ,PST ,XXXX, , ,XXXX,XXXX,COMM,DOT ,SLSH, , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ,AMPR,PERC,HASH,EXLM,LPRN, , ,ASTR,RPRN, AT ,DLR ,CIRC,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , 7 , 5 , 3 , 1 , 9 ,LBRC, RBRC, 8 , 0 , 2 , 4 , 6 ,BSLS, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , GRV,TILD,XXXX,EQL ,PLUS, , ,UNDS,MINS,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , F1 , F2 , F3 , F4 , F5 , F6, F7, F8, F9 ,F10 , F11, F12,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , CMK,QWE , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , ,VOLD,VOLU,MUTE + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ) + +}; + +const uint16_t PROGMEM fn_actions[] = { + [F_SFT] = ACTION_MODS_ONESHOT (MOD_LSFT) + ,[F_ALT] = ACTION_MODS_ONESHOT (MOD_LALT) + ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) + ,[F_NUMPAD] = ACTION_LAYER_TAP_TOGGLE(_NUMPAD) +// ,[F_LOWER] = ACTION_LAYER_TAP_TOGGLE(LOWER) // FN1 - Momentary Layer 1 (Lower) +// ,[F_RAISE] = ACTION_LAYER_TAP_TOGGLE(RAISE) // FN2 - Momentary Layer 2 (Raise) +}; + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case COLEMAK: + if (record->event.pressed) { + set_single_persistent_default_layer(_COLEMAK); + + } + return false; + 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 ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} diff --git a/keyboards/ergotravel/keymaps/ckofy/rules.mk b/keyboards/ergotravel/keymaps/ckofy/rules.mk new file mode 100644 index 0000000000..457a3d01d4 --- /dev/null +++ b/keyboards/ergotravel/keymaps/ckofy/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergotravel/keymaps/default/config.h b/keyboards/ergotravel/keymaps/default/config.h new file mode 100644 index 0000000000..abb8cfa8e6 --- /dev/null +++ b/keyboards/ergotravel/keymaps/default/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Pierre Constantineau + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.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 + +#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/ergotravel/keymaps/default/keymap.c b/keyboards/ergotravel/keymaps/default/keymap.c new file mode 100644 index 0000000000..ef168a5362 --- /dev/null +++ b/keyboards/ergotravel/keymaps/default/keymap.c @@ -0,0 +1,134 @@ +#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, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_ADJT ADJUST +#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] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , Q , W , E , R , T ,LBRC, RBRC, Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , A , S , D , F , G , A, A, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + GRAVE, 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,DEL, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , F1 , F2 , F3 , F4 , F5 , F6 , D, Y ,MINS, EQL,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, F7 , F8 , F9 , F10, F11, F12, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , F1 , F2 , F3 , F4 , F5 , F6, F7, F8, F9 ,F10 , F11, F12,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ) + +}; + + + + + + + +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 + 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/ergotravel/keymaps/default/rules.mk b/keyboards/ergotravel/keymaps/default/rules.mk new file mode 100644 index 0000000000..457a3d01d4 --- /dev/null +++ b/keyboards/ergotravel/keymaps/default/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergotravel/keymaps/ian/config.h b/keyboards/ergotravel/keymaps/ian/config.h new file mode 100644 index 0000000000..b2e8ca9b5d --- /dev/null +++ b/keyboards/ergotravel/keymaps/ian/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Pierre Constantineau + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.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 + +#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/ergotravel/keymaps/ian/keymap.c b/keyboards/ergotravel/keymaps/ian/keymap.c new file mode 100644 index 0000000000..fd4006d51d --- /dev/null +++ b/keyboards/ergotravel/keymaps/ian/keymap.c @@ -0,0 +1,95 @@ +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum custom_layers { + _COLEMAK, + _ADJUST, + _RAISE, + _LOWER, + _QWERTY +}; + + + +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define BASELYR TO(_COLEMAK) // base layer +#define LOWER MO(_LOWER) // momentary lower layer +#define RAISE MO(_RAISE) // momentary raise layer +#define ADJUST MO(_ADJUST) // momentary adjust layer +#define QWERTY TG(_QWERTY) +#define LLOWER TG(_LOWER) // lock for lower layer +#define LRAISE TG(_RAISE) // lock for raise layer +#define LHALF LALT(LGUI(KC_LEFT)) // spec left half screen +#define TLHALF LCTL(LGUI(KC_LEFT)) // spec top left half +#define BLHALF LCTL(LSFT(LGUI(KC_LEFT))) // spec bottom left half +#define RHALF LALT(LGUI(KC_RIGHT)) // spec right half screen +#define TRHALF LCTL(LGUI(KC_RIGHT)) // spec top right half +#define BRHALF LCTL(LSFT(LGUI(KC_RIGHT))) // spec bottom right half +#define SAFBCK LGUI(KC_LBRC) // safari back +#define SAFFWD LGUI(KC_RBRC) // safari forward +#define CENTER LALT(LGUI(KC_C)) // spec center +#define FULL LALT(LGUI(KC_F)) // spec full screen + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_COLEMAK] = LAYOUT( + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + KC_ESC , KC_Q , KC_W , KC_F , KC_P , KC_G ,KC_LCBR, KC_RCBR, KC_J , KC_L , KC_U , KC_Y ,KC_SCLN,KC_BSPC, + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + KC_TAB , KC_A , KC_R , KC_S , KC_T , KC_D ,KC_LPRN, KC_RPRN, KC_H , KC_N , KC_E , KC_I , KC_O ,KC_QUOT, + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + KC_BSLS, KC_Z , KC_X , KC_C , KC_V , KC_B ,KC_LBRC , KC_RBRC , KC_K , KC_M ,KC_COMM, KC_DOT,KC_SLSH,KC_ENT , + //,------+-------+-------+-------+-------+-------+-------. .-------+-------+-------+-------+-------+-------+-------. + ADJUST ,KC_LCTL,KC_LALT,KC_LGUI, LOWER, KC_SPC, KC_LSFT, RAISE, KC_LEFT, KC_DOWN, KC_UP,KC_RGHT + //,------+-------+-------+-------+-------/-------/ \-------\-------+-------+-------+-------+-------' + ), + + [_ADJUST] = LAYOUT( + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + BASELYR,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX, RESET , + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + 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,XXXXXXX, + //|------+-------+-------+-------+-------+-------+-------. .-------+-------+-------+-------+-------+-------+-------. + _______,KC_F10 ,KC_F11 ,KC_F12 ,LLOWER ,XXXXXXX, XXXXXXX,LRAISE ,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX + //`------+-------+-------+-------+-------/-------/ \------\-------+-------+-------+-------+-------' + ), + + [_RAISE] = LAYOUT( + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + BASELYR,KC_EXLM, KC_AT, KC_HASH, KC_DLR,KC_LCBR,XXXXXXX, XXXXXXX, KC_RCBR, TLHALF, CENTER, TRHALF, XXXXXXX, KC_BSPC, + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + KC_TILD,KC_PERC,KC_CIRC,KC_AMPR,KC_ASTR,KC_LPRN,XXXXXXX, XXXXXXX, KC_RPRN, LHALF, FULL, RHALF, XXXXXXX, KC_VOLU, + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + KC_GRV, KC_MINS,KC_PLUS,KC_UNDS,KC_EQL, KC_LBRC,XXXXXXX, XXXXXXX, KC_RBRC, BLHALF, XXXXXXX, BRHALF, XXXXXXX, KC_VOLD, + //|-------+-------+-------+-------+-------+-------+-------. .-------+-------+-------+-------+-------+-------+-------| + XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_TRNS,KC_SPC, KC_LSFT, KC_TRNS, XXXXXXX, KC_F14, KC_F15, KC_MUTE + //`-------+-------+-------+-------+-------/-------/ \------\-------+-------+-------+-------+-------' + ), + + [_LOWER] = LAYOUT( + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + BASELYR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCBR,XXXXXXX, XXXXXXX, KC_RCBR, KC_7, KC_8, KC_9, KC_MINS, KC_BSPC, + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + XXXXXXX, XXXXXXX, SAFBCK, XXXXXXX, SAFFWD, KC_LPRN,XXXXXXX, XXXXXXX, KC_RPRN, KC_4, KC_5, KC_6, KC_PLUS, XXXXXXX, + //,------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC,XXXXXXX, XXXXXXX, KC_RBRC, KC_1, KC_2, KC_3, KC_ASTR, KC_ENT, + //|-------+-------+-------+-------+-------+-------+-------. .-------+-------+-------+-------+-------+-------+-------| + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_SPC, KC_LSFT, KC_0, KC_0, KC_DOT, KC_SLASH, XXXXXXX + //`-------+-------+-------+-------+-------/-------/ \------\-------+-------+-------+-------+-------' + ) + +}; + + + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + + } + return true; +} + diff --git a/keyboards/ergotravel/keymaps/ian/rules.mk b/keyboards/ergotravel/keymaps/ian/rules.mk new file mode 100644 index 0000000000..457a3d01d4 --- /dev/null +++ b/keyboards/ergotravel/keymaps/ian/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergotravel/keymaps/jpconstantineau/config.h b/keyboards/ergotravel/keymaps/jpconstantineau/config.h new file mode 100644 index 0000000000..abb8cfa8e6 --- /dev/null +++ b/keyboards/ergotravel/keymaps/jpconstantineau/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Pierre Constantineau + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.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 + +#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/ergotravel/keymaps/jpconstantineau/keymap.c b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c new file mode 100644 index 0000000000..b2374b7115 --- /dev/null +++ b/keyboards/ergotravel/keymaps/jpconstantineau/keymap.c @@ -0,0 +1,129 @@ +#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, +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_LOWR LOWER +#define KC_RASE RAISE +#define KC_ADJT ADJUST +#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] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , Q , W , E , R , T ,LBRC, RBRC, Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , A , S , D , F , G , A, A, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_LOWER] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + GRAVE, 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,DEL, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , F1 , F2 , F3 , F4 , F5 , F6 , D, Y ,MINS, EQL,LBRC,RBRC,BSLS, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, F7 , F8 , F9 , F10, F11, F12, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_RAISE] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , 1 , 2 , 3 , 4 , 5 , A, B, 6 , 7 , 8 , 9 , 0 ,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + ESC , F1 , F2 , F3 , F4 , F5 , F6, F7, F8, F9 ,F10 , F11, F12,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + TAB , Q , W , E , R , T , C , D, Y , U , I , O , P ,DEL , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LSFT, Z , X , C , V , B , A, SPC, N , M ,COMM,DOT ,SLSH,ENT , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + LCTL,LGUI,LALT,ADJT,LOWR,SPC, SPC, RASE,LEFT, UP ,DOWN,RIGHT + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ) + +}; + + + + + +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/ergotravel/keymaps/jpconstantineau/rules.mk b/keyboards/ergotravel/keymaps/jpconstantineau/rules.mk new file mode 100644 index 0000000000..457a3d01d4 --- /dev/null +++ b/keyboards/ergotravel/keymaps/jpconstantineau/rules.mk @@ -0,0 +1,3 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergotravel/keymaps/viet/config.h b/keyboards/ergotravel/keymaps/viet/config.h new file mode 100644 index 0000000000..24e95b2b96 --- /dev/null +++ b/keyboards/ergotravel/keymaps/viet/config.h @@ -0,0 +1,42 @@ +/* +Copyright 2017 Pierre Constantineau + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.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 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 26 +#define RGBLIGHT_HUE_STEP 20 +#define RGBLIGHT_SAT_STEP 20 +#define RGBLIGHT_VAL_STEP 20 +#define RGBLIGHT_LIMIT_VAL 220 + +#endif diff --git a/keyboards/ergotravel/keymaps/viet/keymap.c b/keyboards/ergotravel/keymaps/viet/keymap.c new file mode 100644 index 0000000000..0e3ec074c7 --- /dev/null +++ b/keyboards/ergotravel/keymaps/viet/keymap.c @@ -0,0 +1,327 @@ +#include "ergotravel.h" +#include "action_layer.h" +#include "eeconfig.h" +#include "mousekey.h" +#include "process_unicode.h" +extern keymap_config_t keymap_config; + +#define _QWERTY 0 +#define _NUMBERS 1 +#define _SYMBOLS 2 +#define _CODING 3 +#define _NAVIGATION 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + ADJUST, + CODING_SPACE, + NUMBERS_SPACE, + SYMBOLS_SPACE, + NAVIGATE_SPACE, + TABLE_FLIP, + RESET_TABLE, + SHRUG, + LOOK_OF_DISAPPROVAL +}; + +#define KC_ KC_TRNS +#define _______ KC_TRNS + +#define KC_ADJT MO(_ADJUST) +#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 + +#define KC_RSEN MT(MOD_RSFT, KC_ENT) // Tap for enter, hold for right shift + +#define KC_LCCA MT(MOD_LCTL, KC_CAPS) // Tap for caps lock, hold for left control +#define KC_SHDE MT(MOD_LSFT, KC_DEL) // Tap for delete, hold for left shift + +#define KC_NAVI MO(_NAVIGATION) + +#define KC_COSP CODING_SPACE +#define KC_NUSP NUMBERS_SPACE +#define KC_SYSP SYMBOLS_SPACE +#define KC_NASP NAVIGATE_SPACE + +#define KC_FLIP TABLE_FLIP +#define KC_TSET RESET_TABLE +#define KC_SRUG SHRUG +#define KC_DISA LOOK_OF_DISAPPROVAL +#define KC_RST RESET + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + TAB , Q , W , E , R , T ,HOME, PGUP, Y , U , I , O , P ,BSPC, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + LCCA, A , S , D , F , G ,END , PGDN, H , J , K , L ,SCLN,QUOT, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + SHDE, Z , X , C , V , B ,LGUI, RALT, N , M ,COMM,DOT ,SLSH,RSEN, + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + ESC ,ADJT,LALT,ENT ,NUSP,NASP, SYSP,COSP,RCTL,NAVI,ADJT,DEL + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_NUMBERS] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + GRAVE, 1 , 2 , 3 , 4 , 5 ,MPLY, VOLU, 6 , 7 , 8 , 9 , 0 , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , ,MNXT, VOLD,FLIP,TSET,SRUG,DISA, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_SYMBOLS] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + GRAVE,EXLM, AT ,HASH,DLR ,PERC,MPLY, VOLU,CIRC,AMPR,ASTR,LPRN,RPRN,BSLS, + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , ,MNXT, VOLD, , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_CODING] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , ,LCBR,RCBR, ,MPLY, VOLU, ,AMPR,PIPE,DLR , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , ,LPRN,RPRN, ,MNXT, VOLD, ,UNDS,MINS,ASTR, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , ,LBRC,RBRC, , , , ,PLUS,EQL , , , , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_NAVIGATION] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + , , , UP , , ,MPLY, VOLU,WH_U,BTN1,MS_U,BTN1, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , ,LEFT,DOWN,RGHT, ,MNXT, VOLD,WH_D,MS_L,MS_D,MS_R, , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + , , , , , , , , , , , , , , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ), + + [_ADJUST] = LAYOUT_kc( + //,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----. + F1 ,F2 ,F3 ,F4 ,F5 ,F6 , , ,F7 ,F8 ,F9 ,F10 ,F11 ,F12 , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,RTOG,RVAI,RHUI,RSAI, , , , , , , , , , + //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| + ,RMOD,RVAD,RHUD,RSAD, , , ,RST , , , , , , + //|----+----+----+----+----+----+----. .----+----+----+----+----+----+----| + , , , , , , , , , , , + //`----+----+----+--+-+----/----/ \----\----+----+----+----+----' + ) + +}; + + +#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); +} + +uint16_t custom_lt_timer; +keypos_t prv_key_pressed; +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +// set_unicode_input_mode(UC_LNX); // Linux + set_unicode_input_mode(UC_OSX); // Mac OSX +// set_unicode_input_mode(UC_WIN); // Windows (with registry key, see wiki) + //set_unicode_input_mode(UC_WINC); // Windows (with WinCompose, see wiki) +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + if(record->event.pressed) prv_key_pressed = record->event.key; + #define IS_KEYPOS_SAME(keyone,keytwo) ((keyone.col==keytwo.col)&&(keyone.row==keytwo.row)) + #define ANOTHER_KEY_PRESSED (!IS_KEYPOS_SAME(prv_key_pressed, record->event.key)) + + inline void tap(uint16_t keycode) { + register_code(keycode); + unregister_code(keycode); + }; + + inline void swapInput(void) { + register_code(KC_LGUI); + tap(KC_SPC); + unregister_code(KC_LGUI); + }; + + 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 CODING_SPACE: + if (record->event.pressed) { + custom_lt_timer = timer_read(); + layer_on(_CODING); + } else { + layer_off(_CODING); + if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + } + return false; + break; + case NUMBERS_SPACE: + if (record->event.pressed) { + custom_lt_timer = timer_read(); + layer_on(_NUMBERS); + } else { + layer_off(_NUMBERS); + if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + } + return false; + break; + case SYMBOLS_SPACE: + if (record->event.pressed) { + custom_lt_timer = timer_read(); + layer_on(_SYMBOLS); + } else { + layer_off(_SYMBOLS); + if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + } + return false; + break; + case NAVIGATE_SPACE: + if (record->event.pressed) { + custom_lt_timer = timer_read(); + layer_on(_NAVIGATION); + } else { + layer_off(_NAVIGATION); + if (timer_elapsed(custom_lt_timer)<150 && (!ANOTHER_KEY_PRESSED)) { + register_code(KC_SPC); + unregister_code(KC_SPC); + } + } + return false; + break; + case TABLE_FLIP: + if (record->event.pressed) { + swapInput(); + + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + process_unicode((0x00B0|QK_UNICODE), record); // Eye + process_unicode((0x25A1|QK_UNICODE), record); // Mouth + process_unicode((0x00B0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + process_unicode((0x256F|QK_UNICODE), record); // Arm + tap(KC_SPC); + process_unicode((0x0361|QK_UNICODE), record); // Flippy + tap(KC_SPC); + process_unicode((0x253B|QK_UNICODE), record); // Table + process_unicode((0x2501|QK_UNICODE), record); // Table + process_unicode((0x253B|QK_UNICODE), record); // Table + + swapInput(); + } + return false; + break; + case RESET_TABLE: // ┬──┬ ノ( ゜-゜ノ) + if (record->event.pressed) { + swapInput(); + + process_unicode((0x252C|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x2500|QK_UNICODE), record); // Table + process_unicode((0x252C|QK_UNICODE), record); // Table + tap(KC_SPC); + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_9); + unregister_code(KC_RSFT); + tap(KC_SPC); + process_unicode((0x309C|QK_UNICODE), record); // Eye + tap(KC_MINS); + process_unicode((0x309C|QK_UNICODE), record); // Eye + process_unicode((0x30CE|QK_UNICODE), record); // Arm + register_code(KC_RSFT); + tap(KC_0); + unregister_code(KC_RSFT); + + swapInput(); + } + return false; + break; + case SHRUG: // ¯\_(ツ)_/¯ + if (record->event.pressed) { + swapInput(); + + process_unicode((0x00AF|QK_UNICODE), record); // Hand + tap(KC_BSLS); // Arm + register_code(KC_RSFT); + tap(KC_UNDS); // Arm + tap(KC_LPRN); // Head + unregister_code(KC_RSFT); + process_unicode((0x30C4|QK_UNICODE), record); // Face + register_code(KC_RSFT); + tap(KC_RPRN); // Head + tap(KC_UNDS); // Arm + unregister_code(KC_RSFT); + tap(KC_SLSH); // Arm + process_unicode((0x00AF|QK_UNICODE), record); // Hand + + swapInput(); + } + return false; + break; + case LOOK_OF_DISAPPROVAL: // ಠ_ಠ + if(record->event.pressed){ + swapInput(); + + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + register_code(KC_RSFT); + tap(KC_MINS); + unregister_code(KC_RSFT); + process_unicode((0x0CA0|QK_UNICODE), record); // Eye + + swapInput(); + } + return false; + break; + } + return true; +} diff --git a/keyboards/ergotravel/keymaps/viet/rules.mk b/keyboards/ergotravel/keymaps/viet/rules.mk new file mode 100644 index 0000000000..da4752731b --- /dev/null +++ b/keyboards/ergotravel/keymaps/viet/rules.mk @@ -0,0 +1,7 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = no +UNICODE_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/ergotravel/matrix.c b/keyboards/ergotravel/matrix.c new file mode 100644 index 0000000000..4061924dc2 --- /dev/null +++ b/keyboards/ergotravel/matrix.c @@ -0,0 +1,482 @@ +/* +Copyright 2018 Pierre Constantineau + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#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" +#include "backlight.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 SERIAL_LED_ADDR 0x00 + +#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(); + PORTD ^= (1 << 2); + } + +# 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; + +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + err = i2c_master_write(get_backlight_level()); +#else + // Write zero, so our byte index is the same + err = i2c_master_write(0x00); +#endif + 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]; + } + +#ifdef BACKLIGHT_ENABLE + // Write backlight level for slave to read + serial_master_buffer[SERIAL_LED_ADDR] = get_backlight_level(); +#endif + 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 +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(i2c_slave_buffer[0]); +#endif + for (int i = 0; i < ROWS_PER_HAND; ++i) { + i2c_slave_buffer[i+1] = matrix[offset+i]; + } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_slave_buffer[i] = matrix[offset+i]; + } + +#ifdef BACKLIGHT_ENABLE + // Read backlight level sent from master and update level on slave + backlight_set(serial_master_buffer[SERIAL_LED_ADDR]); +#endif +#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<> 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/ergotravel/readme.md b/keyboards/ergotravel/readme.md new file mode 100644 index 0000000000..ad37bc1acc --- /dev/null +++ b/keyboards/ergotravel/readme.md @@ -0,0 +1,28 @@ +ErgoTravel +==== + +![ErgoTravel](https://i.imgur.com/H9t6Q7b.png) + + +A split ergo 4x6 keyboard with 2 or 3 thumb keys and extra inner macro keys designed by Pierre Constantineau. [More info on the GitHub Repo](https://github.com/jpconstantineau/ErgoTravel). + +**Status** The ErgoTravel is currently being beta-tested. + +Keyboard Maintainer: [/u/jpconstantineau](https://github.com/jpconstantineau) + +Hardware Supported: Pro Micro (ATmega32U4) + +Hardware Availability: [Group Buys](https://keyboards.jpconstantineau.com/) or order your own [yourself](https://github.com/jpconstantineau/ErgoTravel/blob/master/OrderingInstructions.md) + + +Make example for this keyboard (after setting up your build environment): + + make ergotravel/rev1:default + +Example of flashing this keyboard: + + make ergotravel/rev1: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. + +A build guide for this keyboard can be found here: [Build Guide](https://github.com/jpconstantineau) diff --git a/keyboards/ergotravel/rev1/config.h b/keyboards/ergotravel/rev1/config.h new file mode 100644 index 0000000000..beda546a04 --- /dev/null +++ b/keyboards/ergotravel/rev1/config.h @@ -0,0 +1,90 @@ +/* +Copyright 2018 Pierre Constantineau + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include QMK_KEYBOARD_CONFIG_H + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xCEEB +#define PRODUCT_ID 0x1256 +#define DEVICE_VER 0x0100 +#define MANUFACTURER JPConstantineau.com +#define PRODUCT ErgoTravel Keyboard +#define DESCRIPTION Split 45 percent ergonomic keyboard + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { C6, D7, E6, B4 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define BACKLIGHT_PIN B5 +#define BACKLIGHT_LEVELS 5 + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/ergotravel/rev1/rev1.c b/keyboards/ergotravel/rev1/rev1.c new file mode 100644 index 0000000000..609c479eb3 --- /dev/null +++ b/keyboards/ergotravel/rev1/rev1.c @@ -0,0 +1,22 @@ +#include "rev1.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/ergotravel/rev1/rev1.h b/keyboards/ergotravel/rev1/rev1.h new file mode 100644 index 0000000000..b20d9f9beb --- /dev/null +++ b/keyboards/ergotravel/rev1/rev1.h @@ -0,0 +1,37 @@ +#ifndef REV1_H +#define REV1_H + +#include "ergotravel.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#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, R30, R31, R32, R33, R34, R35 \ + ) \ + { \ + { 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, KC_NO }, \ + { R06, R05, R04, R03, R02, R01, R00 }, \ + { R16, R15, R14, R13, R12, R11, R10 }, \ + { R26, R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30, KC_NO } \ + } + +#endif diff --git a/keyboards/ergotravel/rev1/rules.mk b/keyboards/ergotravel/rev1/rules.mk new file mode 100644 index 0000000000..7b30c0beff --- /dev/null +++ b/keyboards/ergotravel/rev1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no diff --git a/keyboards/ergotravel/rules.mk b/keyboards/ergotravel/rules.mk new file mode 100644 index 0000000000..fceb56edf8 --- /dev/null +++ b/keyboards/ergotravel/rules.mk @@ -0,0 +1,74 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.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) + +# 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 = 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 = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SUBPROJECT_rev1 = yes +USE_I2C = yes # I2C is used between the sides +# 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 + +DEFAULT_FOLDER = ergotravel/rev1 diff --git a/keyboards/ergotravel/serial.c b/keyboards/ergotravel/serial.c new file mode 100644 index 0000000000..74bcbb6bf6 --- /dev/null +++ b/keyboards/ergotravel/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#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/ergotravel/serial.h b/keyboards/ergotravel/serial.h new file mode 100644 index 0000000000..15fe4db7b4 --- /dev/null +++ b/keyboards/ergotravel/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* 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/ergotravel/split_util.c b/keyboards/ergotravel/split_util.c new file mode 100644 index 0000000000..346cbc9089 --- /dev/null +++ b/keyboards/ergotravel/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#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< +#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/melody96/keymaps/crilith/keymap.c b/keyboards/melody96/keymaps/crilith/keymap.c index 3335de0502..3f26992808 100644 --- a/keyboards/melody96/keymaps/crilith/keymap.c +++ b/keyboards/melody96/keymaps/crilith/keymap.c @@ -1,83 +1,83 @@ -#include QMK_KEYBOARD_H - -enum custom_keycodes { - QWERTY = SAFE_RANGE, - DYNAMIC_MACRO_RANGE, -}; - -#include "dynamic_macro.h" - -#define _______ KC_TRNS -#define KC_REC DYN_REC_START1 -#define KC_DONE DYN_REC_STOP -#define KC_PLAY DYN_MACRO_PLAY1 - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - 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_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, 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_BSPC, 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, KC_PMNS, - 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_P4, KC_P5, KC_P6, KC_PPLS, - 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_P1, KC_P2, KC_P3, KC_PENT, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), - - LAYOUT( - RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, - BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, KC_PLAY, _______, KC_REC, KC_DONE, _______, _______, _______, _______, _______, _______), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - return MACRO_NONE; -} - -void matrix_init_user(void) { -} - -void matrix_scan_user(void) { -} - -bool process_record_user(uint16_t keycode, keyrecord_t *record) { - if (!process_record_dynamic_macro(keycode, record)) { - return false; - } - return true; -} - -void led_set_user(uint8_t usb_led) { - - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRC |= (1 << 6); PORTC &= ~(1 << 6); - } else { - DDRC &= ~(1 << 6); PORTC &= ~(1 << 6); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRC |= (1 << 7); PORTC &= ~(1 << 7); - } else { - DDRC &= ~(1 << 7); PORTC &= ~(1 << 7); - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRB |= (1 << 5); PORTB &= ~(1 << 5); - } else { - DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); - } - - if (usb_led & (1 << USB_LED_COMPOSE)) { - - } else { - - } - - if (usb_led & (1 << USB_LED_KANA)) { - - } else { - - } - -} +#include QMK_KEYBOARD_H + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + DYNAMIC_MACRO_RANGE, +}; + +#include "dynamic_macro.h" + +#define _______ KC_TRNS +#define KC_REC DYN_REC_START1 +#define KC_DONE DYN_REC_STOP +#define KC_PLAY DYN_MACRO_PLAY1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + 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_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, 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_BSPC, 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, KC_PMNS, + 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_P4, KC_P5, KC_P6, KC_PPLS, + 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_P1, KC_P2, KC_P3, KC_PENT, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), + + LAYOUT( + RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_TOG, _______, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, + BL_TOGG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, KC_PLAY, _______, KC_REC, KC_DONE, _______, _______, _______, _______, _______, _______), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +} + +void matrix_init_user(void) { +} + +void matrix_scan_user(void) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (!process_record_dynamic_macro(keycode, record)) { + return false; + } + return true; +} + +void led_set_user(uint8_t usb_led) { + + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + DDRC |= (1 << 6); PORTC &= ~(1 << 6); + } else { + DDRC &= ~(1 << 6); PORTC &= ~(1 << 6); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRC |= (1 << 7); PORTC &= ~(1 << 7); + } else { + DDRC &= ~(1 << 7); PORTC &= ~(1 << 7); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + DDRB |= (1 << 5); PORTB &= ~(1 << 5); + } else { + DDRB &= ~(1 << 5); PORTB &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_COMPOSE)) { + + } else { + + } + + if (usb_led & (1 << USB_LED_KANA)) { + + } else { + + } + +} -- cgit v1.2.3 From 1ae011d91902c8a12e23ee5f1f934ac5a0238b87 Mon Sep 17 00:00:00 2001 From: wanleg <32079073+wanleg@users.noreply.github.com> Date: Tue, 5 Jun 2018 12:37:27 -0700 Subject: Gherkin wanleg (#3127) * my planck layout personal planck layout * my XD75 layout personal XD75 layout * Revert "my XD75 layout" This reverts commit e9c3b57df78c1cb658bef56fb735839758f4f949. * my XD75 personal XD75 layout * wanleg layout wanleg layout * typo fixed typo * setup for NovelKeysXKailh Big Series switch setup for Big Swith with ProMicro * mousekeys addition adding mousekeys * mousekey additions * wanleg's jj40 config * mousekey changes * CAD double-tap improvement * software reset for Gherkin * promicro software bootloading * middle click * Update readme.md * add middle click * readme changes * Update readme.md * bootloaderFix * readme edit * bootloader fix * bootloaderEnable * bigswitchTesting * cleanup prior to Gherkin Pull * fixed bootloader RESET and added mousekey fixed RESET issue on ProMicro with default code, added mousekeys * fixed bootloader RESET and added mousekeys fixed RESET issue on ProMicro with default code, added mousekeys. edited readme to reflect changes. * Update config.h * Update keymap.c --- keyboards/gherkin/keymaps/wanleg/keymap.c | 8 ++++---- keyboards/gherkin/keymaps/wanleg/readme.md | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/gherkin/keymaps/wanleg/keymap.c b/keyboards/gherkin/keymaps/wanleg/keymap.c index 46b3b8c713..a9cbd0bb3a 100644 --- a/keyboards/gherkin/keymaps/wanleg/keymap.c +++ b/keyboards/gherkin/keymaps/wanleg/keymap.c @@ -205,17 +205,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // /* // * ETC // * .-----------------------------------------------------------------------------------------. -// * | ` | mUP | | | | SHIFT | mUp | mDown | | \ | +// * | ` | mUP | | | RESET | SHIFT | mUp | mDown | | \ | // * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -// * | mLeft | mDown | mRight | | SHIFT | | mBtn1 | mBtn2 | ; | ' | +// * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | // * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| // * | Sft//Cp| | | | | C-A-D | | | ALT | DEL | // * '-----------------------------------------------------------------------------------------' // */ // [ETC] = KEYMAP( /* ETC */ - KC_GRV, KC_MS_U, _______, _______, _______, KC_RSFT, KC_WH_U, KC_WH_D, _______, KC_BSLS , - KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_LSFT, KC_TRNS, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT , + KC_GRV, KC_MS_U, _______, _______, RESET, KC_RSFT, KC_WH_U, KC_WH_D, _______, KC_BSLS , + KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT , TD(TD_SFT_CAPS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_LALT, KC_DEL ), }; diff --git a/keyboards/gherkin/keymaps/wanleg/readme.md b/keyboards/gherkin/keymaps/wanleg/readme.md index 8fed18b6c4..e147f7ab1d 100644 --- a/keyboards/gherkin/keymaps/wanleg/readme.md +++ b/keyboards/gherkin/keymaps/wanleg/readme.md @@ -1,8 +1,8 @@ -![Gherkin Wanleg Layout Image](https://i.imgur.com/mXsgoro.png) +![Gherkin Wanleg Layout Image](https://i.imgur.com/nCPog2W.png) # Gherkin Wanleg Layout Here is the layout I came up with to preserve a standard QWERTY layout as much as possible, in as few layers as possible for a 30 key board. -I originally set up a few Tap Dance keys, but dropped half of them in favor of chorded versions, since in actual use, they tended to impede typing speed more than their (current) two-key versions. +I originally set up a few Tap Dance keys, but dropped half of them in favor of chorded versions, since in actual use, they tended to impede typing speed more than their current two-key versions. I've left them in my layout ready for use if anyone wants to try them out: Legend Name | Single Tap | Double Tap | Hold -- cgit v1.2.3 From 96546c79c0e931c89e4ac60a154b669925d5d34d Mon Sep 17 00:00:00 2001 From: Jason Date: Tue, 5 Jun 2018 12:43:20 -0700 Subject: Adding SX60 work by amnobis and configurator settings (#3122) * Add SX60 * Add config maps and layouts as well as readmes. * cleanup and fixes * correct readme * add missing closing commenty tag * Changing includes to QMK_KEYBOARD_H * Update settings.json Remove config change that was added automatically by vscode. * Update readme.md fix readme formatting --- keyboards/e6v2/keymaps/amnesia0287/keymap.c | 22 +- keyboards/e6v2/keymaps/amnesia0287/readme.md | 2 +- keyboards/e6v2/keymaps/default/readme.md | 2 +- keyboards/e6v2/readme.md | 2 +- keyboards/sx60/config.h | 61 ++++++ keyboards/sx60/i2cmaster.h | 178 ++++++++++++++++ keyboards/sx60/info.json | 24 +++ keyboards/sx60/keymaps/amnobis/config.h | 1 + keyboards/sx60/keymaps/amnobis/keymap.c | 92 ++++++++ keyboards/sx60/keymaps/amnobis/readme.md | 8 + keyboards/sx60/keymaps/amnobis/rules.mk | 0 keyboards/sx60/keymaps/default/config.h | 1 + keyboards/sx60/keymaps/default/keymap.c | 25 +++ keyboards/sx60/keymaps/default/readme.md | 8 + keyboards/sx60/keymaps/default/rules.mk | 0 keyboards/sx60/matrix.c | 307 +++++++++++++++++++++++++++ keyboards/sx60/readme.md | 20 ++ keyboards/sx60/rules.mk | 61 ++++++ keyboards/sx60/sx60.c | 38 ++++ keyboards/sx60/sx60.h | 86 ++++++++ keyboards/sx60/twimaster.c | 207 ++++++++++++++++++ 21 files changed, 1131 insertions(+), 14 deletions(-) create mode 100755 keyboards/sx60/config.h create mode 100644 keyboards/sx60/i2cmaster.h create mode 100644 keyboards/sx60/info.json create mode 100644 keyboards/sx60/keymaps/amnobis/config.h create mode 100644 keyboards/sx60/keymaps/amnobis/keymap.c create mode 100644 keyboards/sx60/keymaps/amnobis/readme.md create mode 100644 keyboards/sx60/keymaps/amnobis/rules.mk create mode 100644 keyboards/sx60/keymaps/default/config.h create mode 100755 keyboards/sx60/keymaps/default/keymap.c create mode 100644 keyboards/sx60/keymaps/default/readme.md create mode 100644 keyboards/sx60/keymaps/default/rules.mk create mode 100644 keyboards/sx60/matrix.c create mode 100644 keyboards/sx60/readme.md create mode 100755 keyboards/sx60/rules.mk create mode 100755 keyboards/sx60/sx60.c create mode 100755 keyboards/sx60/sx60.h create mode 100644 keyboards/sx60/twimaster.c (limited to 'keyboards') diff --git a/keyboards/e6v2/keymaps/amnesia0287/keymap.c b/keyboards/e6v2/keymaps/amnesia0287/keymap.c index 625ddb74ab..7e64b1212e 100644 --- a/keyboards/e6v2/keymaps/amnesia0287/keymap.c +++ b/keyboards/e6v2/keymaps/amnesia0287/keymap.c @@ -25,24 +25,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), [_HLa] = LAYOUT_hhkb( 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS ), [_HLb] = LAYOUT_hhkb( 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_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, + KC_CAPS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_TRNS ), [_HL] = LAYOUT_hhkb( - RGB_TOG, RGB_M_P, RGB_RMOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, BL_BRTG, BL_OFF, BL_STEP, BL_ON, BL_DEC, BL_INC, LALT(KC_F4), - RESET, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, 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_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + RGB_TOG, RGB_M_P, RGB_RMOD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, BL_BRTG, BL_OFF, BL_STEP, BL_ON, BL_DEC, BL_INC, LALT(KC_F4), + RESET, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, 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_VAD, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_MPRV, KC_MNXT, KC_MPLY, KC_TRNS, KC_TRNS ), }; diff --git a/keyboards/e6v2/keymaps/amnesia0287/readme.md b/keyboards/e6v2/keymaps/amnesia0287/readme.md index 834604ce23..4cc97aef04 100644 --- a/keyboards/e6v2/keymaps/amnesia0287/readme.md +++ b/keyboards/e6v2/keymaps/amnesia0287/readme.md @@ -1,7 +1,7 @@ amnesia0287's Keymap === -Keymap Maintainer: [Jason Gorman](https://github.com/amnesia0287) +Keymap Maintainer: [amnesia0287](https://github.com/amnesia0287) Difference from base layout: Primarily the HHKB-ness diff --git a/keyboards/e6v2/keymaps/default/readme.md b/keyboards/e6v2/keymaps/default/readme.md index 02153cb0d3..e726473646 100644 --- a/keyboards/e6v2/keymaps/default/readme.md +++ b/keyboards/e6v2/keymaps/default/readme.md @@ -3,6 +3,6 @@ Default Keymap Super simple default keymap with only a base layer. -Keymap Maintainer: [Jason Gorman](https://github.com/amnesia0287) +Keymap Maintainer: [amnesia0287](https://github.com/amnesia0287) Intended usage: This is mostly provided for testing before you build your own keymap and as a reference to a stock(ish) configuration diff --git a/keyboards/e6v2/readme.md b/keyboards/e6v2/readme.md index 725c264cab..5fd9668f59 100644 --- a/keyboards/e6v2/readme.md +++ b/keyboards/e6v2/readme.md @@ -3,7 +3,7 @@ E6-V2 These docs are for the QMK version of the PCB. [More info on qmk.fm](http://qmk.fm/) -Keyboard Maintainer: [Jason Gorman](https://github.com/amnesia0287) +Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287) Hardware Supported: E6-V2 Mid Port rev.qmk Hardware Availability: [geekhack.org/index.php?topic=90787.0](https://geekhack.org/index.php?topic=90787.0) diff --git a/keyboards/sx60/config.h b/keyboards/sx60/config.h new file mode 100755 index 0000000000..f22fbe8be4 --- /dev/null +++ b/keyboards/sx60/config.h @@ -0,0 +1,61 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER qmkbuilder +#define PRODUCT keyboard +#define DESCRIPTION Keyboard + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 16 +#define ATMEGA_COLS 8 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B1, B2, B3, C6, B6 } +#define MATRIX_COL_PINS { F6, B5, B4, D7, D6, D5, D3, D2 } +#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 + +/* 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 + + +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 0 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif + +#endif diff --git a/keyboards/sx60/i2cmaster.h b/keyboards/sx60/i2cmaster.h new file mode 100644 index 0000000000..3917b9e6c0 --- /dev/null +++ b/keyboards/sx60/i2cmaster.h @@ -0,0 +1,178 @@ +#ifndef _I2CMASTER_H +#define _I2CMASTER_H 1 +/************************************************************************* +* Title: C include file for the I2C master interface +* (i2cmaster.S or twimaster.c) +* Author: Peter Fleury 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 @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 + + + #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 + +/** 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
+ 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/sx60/info.json b/keyboards/sx60/info.json new file mode 100644 index 0000000000..24cb427724 --- /dev/null +++ b/keyboards/sx60/info.json @@ -0,0 +1,24 @@ +{ + "keyboard_name": "SX60", + "url": "", + "maintainer": "https://github.com/amnobis", + "width": 16.25, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"ANSIEnter", "x":15, "y":2, "w":1}, {"label":"ISOEnter", "x":16, "y":2, "w":1.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"label":"Shift", "x":1.25, "y":3, "w":1.25}, {"label":"\\|", "x":2.5, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] + }, + + "LAYOUT_ansi_split_bs_rshift": { + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] + }, + + "LAYOUT_ansi_split_bs": { + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":2.75}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn", "x":16.25, "y":4, "w":1}] + }, + + "LAYOUT_ansi_split_rshift": { + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"\\|", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] + }, + } +} diff --git a/keyboards/sx60/keymaps/amnobis/config.h b/keyboards/sx60/keymaps/amnobis/config.h new file mode 100644 index 0000000000..a5568e400d --- /dev/null +++ b/keyboards/sx60/keymaps/amnobis/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/sx60/keymaps/amnobis/keymap.c b/keyboards/sx60/keymaps/amnobis/keymap.c new file mode 100644 index 0000000000..1fcfa3d429 --- /dev/null +++ b/keyboards/sx60/keymaps/amnobis/keymap.c @@ -0,0 +1,92 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + LAYOUT_ansi_split_bs_rshift( + 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_ESC, + KC_SPC, 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_SPC, 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_SPC, 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_SPC, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_LALT, KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT ), + + LAYOUT_ansi_split_bs_rshift( + 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_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_LPRN, KC_RPRN, KC_GRV, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + + LAYOUT_ansi_split_bs_rshift( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/sx60/keymaps/amnobis/readme.md b/keyboards/sx60/keymaps/amnobis/readme.md new file mode 100644 index 0000000000..207d241804 --- /dev/null +++ b/keyboards/sx60/keymaps/amnobis/readme.md @@ -0,0 +1,8 @@ +Default Keymap +=== + +Super simple default keymap. + +Keymap Maintainer: [amnobis](https://github.com/amnobis) + +Intended usage: This is mostly provided for testing before you build your own keymap and as a reference to a stock(ish) configuration diff --git a/keyboards/sx60/keymaps/amnobis/rules.mk b/keyboards/sx60/keymaps/amnobis/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/sx60/keymaps/default/config.h b/keyboards/sx60/keymaps/default/config.h new file mode 100644 index 0000000000..a5568e400d --- /dev/null +++ b/keyboards/sx60/keymaps/default/config.h @@ -0,0 +1 @@ +#include "../../config.h" diff --git a/keyboards/sx60/keymaps/default/keymap.c b/keyboards/sx60/keymaps/default/keymap.c new file mode 100755 index 0000000000..942e8ef8eb --- /dev/null +++ b/keyboards/sx60/keymaps/default/keymap.c @@ -0,0 +1,25 @@ +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [0] = LAYOUT_ansi_split_bs_rshift( 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_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_BSPC, + KC_PGUP, 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_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_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), + + [1] = LAYOUT_ansi_split_bs_rshift( 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_PGUP, KC_UP, KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_LPRN, KC_RPRN, KC_GRV, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_INS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + 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) { +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + return true; +} diff --git a/keyboards/sx60/keymaps/default/readme.md b/keyboards/sx60/keymaps/default/readme.md new file mode 100644 index 0000000000..898fb84a2f --- /dev/null +++ b/keyboards/sx60/keymaps/default/readme.md @@ -0,0 +1,8 @@ +Default Keymap +=== + +Super simple default keymap with only a base layer. + +Keymap Maintainer: [amnobis](https://github.com/amnobis) + +Intended usage: This is mostly provided for testing before you build your own keymap and as a reference to a stock(ish) configuration diff --git a/keyboards/sx60/keymaps/default/rules.mk b/keyboards/sx60/keymaps/default/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/sx60/matrix.c b/keyboards/sx60/matrix.c new file mode 100644 index 0000000000..e91b4f4418 --- /dev/null +++ b/keyboards/sx60/matrix.c @@ -0,0 +1,307 @@ +/* +Copyright 2012-2017 Jun Wako, 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 . +*/ +#include +#include +#if defined(__AVR__) +#include +#endif +#include "wait.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "timer.h" +#include "sx60.h" + + +/* Set 0 if debouncing isn't needed */ + +#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) +#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 + +#ifdef MATRIX_MASKED + extern const matrix_row_t matrix_mask[]; +#endif + +static const uint8_t col_pins[ATMEGA_COLS] = MATRIX_COL_PINS; +static const uint8_t row_pins[MATRIX_ROWS] = MATRIX_ROW_PINS; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +static uint8_t mcp23018_reset_loop; + + +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); + +__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) { + + /* To use PORTF disable JTAG with writing JTD bit twice within four cycles. */ + #if (defined(__AVR_AT90USB1286__) || defined(__AVR_AT90USB1287__) || defined(__AVR_ATmega32U4__)) + MCUCR |= _BV(JTD); + MCUCR |= _BV(JTD); + #endif + + mcp23018_status = true; + + /* initialize row and col */ + unselect_rows(); + init_cols(); + + /* 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) +{ + 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 + this will be approx bit more frequent than once per second */ + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + } + } + } + + /* Set row, read cols */ + for (uint8_t current_row = 0; current_row < MATRIX_ROWS; current_row++) { +# if (DEBOUNCING_DELAY > 0) + bool matrix_changed = read_cols_on_row(matrix_debouncing, current_row); + + if (matrix_changed) { + debouncing = true; + debouncing_time = timer_read(); + } +# else + read_cols_on_row(matrix, current_row); +# endif + } + +# if (DEBOUNCING_DELAY > 0) + if (debouncing && (timer_elapsed(debouncing_time) > DEBOUNCING_DELAY)) { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + debouncing = false; + } +# endif + + matrix_scan_quantum(); + return 1; +} + +bool matrix_is_modified(void) +{ +#if (DEBOUNCING_DELAY > 0) + if (debouncing) return false; +#endif + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1> 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); + + if (mcp23018_status) { + /* if there was an error */ + return 0; + } else { + uint16_t data = 0; + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOA); if (mcp23018_status) goto out; + mcp23018_status = i2c_start(I2C_ADDR_READ); if (mcp23018_status) goto out; + data = i2c_readNak(); + data = ~data; + out: + i2c_stop(); + current_matrix[current_row] |= (data << 8); + } + + /* For each col... */ + for(uint8_t col_index = 0; col_index < ATMEGA_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_rows(); + + return (last_row_value != current_matrix[current_row]); +} + +static void select_row(uint8_t row) +{ + if (mcp23018_status) { + /* if there was an error do nothing */ + } else { + /* set active row low : 0 + set active row output : 1 + set other rows hi-Z : 1 */ + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPIOB); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0xFF & ~(1<> 4) + 1) |= _BV(pin & 0xF); /* OUT */ + _SFR_IO8((pin >> 4) + 2) &= ~_BV(pin & 0xF); /* LOW */ +} + +static void unselect_rows(void) +{ + for(uint8_t x = 0; x < MATRIX_ROWS; 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 */ + } +} diff --git a/keyboards/sx60/readme.md b/keyboards/sx60/readme.md new file mode 100644 index 0000000000..40f33ada2f --- /dev/null +++ b/keyboards/sx60/readme.md @@ -0,0 +1,20 @@ +SX60 +=== + + +![SX60](https://i.imgur.com/hZZHrRr.jpg) + + +Keyboard Maintainer: [amnobis](https://github.com/amnobis) +Hardware Supported: SX60 +Hardware Availability: [geekhack.org/index.php?topic=93665.0](https://geekhack.org/index.php?topic=93665.0) + +Make example for this keyboard (after setting up your build environment): + + make SX60:default + +Or to make and flash: + + make SX60:default:dfu + +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/sx60/rules.mk b/keyboards/sx60/rules.mk new file mode 100755 index 0000000000..0381293ceb --- /dev/null +++ b/keyboards/sx60/rules.mk @@ -0,0 +1,61 @@ +# # project specific files +SRC = twimaster.c \ + matrix.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 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 ?= no +CUSTOM_MATRIX ?= yes diff --git a/keyboards/sx60/sx60.c b/keyboards/sx60/sx60.c new file mode 100755 index 0000000000..ede8c07e97 --- /dev/null +++ b/keyboards/sx60/sx60.c @@ -0,0 +1,38 @@ +#include "sx60.h" +#include "i2cmaster.h" + + +bool i2c_initialized = 0; +uint8_t mcp23018_status = 0x20; + +uint8_t init_mcp23018(void) { + mcp23018_status = 0x20; + + /* I2C subsystem */ + + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized = true; + _delay_ms(1000); + } + + /* B Pins are Row, A pins are Columns + Set them to output */ + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111); if (mcp23018_status) goto out; + /* Now write to IODIRB */ + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + i2c_stop(); + + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b11111111); if (mcp23018_status) goto out; + /* Now write to GPPUB */ + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + +out: + i2c_stop(); + + return mcp23018_status; +} diff --git a/keyboards/sx60/sx60.h b/keyboards/sx60/sx60.h new file mode 100755 index 0000000000..e5a68ef2f0 --- /dev/null +++ b/keyboards/sx60/sx60.h @@ -0,0 +1,86 @@ +#ifndef SX60_H +#define SX60_H + +#include "quantum.h" +#include +#include +#include "i2cmaster.h" +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +/* I2C aliases and register addresses (see "mcp23018.md") */ +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 /* i/o direction register */ +#define IODIRB 0x01 +#define GPPUA 0x0C /* GPIO pull-up resistor register */ +#define GPPUB 0x0D +#define GPIOA 0x12 /* general purpose i/o port register (write modifies OLAT) */ +#define GPIOB 0x13 +#define OLATA 0x14 /* output latch register */ +#define OLATB 0x15 + +extern uint8_t mcp23018_status; + +uint8_t init_mcp23018(void); + +#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, K66, K67, K68, K69, K70, K71 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ + { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, K44 }, \ + { K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K58, K59, K59 }, \ + { K60, K61, K62, K63, K64, K65, KC_NO, KC_NO, K66, K67, K68, K69, K70, K71, KC_NO, KC_NO } \ +} + +#define LAYOUT_ansi_split_bs_rshift( \ + 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, K66, K67, K68, K69 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ + { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, KC_NO }, \ + { K44, K45, KC_NO, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K57, K57 }, \ + { K58, K59, K60, K61, K62, K63, KC_NO, KC_NO, K64, K65, K66, K67, K68, K69, KC_NO, KC_NO } \ +} + +#define LAYOUT_ansi_split_bs( \ + 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, K66, K67, K68 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K14 }, \ + { K15, K16, K17, K18, K19, K20, K21, KC_NO, K22, K23, K24, K25, K26, K27, K28, K29 }, \ + { K30, K31, K32, K33, K34, K35, K36, KC_NO, K37, K38, K39, K40, K41, K42, K43, KC_NO }, \ + { K44, K45, KC_NO, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, KC_NO, KC_NO }, \ + { K57, K58, K59, K60, K61, K62, KC_NO, KC_NO, K63, K64, K65, K66, K67, K68, KC_NO, KC_NO } \ +} + +#define LAYOUT_ansi_split_rshift( \ + 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, K66, K67, K68 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06, KC_NO, K07, K08, K09, K10, K11, K12, K13, K13 }, \ + { K14, K15, K16, K17, K18, K19, K20, KC_NO, K21, K22, K23, K24, K25, K26, K27, K28 }, \ + { K29, K30, K31, K32, K33, K34, K35, KC_NO, K36, K37, K38, K39, K40, K41, K42, KC_NO }, \ + { K43, K44, KC_NO, K45, K46, K47, K48, K49, K50, K51, K52, K53, K54, K55, K56, K56 }, \ + { K57, K58, K59, K60, K61, K62, KC_NO, KC_NO, K63, K64, K65, K66, K67, K68, KC_NO, KC_NO } \ +} + +#endif diff --git a/keyboards/sx60/twimaster.c b/keyboards/sx60/twimaster.c new file mode 100644 index 0000000000..30d8c24bf0 --- /dev/null +++ b/keyboards/sx60/twimaster.c @@ -0,0 +1,207 @@ +/************************************************************************* +* Title: I2C master library using hardware TWI interface +* Author: Peter Fleury 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 +#include + +#include + +/* define CPU frequency in Hz 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< Date: Thu, 7 Jun 2018 01:41:51 +0900 Subject: Add ErgoDash keyboard (#3128) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * create ergodash * Revert "create ergodash" This reverts commit b261c808c30fee95cb656629f7e9b44b01e79363. * add ergodash * keymap→layout * use set_single_persistent_default_layer --- keyboards/ergodash/config.h | 24 ++ keyboards/ergodash/ergodash.c | 1 + keyboards/ergodash/ergodash.h | 29 ++ keyboards/ergodash/i2c.c | 162 ++++++++++ keyboards/ergodash/i2c.h | 49 +++ keyboards/ergodash/keymaps/default/config.h | 44 +++ keyboards/ergodash/keymaps/default/keymap.c | 163 ++++++++++ keyboards/ergodash/keymaps/default/rules.mk | 0 keyboards/ergodash/matrix.c | 460 ++++++++++++++++++++++++++++ keyboards/ergodash/readme.md | 13 + keyboards/ergodash/rev1/config.h | 90 ++++++ keyboards/ergodash/rev1/rev1.c | 39 +++ keyboards/ergodash/rev1/rev1.h | 66 ++++ keyboards/ergodash/rev1/rules.mk | 1 + keyboards/ergodash/rules.mk | 77 +++++ keyboards/ergodash/serial.c | 228 ++++++++++++++ keyboards/ergodash/serial.h | 26 ++ keyboards/ergodash/split_util.c | 86 ++++++ keyboards/ergodash/split_util.h | 20 ++ 19 files changed, 1578 insertions(+) create mode 100644 keyboards/ergodash/config.h create mode 100644 keyboards/ergodash/ergodash.c create mode 100644 keyboards/ergodash/ergodash.h create mode 100644 keyboards/ergodash/i2c.c create mode 100644 keyboards/ergodash/i2c.h create mode 100644 keyboards/ergodash/keymaps/default/config.h create mode 100644 keyboards/ergodash/keymaps/default/keymap.c create mode 100644 keyboards/ergodash/keymaps/default/rules.mk create mode 100644 keyboards/ergodash/matrix.c create mode 100644 keyboards/ergodash/readme.md create mode 100644 keyboards/ergodash/rev1/config.h create mode 100644 keyboards/ergodash/rev1/rev1.c create mode 100644 keyboards/ergodash/rev1/rev1.h create mode 100644 keyboards/ergodash/rev1/rules.mk create mode 100644 keyboards/ergodash/rules.mk create mode 100644 keyboards/ergodash/serial.c create mode 100644 keyboards/ergodash/serial.h create mode 100644 keyboards/ergodash/split_util.c create mode 100644 keyboards/ergodash/split_util.h (limited to 'keyboards') diff --git a/keyboards/ergodash/config.h b/keyboards/ergodash/config.h new file mode 100644 index 0000000000..c910d8f24f --- /dev/null +++ b/keyboards/ergodash/config.h @@ -0,0 +1,24 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#endif diff --git a/keyboards/ergodash/ergodash.c b/keyboards/ergodash/ergodash.c new file mode 100644 index 0000000000..51e6dbf08f --- /dev/null +++ b/keyboards/ergodash/ergodash.c @@ -0,0 +1 @@ +#include "ergodash.h" diff --git a/keyboards/ergodash/ergodash.h b/keyboards/ergodash/ergodash.h new file mode 100644 index 0000000000..534486ba81 --- /dev/null +++ b/keyboards/ergodash/ergodash.h @@ -0,0 +1,29 @@ +#ifndef ERGODASH_H +#define ERGODASH_H + +#include "quantum.h" + +#ifdef KEYBOARD_ergodash_rev1 + #include "rev1.h" +#endif + + +// Used to create a keymap using only KC_ prefixed keys +#define LAYOUT_kc( \ + 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, \ + LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ + KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36, \ + KC_##LT0, KC_##LT1, KC_##LT2, KC_##LT3, KC_##LT4, KC_##LT5, KC_##RT0, KC_##RT1, KC_##RT2, KC_##RT3, KC_##RT4, KC_##RT5 \ + ) + +#define KC_LAYOUT_ortho_5x14 KC_KEYMAP + +#endif diff --git a/keyboards/ergodash/i2c.c b/keyboards/ergodash/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/ergodash/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/ergodash/keymaps/default/config.h b/keyboards/ergodash/keymaps/default/config.h new file mode 100644 index 0000000000..7e7fe4f69a --- /dev/null +++ b/keyboards/ergodash/keymaps/default/config.h @@ -0,0 +1,44 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#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 + +#endif + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 24 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 diff --git a/keyboards/ergodash/keymaps/default/keymap.c b/keyboards/ergodash/keymaps/default/keymap.c new file mode 100644 index 0000000000..88f813223c --- /dev/null +++ b/keyboards/ergodash/keymaps/default/keymap.c @@ -0,0 +1,163 @@ +#include QMK_KEYBOARD_H +#include "action_layer.h" +#include "eeconfig.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, +}; + +// 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 +#define KC_JPN LALT(KC_GRV) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | ESC | 1 | 2 | 3 | 4 | 5 | [ | ] | 6 | 7 | 8 | 9 | 0 | Caps | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | ` | Q | W | E | R | T | - | = | Y | U | I | O | P | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | Del | Bksp | H | J | K | L | ; | " | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | JPN | Enter| N | M | , | . | / | Shift| + * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' + * | Ctrl | GUI | ALt |Adjust| |Lower | Space |Enter |Raise| | Left| Down | Up | Right| + * ,-------------------------------------------------------------------------------------------------. + */ +[_QWERTY] = LAYOUT( \ + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, KC_CAPS, \ + KC_GRV, 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_BSLS, \ + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_DEL , KC_BSPC, 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_JPN , KC_ENT , KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_AJST, KC_LOWR, KC_SPC , KC_ENT , KC_RASE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower +* ,-------------------------------------------------------------------------------------------------. +* | F11 | F1 | F2 | F3 | F4 | F5 | { | } | F6 | F7 | F8 | F9 | F10 | F12 | +* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| +* | ~ | ! | @ | # | $ | % | _ | + | ^ | & | * | ( | ) | | | +* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| +* | Tab | A | S | D | F | G | Del | Bksp | H | J | K | L | : | " | +* |------+------+------+------+------+------+-------------+------+------+------+------+------+------| +* | Shift| Z | X | C | V | B | JPN | Enter| N | M | < | > | ? | Shift| +* `-------------+------+------+------+------+------+------+------+------+------+------+-------------' +* | Ctrl | GUI | ALt |Adjust| |Lower | Space |Enter |Raise| | Home |PageDn|PageUp| End | +* ,-------------------------------------------------------------------------------------------------. + */ + [_LOWER] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ + KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_JPN , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_AJST, KC_LOWR, KC_SPC , KC_ENT , KC_RASE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + ), + +/* Raise +* ,-------------------------------------------------------------------------------------------------. +* | F11 | F1 | F2 | F3 | F4 | F5 | { | } | F6 | F7 | F8 | F9 | F10 | F12 | +* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| +* | ~ | ! | @ | # | $ | % | _ | + | ^ | & | * | ( | ) | | | +* |------+------+------+------+------+------+------+------+------+------+------+------+------+------| +* | Tab | A | S | D | F | G | Del | Bksp | H | J | K | L | : | " | +* |------+------+------+------+------+------+-------------+------+------+------+------+------+------| +* | Shift| Z | X | C | V | B | JPN | Enter| N | M | < | > | ? | Shift| +* `-------------+------+------+------+------+------+------+------+------+------+------+-------------' +* | Ctrl | GUI | ALt |Adjust| |Lower | Space |Enter |Raise| | Home |PageDn|PageUp| End | +* ,-------------------------------------------------------------------------------------------------. + */ + [_RAISE] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_LCBR, KC_RCBR, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12, \ + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_UNDS, KC_PLUS, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_PIPE, \ + KC_TAB, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DEL , KC_BSPC, KC_H, KC_J, KC_K, KC_L, KC_COLN, KC_DQT , \ + KC_LSFT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_JPN , KC_ENT , KC_N, KC_M, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ + KC_LCTL, KC_LGUI, KC_LALT, KC_AJST, KC_LOWR, KC_SPC , KC_ENT , KC_RASE, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ + ), + + /* Adjust + * ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | Reset|RGB ON| MODE| HUE-| HUE+| | | SAT-| SAT+| VAL-| VAL+| | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+-------------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------+------+------+------+------+------+------+------+------+------+------+-------------' + * | | | | | | | | | | | | | | | + * ,-------------------------------------------------------------------------------------------------. + */ + [_ADJUST] = LAYOUT( + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ + _______, RESET , RGB_TOG, RGB_MOD, RGB_HUD, RGB_HUI,_______, _______, RGB_SAD, RGB_SAI, RGB_VAD, RGB_VAI, _______, _______, \ + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______,_______, _______, _______, _______, _______, _______, _______ \ + ) +}; + +#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) { + print("mode just switched to qwerty and this is a huge string\n"); + 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/ergodash/keymaps/default/rules.mk b/keyboards/ergodash/keymaps/default/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/ergodash/matrix.c b/keyboards/ergodash/matrix.c new file mode 100644 index 0000000000..80d4ce46a8 --- /dev/null +++ b/keyboards/ergodash/matrix.c @@ -0,0 +1,460 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#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 +#if (DIODE_DIRECTION == COL2ROW) + unselect_rows(); + init_cols(); +#elif (DIODE_DIRECTION == ROW2COL) + unselect_cols(); + init_rows(); +#endif + + 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(); + PORTD ^= (1 << 2); + } + +# 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<> 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/ergodash/readme.md b/keyboards/ergodash/readme.md new file mode 100644 index 0000000000..4b84b4802c --- /dev/null +++ b/keyboards/ergodash/readme.md @@ -0,0 +1,13 @@ +# ErgoDash + +![ErgoDash](https://i.imgur.com/ZyI592o.jpg) + +Keyboard Maintainer: [omkbd](https://github.com/omkbd) [@omkbd](https://twitter.com/omkbd) +Hardware Supported: ErgoDash PCB, Pro Micro ATmega32u4 +Hardware Availability: In preparation + +Make example for this keyboard (after setting up your build environment): + + make ergodash/rev1: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/ergodash/rev1/config.h b/keyboards/ergodash/rev1/config.h new file mode 100644 index 0000000000..09dd6604eb --- /dev/null +++ b/keyboards/ergodash/rev1/config.h @@ -0,0 +1,90 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0100 +#define MANUFACTURER Omkbd +#define PRODUCT ErgoDash +#define DESCRIPTION Power + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 10 +#define MATRIX_COLS 7 + +// wiring of each half +#define MATRIX_ROW_PINS { D7, E6, B4, B5, D4 } +#define MATRIX_COL_PINS { F5, F6, F7, B1, B3, B2, B6 } +// #define MATRIX_COL_PINS { B6, B2, B3, B1, F7, F6 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define tapping term */ +#define TAPPING_TERM 120 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 24 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif diff --git a/keyboards/ergodash/rev1/rev1.c b/keyboards/ergodash/rev1/rev1.c new file mode 100644 index 0000000000..5e787921cb --- /dev/null +++ b/keyboards/ergodash/rev1/rev1.c @@ -0,0 +1,39 @@ +#include "ergodash.h" + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +#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) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); + #endif + + // // green led on + // DDRD |= (1<<5); + // PORTD &= ~(1<<5); + + // // orange led on + // DDRB |= (1<<0); + // PORTB &= ~(1<<0); + + matrix_init_user(); +}; + +void shutdown_user(void) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/ergodash/rev1/rev1.h b/keyboards/ergodash/rev1/rev1.h new file mode 100644 index 0000000000..d27d22dca1 --- /dev/null +++ b/keyboards/ergodash/rev1/rev1.h @@ -0,0 +1,66 @@ +#ifndef REV1_H +#define REV1_H + +#include "ergodash.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); + +#ifndef FLIP_HALF +// Standard Keymap +// (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) +#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, \ + LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \ + ) \ + { \ + { 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 }, \ + { LT0, LT1, LT2, LT3, LT4, LT5, KC_NO}, \ + { 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 }, \ + { RT5, RT4, RT3, RT2, RT1, RT0, KC_NO} \ + } +#else +// Keymap with right side flipped +// (TRRS jack on both halves are to the right) +#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, \ + LT0, LT1, LT2, LT3, LT4, LT5, RT0, RT1, RT2, RT3, RT4, RT5 \ + ) \ + { \ + { 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 }, \ + { LT0, LT1, LT2, LT3, LT4, LT, KC_NO}, \ + { R00, R01, R02, R03, R04, R05, R06 }, \ + { R10, R11, R12, R13, R14, R15, R16 }, \ + { R20, R21, R22, R23, R24, R25, R26 }, \ + { R30, R31, R32, R33, R34, R35, R36 }, \ + { RT0, RT1, RT2, RT3, RT4, RT5, KC_NO} \ + } +#endif + +#endif diff --git a/keyboards/ergodash/rev1/rules.mk b/keyboards/ergodash/rev1/rules.mk new file mode 100644 index 0000000000..7b30c0beff --- /dev/null +++ b/keyboards/ergodash/rev1/rules.mk @@ -0,0 +1 @@ +BACKLIGHT_ENABLE = no diff --git a/keyboards/ergodash/rules.mk b/keyboards/ergodash/rules.mk new file mode 100644 index 0000000000..471f6b9cfe --- /dev/null +++ b/keyboards/ergodash/rules.mk @@ -0,0 +1,77 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c \ + ssd1306.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 +# 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 + +# 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 = no # 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +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 + +LAYOUTS = ortho_5x14 + +DEFAULT_FOLDER = ergodash/rev1 diff --git a/keyboards/ergodash/serial.c b/keyboards/ergodash/serial.c new file mode 100644 index 0000000000..74bcbb6bf6 --- /dev/null +++ b/keyboards/ergodash/serial.c @@ -0,0 +1,228 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#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/ergodash/serial.h b/keyboards/ergodash/serial.h new file mode 100644 index 0000000000..15fe4db7b4 --- /dev/null +++ b/keyboards/ergodash/serial.h @@ -0,0 +1,26 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* 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/ergodash/split_util.c b/keyboards/ergodash/split_util.c new file mode 100644 index 0000000000..346cbc9089 --- /dev/null +++ b/keyboards/ergodash/split_util.c @@ -0,0 +1,86 @@ +#include +#include +#include +#include +#include +#include +#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< +#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 -- cgit v1.2.3 From 1986f560e1bb36e72c6c7eb4626a0a0557fe21c6 Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 6 Jun 2018 09:46:06 -0700 Subject: remove trailing comma to fix parsing issue (#3130) * remove trailing comma to fix parsing issue * ctrl shift i is gud --- keyboards/sx60/info.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/sx60/info.json b/keyboards/sx60/info.json index 24cb427724..3ac6af4a3f 100644 --- a/keyboards/sx60/info.json +++ b/keyboards/sx60/info.json @@ -6,19 +6,19 @@ "height": 5, "layouts": { "LAYOUT": { - "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"ANSIEnter", "x":15, "y":2, "w":1}, {"label":"ISOEnter", "x":16, "y":2, "w":1.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"label":"Shift", "x":1.25, "y":3, "w":1.25}, {"label":"\\|", "x":2.5, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"ANSIEnter", "x":15, "y":2, "w":1}, {"label":"ISOEnter", "x":16, "y":2, "w":1.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"label":"Shift", "x":1.25, "y":3, "w":1.25}, {"label":"\\|", "x":2.5, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] }, "LAYOUT_ansi_split_bs_rshift": { - "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] }, "LAYOUT_ansi_split_bs": { - "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":2.75}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn", "x":16.25, "y":4, "w":1}] + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"\\|", "x":15.25, "y":0, "w":1}, {"label":"`~", "x":16.25, "y":0, "w":1}, {"label":"M1", "x":0, "y":1, "w":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":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"Backspace", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":2.75}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn", "x":16.25, "y":4, "w":1}] }, "LAYOUT_ansi_split_rshift": { - "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"M1", "x":0, "y":1, "w":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":7.75, "y":1}, {"label":"U", "x":8.75, "y":1}, {"label":"I", "x":9.75, "y":1}, {"label":"O", "x":10.75, "y":1}, {"label":"P", "x":11.75, "y":1}, {"label":"{", "x":12.75, "y":1}, {"label":"}", "x":13.75, "y":1}, {"label":"\\|", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":1.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] - }, + "layout": [{"label":"Esc", "x":1.25, "y":0}, {"label":"1!", "x":2.25, "y":0}, {"label":"2@", "x":3.25, "y":0}, {"label":"3#", "x":4.25, "y":0}, {"label":"4$", "x":5.25, "y":0}, {"label":"5%", "x":6.25, "y":0}, {"label":"6^", "x":7.25, "y":0}, {"label":"7&", "x":9.25, "y":0}, {"label":"8*", "x":10.25, "y":0}, {"label":"9(", "x":11.25, "y":0}, {"label":"0)", "x":12.25, "y":0}, {"label":"-_", "x":13.25, "y":0}, {"label":"=+", "x":14.25, "y":0}, {"label":"Backspace", "x":15.25, "y":0, "w":2}, {"label":"M1", "x":0, "y":1, "w":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":8.75, "y":1}, {"label":"U", "x":9.75, "y":1}, {"label":"I", "x":10.75, "y":1}, {"label":"O", "x":11.75, "y":1}, {"label":"P", "x":12.75, "y":1}, {"label":"{", "x":13.75, "y":1}, {"label":"}", "x":14.75, "y":1}, {"label":"\\|", "x":15.75, "y":1, "w":1.5}, {"label":"M2", "x":0, "y":2, "w":1}, {"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, "y":2}, {"label":"J", "x":10, "y":2}, {"label":"K", "x":11, "y":2}, {"label":"L", "x":12, "y":2}, {"label":":", "x":13, "y":2}, {"label":"\"", "x":14, "y":2}, {"label":"Enter", "x":15, "y":2, "w":2.25}, {"label":"M3", "x":0, "y":3, "w":1}, {"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":7.5, "y":3}, {"label":"N", "x":9.5, "y":3}, {"label":"M", "x":10.5, "y":3}, {"label":"<", "x":11.5, "y":3}, {"label":">", "x":12.5, "y":3}, {"label":"?", "x":13.5, "y":3}, {"label":"Shift", "x":14.5, "y":3, "w":1.75}, {"label":"Fn", "x":16.25, "y":3, "w":1}, {"label":"M4", "x":0, "y":4, "w":1}, {"label":"Ctrl", "x":1.25, "y":4, "w":1.25}, {"label":"Win", "x":2.5, "y":4, "w":1.25}, {"label":"Alt", "x":3.75, "y":4, "w":1.25}, {"x":5, "y":4, "w":2}, {"x":7, "y":4, "w":1}, {"x":9, "y":4, "w":2.75}, {"label":"Alt", "x":11.75, "y":4, "w":1.25}, {"label":"Win", "x":13, "y":4, "w":1.25}, {"label":"Menu", "x":14.25, "y":4, "w":1}, {"label":"Ctrl", "x":15.25, "y":4, "w":1}, {"label":"Fn2", "x":16.25, "y":4, "w":1}] + } } } -- cgit v1.2.3 From 97d5b6aba0a5ba69d0e6a2e2620f02408022feff Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 6 Jun 2018 09:47:25 -0700 Subject: Refactor for DeltaSplit75 (#3132) --- keyboards/deltasplit75/info.json | 4 +- keyboards/deltasplit75/keymaps/default/keymap.c | 45 +++++++------ keyboards/deltasplit75/keymaps/itsaferbie/keymap.c | 75 +++++++++++----------- keyboards/deltasplit75/keymaps/protosplit/keymap.c | 46 ++++++------- keyboards/deltasplit75/v2/v2.h | 4 +- 5 files changed, 91 insertions(+), 83 deletions(-) (limited to 'keyboards') diff --git a/keyboards/deltasplit75/info.json b/keyboards/deltasplit75/info.json index 6dedb79aa2..7bcb14d1cc 100644 --- a/keyboards/deltasplit75/info.json +++ b/keyboards/deltasplit75/info.json @@ -4,10 +4,10 @@ "width": 17, "height": 6, "layouts": { - "KEYMAP_V2": { + "LAYOUT_v2": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "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":"Print", "x":14, "y":0}, {"label":"Scroll", "x":15, "y":0}, {"label":"Pause", "x":16, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"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":8, "y":1}, {"label":"*", "x":9, "y":1}, {"label":"(", "x":10, "y":1}, {"label":")", "x":11, "y":1}, {"label":"_", "x":12, "y":1}, {"label":"+", "x":13, "y":1}, {"label":"Back", "x":14, "y":1}, {"label":"Trns", "x":15, "y":1}, {"label":"Home", "x":16, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":7.5, "y":2}, {"label":"U", "x":8.5, "y":2}, {"label":"I", "x":9.5, "y":2}, {"label":"O", "x":10.5, "y":2}, {"label":"P", "x":11.5, "y":2}, {"label":"{", "x":12.5, "y":2}, {"label":"}", "x":13.5, "y":2}, {"label":"Back", "x":14.5, "y":2, "w":1.5}, {"label":"PgUp", "x":16, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":7.75, "y":3}, {"label":"J", "x":8.75, "y":3}, {"label":"K", "x":9.75, "y":3}, {"label":"L", "x":10.75, "y":3}, {"label":":", "x":11.75, "y":3}, {"label":"\"", "x":12.75, "y":3}, {"label":"Trns", "x":13.75, "y":3}, {"label":"Enter", "x":14.75, "y":3, "w":1.25}, {"label":"PgDn", "x":16, "y":3}, {"label":"Shift", "x":0, "y":4, "w":1.25}, {"label":"Trns", "x":1.25, "y":4}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"B", "x":7.25, "y":4}, {"label":"N", "x":8.25, "y":4}, {"label":"M", "x":9.25, "y":4}, {"label":"<", "x":10.25, "y":4}, {"label":">", "x":11.25, "y":4}, {"label":"?", "x":12.25, "y":4}, {"label":"Shift", "x":13.25, "y":4, "w":1.75}, {"label":"Up", "x":15, "y":4}, {"label":"End", "x":16, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"label":"Space", "x":3.75, "y":5, "w":2}, {"label":"Fn", "x":5.75, "y":5}, {"label":"Space", "x":7.75, "y":5, "w":2.75}, {"label":"Alt", "x":10.5, "y":5, "w":1.25}, {"label":"Win", "x":11.75, "y":5}, {"label":"Ctrl", "x":12.75, "y":5, "w":1.25}, {"label":"Left", "x":14, "y":5}, {"label":"Down", "x":15, "y":5}, {"label":"Right", "x":16, "y":5}] }, - "KEYMAP_PROTOSPLIT": { + "LAYOUT_protosplit": { "layout": [{"label":"Esc", "x":0, "y":0}, {"label":"F1", "x":1, "y":0}, {"label":"F2", "x":2, "y":0}, {"label":"F3", "x":3, "y":0}, {"label":"F4", "x":4, "y":0}, {"label":"F5", "x":5, "y":0}, {"label":"F6", "x":6, "y":0}, {"label":"F7", "x":8, "y":0}, {"label":"F8", "x":9, "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":"Insert", "x":14, "y":0}, {"label":"Home", "x":15, "y":0}, {"label":"PgUp", "x":16, "y":0}, {"label":"~", "x":0, "y":1}, {"label":"!", "x":1, "y":1}, {"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":8, "y":1}, {"label":"*", "x":9, "y":1}, {"label":"(", "x":10, "y":1}, {"label":")", "x":11, "y":1}, {"label":"_", "x":12, "y":1}, {"label":"+", "x":13, "y":1}, {"label":"Delete", "x":14, "y":1}, {"label":"End", "x":15, "y":1}, {"label":"PgDn", "x":16, "y":1}, {"label":"Tab", "x":0, "y":2, "w":1.5}, {"label":"Q", "x":1.5, "y":2}, {"label":"W", "x":2.5, "y":2}, {"label":"E", "x":3.5, "y":2}, {"label":"R", "x":4.5, "y":2}, {"label":"T", "x":5.5, "y":2}, {"label":"Y", "x":7.5, "y":2}, {"label":"U", "x":8.5, "y":2}, {"label":"I", "x":9.5, "y":2}, {"label":"O", "x":10.5, "y":2}, {"label":"P", "x":11.5, "y":2}, {"label":"{", "x":12.5, "y":2}, {"label":"}", "x":13.5, "y":2}, {"label":"Back", "x":14.5, "y":2, "w":1.5}, {"label":"Scroll", "x":16, "y":2}, {"label":"Ctrl", "x":0, "y":3, "w":1.75}, {"label":"A", "x":1.75, "y":3}, {"label":"S", "x":2.75, "y":3}, {"label":"D", "x":3.75, "y":3}, {"label":"F", "x":4.75, "y":3}, {"label":"G", "x":5.75, "y":3}, {"label":"H", "x":7.75, "y":3}, {"label":"J", "x":8.75, "y":3}, {"label":"K", "x":9.75, "y":3}, {"label":"L", "x":10.75, "y":3}, {"label":":", "x":11.75, "y":3}, {"label":"\"", "x":12.75, "y":3}, {"label":"Enter", "x":13.75, "y":3, "w":2.25}, {"label":"Pause", "x":16, "y":3}, {"label":"Shift", "x":0, "y":4, "w":2.25}, {"label":"Z", "x":2.25, "y":4}, {"label":"X", "x":3.25, "y":4}, {"label":"C", "x":4.25, "y":4}, {"label":"V", "x":5.25, "y":4}, {"label":"B", "x":6.25, "y":4}, {"label":"B", "x":7.25, "y":4}, {"label":"N", "x":8.25, "y":4}, {"label":"M", "x":9.25, "y":4}, {"label":"<", "x":10.25, "y":4}, {"label":">", "x":11.25, "y":4}, {"label":"?", "x":12.25, "y":4}, {"label":"Shift", "x":13.25, "y":4, "w":1.75}, {"label":"Up", "x":15, "y":4}, {"label":"Print", "x":16, "y":4}, {"label":"Ctrl", "x":0, "y":5, "w":1.25}, {"label":"Win", "x":1.25, "y":5, "w":1.25}, {"label":"Alt", "x":2.5, "y":5, "w":1.25}, {"label":"Space", "x":3.75, "y":5, "w":2}, {"label":"Fn", "x":5.75, "y":5}, {"label":"Space", "x":7.75, "y":5, "w":2.75}, {"label":"Alt", "x":10.5, "y":5, "w":1.25}, {"label":"Win", "x":11.75, "y":5}, {"label":"Ctrl", "x":12.75, "y":5, "w":1.25}, {"label":"Left", "x":14, "y":5}, {"label":"Down", "x":15, "y":5}, {"label":"Right", "x":16, "y":5}] } } diff --git a/keyboards/deltasplit75/keymaps/default/keymap.c b/keyboards/deltasplit75/keymaps/default/keymap.c index e2657bfa2a..8824986120 100644 --- a/keyboards/deltasplit75/keymaps/default/keymap.c +++ b/keyboards/deltasplit75/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "deltasplit75.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -11,21 +9,26 @@ extern keymap_config_t keymap_config; // Fillers to make layering more clear -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP_V2( - 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_HOME, KC_PGUP, - 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_END, KC_PGDN, - 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_SLCK, - 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_TRNS, KC_ENT, KC_PAUS, //modify KC_TRNS to enable ISO Support - KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR, //modify KC_TRNS to enable ISO Support - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - KEYMAP_V2( - KC_TRNS, KC_TRNS, KC_TRNS, 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_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_VOLU, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - M(1), KC_LEFT, KC_DOWN, KC_RGHT, 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_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - -}; \ No newline at end of file +#define _______ KC_TRNS + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_v2( + 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_HOME, KC_PGUP, + 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_END, KC_PGDN, + 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_SLCK, + 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_TRNS, KC_ENT, KC_PAUS, //modify KC_TRNS to enable ISO Support + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR, //modify KC_TRNS to enable ISO Support + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_v2( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_VOLU, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, KC_VOLD, M(0), KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c index bc0b23868a..d7857294fb 100644 --- a/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c +++ b/keyboards/deltasplit75/keymaps/itsaferbie/keymap.c @@ -1,6 +1,4 @@ -#include "deltasplit75.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -11,36 +9,41 @@ extern keymap_config_t keymap_config; // Fillers to make layering more clear -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - *,-----------------------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|Prnt|Ins|Del| - * |----------------------------------------------------------------------| - * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backspace| Home| - * |----------------------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| PgUp| - * |----------------------------------------------------------------------| - * |Ctrl| A| S| D| F| G| H| J| K| L| ;| '|Enter | PgDown| - * |----------------------------------------------------------------------| - * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift | Up| End| - * |----------------------------------------------------------------------| - * |CapsLo|Gui |Alt |Mod|Sp | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig| - * `----------------------------------------------------------------------' - */ - KEYMAP_V2( - 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_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_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace. - 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is uneeded ISO enter key. - KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, // KC_TRNS is uneeded ISO layout key. - KC_CAPS, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - KEYMAP_V2( - RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, - RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_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_TRNS, KC_MPLY, KC_VOLD, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_STOP, KC_MNXT), - -}; \ No newline at end of file +#define _______ KC_TRNS + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + *,-----------------------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|Prnt|Ins|Del| + * |----------------------------------------------------------------------| + * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backspace| Home| + * |----------------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| PgUp| + * |----------------------------------------------------------------------| + * |Ctrl| A| S| D| F| G| H| J| K| L| ;| '|Enter | PgDown| + * |----------------------------------------------------------------------| + * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift | Up| End| + * |----------------------------------------------------------------------| + * |CapsLo|Gui |Alt |Mod|Sp | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig| + * `----------------------------------------------------------------------' + */ + LAYOUT_v2( + 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_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_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace. + 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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is unneeded ISO Enter key. + KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, // KC_TRNS is unneeded ISO layout key. + KC_CAPS, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_v2( + RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_VOLD, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_STOP, KC_MNXT + ), + +}; diff --git a/keyboards/deltasplit75/keymaps/protosplit/keymap.c b/keyboards/deltasplit75/keymaps/protosplit/keymap.c index d8db2b88e1..5505f97802 100644 --- a/keyboards/deltasplit75/keymaps/protosplit/keymap.c +++ b/keyboards/deltasplit75/keymaps/protosplit/keymap.c @@ -1,6 +1,4 @@ -#include "deltasplit75.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -11,22 +9,26 @@ extern keymap_config_t keymap_config; // Fillers to make layering more clear -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP_PROTOSPLIT( - 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_HOME, KC_PGUP, - 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_END, KC_PGDN, - 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_SLCK, - 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_PAUS, - 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_LSFT, KC_UP, KC_PSCR, - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), - - KEYMAP_PROTOSPLIT( - KC_TRNS, KC_TRNS, KC_TRNS, 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_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_VOLU, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_VOLD, M(0), KC_PSCR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - -}; \ No newline at end of file +#define _______ KC_TRNS + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + LAYOUT_protosplit( + 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_HOME, KC_PGUP, + 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_END, KC_PGDN, + 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_SLCK, + 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_PAUS, + 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_LSFT, KC_UP, KC_PSCR, + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), + + LAYOUT_protosplit( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_VOLU, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, KC_VOLD, M(0), KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + +}; diff --git a/keyboards/deltasplit75/v2/v2.h b/keyboards/deltasplit75/v2/v2.h index 985a8b267f..9e364f38ab 100644 --- a/keyboards/deltasplit75/v2/v2.h +++ b/keyboards/deltasplit75/v2/v2.h @@ -9,7 +9,7 @@ //void promicro_bootloader_jmp(bool program); //matrix is defined in a weird way here; the layout on both sides are asymmetrical, but the "matrix" is symmetrical but with empty gaps //the last column is defined as a separate row because the firmware currently doesnt support more than 8 columns (this layout has 9 columns per side) K45 and K110 are the Bs on both sides; K53 and K106 are extra keys for ISO -#define KEYMAP_V2( \ +#define LAYOUT_v2( \ K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \ K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \ K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \ @@ -34,7 +34,7 @@ { KC_NO, KC_NO, K132, K133, K134, K135, K136, K137} \ } -#define KEYMAP_PROTOSPLIT( \ +#define LAYOUT_protosplit( \ K00, K01, K02, K03, K04, K05, K06, K70, K71, K72, K73, K74, K75, K76, K77, K132, \ K10, K11, K12, K13, K14, K15, K16, K80, K81, K82, K83, K84, K85, K86, K87, K133, \ K20, K21, K22, K23, K24, K25, K90, K91, K92, K93, K94, K95, K96, K97, K134, \ -- cgit v1.2.3 From 99e849ac89bcd97c9bd5fcb2b368643bf4fb3812 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 6 Jun 2018 09:47:56 -0700 Subject: Dichotemy: Refactor and Configurator update (#3133) * Refactor KEYMAP to LAYOUT * Configurator support --- keyboards/dichotemy/dichotemy.h | 2 +- keyboards/dichotemy/info.json | 12 ++++ keyboards/dichotemy/keymaps/default/keymap.c | 84 ++++++++++++++-------------- 3 files changed, 55 insertions(+), 43 deletions(-) create mode 100644 keyboards/dichotemy/info.json (limited to 'keyboards') diff --git a/keyboards/dichotemy/dichotemy.h b/keyboards/dichotemy/dichotemy.h index 09b9dfcf22..1d617d91c9 100644 --- a/keyboards/dichotemy/dichotemy.h +++ b/keyboards/dichotemy/dichotemy.h @@ -49,7 +49,7 @@ // 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 KEYMAP( \ +#define LAYOUT( \ 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, \ diff --git a/keyboards/dichotemy/info.json b/keyboards/dichotemy/info.json new file mode 100644 index 0000000000..fc4390cdd7 --- /dev/null +++ b/keyboards/dichotemy/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Dichotemy", + "url": "", + "maintainer": "qmk", + "width": 13, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"k00", "x":0, "y":0.5}, {"label":"k01", "x":1, "y":0.5}, {"label":"k02", "x":2, "y":0.25}, {"label":"k03", "x":3, "y":0}, {"label":"k04", "x":4, "y":0.5}, {"label":"k05", "x":5, "y":0.5}, {"label":"k06", "x":7, "y":0.5}, {"label":"k07", "x":8, "y":0.5}, {"label":"k08", "x":9, "y":0}, {"label":"k09", "x":10, "y":0.25}, {"label":"k0A", "x":11, "y":0.5}, {"label":"k0B", "x":12, "y":0.5}, {"label":"k10", "x":0, "y":1.5}, {"label":"k11", "x":1, "y":1.5}, {"label":"k12", "x":2, "y":1.25}, {"label":"k13", "x":3, "y":1}, {"label":"k14", "x":4, "y":1.5}, {"label":"k15", "x":5, "y":1.5}, {"label":"k16", "x":7, "y":1.5}, {"label":"k17", "x":8, "y":1.5}, {"label":"k18", "x":9, "y":1}, {"label":"k19", "x":10, "y":1.25}, {"label":"k1A", "x":11, "y":1.5}, {"label":"k1B", "x":12, "y":1.5}, {"label":"k20", "x":0, "y":2.5}, {"label":"k21", "x":1, "y":2.5}, {"label":"k22", "x":2, "y":2.25}, {"label":"k23", "x":3, "y":2}, {"label":"k24", "x":4, "y":2.5}, {"label":"k25", "x":5, "y":2.5}, {"label":"k26", "x":7, "y":2.5}, {"label":"k27", "x":8, "y":2.5}, {"label":"k28", "x":9, "y":2}, {"label":"k29", "x":10, "y":2.25}, {"label":"k2A", "x":11, "y":2.5}, {"label":"k2B", "x":12, "y":2.5}, {"label":"k33", "x":3, "y":4}, {"label":"k34", "x":4, "y":4}, {"label":"k35", "x":5, "y":4}, {"label":"k36", "x":7, "y":4}, {"label":"k37", "x":8, "y":4}, {"label":"k38", "x":9, "y":4}, {"label":"k43", "x":3, "y":5}, {"label":"k44", "x":4, "y":5}, {"label":"k45", "x":5, "y":5}, {"label":"k46", "x":7, "y":5}, {"label":"k47", "x":8, "y":5}, {"label":"k48", "x":9, "y":5}] + } + } +} diff --git a/keyboards/dichotemy/keymaps/default/keymap.c b/keyboards/dichotemy/keymaps/default/keymap.c index 2298ecb222..8742116f15 100644 --- a/keyboards/dichotemy/keymaps/default/keymap.c +++ b/keyboards/dichotemy/keymaps/default/keymap.c @@ -1,8 +1,7 @@ // this is the style you want to emulate. // This is the canonical layout file for the Quantum project. If you want to add another keyboard, -#include "dichotemy.h" -#include "report.h" +#include QMK_KEYBOARD_H #include "pointing_device.h" // Each layer gets a name for readability, which is then used in the keymap matrix below. @@ -20,7 +19,7 @@ enum dichotemy_layers #define LONGPRESS_COUNT 4 -enum dichotemy_keycodes +enum dichotemy_keycodes { CK_1G = SAFE_RANGE, CK_BSPE, @@ -53,45 +52,46 @@ enum dichotemy_macros #define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_BS] = { /* Base layout, nearly qwerty but with modifications because it's not a full keyboard. Obviously. */ - {CK_TE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - {NUMKEY, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CK_QE }, - {SFTKEY, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOUSE }, - {XXXXXXX, XXXXXXX, XXXXXXX, KC_LCTL, KC_LALT, KC_LGUI, KC_RGUI, KC_RALT, KC_RCTL, XXXXXXX, XXXXXXX, XXXXXXX }, - {XXXXXXX, XXXXXXX, XXXXXXX, KC_LBRC, KC_LPRN, KC_QUOT, KC_SPC, KC_RPRN, KC_RBRC, XXXXXXX, XXXXXXX, XXXXXXX } -}, -[_SF] = { /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */ - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, NS_HYPH, KC_UNDS, _______, _______ }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_LABK, _______, _______, KC_RABK, _______, XXXXXXX, XXXXXXX, XXXXXXX } -}, + [_BS] = LAYOUT( /* Base layout, nearly qwerty but with modifications because it's not a full keyboard. Obviously. */ + CK_TE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + NUMKEY, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CK_QE, + SFTKEY, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOUSE, + KC_LCTL, KC_LALT, KC_LGUI, KC_RGUI, KC_RALT, KC_RCTL, + KC_LBRC, KC_LPRN, KC_QUOT, KC_SPC, KC_RPRN, KC_RBRC + ), -[_NM] = { /* Number layout, basically the main function layer */ - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______ }, - {_______, CK_1G, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, CK_BSPE }, - {_______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______ }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX } -}, + [_SF] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, NS_HYPH, KC_UNDS, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, KC_LABK, _______, _______, KC_RABK, _______ + ), -[_NS] = { /* Shifted number/function layout, for per-key control. Only active when shift is held, and number is toggled or held */ - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, NS_EQU, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX } -}, + [_NM] = LAYOUT( /* Number layout, basically the main function layer */ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, CK_1G, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, CK_BSPE, + _______, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), -[_MS] = { /* Mouse layer, including buttons for clicking. */ - {_______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______ }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______, KC_UP, _______, XXXXXXX, XXXXXXX, XXXXXXX }, - {XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX } -} + [_NS] = LAYOUT( /* Shifted number/function layout, for per-key control. Only active when shift is held, and number is toggled or held */ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PLUS, NS_EQU, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______ + ), + + [_MS] = LAYOUT( /* Mouse layer, including buttons for clicking. */ + _______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______, + _______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______, + _______, _______, _______, _______, KC_UP, _______, + _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT + ) }; @@ -259,8 +259,8 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { special_timers[CK_TE-SAFE_RANGE] = 0xFFFF; } break; - //No-shift keys, they unregister the KC_LSFT code so they can send - //unshifted values - but they don't change the bool. if any other + //No-shift keys, they unregister the KC_LSFT code so they can send + //unshifted values - but they don't change the bool. if any other //key is pressed and the bool is set, KC_LSFT is registered again. case NS_HYPH: if (record->event.pressed) { @@ -288,7 +288,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } } break; - + //mouse buttons, for 1-3, to update the mouse report: case MS_BTN1: currentReport = pointing_device_get_report(); @@ -335,7 +335,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } pointing_device_set_report(currentReport); break;*/ - + //If any other key was pressed during the layer mod hold period, //then the layer mod was used momentarily, and should block latching //Additionally, if NS_ keys are in use, then shift may be held (but is -- cgit v1.2.3 From b5ab6a5d01d66f1c2d324be0c73bbedf0bdfa3a1 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 6 Jun 2018 09:51:24 -0700 Subject: Diverge3: Readme Clean-up, Refactor and Configurator support (#3135) * Readme cleanup * Refactor * Configurator support --- keyboards/diverge3/diverge3.h | 36 +++++++++++++--------------- keyboards/diverge3/info.json | 13 ++++++++++ keyboards/diverge3/keymaps/default/keymap.c | 37 ++++++++++------------------- keyboards/diverge3/readme.md | 4 ++-- 4 files changed, 45 insertions(+), 45 deletions(-) create mode 100644 keyboards/diverge3/info.json (limited to 'keyboards') diff --git a/keyboards/diverge3/diverge3.h b/keyboards/diverge3/diverge3.h index 37bad2ee7c..53364213f6 100644 --- a/keyboards/diverge3/diverge3.h +++ b/keyboards/diverge3/diverge3.h @@ -28,24 +28,22 @@ // This a shortcut to help you visually see your layout. // The second converts the arguments into a two-dimensional array -// Used to create a keymap using only KC_ prefixed keys #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, LT0, LT1, LT2, RT2, RT1, RT0, R40, R41, R42, R43, R44 \ - ) \ - { \ - { KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_NO }, \ - { KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_NO }, \ - { KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_NO }, \ - { KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_NO }, \ - { KC_##L40, KC_##L41, KC_##L42, KC_##L43, KC_##L44, KC_##LT0, KC_##LT1, KC_##LT2 }, \ - { KC_##R06, KC_##R05, KC_##R04, KC_##R03, KC_##R02, KC_##R01, KC_##R00, KC_NO }, \ - { KC_##R16, KC_##R15, KC_##R14, KC_##R13, KC_##R12, KC_##R11, KC_##R10, KC_NO }, \ - { KC_##R26, KC_##R25, KC_##R24, KC_##R23, KC_##R22, KC_##R21, KC_##R20, KC_NO }, \ - { KC_##R36, KC_##R35, KC_##R34, KC_##R33, KC_##R32, KC_##R31, KC_##R30, KC_NO }, \ - { KC_##R44, KC_##R43, KC_##R42, KC_##R41, KC_##R40, KC_##RT0, KC_##RT1, KC_##RT2 } \ - } + 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, LT0, LT1, LT2, RT2, RT1, RT0, R40, R41, R42, R43, R44 \ +) { \ + { L00, L01, L02, L03, L04, L05, L06, KC_NO }, \ + { L10, L11, L12, L13, L14, L15, L16, KC_NO }, \ + { L20, L21, L22, L23, L24, L25, L26, KC_NO }, \ + { L30, L31, L32, L33, L34, L35, L36, KC_NO }, \ + { L40, L41, L42, L43, L44, LT0, LT1, LT2 }, \ + { R06, R05, R04, R03, R02, R01, R00, KC_NO }, \ + { R16, R15, R14, R13, R12, R11, R10, KC_NO }, \ + { R26, R25, R24, R23, R22, R21, R20, KC_NO }, \ + { R36, R35, R34, R33, R32, R31, R30, KC_NO }, \ + { R44, R43, R42, R41, R40, RT0, RT1, RT2 } \ + } #endif diff --git a/keyboards/diverge3/info.json b/keyboards/diverge3/info.json new file mode 100644 index 0000000000..d0240a9ea5 --- /dev/null +++ b/keyboards/diverge3/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Diverge3", + "url": "", + "maintainer": "qmk", + "width": 17, + "height": 6.25, + "layouts": { + "LAYOUT": { + "key_count": 72, + "layout": [{"x":0, "y":0}, {"x":1, "y":0.75}, {"x":2, "y":0.25}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0.25}, {"x":6, "y":0.5}, {"x":10, "y":0.5}, {"x":11, "y":0.25}, {"x":12, "y":0}, {"x":13, "y":0}, {"x":14, "y":0.25}, {"x":15, "y":0.75}, {"x":16, "y":0}, {"x":0, "y":1}, {"x":1, "y":1.75}, {"x":2, "y":1.25}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1.25}, {"x":6, "y":1.5}, {"x":10, "y":1.5}, {"x":11, "y":1.25}, {"x":12, "y":1}, {"x":13, "y":1}, {"x":14, "y":1.25}, {"x":15, "y":1.75}, {"x":16, "y":1}, {"x":0, "y":2}, {"x":1, "y":2.75}, {"x":2, "y":2.25}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2.25}, {"x":6, "y":2.5}, {"x":10, "y":2.5}, {"x":11, "y":2.25}, {"x":12, "y":2}, {"x":13, "y":2}, {"x":14, "y":2.25}, {"x":15, "y":2.75}, {"x":16, "y":2}, {"x":0, "y":3}, {"x":1, "y":3.75}, {"x":2, "y":3.25}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3.25}, {"x":6, "y":3.5}, {"x":10, "y":3.5}, {"x":11, "y":3.25}, {"x":12, "y":3}, {"x":13, "y":3}, {"x":14, "y":3.25}, {"x":15, "y":3.75}, {"x":16, "y":3}, {"x":0, "y":4}, {"x":1, "y":4.75}, {"x":2, "y":4.25}, {"x":3, "y":4}, {"x":4, "y":4}, {"x":5, "y":4.75, "h":1.25}, {"x":6, "y":5, "h":1.25}, {"x":7, "y":5.25}, {"x":9, "y":5.25}, {"x":10, "y":5, "h":1.25}, {"x":11, "y":4.75, "h":1.25}, {"x":12, "y":4}, {"x":13, "y":4}, {"x":14, "y":4.25}, {"x":15, "y":4.75}, {"x":16, "y":4}] + } + } +} diff --git a/keyboards/diverge3/keymaps/default/keymap.c b/keyboards/diverge3/keymaps/default/keymap.c index 94ff01304e..1b704e87ed 100644 --- a/keyboards/diverge3/keymaps/default/keymap.c +++ b/keyboards/diverge3/keymaps/default/keymap.c @@ -13,9 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "diverge3.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H //**************** Definitions needed for quad function to work *********************// enum { @@ -98,7 +96,7 @@ enum custom_keycodes { }; // Make layer undefined do nothing -#define KC_ KC_TRNS +#define _______ KC_TRNS // Macros #define KC_PMAC PAREN_MACRO @@ -120,30 +118,21 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = LAYOUT( - //,----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - ESC, 1 , 2 , 3 , 4 , 5 ,MUTE, MPLY, 6 , 7 , 8 , 9 , 0 ,PSCR, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - GRV, Q , W , E , R , T ,VOLD, VOLU, Y , U , I , O , P ,CAPS, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - TAB, A , S , D , F , G ,PGDN, PGUP, H , J , K , L ,SCLN,BSLS, - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - LSFT, Z , X , C , V , B ,WRDLT, WRDRT, N , M ,COMM,DOT ,SLSH,QUOT, - //|----+----+----+----+----+----+----+----|||----+----+----+----+----+----+----+----| - LCTL,LGUI, APP,LALT,HOME,SPNT,DEL1,BSHT , ENT ,TAB1,BSHT,END ,DOWN, UP ,LEFT,RIGHT + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_MUTE, KC_MPLY, KC_6, KC_7, KC_8, KC_9, KC_0, KC_PSCR, + KC_GRV, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_VOLD, KC_VOLU, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_CAPS, + KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_PGDN, KC_PGUP, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_BSLS, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_WRDLT, KC_WRDRT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_LCTL, KC_LGUI, KC_APP, KC_LALT, KC_HOME, KC_SPNT, KC_DEL1, KC_BSHT, KC_ENT, KC_TAB1, KC_BSHT, KC_END, KC_DOWN, KC_UP, KC_LEFT, KC_RIGHT ), [_LOWER] = LAYOUT( - //,----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , F1 , F2 , F3 , F4 , F5 ,F11 , F12, F6 , F7 , F8 , F9 , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - TILD,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR, , , , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , ,LBRC,LPRN,UNDS,LCBR, , ,RCBR, EQL,RPRN,RBRC,COLN, , - //|----+----+----+----+----+----+----| |----+----+----+----+----+----+----| - , , ,PMAC,MINS,AMAC, , , ,PLUS, , , , , - //|----+----+----+----+----+----+----+----|||----+----+----+----+----+----+----+----| - , , , , , , , , , , , , , , , + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F11, KC_F12, KC_F6, KC_F7, KC_F8, KC_F9, _______, _______, + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, _______, _______, _______, + _______, _______, KC_LBRC, KC_LPRN, KC_UNDS, KC_LCBR, _______, _______, KC_RCBR, KC_EQL, KC_RPRN, KC_RBRC, KC_COLN, _______, + _______, _______, _______, KC_PMAC, KC_MINS, KC_AMAC, _______, _______, _______, KC_PLUS, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ) + }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/diverge3/readme.md b/keyboards/diverge3/readme.md index f8ad69a2ee..2ecfbca3bb 100644 --- a/keyboards/diverge3/readme.md +++ b/keyboards/diverge3/readme.md @@ -2,8 +2,8 @@ A split 5x7 keyboard with 3 thumb keys. Made by [Unikeyboard](https://unikeyboard.io). -Keyboard Maintainer: [IslandMan93](https://github.com/islandman93) -Hardware Supported: Pro Micro +Keyboard Maintainer: [IslandMan93](https://github.com/islandman93) +Hardware Supported: Pro Micro Hardware Availability: [Diverge 3](https://unikeyboard.io/product/diverge/) Make example for this keyboard (after setting up your build environment): -- cgit v1.2.3 From 87abed6865e97f443bfc539413f9d454ee632722 Mon Sep 17 00:00:00 2001 From: Oryhara Date: Wed, 6 Jun 2018 11:52:56 -0500 Subject: Sweeping Visualizer for Ergodox Inifinity (#3136) * started work on halfkeyboard * update to keymap * halfkey layouts complete for dvorak and qwerty * added plover layout to halfkeyboard mapping * fixed error in dvorak layout right hand * fixed error in dvorak layout right hand, comments updated * thing * added minus and equals to normal layouts * added minus and equals to normal layouts * adde visualizer matching halfkeyboard mappings * adde visualizer matching halfkeyboard mappings * updated keymaps for mirror handedness functionality for all layers. Also added visualizer code for distinct color for each layer, and LCD text displaying the current layer. * had a KC_TILD where should have had KC_GRAV * its spelled KC_GRAVE * mouskeys and some visualizer work. * added LED backlight visuals * trying to get visualizer working * Move lufa descriptor to protocol/usb_descriptor * Try to compile usb_descriptor on ChibiOS * Add lufa_utils for ChibiOS Lufa USB descriptors for ChibiOS * More lufa_util compatibility fixes * First compiling version of shared USB descriptor * Send the usb descriptors * Fix the CONSOLE output on ChibiOS * Add errors for unsupported interfaces * Enable support for vitual serial port USB descriptors * Implement virtual serial port for ChibiOS * Cleanup the lufa_utils Use the default lufa header files * Add raw hid support for ChibiOS This is completely untested * Enable midi compilation on ChibiOS * Move midi functionality out of lufa.c * Don't register sysex callback when not needed * ChibiOS compilation fixes * Update ChibiOS submodule * Fix the Midi USB descriptor It didn't work properly when both Midi and Virtual serial port was enabled. * Add MIDI support for ChibiOS * Fix USB descriptor strings on ChibiOS * Use serial usb driver for raw hid * Generalize the ChibiOS stream like drivers This makes the initialization much more simple and eliminates a lot of the code duplication. * Convert console output to chibios stream driver * Fixes for ChibiOS update * Update the ChibiOS contrib submodule To include the usb data toggle synchronization fixes * Fix duplicate reset enumeration on ChibiOS * Add missing include * Add number of endpoints check for ChibiOS * Enable serial USB driver on all keyboards * Add missing includes when API is enabled withot midi * Add another missing inlcude * consolidated my custom animations into visualizer.c in my keymap directory * LED backlight keys animation KITT scanner * moved my custom rules.mk to my keymap folder * undoing changes i shouldn't have done * more fixes * updated comments on the visulizer code * steno keys added to plover layout * updated halfkeyboard rules to allow steno mode * adding my stuff back after hard reset * added a plover layout back in for androud steno app * fixed layer toggle typo * merged again * visualizer decided to have a conflict again. fixed. * keymap change to add mouse keys and put layer switching on shortcuts layer * made the ergodox LEDs scan left to right and back again * visualizer work * KITTSCANNER finally * fixed right hand shortcuts layer and removed handedness switching for base layer so jump in gaming works corrrectly * added another sweep that goes full on over both boards then full off in both directions * added function key layer and cleaned up some layer switching --- keyboards/ergodox_infinity/config.h | 1 - .../ergodox_infinity/keymaps/halfkeyboard/keymap.c | 253 +++++++-------- .../keymaps/halfkeyboard/visualizer.c | 353 +++++++++++++++------ 3 files changed, 389 insertions(+), 218 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox_infinity/config.h b/keyboards/ergodox_infinity/config.h index c08356cb06..0e64897cba 100644 --- a/keyboards/ergodox_infinity/config.h +++ b/keyboards/ergodox_infinity/config.h @@ -72,7 +72,6 @@ along with this program. If not, see . #define SERIAL_LINK_THREAD_PRIORITY (NORMALPRIO - 1) #define VISUALIZER_USER_DATA_SIZE 16 - /* * Feature disable options * These options are also useful to firmware size reduction. diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c b/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c index 7df97bd01f..b1cfdf42fc 100644 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/keymap.c @@ -10,12 +10,13 @@ #define HALFQWERTY 1 // mirrored qwerty layer #define DVORAK 2 // dvorak layer #define HALFDVORAK 3 // mirrored dvorak layer +//no layer 4 #define SYMB 5 // symbols #define HALFSYMB 6 // media keys #define PLVR 7 // steno plover layout -#define SHORTCUTS 8 //layer with shortcut keys -#define MDIA 9 - +#define SHORTCUTS 8 //layer with shortcut keys and other layer nav +#define FUNCTION 9 //all F-keys, all day +#define PROPERSTENO 10 //real steno layout enum custom_keycodes { PLACEHOLDER = SAFE_RANGE, // can always be here @@ -28,7 +29,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: qwerty * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | ` | | \ | 6 | 7 | 8 | 9 | 0 | BSPC | + * | ESC | 1 | 2 | 3 | 4 | 5 | RMB | | \ | 6 | 7 | 8 | 9 | 0 | BSPC | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | TAB | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | ' | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| @@ -39,7 +40,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LCTRL|ALT |CTLShTab|CTL-TAB| LGui| | RGui| UP | DOWN | ALT | RCTRL | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * |Symbol|Dvorak| |Plover|HalfSymb| + * |Symbol|LMB | |Plover|HalfSymb| * ,------|------|------| |------+--------+------. * | | |MU_TOG| | PgUp | | | * | Space|DELETE|------| |------| Tab |Enter | @@ -50,21 +51,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [QWERTY] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRAVE, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_BTN2, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_EQL, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_MINUS, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), MO(SHORTCUTS), - TG(SYMB), TG(DVORAK), + KC_LGUI, KC_BTN1, MU_ON, - LT(HALFQWERTY, KC_SPACE),KC_DEL,KC_END, + KC_SPACE,KC_DEL,KC_END, // right hand - KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_BTN2, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLASH, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, KC_EQL,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT, - MO(MDIA), KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, - TG(PLVR), TG(MDIA), + MO(SHORTCUTS), KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, + KC_BTN1, KC_RGUI, MU_OFF, KC_PGDN,KC_TAB, LT(HALFQWERTY, KC_ENT) ), @@ -93,25 +94,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [HALFQWERTY] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_BSLS, - KC_BSLS, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_RBRC, + KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_TRNS, + KC_BSLS, KC_P, KC_O, KC_I, KC_U, KC_Y, KC_LBRC, KC_ENT, KC_SCLN, KC_L, KC_K, KC_J, KC_H, - KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_EQL, + KC_LSFT, KC_SLASH, KC_DOT, KC_COMM,KC_M, KC_N, KC_RBRC, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS, - KC_TRNS, KC_TRANSPARENT, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRANSPARENT,KC_DEL,KC_END, // right hand - KC_GRAVE, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC, - KC_LBRC, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS, + KC_TRNS, KC_5, KC_4, KC_3, KC_2, KC_1, KC_BSPC, + KC_MINUS, KC_T, KC_R, KC_E, KC_W, KC_Q, KC_BSLS, KC_G, KC_F, KC_D, KC_S, KC_A, KC_ENT, - KC_MINUS,KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT, + KC_EQL,KC_B, KC_V, KC_C, KC_X, KC_Z, KC_RSFT, KC_TRNS, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, KC_TRANSPARENT, KC_TRNS, KC_TRNS, KC_PGDN,KC_TAB, KC_TRANSPARENT ), -/* Keymap 3: dvorak +/* Keymap 2: dvorak * * ,--------------------------------------------------. ,--------------------------------------------------. * | ESC | 1 | 2 | 3 | 4 | 5 | ` | | \ | 6 | 7 | 8 | 9 | 0 | BSPC | @@ -134,24 +135,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* -[DVORAK] = LAYOUT_ergodox( // layer 0 : default +[DVORAK] = LAYOUT_ergodox( // layer 2 : dvorak // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_GRAVE, - KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_LBRC, + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_TAB, KC_QUOTE, KC_COMM,KC_DOT, KC_P, KC_Y, KC_MINUS, KC_BSPC, KC_A, KC_O, KC_E, KC_U, KC_I, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_MINUS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_EQL, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS, - TG(SYMB), KC_TRANSPARENT, - KC_TRNS, - LT(HALFDVORAK, KC_SPACE),KC_DEL,KC_END, + KC_TRNS, KC_TRANSPARENT, + KC_UP, + LT(HALFDVORAK, KC_SPACE),KC_DEL,KC_DOWN, // right hand - KC_BSLS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - KC_RBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, + KC_LBRC, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_ENT, - KC_EQL,KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_RBRC,KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_TRNS, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, - KC_TRANSPARENT, TG(MDIA), - KC_TRNS, + KC_TRANSPARENT, KC_TRANSPARENT, + KC_PGUP, KC_PGDN,KC_TAB, LT(HALFDVORAK, KC_ENT) ), /* Keymap 3: mirrored dvorak @@ -179,23 +180,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [HALFDVORAK] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_BSLS, - KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, KC_RBRC, + KC_BSPC, KC_0, KC_9, KC_8, KC_7, KC_6, KC_TRNS, + KC_SLASH, KC_L, KC_R, KC_C, KC_G, KC_F, KC_LBRC, KC_ENT, KC_S, KC_N, KC_T, KC_H, KC_D, - KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, KC_EQL, + KC_LSFT, KC_Z, KC_V, KC_W, KC_M, KC_B, KC_RBRC, KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRNS, KC_TRANSPARENT, KC_TRANSPARENT, KC_TRNS, - KC_TRANSPARENT,KC_DEL,KC_END, + KC_TRANSPARENT,KC_ENT,KC_TRNS, // right hand - KC_GRAVE, KC_5, KC_4, KC_3, KC_2, KC_5, KC_ESC, - KC_LBRC, KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB, + KC_TRNS, KC_5, KC_4, KC_3, KC_2, KC_5, KC_ESC, + KC_MINUS, KC_Y, KC_P, KC_DOT, KC_COMM,KC_P, KC_TAB, KC_I, KC_U, KC_E, KC_O, KC_A, KC_BSPC, - KC_MINUS,KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT, + KC_EQL,KC_X, KC_K, KC_J, KC_Q, KC_SCLN, KC_RSFT, KC_TRNS, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, KC_TRANSPARENT, KC_TRNS, KC_TRNS, - KC_PGDN,KC_TAB, KC_TRANSPARENT + KC_TRNS,KC_TAB, KC_TRANSPARENT ), /* Keymap 5: Symbol Layer * @@ -235,8 +236,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_DOWN, KC_KP_4, KC_KP_5, KC_KP_6, KC_KP_MINUS, KC_KP_ENTER, KC_NO,KC_AMPR,KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_PLUS, KC_NO, KC_TRNS,KC_DOT, KC_0, KC_KP_EQUAL, KC_NO, - KC_NO, KC_TRNS, - KC_NO, + BL_OFF, KC_TRNS, + BL_ON, KC_NO, KC_NO, LT(HALFSYMB, KC_ENT) ), /* Keymap 6: Mirrored Symbol Layer @@ -263,7 +264,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // SYMBOLS [HALFSYMB] = LAYOUT_ergodox( // left hand - KC_BSPC, KC_F12, KC_F11, KC_F10, KC_F9, KC_F8, KC_F7, + KC_BSPC, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_NO,KC_NO,KC_KP_7, KC_KP_8, KC_KP_9,KC_KP_ASTERISK,KC_KP_SLASH, KC_ENTER,KC_NO,KC_KP_4, KC_KP_5, KC_KP_6,KC_KP_MINUS, KC_NO,KC_NO,KC_KP_1, KC_KP_2, KC_KP_3,KC_KP_PLUS,KC_KP_ENTER, @@ -272,7 +273,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRANSPARENT,KC_NO,KC_NO, // right hand - KC_F6, KC_F5, KC_F4, KC_F3, KC_F2, KC_F1, KC_BSPC, + KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_BSPC, KC_NO,KC_PIPE,KC_LCBR,KC_RCBR, KC_SLASH, KC_BSLS, KC_NO, KC_GRV,KC_LPRN,KC_RPRN, KC_SCLN, KC_QUOT, KC_NO, KC_NO, KC_TILD,KC_LBRC,KC_RBRC, KC_EQL, KC_MINUS, KC_NO, @@ -281,7 +282,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_NO, KC_NO, KC_TRANSPARENT ), - /* Keymap 7: Steno for Plover from https://github.com/shayneholmes/tmk_keyboard/commit/11290f8489013018f778627db725160c745e75bd * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -304,26 +304,27 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `--------------------' `--------------------' */ -[PLVR] = LAYOUT_ergodox( // layout: layer 4: Steno for Plover +[PLVR] = KEYMAP( // layout: layer 7: Steno for Plover // left hand KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, - STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, KC_NO, - STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, - KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, + KC_NO, KC_1, KC_2, KC_3, KC_4, KC_5, KC_TRNS, + KC_NO, KC_Q, KC_W, KC_E, KC_R, KC_T, + KC_NO, KC_A, KC_S, KC_D, KC_F, KC_G, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, - KC_TRNS, - STN_A, STN_O, KC_NO, + KC_NO, + KC_C, KC_V, KC_NO, // right hand - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, - KC_TRNS, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC, - STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, - KC_NO,STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_6, KC_7, KC_8, KC_9, KC_0, KC_TRNS, + KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_NO, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, KC_TRNS, - KC_NO, STN_E, STN_U + KC_NO, KC_N, KC_M ), + /* Keymap 8: shortcuts * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -338,7 +339,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |LCTRL|ALT |CTLShTab|CTL-TAB| | | RGui| UP | DOWN | ALT | RCTRL | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Alt |Dvorak| |Plover|Alt | + * |SYMBOLS|Dvorak| |Steno |Plover| * ,------|------|------| |------+--------+------. * | | | Home | | PgUp | | | * | Space|DELETE|------| |------| Tab |Enter | @@ -349,35 +350,35 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Otherwise, it needs KC_* [SHORTCUTS] = LAYOUT_ergodox( // layer 0 : default // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, + RGB_MODE_KNIGHT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_TAB, LCTL(KC_Q), LCTL(KC_W),LCTL(KC_E),LCTL(KC_R),LCTL(KC_T), KC_NO, KC_BSPC, LCTL(KC_A), LCTL(KC_S),LCTL(KC_D),LCTL(KC_F),LCTL(KC_G), KC_LSFT, LCTL(KC_Z), LCTL(KC_X),LCTL(KC_C),LCTL(KC_V),LCTL(KC_B), KC_MINUS, - KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRANSPARENT, - KC_NO, KC_NO, + RESET, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRANSPARENT, + TG(SYMB), TG(DVORAK), - KC_NO, + TG(FUNCTION), KC_NO,KC_NO,KC_NO, - // right hand +// right hand KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_EQL,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT, - KC_TRNS, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, - KC_NO, KC_TRNS, + TG(SYMB),LCTL(KC_Y),LCTL(KC_U),LCTL(KC_I),LCTL(KC_O),LCTL(KC_P),KC_BSLS, + LCTL(KC_H),LCTL(KC_J),LCTL(KC_K),LCTL(KC_L),LCTL(KC_SCLN),KC_ENT, + KC_EQL,LCTL(KC_N),LCTL(KC_M),LCTL(KC_COMM),LCTL(KC_DOT),LCTL(KC_SLASH),KC_RSFT, + KC_TRNS, KC_UP,KC_DOWN,KC_RALT, RESET, + TG(PROPERSTENO),TG(PLVR), KC_NO, KC_NO,KC_NO, KC_NO ), - /* Keymap 2: Media and mouse keys + /* Keymap 9: Functions * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | + * | F1 | F2 | F3 | F4 | F5 | F6 | | | | F1 | F2 | F3 | F4 | F5 | F6 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | |LClick| MsUp |RClick| | | | | |LClick| MsUp |RClick| | | + * | F7 | F8 | F9 | F10 | F11 | F12 | | | | F7 | F8 | F9 | F10 | F11 | F12 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| |MsLeft|MsDown|MsRght| | | + * | F13 | F14 | F15 | F16 | F17 | F18 |------| |------| F13 | F14 | F15 | F16 | F17 | F18 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | | | | | + * | F19 | F20 | F21 | F22 | F23 | F24 | | | | F19 | F20 | F21 | F22 | F23 | F24 | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' @@ -385,74 +386,74 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | * ,------|------|------| |------+------+------. * | | | | | | | | - * | | |------| |------| | | + * | c | v |------| |------| n | m | * | | | | | | | | * `--------------------' `--------------------' */ -// MEDIA AND MOUSE -[MDIA] = LAYOUT_ergodox( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_WH_U, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_D, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_WH_L, KC_WH_R, KC_TRNS, - // right hand - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_WH_U, KC_TRNS, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS, - KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, - KC_WH_D, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, - KC_TRNS, KC_WH_L, KC_WH_R + +[FUNCTION] = LAYOUT_ergodox( // layout: layer 9 + // left hand + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_NO, + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, + KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, KC_NO, KC_NO, + // right hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, + KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, + KC_NO,KC_F19, KC_F20, KC_F21, KC_F22, KC_F23, KC_F24, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, KC_NO, KC_NO ), -/* Keymap 8: shortcuts + /* Keymap 10: Steno * * ,--------------------------------------------------. ,--------------------------------------------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | BSPC | + * | | | | | | | | | | | | | | | | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | TAB | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * | | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L | ; |ENTER | - * |--------+------+------+------+------+------| - | | = |------+------+------+------+------+--------| - * | LShift | Z | X | C | V | B | | | | N | M | , | . | / | RShift | + * | | q | w | e | r | t |------| |------| y | u | i | o | p | [ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | a | s | d | f | g | | | | h | j | k | l | ; | ' | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |LCTRL|ALT |CTLShTab|CTL-TAB| | | RGui| UP | DOWN | ALT | RCTRL | + * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Alt |Dvorak| |Plover|Alt | - * ,------|------|------| |------+--------+------. - * | | | Home | | PgUp | | | - * | Space|DELETE|------| |------| Tab |Enter | - * |mirror| | End | | PgDn | |mirror| - * `--------------------' `----------------------' + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | c | v |------| |------| n | m | + * | | | | | | | | + * `--------------------' `--------------------' */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[SHORTCUTS] = LAYOUT_ergodox( // layer 0 : default - // left hand - KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, - KC_TAB, LCTL(KC_Q), LCTL(KC_W),LCTL(KC_E),LCTL(KC_R),LCTL(KC_T), KC_NO, - KC_BSPC, LCTL(KC_A), LCTL(KC_S),LCTL(KC_D),LCTL(KC_F),LCTL(KC_G), - KC_LSFT, LCTL(KC_Z), LCTL(KC_X),LCTL(KC_C),LCTL(KC_V),LCTL(KC_B), KC_MINUS, - KC_LCTRL, KC_LALT, LCTL(LSFT(KC_TAB)),LCTL(KC_TAB), KC_TRANSPARENT, - KC_NO, KC_NO, - KC_NO, - KC_NO,KC_NO,KC_NO, +[PROPERSTENO] = LAYOUT_ergodox( // layout: layer 10 + // left hand + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, + STN_N1, STN_N2, STN_N3, STN_N4, STN_N5, STN_N6, KC_NO, + STN_FN, STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, + KC_NO, STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, KC_NO, + KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + STN_A, STN_O, KC_NO, // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT, - KC_EQL,KC_N, KC_M, KC_COMM,KC_DOT, KC_SLASH, KC_RSFT, - KC_RGUI, KC_UP,KC_DOWN,KC_RALT, KC_RCTRL, - KC_NO, KC_NO, - KC_NO, - KC_NO,KC_NO, KC_NO - ), + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, STN_N7, STN_N8, STN_N9, STN_NA, STN_NB, STN_NC, + STN_ST3, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + KC_NO,STN_ST4, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_NO, STN_E, STN_U +), + }; const uint16_t PROGMEM fn_actions[] = { diff --git a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c b/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c index 7bd5a0783f..61a724c63f 100644 --- a/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c +++ b/keyboards/ergodox_infinity/keymaps/halfkeyboard/visualizer.c @@ -18,15 +18,21 @@ along with this program. If not, see . #include "default_animations.h" #include "led_backlight_keyframes.h" -#define ONESIDESCAN 9 -#define BOTHSIDESCAN 16 +#define NUM_ROWS LED_HEIGHT +#define NUM_COLS LED_WIDTH + +#define ONESIDESCAN 10 +#define BOTHSIDESCAN 20 #define FULL_ON LUMA2COLOR(255) #define THREE_QUARTER LUMA2COLOR(200) #define HALF_ON LUMA2COLOR(150) #define ONE_QUARTER LUMA2COLOR(50) -#define CROSSFADE_TIME 8000 -bool KITT_scan_one_side_left_to_right(keyframe_animation_t* animation, visualizer_state_t* state); -bool KITT_scan_one_side_right_to_left(keyframe_animation_t* animation, visualizer_state_t* state); + +#define CROSSFADE_TIME 500 +#define GRADIENT_TIME 3000 +bool led_backlight_keyframe_one_period_sweep(keyframe_animation_t* animation, visualizer_state_t* state); +bool led_backlight_keyframe_half_period_sweep_to_on(keyframe_animation_t* animation, visualizer_state_t* state); +bool led_backlight_keyframe_half_period_sweep_to_off(keyframe_animation_t* animation, visualizer_state_t* state); keyframe_animation_t Fade_in_all_leds = { .num_frames = 1, .loop = false, @@ -37,114 +43,272 @@ keyframe_animation_t Fade_in_all_leds = { led_backlight_keyframe_fade_in_all, }, }; -/* - * one set left to right. then reverse to go back. - * | left side | right side | | - |---|---|---|---|---|---|---|:-:|---|---|---|---|---|---|-------| - | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | phase | - _________________________________________________________________ - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | - | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | - | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | - | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | - | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | - | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | - | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | - | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | - | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | - | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 0 | 9 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 0 | 10 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 0 | 11 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 0 | 12 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 0 | 13 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 14 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 15 | - | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 16 | - */ - -#ifdef MASTER_IS_ON_RIGHT /*right side*/ - -keyframe_animation_t KITT_Scanner_animation = { - .num_frames = 2, +keyframe_animation_t decreasing_gradient = { + .num_frames = 8, .loop = true, .frame_lengths = { - CROSSFADE_TIME * BOTHSIDESCAN, - CROSSFADE_TIME * BOTHSIDESCAN, + gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) + 0, // normal leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) + 0, // normal leds }, .frame_functions = { - KITT_scan_one_side_left_to_right, - KITT_scan_one_side_right_to_left, + led_backlight_keyframe_one_period_sweep, + led_backlight_keyframe_mirror_orientation, + keyframe_no_operation, + keyframe_no_operation, + keyframe_no_operation, + keyframe_no_operation, + led_backlight_keyframe_one_period_sweep, + led_backlight_keyframe_normal_orientation, + }, }; -bool KITT_scan_one_side_left_to_right(keyframe_animation_t* animation, visualizer_state_t* state) { + + +static uint8_t off_on_off_gradient(float t, float index, float num) { + const float two_pi = M_PI * 2.0f; + float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; + float x = t * two_pi + normalized_index-M_PI; + if((1*M_PI) < x && x < (3*M_PI)) + { + float v = 0.5 * (cosf(x) + 1.0f); + return (uint8_t)(255.0f * v); + } + else + { + return 0; + } +} +static uint8_t off_on_gradient(float t, float index, float num) { + const float two_pi = M_PI * 2.0f; + float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; + float x = t * two_pi + normalized_index-M_PI; + float v; + if((1*M_PI) < x && x < (2*M_PI)) + { + v = 0.5 * (cosf(x) + 1.0f); + } + else if(x >= (2*M_PI)) + { + v = 1; + } + else + { + v = 0; + } + return (uint8_t)(255.0f * v); +} +static uint8_t on_off_gradient(float t, float index, float num) { + const float two_pi = M_PI * 2.0f; + float normalized_index = (1.0f - index / (num - 1.0f)) * two_pi; + float x = t * two_pi + normalized_index-M_PI; + float v; + if((2*M_PI) < x && x < (3*M_PI)) + { + v = 0.5 * (cosf(x) + 1.0f); + + } + else if(x >= (3*M_PI)) + { + v = 0; + } + else + { + v = 1; + } + return (uint8_t)(255.0f * v); +} + +bool led_backlight_keyframe_one_period_sweep(keyframe_animation_t* animation, visualizer_state_t* state) { (void)state; float frame_length = animation->frame_lengths[animation->current_frame]; float current_pos = frame_length - animation->time_left_in_frame; - int phase = current_pos/(frame_length/BOTHSIDESCAN); - int row = 0; - gdispGClear(LED_DISPLAY, ONE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, 14-phase, row, FULL_ON); - gdispGDrawPixel(LED_DISPLAY, 15-phase, row, THREE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, 16-phase, row, HALF_ON); - gdispGDrawPixel(LED_DISPLAY, 6, row, ONE_QUARTER); + float t = current_pos / frame_length; + for (int i=0; i< NUM_COLS; i++) { + uint8_t color = off_on_off_gradient(t*2, i, NUM_COLS); + gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); + } return true; } -bool KITT_scan_one_side_right_to_left(keyframe_animation_t* animation, visualizer_state_t* state) { +bool led_backlight_keyframe_half_period_sweep_to_on(keyframe_animation_t* animation, visualizer_state_t* state) { + (void)state; + float frame_length = animation->frame_lengths[animation->current_frame]; + float current_pos = frame_length - animation->time_left_in_frame; + float t = current_pos / frame_length; + for (int i=0; i< NUM_COLS; i++) { + uint8_t color = off_on_gradient(t*2, i, NUM_COLS); + gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); + } + return true; +} +bool led_backlight_keyframe_half_period_sweep_to_off(keyframe_animation_t* animation, visualizer_state_t* state) { (void)state; float frame_length = animation->frame_lengths[animation->current_frame]; float current_pos = frame_length - animation->time_left_in_frame; - int phase = current_pos/(frame_length/BOTHSIDESCAN); - int row = 0; - gdispGClear(LED_DISPLAY, ONE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, phase, row, FULL_ON); - gdispGDrawPixel(LED_DISPLAY, phase-1, row, THREE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, phase-2, row, HALF_ON); - gdispGDrawPixel(LED_DISPLAY, 6, row, ONE_QUARTER); + float t = current_pos / frame_length; + for (int i=0; i< NUM_COLS; i++) { + uint8_t color = on_off_gradient(t*2, i, NUM_COLS); + gdispGDrawLine(LED_DISPLAY, i, 0, i, NUM_ROWS - 1, LUMA2COLOR(color)); + } return true; } + + +/* + +---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | phase | ++---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | +| 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | +| 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 2 | +| 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 3 | +| 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 4 | +| 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 5 | +| 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 6 | +| 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 7 | +| 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 0 | 8 | +| 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 0 | 9 | +| 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 0 | 10 | +| 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 0 | 11 | +| 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 0 | 12 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 0 | 13 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 14 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 5 | 15 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 4 | 16 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 3 | 17 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 2 | 18 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 19 | +| 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 20 | ++---+---+---+---+---+---+---+---+---+---+---+---+---+---+-------+ +*/ + +#ifdef MASTER_IS_ON_RIGHT /*right side*/ +keyframe_animation_t sweep_on_sweep_off_left_and_right = { + .num_frames = 12, + .loop = true, + .frame_lengths = { + 0, + 1, + gfxMillisecondsToTicks(GRADIENT_TIME), // left on + gfxMillisecondsToTicks(GRADIENT_TIME), // right on + gfxMillisecondsToTicks(GRADIENT_TIME), // left off + gfxMillisecondsToTicks(GRADIENT_TIME), // right off + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // right on + gfxMillisecondsToTicks(GRADIENT_TIME), // left on + gfxMillisecondsToTicks(GRADIENT_TIME), // right off + gfxMillisecondsToTicks(GRADIENT_TIME), // left off + 0, // normal leds + }, + .frame_functions = { + led_backlight_keyframe_mirror_orientation, + led_backlight_keyframe_fade_out_all, + keyframe_no_operation, + led_backlight_keyframe_half_period_sweep_to_on, + keyframe_no_operation, + led_backlight_keyframe_half_period_sweep_to_off, + led_backlight_keyframe_normal_orientation, + led_backlight_keyframe_half_period_sweep_to_on, + keyframe_no_operation, + led_backlight_keyframe_half_period_sweep_to_off, + keyframe_no_operation, + led_backlight_keyframe_mirror_orientation, + + }, +}; +keyframe_animation_t both_sides_fade_across = { + .num_frames = 10, + .loop = true, + .frame_lengths = { + 0, + 1, + gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) + 0, // normal leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) + 0, // normal leds + }, + .frame_functions = { + led_backlight_keyframe_mirror_orientation, + led_backlight_keyframe_fade_out_all, + keyframe_no_operation, + keyframe_no_operation, + led_backlight_keyframe_one_period_sweep, + led_backlight_keyframe_normal_orientation, + led_backlight_keyframe_one_period_sweep, + led_backlight_keyframe_mirror_orientation, + keyframe_no_operation, + keyframe_no_operation, + }, +}; + #else /*left side*/ -keyframe_animation_t KITT_Scanner_animation = { - .num_frames = 2, +keyframe_animation_t sweep_on_sweep_off_left_and_right = { + .num_frames = 10, + .loop = true, + .frame_lengths = { + gfxMillisecondsToTicks(GRADIENT_TIME), // left on + gfxMillisecondsToTicks(GRADIENT_TIME), // right on + gfxMillisecondsToTicks(GRADIENT_TIME), // left off + gfxMillisecondsToTicks(GRADIENT_TIME), // right off + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // right on + gfxMillisecondsToTicks(GRADIENT_TIME), // left on + gfxMillisecondsToTicks(GRADIENT_TIME), // right off + gfxMillisecondsToTicks(GRADIENT_TIME), // left off + 0, // normal leds + }, + .frame_functions = { + led_backlight_keyframe_half_period_sweep_to_on, + keyframe_no_operation, + led_backlight_keyframe_half_period_sweep_to_off, + keyframe_no_operation, + led_backlight_keyframe_mirror_orientation, + keyframe_no_operation, + led_backlight_keyframe_half_period_sweep_to_on, + keyframe_no_operation, + led_backlight_keyframe_half_period_sweep_to_off, + led_backlight_keyframe_normal_orientation, + + }, +}; +keyframe_animation_t both_sides_fade_across = { + .num_frames = 8, .loop = true, .frame_lengths = { - CROSSFADE_TIME * BOTHSIDESCAN, - CROSSFADE_TIME * BOTHSIDESCAN, + gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) + 0, // normal leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left to rigt (outside in) + 0, // mirror leds + gfxMillisecondsToTicks(GRADIENT_TIME), // left_to_right (mirrored, so inside out) + 0, // normal leds }, .frame_functions = { - KITT_scan_one_side_left_to_right, - KITT_scan_one_side_right_to_left, + led_backlight_keyframe_one_period_sweep, + led_backlight_keyframe_mirror_orientation, + keyframe_no_operation, + keyframe_no_operation, + keyframe_no_operation, + keyframe_no_operation, + led_backlight_keyframe_one_period_sweep, + led_backlight_keyframe_normal_orientation, + }, }; -bool KITT_scan_one_side_left_to_right(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - int phase = current_pos/(frame_length/BOTHSIDESCAN); - int row = 0; - gdispGClear(LED_DISPLAY, ONE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, phase, row, FULL_ON); - gdispGDrawPixel(LED_DISPLAY, phase-1, row, THREE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, phase-2, row, HALF_ON); - gdispGDrawPixel(LED_DISPLAY, 6, row, ONE_QUARTER); - return true; -} -bool KITT_scan_one_side_right_to_left(keyframe_animation_t* animation, visualizer_state_t* state) { - (void)state; - float frame_length = animation->frame_lengths[animation->current_frame]; - float current_pos = frame_length - animation->time_left_in_frame; - int phase = current_pos/(frame_length/BOTHSIDESCAN); - int row = 0; - gdispGClear(LED_DISPLAY, ONE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, (14 - phase), row, FULL_ON); - gdispGDrawPixel(LED_DISPLAY, 14 - (phase-1), row, THREE_QUARTER); - gdispGDrawPixel(LED_DISPLAY, 14 - (phase-2), row, HALF_ON); - gdispGDrawPixel(LED_DISPLAY, 6, row, ONE_QUARTER); - return true; -} #endif #define RED 0 @@ -170,19 +334,24 @@ static void get_visualizer_layer_and_color(visualizer_state_t* state) { /* if (state->status.leds & (1u << USB_LED_CAPS_LOCK)) { saturation = 255; } */ - if (state->status.layer & 0x200) { + + if (state->status.layer & 0x400) { + state->target_lcd_color = LCD_COLOR(OCEAN, saturation, 0xFF); + state->layer_text = "STENOGRAPHY"; + } + else if (state->status.layer & 0x200) { state->target_lcd_color = LCD_COLOR(GREEN, saturation, 0xFF); - state->layer_text = "MOUSE"; + state->layer_text = "FUNCTION"; } else if (state->status.layer & 0x100) { state->target_lcd_color = LCD_COLOR(MAGENTA, saturation, 0xFF); state->layer_text = "Shortcuts Layer"; + stop_keyframe_animation(&sweep_on_sweep_off_left_and_right); + start_keyframe_animation(&led_test_animation); } else if (state->status.layer & 0x80) { state->target_lcd_color = LCD_COLOR(VIOLET, saturation, 0xFF); state->layer_text = "Plover"; - start_keyframe_animation(&KITT_Scanner_animation); - } else if (state->status.layer & 0x40) { state->target_lcd_color = LCD_COLOR(RASPBERRY, saturation, 0xFF); @@ -199,6 +368,8 @@ static void get_visualizer_layer_and_color(visualizer_state_t* state) { else if (state->status.layer & 0x4) { state->target_lcd_color = LCD_COLOR(BLUE, saturation, 0xFF); state->layer_text = "Dvorak"; + stop_keyframe_animation(&led_test_animation); + start_keyframe_animation(&sweep_on_sweep_off_left_and_right); } else if (state->status.layer & 0x2) { state->target_lcd_color = LCD_COLOR(ORANGE, saturation, 0xFF); @@ -207,7 +378,7 @@ static void get_visualizer_layer_and_color(visualizer_state_t* state) { else { state->target_lcd_color = LCD_COLOR(YELLOW, saturation, 0xFF); state->layer_text = "Qwerty"; - stop_keyframe_animation(&KITT_Scanner_animation); + stop_keyframe_animation(&led_test_animation); start_keyframe_animation(&Fade_in_all_leds); } } -- cgit v1.2.3 From d86410103fd48a98c086dd7e5054d7d42905b741 Mon Sep 17 00:00:00 2001 From: Joshua Lawrence Date: Wed, 6 Jun 2018 09:54:26 -0700 Subject: Added jwlawrence keymap for zen keyboard (#3137) * Created jwlawrence keymap --- keyboards/zen/keymaps/jwlawrence/config.h | 41 ++++++++++++ keyboards/zen/keymaps/jwlawrence/keymap.c | 103 ++++++++++++++++++++++++++++++ keyboards/zen/keymaps/jwlawrence/rules.mk | 6 ++ 3 files changed, 150 insertions(+) create mode 100644 keyboards/zen/keymaps/jwlawrence/config.h create mode 100644 keyboards/zen/keymaps/jwlawrence/keymap.c create mode 100644 keyboards/zen/keymaps/jwlawrence/rules.mk (limited to 'keyboards') diff --git a/keyboards/zen/keymaps/jwlawrence/config.h b/keyboards/zen/keymaps/jwlawrence/config.h new file mode 100644 index 0000000000..38e4d73f0d --- /dev/null +++ b/keyboards/zen/keymaps/jwlawrence/config.h @@ -0,0 +1,41 @@ +/* +Copyright 2017 Danny Nguyen + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.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 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 16 +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/zen/keymaps/jwlawrence/keymap.c b/keyboards/zen/keymaps/jwlawrence/keymap.c new file mode 100644 index 0000000000..ca70567188 --- /dev/null +++ b/keyboards/zen/keymaps/jwlawrence/keymap.c @@ -0,0 +1,103 @@ +#include "zen.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _NAV 2 + + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + NAV, + +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------. .-----------------------------------------. + * | GESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Tab | Q | W | E | R | T | | Y | U | I | O | P | \ | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |CAPS(NAV)|A | S | D | F | G | | H | J | K | L | ; | " | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------..-----+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | GUI | NAV |Space |Delete||Enter|Space | NAV | - | = |RGBTOG|Enter | + * `------------------------------------------------''-----------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + KC_GESC, 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_BSLS, \ + LT(_NAV, 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_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_LGUI, MO(_NAV), KC_SPC, KC_DEL, KC_ENT, KC_SPACE, MO(_NAV), KC_MINS, KC_EQL, RGB_TOG, KC_ENT \ +), + +/* NAV + * ,-----------------------------------------. .-----------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBSAI|RGBVAI|RGBSAD| RESET| [ | | ] | Pgup | Up | Pgdn |Insert| Home | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * | |RGBHUD|RGBVAD|RGBHUI|RGBMOD| | | | Left | Down | Right|Delete| End | + * |------+------+------+------+------+------| |------+------+------+------+------+------| + * |Shift | | | | | | | NKRO | | | Pause| Back | Next | + * |------+------+------+------+------+------+------..-----+------+------+------+------+------+------| + * | Ctrl | Alt | GUI | | | | || | | | | Mute | VOLUP| VOLDN| + * `------------------------------------------------''-----------------------------------------------' + */ +[_NAV] = KEYMAP( \ + 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, RGB_SAI, RGB_VAI, RGB_SAD, RESET, KC_LBRC, KC_RBRC, KC_PGUP, KC_UP, KC_PGDN, KC_INS, KC_HOME , \ + KC_TRNS, RGB_HUD, RGB_VAD, RGB_HUI, RGB_MOD, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_DEL, KC_END , \ + KC_LSFT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, MAGIC_TOGGLE_NKRO, KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT , \ + KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MUTE, KC_VOLU, KC_VOLD \ +), + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + //case COLEMAK: + //if (record->event.pressed) { + //#ifdef AUDIO_ENABLE + //PLAY_NOTE_ARRAY(tone_colemak, false, 0); + //#endif + //persistant_default_layer_set(1UL<<_COLEMAK); + //} + //return false; + //break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/zen/keymaps/jwlawrence/rules.mk b/keyboards/zen/keymaps/jwlawrence/rules.mk new file mode 100644 index 0000000000..22b6ec4766 --- /dev/null +++ b/keyboards/zen/keymaps/jwlawrence/rules.mk @@ -0,0 +1,6 @@ +RGBLIGHT_ENABLE = yes +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif -- cgit v1.2.3 From afa0a8d6f7822e1c0544aed1475ae528262987d8 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Wed, 6 Jun 2018 11:12:42 -0700 Subject: Dilly: Refactor and Configurator support (#3134) * Refactor * Configurator support * Add LAYOUT_ortho_3x10 to default QMK layouts * Refactor Dilly to use LAYOUT_ortho_3x10 --- keyboards/dilly/dilly.h | 6 +-- keyboards/dilly/info.json | 13 +++++ keyboards/dilly/keymaps/default/keymap.c | 88 +++++++++---------------------- keyboards/dilly/keymaps/delmo/keymap.c | 21 ++++---- keyboards/dilly/keymaps/pletcher/keymap.c | 15 +++--- keyboards/dilly/rules.mk | 4 +- 6 files changed, 61 insertions(+), 86 deletions(-) create mode 100644 keyboards/dilly/info.json (limited to 'keyboards') diff --git a/keyboards/dilly/dilly.h b/keyboards/dilly/dilly.h index ca75704bf9..c7cc4aa725 100644 --- a/keyboards/dilly/dilly.h +++ b/keyboards/dilly/dilly.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT_ortho_3x10( \ A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, \ B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, \ C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 \ @@ -17,12 +17,12 @@ } // Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ A1, A2, A3, A4, A5, A6, A7, A8, A9, A10, \ B1, B2, B3, B4, B5, B6, B7, B8, B9, B10, \ C1, C2, C3, C4, C5, C6, C7, C8, C9, C10 \ ) \ - KEYMAP( \ + LAYOUT_ortho_3x10( \ KC_##A1, KC_##A2, KC_##A3, KC_##A4, KC_##A5, KC_##A6, KC_##A7, KC_##A8, KC_##A9, KC_##A10, \ KC_##B1, KC_##B2, KC_##B3, KC_##B4, KC_##B5, KC_##B6, KC_##B7, KC_##B8, KC_##B9, KC_##B10, \ KC_##C1, KC_##C2, KC_##C3, KC_##C4, KC_##C5, KC_##C6, KC_##C7, KC_##C8, KC_##C9, KC_##C10 \ diff --git a/keyboards/dilly/info.json b/keyboards/dilly/info.json new file mode 100644 index 0000000000..6b67d45b93 --- /dev/null +++ b/keyboards/dilly/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Dilly", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x10": { + "key_count": 30, + "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"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}] + } + } +} diff --git a/keyboards/dilly/keymaps/default/keymap.c b/keyboards/dilly/keymaps/default/keymap.c index 67ace9d1d6..03b539e3d8 100644 --- a/keyboards/dilly/keymaps/default/keymap.c +++ b/keyboards/dilly/keymaps/default/keymap.c @@ -1,5 +1,4 @@ -#include "dilly.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -10,7 +9,6 @@ extern keymap_config_t keymap_config; #define _FN4 4 #define _FN5 5 -#define KC_ KC_TRNS #define _______ KC_TRNS // Tap-Hold keys @@ -30,78 +28,42 @@ extern keymap_config_t keymap_config; #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] = KC_KEYMAP( - //,----+----+----+----+----+----+----+----+----+----. - 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 - //`----+----+----+----+----+----+----+----+----+----' + [_BASE] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_ASFT, KC_S, KC_D, KC_F_L3, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESCS, + KC_ZCTL, KC_XALT, KC_CGUI, KC_V_L4, KC_SPL2, KC_B_L1, KC_N_L5, KC_MALT, KC_BSCT, KC_ENTS ), - [_FN1] = KC_KEYMAP( - //,----+----+----+----+----+----+----+----+----+----. - 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , - //|----+----+----+----+----+----+----+----+----+----| - F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 ,F10 , - //|----+----+----+----+----+----+----+----+----+----| - , , , ,BSPC, , , , , - //`----+----+----+----+----+----+----+----+----+----' + [_FN1] = LAYOUT_ortho_3x10( + 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_F7, KC_F8, KC_F9, KC_F10, + _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______ ), - [_FN2] = KC_KEYMAP( - //,----+----+----+----+----+----+----+----+----+----. - EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, - //|----+----+----+----+----+----+----+----+----+----| - F11 ,F12 , , , , , , , ,GRV , - //|----+----+----+----+----+----+----+----+----+----| - , , , , ,DEL , , , , - //`----+----+----+----+----+----+----+----+----+----' + [_FN2] = LAYOUT_ortho_3x10( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_F11, KC_F12, _______, _______, _______, _______, _______, _______, _______, KC_GRV, + _______, _______, _______, _______, _______, KC_DEL, _______, _______, _______, _______ ), - [_FN3] = KC_KEYMAP( - //,----+----+----+----+----+----+----+----+----+----. - , , , , ,MINS,EQL ,LBRC,RBRC,BSLS, - //|----+----+----+----+----+----+----+----+----+----| - TAB , , , , ,COMM,DOT ,SLSH,SCLN,QUOT, - //|----+----+----+----+----+----+----+----+----+----| - , , , ,BSPC, ,LEFT,DOWN, UP ,RGHT - //`----+----+----+----+----+----+----+----+----+----' + [_FN3] = LAYOUT_ortho_3x10( + _______, _______, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + KC_TAB, _______, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_SCLN, KC_QUOT, + _______, _______, _______, _______, KC_BSPC, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT ), - [_FN4] = KC_KEYMAP( - //,----+----+----+----+----+----+----+----+----+----. - , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE, - //|----+----+----+----+----+----+----+----+----+----| - TAB , , , , , LT , GT ,QUES,COLN,DQUO, - //|----+----+----+----+----+----+----+----+----+----| - , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END - //`----+----+----+----+----+----+----+----+----+----' + [_FN4] = LAYOUT_ortho_3x10( + _______, _______, _______, _______, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + KC_TAB, _______, _______, _______, _______, KC_LT, KC_GT, KC_QUES, KC_COLN, KC_DQUO, + _______, _______, KC_GUIC, _______, KC_BSPC, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END ), - [_FN5] = KC_KEYMAP( - //,----+----+----+----+----+----+----+----+----+----. - RTOG,RMOD, ,RST ,RHUI,RSAI,RVAI, , , , - //|----+----+----+----+----+----+----+----+----+----| - , ,DBUG, ,RHUD,RSAD,RVAD, , , , - //|----+----+----+----+----+----+----+----+----+----| - BL_S, ,GUIC, , , , , , , - //`----+----+----+----+----+----+----+----+----+----' + [_FN5] = LAYOUT_ortho_3x10( + RGB_TOG, RGB_MOD, _______, RESET, RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, + _______, _______, DEBUG, _______, RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, _______, + BL_STEP, _______, KC_GUIC, _______, _______, _______, _______, _______, _______, _______ ) }; diff --git a/keyboards/dilly/keymaps/delmo/keymap.c b/keyboards/dilly/keymaps/delmo/keymap.c index c0441ab674..d3e8c5daf2 100644 --- a/keyboards/dilly/keymaps/delmo/keymap.c +++ b/keyboards/dilly/keymaps/delmo/keymap.c @@ -1,5 +1,4 @@ -#include "dilly.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -44,7 +43,7 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. Q , W , E , R , T , Y , U , I , O , P , //|----+----+----+----+----+----+----+----+----+----| @@ -54,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , //|----+----+----+----+----+----+----+----+----+----| @@ -64,17 +63,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, //|----+----+----+----+----+----+----+----+----+----| F11 ,F12 , , , , , , , ,GRV , //|----+----+----+----+----+----+----+----+----+----| - , , , ,DEL , , , , , + , , , ,DEL , , , , , //`----+----+----+----+----+----+----+----+----+----' ), - [_FN3] = KC_KEYMAP( + [_FN3] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. ESC , , , , ,MINS,EQL ,LBRC,RBRC,BSLS, //|----+----+----+----+----+----+----+----+----+----| @@ -84,23 +83,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN4] = KC_KEYMAP( + [_FN4] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE, //|----+----+----+----+----+----+----+----+----+----| TAB , , , , , LT , GT ,QUES,COLN,DQUO, //|----+----+----+----+----+----+----+----+----+----| - , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END + , ,GUIC, ,BSPC, ,HOME,PGDN,PGUP,END //`----+----+----+----+----+----+----+----+----+----' ), - [_FN5] = KC_KEYMAP( + [_FN5] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. RTOG,RMOD, ,RST ,RHUI,RSAI,RVAI, , , , //|----+----+----+----+----+----+----+----+----+----| , ,DBUG, ,RHUD,RSAD,RVAD, , , , //|----+----+----+----+----+----+----+----+----+----| - BL_S, ,GUIC, , , , , , , + BL_S, ,GUIC, , , , , , , //`----+----+----+----+----+----+----+----+----+----' ) diff --git a/keyboards/dilly/keymaps/pletcher/keymap.c b/keyboards/dilly/keymaps/pletcher/keymap.c index f91dabee76..4e7a5c89d2 100644 --- a/keyboards/dilly/keymaps/pletcher/keymap.c +++ b/keyboards/dilly/keymaps/pletcher/keymap.c @@ -1,5 +1,4 @@ -#include "dilly.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -34,7 +33,7 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_BASE] = KC_KEYMAP( + [_BASE] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. Q , W , E , R , T , Y , U , I , O , P , //|----+----+----+----+----+----+----+----+----+----| @@ -44,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN1] = KC_KEYMAP( + [_FN1] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , //|----+----+----+----+----+----+----+----+----+----| @@ -54,7 +53,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN2] = KC_KEYMAP( + [_FN2] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. EXLM, AT ,HASH,DLR ,PERC,CIRC,AMPR,ASTR,LPRN,RPRN, //|----+----+----+----+----+----+----+----+----+----| @@ -64,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN3] = KC_KEYMAP( + [_FN3] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. , , , , ,MINS,EQL ,LBRC,RBRC,BSLS, //|----+----+----+----+----+----+----+----+----+----| @@ -74,7 +73,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN4] = KC_KEYMAP( + [_FN4] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. , , , , ,UNDS,PLUS,LCBR,RCBR,PIPE, //|----+----+----+----+----+----+----+----+----+----| @@ -84,7 +83,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //`----+----+----+----+----+----+----+----+----+----' ), - [_FN5] = KC_KEYMAP( + [_FN5] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----. , , ,RST , , ,MSTP,VOLD,VOLU,MPLY, //|----+----+----+----+----+----+----+----+----+----| diff --git a/keyboards/dilly/rules.mk b/keyboards/dilly/rules.mk index 9c4082da29..812362567e 100644 --- a/keyboards/dilly/rules.mk +++ b/keyboards/dilly/rules.mk @@ -53,4 +53,6 @@ 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 \ No newline at end of file +RGBLIGHT_ENABLE = yes + +LAYOUTS = ortho_3x10 -- cgit v1.2.3 From e3c10a73ac0857a60fba5530c2dceee954fe89d4 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 7 Jun 2018 08:15:14 -0700 Subject: Gherkin: Refactor and Configurator support [resolved] (#3140) * Refactor KEYMAP to LAYOUT_ortho_3x10 * Configurator support * Renamed @Talljoe's keymap folder * Renamed matrix_init_user to matrix_init_keymap --- keyboards/gherkin/gherkin.h | 2 +- keyboards/gherkin/info.json | 13 ++ keyboards/gherkin/keymaps/bbaserdem/keymap.c | 6 +- keyboards/gherkin/keymaps/default/keymap.c | 195 ++++++--------------- keyboards/gherkin/keymaps/itsaferbie/keymap.c | 143 +++++++-------- keyboards/gherkin/keymaps/mjt/keymap.c | 97 +++++----- keyboards/gherkin/keymaps/steno/keymap.c | 4 +- keyboards/gherkin/keymaps/talljoe/config.h | 8 - keyboards/gherkin/keymaps/talljoe/keymap.c | 53 ------ keyboards/gherkin/keymaps/talljoe/rules.mk | 6 - keyboards/gherkin/keymaps/talljoe_gherkin/config.h | 8 + keyboards/gherkin/keymaps/talljoe_gherkin/keymap.c | 58 ++++++ keyboards/gherkin/keymaps/talljoe_gherkin/rules.mk | 6 + keyboards/gherkin/keymaps/wanleg/keymap.c | 135 +++++++------- keyboards/gherkin/rules.mk | 6 +- 15 files changed, 332 insertions(+), 408 deletions(-) create mode 100644 keyboards/gherkin/info.json delete mode 100644 keyboards/gherkin/keymaps/talljoe/config.h delete mode 100644 keyboards/gherkin/keymaps/talljoe/keymap.c delete mode 100644 keyboards/gherkin/keymaps/talljoe/rules.mk create mode 100644 keyboards/gherkin/keymaps/talljoe_gherkin/config.h create mode 100644 keyboards/gherkin/keymaps/talljoe_gherkin/keymap.c create mode 100644 keyboards/gherkin/keymaps/talljoe_gherkin/rules.mk (limited to 'keyboards') diff --git a/keyboards/gherkin/gherkin.h b/keyboards/gherkin/gherkin.h index ebb2303ac8..f8674be40e 100644 --- a/keyboards/gherkin/gherkin.h +++ b/keyboards/gherkin/gherkin.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT_ortho_3x10( \ K00, K01, K02, K03, K04, K05, K10, K11, K12, K13 , \ K14, K15, K20, K21, K22, K23, K24, K25, K30, K31 , \ K32, K33, K34, K35, K40, K41, K42, K43, K44, K45 \ diff --git a/keyboards/gherkin/info.json b/keyboards/gherkin/info.json new file mode 100644 index 0000000000..7ebbfb04be --- /dev/null +++ b/keyboards/gherkin/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Gherkin", + "url": "", + "maintainer": "qmk", + "width": 10, + "height": 3, + "layouts": { + "LAYOUT_ortho_3x10": { + "key_count": 30, + "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":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"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":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"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}] + } + } +} diff --git a/keyboards/gherkin/keymaps/bbaserdem/keymap.c b/keyboards/gherkin/keymaps/bbaserdem/keymap.c index 6e9898a277..d756f9b5c1 100644 --- a/keyboards/gherkin/keymaps/bbaserdem/keymap.c +++ b/keyboards/gherkin/keymaps/bbaserdem/keymap.c @@ -1,6 +1,6 @@ // This is a game-pad gherkin layout with RGB and LED lights -#include "gherkin.h" +#include QMK_KEYBOARD_H backlight_config_t backlight_config; @@ -14,14 +14,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Shf | A | S | D | F | <-- | |v| | --> | , | . | * `-----------------------------------------------------------' */ - KEYMAP( + LAYOUT_ortho_3x10( KC_ESCAPE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_LCTRL, KC_LALT, KC_GRAVE, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_UP, KC_SCLN, KC_QUOTE, KC_SLASH, KC_LSHIFT, KC_A, KC_S, KC_D, KC_F, KC_LEFT, KC_DOWN, KC_RIGHT, KC_COMMA, KC_DOT ) }; -void matrix_init_user(void) { +void matrix_init_keymap(void) { // Set LED's to max _delay_us(300); backlight_config.level = 2; diff --git a/keyboards/gherkin/keymaps/default/keymap.c b/keyboards/gherkin/keymaps/default/keymap.c index 7185046760..f018200304 100644 --- a/keyboards/gherkin/keymaps/default/keymap.c +++ b/keyboards/gherkin/keymaps/default/keymap.c @@ -1,129 +1,32 @@ -#include "gherkin.h" +#include QMK_KEYBOARD_H + +#define _______ KC_TRNS +#define FN1_Q LT(1, KC_Q) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( - LT(1, KC_Q), KC_W, KC_E, KC_R, KC_T, KC_Y, - KC_U, KC_I, KC_O, KC_P, KC_A, KC_S, - KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, - KC_L, KC_ESC, KC_Z, KC_X, KC_C, KC_V, - KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TRNS, BL_DEC), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS) + [0] = LAYOUT_ortho_3x10( + FN1_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ESC, + KC_Z, KC_X, KC_C, KC_V, KC_BSPC, KC_SPC, KC_B, KC_N, KC_M, KC_ENT + ), + + [1] = LAYOUT_ortho_3x10( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_INC, + _______, _______, _______, _______, _______, _______, RESET, _______, _______, BL_DEC + ), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; + keyevent_t event = record->event; (void)event; - switch (id) { + switch (id) { - } - return MACRO_NONE; + } + return MACRO_NONE; } void matrix_init_user(void) { @@ -133,39 +36,39 @@ void matrix_scan_user(void) { } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - return true; + return true; } void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRD |= (1 << 5); PORTD &= ~(1 << 5); - } else { - DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); - } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); - } - - 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)) { + DDRD |= (1 << 5); PORTD &= ~(1 << 5); + } else { + DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); + } + + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 0); PORTB &= ~(1 << 0); + } else { + DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); + } + + 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/gherkin/keymaps/itsaferbie/keymap.c b/keyboards/gherkin/keymaps/itsaferbie/keymap.c index d27b120998..580b041c9c 100644 --- a/keyboards/gherkin/keymaps/itsaferbie/keymap.c +++ b/keyboards/gherkin/keymaps/itsaferbie/keymap.c @@ -1,5 +1,4 @@ -#include "gherkin.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H extern rgblight_config_t rgblight_config; extern keymap_config_t keymap_config; @@ -10,11 +9,13 @@ extern keymap_config_t keymap_config; #define _XD 3 // This is the Experience Design Layer enum custom_keycodes { - PS = SAFE_RANGE, - AI, - PR, + PS = SAFE_RANGE, + AI, + PR, }; +#define _______ KC_TRNS + #define PS TO(0) #define AI TO(1) #define PR TO(2) @@ -62,86 +63,90 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - // Photoshop layer - [_PS] = KEYMAP( - SAVE, KC_W, KC_E, KC_T, KC_U, KC_I, KC_P, INVERT, CUNDO, NLAYER, - UNDO, KC_H, KC_L, TRANS, ALIGNL, ALIGNC, ALIGNR, BRINGB, BRINGF, OPEN, - KC_LSFT, COPY, PAST, KC_Z, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, AI), - - // Illustrator layer - [_AI] = KEYMAP( - KC_TRNS, M(0), RULER, KC_TRNS, KC_G, KC_TRNS, KC_TRNS, KC_Q, KC_MINS, KC_PLUS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_E, KC_TRNS, KC_TRNS, KC_TRNS, SHAPE, KC_O, OPEN, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_M, KC_SLSH, PR), - - // Premiere layer - [_PR] = KEYMAP( - KC_TRNS, KC_Q, KC_W, KC_I, KC_O, KC_P, IMPORT, EXPORT, KC_MINS, KC_EQL, - KC_TRNS, REDO, KC_D, KC_F, KC_H, KC_M, KC_ENT, KC_LBRC, KC_RBRC, OPEN, - KC_TRNS, PCOPY, PPASTE, KC_SPC, KC_Z, KC_C, KC_V, KC_LEFT, KC_RIGHT, XD), - - // Experience Design layer - [_XD] = KEYMAP( - KC_TRNS, KC_E, KC_R, KC_T, KC_P, KC_A, KC_L, KC_V, KC_DEL, NEW, - KC_TRNS, REDO, GROUP, UNGRP, VIEW, HORZ, VERT, KC_Z, KC_ENT, OPEN, - KC_TRNS, KC_LCTL, COPY, PAST, SYMB, LOCK, MASK, HIDE, REPEAT, PS), + // Photoshop layer + [_PS] = LAYOUT_ortho_3x10( + SAVE, KC_W, KC_E, KC_T, KC_U, KC_I, KC_P, INVERT, CUNDO, NLAYER, + UNDO, KC_H, KC_L, TRANS, ALIGNL, ALIGNC, ALIGNR, BRINGB, BRINGF, OPEN, + KC_LSFT, COPY, PAST, KC_Z, KC_C, KC_V, KC_B, KC_LBRC, KC_RBRC, AI + ), + + // Illustrator layer + [_AI] = LAYOUT_ortho_3x10( + _______, M(0), RULER, _______, KC_G, _______, _______, KC_Q, KC_MINS, KC_PLUS, + _______, _______, _______, KC_E, _______, _______, _______, SHAPE, KC_O, OPEN, + _______, _______, _______, _______, _______, _______, _______, KC_M, KC_SLSH, PR + ), + + // Premiere layer + [_PR] = LAYOUT_ortho_3x10( + _______, KC_Q, KC_W, KC_I, KC_O, KC_P, IMPORT, EXPORT, KC_MINS, KC_EQL, + _______, REDO, KC_D, KC_F, KC_H, KC_M, KC_ENT, KC_LBRC, KC_RBRC, OPEN, + _______, PCOPY, PPASTE, KC_SPC, KC_Z, KC_C, KC_V, KC_LEFT, KC_RIGHT, XD + ), + + // Experience Design layer + [_XD] = LAYOUT_ortho_3x10( + _______, KC_E, KC_R, KC_T, KC_P, KC_A, KC_L, KC_V, KC_DEL, NEW, + _______, REDO, GROUP, UNGRP, VIEW, HORZ, VERT, KC_Z, KC_ENT, OPEN, + _______, KC_LCTL, COPY, PAST, SYMB, LOCK, MASK, HIDE, REPEAT, PS + ), }; void persistent_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } void matrix_init_user(void) { - rgblight_enable(); + rgblight_enable(); } void matrix_scan_user(void) { - #ifdef RGBLIGHT_ENABLE - - static uint8_t old_layer = 255; - uint8_t new_layer = biton32(layer_state); - - // Color of the Icons. - if (old_layer != new_layer) { - switch (new_layer) { - case _PS: - // #31C5F0 - rgblight_setrgb(49, 197, 240); - break; - case _AI: - // #FF8011 - rgblight_setrgb(255, 128, 17); - break; - case _PR: - // #E788FF - rgblight_setrgb(231, 136, 255); - break; - case _XD: - // #FF2BC2 - rgblight_setrgb(255, 43, 194); - break; - } - old_layer = new_layer; - } - #endif + #ifdef RGBLIGHT_ENABLE + + static uint8_t old_layer = 255; + uint8_t new_layer = biton32(layer_state); + + // Color of the Icons. + if (old_layer != new_layer) { + switch (new_layer) { + case _PS: + // #31C5F0 + rgblight_setrgb(49, 197, 240); + break; + case _AI: + // #FF8011 + rgblight_setrgb(255, 128, 17); + break; + case _PR: + // #E788FF + rgblight_setrgb(231, 136, 255); + break; + case _XD: + // #FF2BC2 + rgblight_setrgb(255, 43, 194); + break; + } + old_layer = new_layer; + } + #endif } const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; + keyevent_t event = record->event; (void)event; - switch (id) { - case 0: - // Save for Web Macro. - return MACRO(D(LSFT), D(LALT), D(LCTL), T(S), U(LCTL), U(LALT), U(LSFT), END); - } - return MACRO_NONE; + switch (id) { + case 0: + // Save for Web Macro. + return MACRO(D(LSFT), D(LALT), D(LCTL), T(S), U(LCTL), U(LALT), U(LSFT), END); + } + return MACRO_NONE; } bool process_record_user(uint16_t keycode, keyrecord_t *record) { - switch (keycode) { - } - return true; + switch (keycode) { + } + return true; } diff --git a/keyboards/gherkin/keymaps/mjt/keymap.c b/keyboards/gherkin/keymaps/mjt/keymap.c index 3dcc3ca090..2b4369c34f 100644 --- a/keyboards/gherkin/keymaps/mjt/keymap.c +++ b/keyboards/gherkin/keymaps/mjt/keymap.c @@ -1,9 +1,7 @@ -#include "gherkin.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #ifdef AUDIO_ENABLE #include "audio.h" #endif -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -44,30 +42,31 @@ enum gherkin_keycodes { #define XXXXXXX KC_NO const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KEYMAP( - TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - TD(TD_A_TAB), LT(_SYMBOLS,KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_ADJUST,KC_SPC), - TD(TD_Z_LCTL), TD(TD_X_LGUI), TD(TD_C_LALT), KC_V, KC_B, LT(_NUMBERS, KC_N), KC_M, KC_COMM, KC_DOT, SFT_T(KC_ENT)) - , - [_NUMBERS] = KEYMAP( - 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_HOME, KC_PGDN, KC_PGUP, KC_END , - KC_F7, KC_F8, KC_F9, KC_F10, LT(_ADJUST,KC_F11), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT) - , - [_SYMBOLS] = KEYMAP( - KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, - KC_GRV, _______, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, KC_MINS, KC_EQL , KC_SCLN, KC_QUOT, - KC_TILD, MO(_ADJUST), XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, KC_UNDS, KC_PLUS, S(KC_SCLN), S(KC_QUOT)) - , - [_PLOVER] = KEYMAP( - KC_Q, KC_W, KC_E, KC_R, KC_1, KC_U, KC_I, KC_O, KC_P, KC_LBRC, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, - EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX) - , - [_ADJUST] = KEYMAP( - RESET, _______, _______, _______, _______, QWERTY, NUMBERS, SYMBOLS, PLOVER, SONGS, - MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, MACSLEEP, _______, - BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______) + [_QWERTY] = LAYOUT_ortho_3x10( + TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + TD(TD_A_TAB), LT(_SYMBOLS,KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(_ADJUST,KC_SPC), + TD(TD_Z_LCTL), TD(TD_X_LGUI), TD(TD_C_LALT), KC_V, KC_B, LT(_NUMBERS, KC_N), KC_M, KC_COMM, KC_DOT, SFT_T(KC_ENT) + ), + [_NUMBERS] = LAYOUT_ortho_3x10( + 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_HOME, KC_PGDN, KC_PGUP, KC_END , + KC_F7, KC_F8, KC_F9, KC_F10, LT(_ADJUST,KC_F11), _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT + ), + [_SYMBOLS] = LAYOUT_ortho_3x10( + KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, + KC_GRV, _______, XXXXXXX, KC_LBRC, KC_RBRC, KC_BSLS, KC_MINS, KC_EQL , KC_SCLN, KC_QUOT, + KC_TILD, MO(_ADJUST), XXXXXXX, KC_LCBR, KC_RCBR, KC_PIPE, KC_UNDS, KC_PLUS, S(KC_SCLN), S(KC_QUOT) + ), + [_PLOVER] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_1, KC_U, KC_I, KC_O, KC_P, KC_LBRC, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, + EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX + ), + [_ADJUST] = LAYOUT_ortho_3x10( + RESET, _______, _______, _______, _______, QWERTY, NUMBERS, SYMBOLS, PLOVER, SONGS, + MUV_DE, MUV_IN, MU_ON, MU_OFF, _______, _______, _______, _______, MACSLEEP, _______, + BACKLIT, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; #ifdef AUDIO_ENABLE @@ -175,9 +174,9 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - keyevent_t event = record->event; + keyevent_t event = record->event; - switch (id) { + switch (id) { case 0: { if (record->event.pressed) { key_timer = timer_read(); // if the key is being pressed, we start the timer. @@ -193,7 +192,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { break; } } - return MACRO_NONE; + return MACRO_NONE; }*/ void matrix_init_user(void) { @@ -246,35 +245,35 @@ qk_tap_dance_action_t tap_dance_actions[] = { /* void led_set_user(uint8_t usb_led) { - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - DDRD |= (1 << 5); PORTD &= ~(1 << 5); - } else { - DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); - } + if (usb_led & (1 << USB_LED_NUM_LOCK)) { + DDRD |= (1 << 5); PORTD &= ~(1 << 5); + } else { + DDRD &= ~(1 << 5); PORTD &= ~(1 << 5); + } - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRB |= (1 << 0); PORTB &= ~(1 << 0); - } else { - DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); - } + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + DDRB |= (1 << 0); PORTB &= ~(1 << 0); + } else { + DDRB &= ~(1 << 0); PORTB &= ~(1 << 0); + } - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - } else { + } else { - } + } - if (usb_led & (1 << USB_LED_COMPOSE)) { + if (usb_led & (1 << USB_LED_COMPOSE)) { - } else { + } else { - } + } - if (usb_led & (1 << USB_LED_KANA)) { + if (usb_led & (1 << USB_LED_KANA)) { - } else { + } else { - } + } } */ diff --git a/keyboards/gherkin/keymaps/steno/keymap.c b/keyboards/gherkin/keymaps/steno/keymap.c index 473af85dd2..c7ee63d126 100644 --- a/keyboards/gherkin/keymaps/steno/keymap.c +++ b/keyboards/gherkin/keymaps/steno/keymap.c @@ -1,8 +1,8 @@ -#include "gherkin.h" +#include QMK_KEYBOARD_H #include "keymap_steno.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( + LAYOUT_ortho_3x10( STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , STN_NUM, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, STN_NUM), diff --git a/keyboards/gherkin/keymaps/talljoe/config.h b/keyboards/gherkin/keymaps/talljoe/config.h deleted file mode 100644 index 3e9e692d3c..0000000000 --- a/keyboards/gherkin/keymaps/talljoe/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#define PREVENT_STUCK_MODIFIERS - -#endif \ No newline at end of file diff --git a/keyboards/gherkin/keymaps/talljoe/keymap.c b/keyboards/gherkin/keymaps/talljoe/keymap.c deleted file mode 100644 index 7574c0476f..0000000000 --- a/keyboards/gherkin/keymaps/talljoe/keymap.c +++ /dev/null @@ -1,53 +0,0 @@ -#include "gherkin.h" -#include "action_layer.h" -#include "keymap_steno.h" - -#define ST_BOLT QK_STENO_BOLT -#define ST_GEM QK_STENO_GEMINI - -#define XXXXXXX KC_NO - -enum keyboard_layers { - _QWERTY, - _RAISE, - _LOWER, - _PLOVER, - _ADJUST -}; - -#define ADJ_Z LT(_ADJUST, KC_Z) -#define RS_BSPC LT(_RAISE, KC_BSPC) -#define LW_SPC LT(_LOWER, KC_SPC) -#define MO_ADJ MO(_ADJUST) -#define TG_PLV TG(_PLOVER) -#define OS_LCTL OSM(MOD_LCTL) -#define OS_LALT OSM(MOD_LALT) -#define OS_LGUI OSM(MOD_LGUI) - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - [_QWERTY] = KEYMAP( - KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RSFT, - ADJ_Z, KC_X, KC_C, KC_V, RS_BSPC, LW_SPC, KC_B, KC_N, KC_M, KC_ENT ), - - [_RAISE] = KEYMAP( - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_7, KC_9, KC_0, - KC_ESC , KC_MINS, KC_EQL , _______, KC_LBRC, KC_RBRC, _______, KC_QUOT, KC_SCLN, _______, - OS_LCTL, OS_LGUI, OS_LALT, KC_GRV , _______, KC_TAB , KC_BSLS, KC_COMM, KC_DOT , KC_SLSH), - - [_LOWER] = KEYMAP( - KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_PGUP, KC_HOME, KC_UP , KC_END , XXXXXXX, - KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, - KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_DEL , _______, OS_LALT, OS_LGUI, OS_LCTL, KC_CAPS), - - [_PLOVER] = KEYMAP( - STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR , - STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR , - MO_ADJ, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, XXXXXXX), - - [_ADJUST] = KEYMAP( - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ST_BOLT, ST_GEM , TG_PLV , - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, - XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET ), -}; \ No newline at end of file diff --git a/keyboards/gherkin/keymaps/talljoe/rules.mk b/keyboards/gherkin/keymaps/talljoe/rules.mk deleted file mode 100644 index 02216ecb36..0000000000 --- a/keyboards/gherkin/keymaps/talljoe/rules.mk +++ /dev/null @@ -1,6 +0,0 @@ -ifndef QUANTUM_DIR - include ../../../../Makefile -endif - -MOUSEKEY_ENABLE = no # Mouse keys(+4700) -STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER diff --git a/keyboards/gherkin/keymaps/talljoe_gherkin/config.h b/keyboards/gherkin/keymaps/talljoe_gherkin/config.h new file mode 100644 index 0000000000..3e9e692d3c --- /dev/null +++ b/keyboards/gherkin/keymaps/talljoe_gherkin/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS + +#endif \ No newline at end of file diff --git a/keyboards/gherkin/keymaps/talljoe_gherkin/keymap.c b/keyboards/gherkin/keymaps/talljoe_gherkin/keymap.c new file mode 100644 index 0000000000..ea2921924e --- /dev/null +++ b/keyboards/gherkin/keymaps/talljoe_gherkin/keymap.c @@ -0,0 +1,58 @@ +#include QMK_KEYBOARD_H +#include "keymap_steno.h" + +#define ST_BOLT QK_STENO_BOLT +#define ST_GEM QK_STENO_GEMINI + +#define XXXXXXX KC_NO + +enum keyboard_layers { + _QWERTY, + _RAISE, + _LOWER, + _PLOVER, + _ADJUST +}; + +#define ADJ_Z LT(_ADJUST, KC_Z) +#define RS_BSPC LT(_RAISE, KC_BSPC) +#define LW_SPC LT(_LOWER, KC_SPC) +#define MO_ADJ MO(_ADJUST) +#define TG_PLV TG(_PLOVER) +#define OS_LCTL OSM(MOD_LCTL) +#define OS_LALT OSM(MOD_LALT) +#define OS_LGUI OSM(MOD_LGUI) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_ortho_3x10( + KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_RSFT, + ADJ_Z, KC_X, KC_C, KC_V, RS_BSPC, LW_SPC, KC_B, KC_N, KC_M, KC_ENT + ), + + [_RAISE] = LAYOUT_ortho_3x10( + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_7, KC_9, KC_0, + KC_ESC, KC_MINS, KC_EQL, _______, KC_LBRC, KC_RBRC, _______, KC_QUOT, KC_SCLN, _______, + OS_LCTL, OS_LGUI, OS_LALT, KC_GRV, _______, KC_TAB, KC_BSLS, KC_COMM, KC_DOT, KC_SLSH + ), + + [_LOWER] = LAYOUT_ortho_3x10( + KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_PGUP, KC_HOME, KC_UP, KC_END, XXXXXXX, + KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_PGDN, KC_LEFT, KC_DOWN, KC_RGHT, _______, + KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, OS_LALT, OS_LGUI, OS_LCTL, KC_CAPS + ), + + [_PLOVER] = LAYOUT_ortho_3x10( + STN_S1, STN_TL, STN_PL, STN_HL, STN_ST1, STN_FR, STN_PR, STN_LR, STN_TR, STN_DR, + STN_S2, STN_KL, STN_WL, STN_RL, STN_ST2, STN_RR, STN_BR, STN_GR, STN_SR, STN_ZR, + MO_ADJ, STN_NUM, STN_A, STN_O, STN_NUM, STN_E, STN_U, STN_NUM, STN_NUM, XXXXXXX + ), + + [_ADJUST] = LAYOUT_ortho_3x10( + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ST_BOLT, ST_GEM, TG_PLV, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET + ), + +}; diff --git a/keyboards/gherkin/keymaps/talljoe_gherkin/rules.mk b/keyboards/gherkin/keymaps/talljoe_gherkin/rules.mk new file mode 100644 index 0000000000..02216ecb36 --- /dev/null +++ b/keyboards/gherkin/keymaps/talljoe_gherkin/rules.mk @@ -0,0 +1,6 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +MOUSEKEY_ENABLE = no # Mouse keys(+4700) +STENO_ENABLE = yes # Additional protocols for Stenography(+1700), requires VIRTSER diff --git a/keyboards/gherkin/keymaps/wanleg/keymap.c b/keyboards/gherkin/keymaps/wanleg/keymap.c index a9cbd0bb3a..95cabe133f 100644 --- a/keyboards/gherkin/keymaps/wanleg/keymap.c +++ b/keyboards/gherkin/keymaps/wanleg/keymap.c @@ -13,7 +13,7 @@ * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ -#include "gherkin.h" +#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. @@ -24,6 +24,9 @@ #define NUM 2 #define ETC 3 +// Readability keycodes +#define _______ KC_TRNS + /////////////// TAP DANCE SECTION START /////////////// //Tap Dance Declarations (list of my tap dance configurations) @@ -146,76 +149,70 @@ qk_tap_dance_action_t tap_dance_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Qwerty - * .-----------------------------------------------------------------------------------------. - * | Q//ESC | W | E | R | T | Y | U | I | O | P | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | A | S | D | F | G | H | J | K | L | ENTER | - * | | | | | | | | | |SFThold | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BKSC | - * | SFThold| | | | | | | | |CTRLhold| - * '-----------------------------------------------------------------------------------------' - */ + /* Qwerty + * .-----------------------------------------------------------------------------------------. + * | Q//ESC | W | E | R | T | Y | U | I | O | P | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | A | S | D | F | G | H | J | K | L | ENTER | + * | | | | | | | | | |SFThold | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Z | X | C | V/NUM | B/ETC | N | M/DIR | ,/GUI | ./ALT | BKSC | + * | SFThold| | | | | | | | |CTRLhold| + * '-----------------------------------------------------------------------------------------' + */ + [_QW] = LAYOUT_ortho_3x10( /* Qwerty*/ + TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, + KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SPC), + SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V), LT(ETC, KC_B), KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC) + ), - [_QW] = KEYMAP( /* Qwerty*/ - TD(TD_Q_ESC), KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, - KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, SFT_T(KC_SPC), - SFT_T(KC_Z), KC_X, KC_C, LT(NUM, KC_V), LT(ETC, KC_B), KC_N, LT(DIR, KC_M), GUI_T(KC_COMM), ALT_T(KC_DOT), CTL_T(KC_BSPC) + /* + * Directional Modifiers + * .-----------------------------------------------------------------------------------------. + * | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | P-Brk | | | | | | | RGUI | ALT | / | + * '-----------------------------------------------------------------------------------------' + */ + [DIR] = LAYOUT_ortho_3x10( /* Directional Modifiers */ + KC_TAB, KC_UP, _______, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL, + KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC, + KC_PAUS, _______, _______, _______, _______, _______, _______, KC_RGUI, KC_LALT, KC_SLSH ), + /* + * Numbers + * .-----------------------------------------------------------------------------------------. + * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | F11 | F12 | | | | ENTER | SHIFT | GUI | ./ALT | BKSC | + * | | | | | | | | | |CTRLhold| + * '-----------------------------------------------------------------------------------------' + */ + [NUM] = LAYOUT_ortho_3x10 ( /* Numbers */ + KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, + KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, + KC_F11, KC_F12, _______, _______, _______, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC) + ), + + /* + * ETC + * .-----------------------------------------------------------------------------------------. + * | ` | mUP | | | RESET | SHIFT | mUp | mDown | | \ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Sft//Cp| | | | | C-A-D | | | ALT | DEL | + * '-----------------------------------------------------------------------------------------' + */ + [ETC] = LAYOUT_ortho_3x10( /* ETC */ + KC_GRV, KC_MS_U, _______, _______, RESET, KC_RSFT, KC_WH_U, KC_WH_D, _______, KC_BSLS, + KC_MS_L, KC_MS_D, KC_MS_R, _______, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT, + TD(TD_SFT_CAPS), _______, _______, _______, _______, LALT(LCTL(KC_DEL)), _______, _______, KC_LALT, KC_DEL + ), -// -///* -// * Directional Modifiers -// * .-----------------------------------------------------------------------------------------. -// * | TAB | up | | INS | CTRL | SHIFT | PgUp | HOME | - | = | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -// * | left | down | right | PrScr | SHIFT | CTRL | PgDn | END | [ | ] | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -// * | P-Brk | | | | | | | RGUI | ALT | / | -// * '-----------------------------------------------------------------------------------------' -// */ -// -[DIR] = KEYMAP( /* Directional Modifiers */ - KC_TAB, KC_UP, KC_TRNS, KC_INS, KC_LCTL, KC_RSFT, KC_PGUP, KC_HOME, KC_MINS, KC_EQL , - KC_LEFT, KC_DOWN, KC_RGHT, KC_PSCR, KC_LSFT, KC_RCTL, KC_PGDN, KC_END, KC_LBRC, KC_RBRC , - KC_PAUS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RGUI, KC_LALT, KC_SLSH -), -// -// /* -// * Numbers -// * .-----------------------------------------------------------------------------------------. -// * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -// * | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -// * | F11 | F12 | | | | ENTER | SHIFT | GUI | ./ALT | BKSC | -// * | | | | | | | | | |CTRLhold| -// * '-----------------------------------------------------------------------------------------' -// */ -// -[NUM] = KEYMAP ( /* Numbers */ - KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10 , - KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , - KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_ENT, KC_RSFT, KC_RGUI, ALT_T(KC_DOT), CTL_T(KC_BSPC) -), -// -// -// /* -// * ETC -// * .-----------------------------------------------------------------------------------------. -// * | ` | mUP | | | RESET | SHIFT | mUp | mDown | | \ | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -// * | mLeft | mDown | mRight | | SHIFT | mBtn3 | mBtn1 | mBtn2 | ; | ' | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| -// * | Sft//Cp| | | | | C-A-D | | | ALT | DEL | -// * '-----------------------------------------------------------------------------------------' -// */ -// -[ETC] = KEYMAP( /* ETC */ - KC_GRV, KC_MS_U, _______, _______, RESET, KC_RSFT, KC_WH_U, KC_WH_D, _______, KC_BSLS , - KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_LSFT, KC_BTN3, KC_BTN1, KC_BTN2, KC_SCLN, KC_QUOT , - TD(TD_SFT_CAPS), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, LALT(LCTL(KC_DEL)), KC_TRNS, KC_TRNS, KC_LALT, KC_DEL - ), }; diff --git a/keyboards/gherkin/rules.mk b/keyboards/gherkin/rules.mk index 530898bd78..416ca5e5f4 100644 --- a/keyboards/gherkin/rules.mk +++ b/keyboards/gherkin/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 @@ -54,4 +54,6 @@ 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 = no \ No newline at end of file +RGBLIGHT_ENABLE = no + +LAYOUTS = ortho_3x10 -- cgit v1.2.3 From 815dab6275eda7fee5a4ea4d02a845e90d4b469f Mon Sep 17 00:00:00 2001 From: Jorge Porras Date: Thu, 7 Jun 2018 08:20:41 -0700 Subject: Normacos update (#3141) * Cheers let's split keymap * fixed typo on norman layer of cheers keymap for let's split * fixed right handed mappings for home row * cheers keymap for let's split redefinition * updated Cheers keymap for let's split * cheers keymap for let's split updated with some terminal macros * renamed cheers let's split keymap to a more appropriate normacos * updated normacos keymap doc / removed non functional keys * reset let's split rules to default values * added more spotlight search macros * normalized keymap comments * Moved numpad on lower layer * updated normacos layout and fixed some readme typos * removed leftover merge diff * added waits to macros that make use of SEND_STRING * fixed wrong waits on macros that use SEND_STRING * normalized macro comments after adding waits --- keyboards/lets_split/keymaps/normacos/keymap.c | 60 +++++++++++++++++-------- keyboards/lets_split/keymaps/normacos/readme.md | 11 ++--- 2 files changed, 48 insertions(+), 23 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/keymaps/normacos/keymap.c b/keyboards/lets_split/keymaps/normacos/keymap.c index 9868fab6ec..8902b7b56f 100644 --- a/keyboards/lets_split/keymaps/normacos/keymap.c +++ b/keyboards/lets_split/keymaps/normacos/keymap.c @@ -1,6 +1,5 @@ #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. @@ -18,7 +17,7 @@ enum custom_keycodes { LOWER, RAISE, ADJUST, - SH_SUDO, + SH_LOG, SH_GOUP, SH_TERM, SPOT, @@ -86,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------. ,-----------------------------------------. * | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+------| |------+------+------+------+------+------| - * |CtlEsc| Sudo | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | + * |CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | * |------+------+------+------+------+------| |------+------+------+------+------+------| * | Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt| * |------+------+------+------+------+------| |------+------+------+------+------+------| @@ -95,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_RAISE] = LAYOUT_ortho_4x12( \ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, \ - _______, SH_SUDO, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \ + _______, SH_LOG, SH_GOUP, SLACK, SH_TERM, OUTLOOK, KC_EQL, KC_MINS, KC_BSLS, KC_LBRC, KC_RBRC, KC_GRV, \ _______, SH_CLRH, SH_CLRE, SH_HOME, SH_END, SH_RSCH, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, SCN_SHT, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), @@ -149,26 +148,51 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case ADJUST: layer_on(_ADJUST); return false; - case SH_SUDO: - SEND_STRING("sudo !!"SS_TAP(X_ENTER)); // Elevate last command + case SH_LOG: // Open Jira log work window + SEND_STRING(SS_TAP(X_DOT)); + _delay_ms(100); + SEND_STRING("log work"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); + return false; + case SH_GOUP: // Go up a directory + SEND_STRING("cd .."SS_TAP(X_ENTER)); return false; - case SH_GOUP: - SEND_STRING("cd .."SS_TAP(X_ENTER)); // Go up a directory + case SH_TERM: // Open Terminal + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("terminal"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); return false; - case SH_TERM: - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"terminal"SS_TAP(X_ENTER)); // Open Terminal + case SPOT: // Open Spotify + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("spotify app"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); return false; - case SPOT: - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"spotify app"SS_TAP(X_ENTER)); // Open Spotify + case SLACK: // Open Slack + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("slack"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); return false; - case SLACK: - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"slack"SS_TAP(X_ENTER)); // Open Slack + case OUTLOOK: // Open MS Outlook + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("outlook"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); return false; - case OUTLOOK: - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"outlook"SS_TAP(X_ENTER)); // Open Outlook + case CHROME: // Open Chrome + SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))); + _delay_ms(100); + SEND_STRING("chrome"); + _delay_ms(100); + SEND_STRING(SS_TAP(X_ENTER)); return false; - case CHROME: - SEND_STRING(SS_LGUI(SS_TAP(X_SPACE))"chrome"SS_TAP(X_ENTER)); // Open Chrome } } else { switch(keycode) { diff --git a/keyboards/lets_split/keymaps/normacos/readme.md b/keyboards/lets_split/keymaps/normacos/readme.md index 5ab245bdfd..3b7a20632b 100644 --- a/keyboards/lets_split/keymaps/normacos/readme.md +++ b/keyboards/lets_split/keymaps/normacos/readme.md @@ -1,9 +1,9 @@ # normacos -This keymap was designed especifically to be used on a MacOS High Sierra system with constant use of the Terminal, as it includes a multitude of macros for both the terminal as well as Spotlight Search. +This keymap was designed specifically to be used on a MacOS High Sierra system with constant use of the Terminal, as it includes a multitude of macros for both the terminal as well as Spotlight Search. Norman keyboard layout [info page.](https://normanlayout.info/) -Some Norman layout keys were placed on different layers and different positions based on available space. +Some Norman layout keys were placed on different layers and different positions based on available space and preference. Macros: @@ -13,7 +13,7 @@ Macros: - Slack opens Slack through Spotlight Search - Term opens Terminal through Spotlight Search - Spot opens Spotify through Spotlight Search -- Chrome opesn Chrome through Spotlight Search +- Chrome opens Chrome through Spotlight Search - OutLk opens Microsoft Outlook through Spotlight Search - ScnSht allows the user to take a screenshot of a selected portion of the screen - ClrHom clears Terminal line from beginning of line up to cursor @@ -21,9 +21,10 @@ Macros: - ShHome moves Terminal cursor to beginning of line - ShEnd moves Terminal cursor to end of line - Search activates Terminal Reverse Search Command History -- Sudo elevates last Terminal command +- Log opens the 'Log Work' modal on Atlassian's Jira web client - UpDir moves working directory to its parent +All macros that make use of the SEND_STRING command have a 100 millisecond wait before and after "writing" to let the computer/OS/app catch up. Any and all empty keys shown below are will be set in the future, and do nothing as of the time of this writing. @@ -62,7 +63,7 @@ Any and all empty keys shown below are will be set in the future, and do nothing ,-----------------------------------------. ,-----------------------------------------. | Tab | ! | @ | # | $ | % | | ^ | & | * | ( | ) | Del | |------+------+------+------+------+------| |------+------+------+------+------+------| -|CtlEsc| Sudo | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | +|CtlEsc| Log | UpDir| Slack| Term | OutLk| | = | - | \ | [ | ] | ` | |------+------+------+------+------+------| |------+------+------+------+------+------| | Shift|ClrHom|ClrEnd|ShHome| ShEnd|Search| | Play | Mute | VolDn| VolUp|ScnSht|SftEnt| |------+------+------+------+------+------| |------+------+------+------+------+------| -- cgit v1.2.3 From 3ab69e2356168414ac9b36eaf14ba18d9e069b45 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 7 Jun 2018 08:23:50 -0700 Subject: DK60: Refactor, Configurator and Readme updates (#3142) * Readme cleanup * Refactor KEYMAP to LAYOUT * Configurator support * Readme cleanup Didn't spot that the modified lines were formatted as a list the first time. --- keyboards/dk60/dk60.h | 2 +- keyboards/dk60/info.json | 13 ++++++++ keyboards/dk60/keymaps/default/keymap.c | 57 ++++++++++++++++----------------- keyboards/dk60/readme.md | 4 +-- 4 files changed, 44 insertions(+), 32 deletions(-) create mode 100644 keyboards/dk60/info.json (limited to 'keyboards') diff --git a/keyboards/dk60/dk60.h b/keyboards/dk60/dk60.h index 4b91599190..7c96af100a 100644 --- a/keyboards/dk60/dk60.h +++ b/keyboards/dk60/dk60.h @@ -24,7 +24,7 @@ #define ___ KC_NO - #define KEYMAP( \ + #define LAYOUT( \ K00, K01, K02, K03, K04, K05, K06, K07, K08, K09, K0A, K0B, K0C, K4B, K4A, \ K10, K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, K1B, K1C, K4C, \ K20, K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, K2B, K2C, \ diff --git a/keyboards/dk60/info.json b/keyboards/dk60/info.json new file mode 100644 index 0000000000..0dd669fd33 --- /dev/null +++ b/keyboards/dk60/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "DK60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "key_count": 60, + "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":"K4B", "x":13, "y":0}, {"label":"K4A", "x":14, "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":"K4C", "x":13.5, "y":1, "w":1.5}, {"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":"K2C", "x":12.75, "y":2, "w":2.25}, {"label":"K30", "x":0, "y":3, "w":2.25}, {"label":"K31", "x":2.25, "y":3}, {"label":"K32", "x":3.25, "y":3}, {"label":"K33", "x":4.25, "y":3}, {"label":"K34", "x":5.25, "y":3}, {"label":"K35", "x":6.25, "y":3}, {"label":"K36", "x":7.25, "y":3}, {"label":"K37", "x":8.25, "y":3}, {"label":"K38", "x":9.25, "y":3}, {"label":"K39", "x":10.25, "y":3}, {"label":"K3A", "x":11.25, "y":3}, {"label":"K3B", "x":12.25, "y":3, "w":1.75}, {"label":"K3C", "x":14, "y":3}, {"label":"K41", "x":1.5, "y":4}, {"label":"K42", "x":2.5, "y":4, "w":1.25}, {"label":"K45", "x":3.75, "y":4, "w":7}, {"label":"K48", "x":10.75, "y":4, "w":1.25}, {"label":"K49", "x":12, "y":4}] + } + } +} diff --git a/keyboards/dk60/keymaps/default/keymap.c b/keyboards/dk60/keymaps/default/keymap.c index a6a3b83f0a..43c2819831 100644 --- a/keyboards/dk60/keymaps/default/keymap.c +++ b/keyboards/dk60/keymaps/default/keymap.c @@ -1,5 +1,4 @@ -#include "dk60.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H enum planck_layers { _QWERTY, @@ -20,26 +19,26 @@ enum planck_keycodes { #define ______ KC_TRNS const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty gui/alt/space/alt/gui - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | - * |-----------------------------------------------------------------------------------------+ - * |LGUI | LAlt | Space | RAlt |RGUI | - * `-----------------------------------------------------------------' - */ - [_QWERTY] = KEYMAP( /* Basic QWERTY */ - 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_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, FN, \ - KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI \ - ), + /* Qwerty gui/alt/space/alt/gui + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN | + * |-----------------------------------------------------------------------------------------+ + * |LGUI | LAlt | Space | RAlt |RGUI | + * `-----------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( /* Basic QWERTY */ + 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_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, FN, \ + KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI \ + ), /* FN Layer * ,-----------------------------------------------------------------------------------------. @@ -54,13 +53,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | Stop | | * `-----------------------------------------------------------------' */ - [_FN] = KEYMAP( /* Layer 1 */ - ______, 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_PAST,KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \ - ______, KC_MPRV,KC_MPLY,KC_MNXT,______, ______, KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______, ______, \ - ______, ______, ______, KC_MSTP, ______ \ - ) + [_FN] = LAYOUT( /* Layer 1 */ + ______, 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_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, \ + ______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \ + ______, ______, ______, KC_MSTP, ______ \ + ) }; bool process_record_user(uint16_t keycode, keyrecord_t *record) { diff --git a/keyboards/dk60/readme.md b/keyboards/dk60/readme.md index bd99d4b61c..3e6f680615 100644 --- a/keyboards/dk60/readme.md +++ b/keyboards/dk60/readme.md @@ -5,8 +5,8 @@ DK60 Another 60% keyboard with different HHKB layout made and sold by dbroqua. [More info on github/dbroqua](https://github.com/Dbroqua/DK60/) -* Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua) -* Hardware Supported: DK60 PCB revA +Keyboard Maintainer: [Damien Broqua aka DarKou](https://github.com/Dbroqua) +Hardware Supported: DK60 PCB revA Make example for this keyboard (after setting up your build environment): -- cgit v1.2.3 From 7004e934d041cf5b187cedb4ab15e649b586edea Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Thu, 7 Jun 2018 08:26:46 -0700 Subject: Eco: Refactor, Configurator support and Readme changes (#3143) * Readme changes * Refactor matrices; add QMK_KEYBOARD_H * Configurator Support --- keyboards/eco/eco.h | 2 +- keyboards/eco/info.json | 13 ++ keyboards/eco/keymaps/default/keymap.c | 107 +++++++------ keyboards/eco/keymaps/hexwire/keymap.c | 18 +-- keyboards/eco/keymaps/that_canadian/keymap.c | 182 +++++++++++----------- keyboards/eco/keymaps/xyverz/keymap.c | 220 +++++++++++++-------------- keyboards/eco/readme.md | 5 +- keyboards/eco/rev1/rev1.h | 26 ++-- keyboards/eco/rev2/rev2.h | 26 ++-- 9 files changed, 302 insertions(+), 297 deletions(-) create mode 100644 keyboards/eco/info.json (limited to 'keyboards') diff --git a/keyboards/eco/eco.h b/keyboards/eco/eco.h index 2615ac1ae8..8c57244fba 100644 --- a/keyboards/eco/eco.h +++ b/keyboards/eco/eco.h @@ -11,7 +11,7 @@ #include "quantum.h" // Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ +#define LAYOUT_kc( \ k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ diff --git a/keyboards/eco/info.json b/keyboards/eco/info.json new file mode 100644 index 0000000000..78b1dd7705 --- /dev/null +++ b/keyboards/eco/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "ECO", + "url": "", + "maintainer": "qmk", + "width": 14, + "height": 4, + "layouts": { + "LAYOUT": { + "key_count": 56, + "layout": [{"label":"k01", "x":0, "y":0}, {"label":"k02", "x":1, "y":0}, {"label":"k03", "x":2, "y":0}, {"label":"k04", "x":3, "y":0}, {"label":"k05", "x":4, "y":0}, {"label":"k06", "x":5, "y":0}, {"label":"k07", "x":6, "y":0}, {"label":"k08", "x":7, "y":0}, {"label":"k09", "x":8, "y":0}, {"label":"k010", "x":9, "y":0}, {"label":"k011", "x":10, "y":0}, {"label":"k012", "x":11, "y":0}, {"label":"k013", "x":12, "y":0}, {"label":"k014", "x":13, "y":0}, {"label":"k11", "x":0, "y":1}, {"label":"k12", "x":1, "y":1}, {"label":"k13", "x":2, "y":1}, {"label":"k14", "x":3, "y":1}, {"label":"k15", "x":4, "y":1}, {"label":"k16", "x":5, "y":1}, {"label":"k17", "x":6, "y":1}, {"label":"k18", "x":7, "y":1}, {"label":"k19", "x":8, "y":1}, {"label":"k110", "x":9, "y":1}, {"label":"k111", "x":10, "y":1}, {"label":"k112", "x":11, "y":1}, {"label":"k113", "x":12, "y":1}, {"label":"k114", "x":13, "y":1}, {"label":"k21", "x":0, "y":2}, {"label":"k22", "x":1, "y":2}, {"label":"k23", "x":2, "y":2}, {"label":"k24", "x":3, "y":2}, {"label":"k25", "x":4, "y":2}, {"label":"k26", "x":5, "y":2}, {"label":"k27", "x":6, "y":2}, {"label":"k28", "x":7, "y":2}, {"label":"k29", "x":8, "y":2}, {"label":"k210", "x":9, "y":2}, {"label":"k211", "x":10, "y":2}, {"label":"k212", "x":11, "y":2}, {"label":"k213", "x":12, "y":2}, {"label":"k214", "x":13, "y":2}, {"label":"k31", "x":0, "y":3}, {"label":"k32", "x":1, "y":3}, {"label":"k33", "x":2, "y":3}, {"label":"k34", "x":3, "y":3}, {"label":"k35", "x":4, "y":3}, {"label":"k36", "x":5, "y":3}, {"label":"k37", "x":6, "y":3}, {"label":"k38", "x":7, "y":3}, {"label":"k39", "x":8, "y":3}, {"label":"k310", "x":9, "y":3}, {"label":"k311", "x":10, "y":3}, {"label":"k312", "x":11, "y":3}, {"label":"k313", "x":12, "y":3}, {"label":"k314", "x":13, "y":3}] + } + } +} diff --git a/keyboards/eco/keymaps/default/keymap.c b/keyboards/eco/keymaps/default/keymap.c index 6270d4260e..7d714d9ad3 100644 --- a/keyboards/eco/keymaps/default/keymap.c +++ b/keyboards/eco/keymaps/default/keymap.c @@ -2,9 +2,7 @@ // Default ECO Layout // KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 -#include "eco.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -30,59 +28,59 @@ enum eco_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-------------------------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | Enter| \ | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| Up | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | GUI | Alt | Del | FN1 | FN1 | Space| Space| FN2 | FN2 | Ctrl | Left | Down | Right| - * `-------------------------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( - KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, - KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_BSLS, - 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_DEL, - KC_LCTL, KC_LGUI,KC_LALT, KC_DEL, MO(_FN1), MO(_FN1), KC_SPC, KC_SPC, MO(_FN2), MO(_FN2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT -), + /* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Esc | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Tab | A | S | D | F | G | H | J | K | L | ; | ' | Enter| \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Shift| Up | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | GUI | Alt | Del | FN1 | FN1 | Space| Space| FN2 | FN2 | Ctrl | Left | Down | Right| + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_ESC, 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_TAB, 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_BSLS, + 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_DEL, + KC_LCTL, KC_LGUI,KC_LALT, KC_DEL, MO(_FN1), MO(_FN1), KC_SPC, KC_SPC, MO(_FN2), MO(_FN2), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT + ), -/* FN1 - * ,-------------------------------------------------------------------------------------------------. - * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |caltde| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | RESET| - * `-------------------------------------------------------------------------------------------------' - */ -[_FN1] = KEYMAP( - _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, _______, - CALTDEL, 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 -), + /* FN1 + * ,-------------------------------------------------------------------------------------------------. + * | | ! | @ | # | $ | % | ^ | & | * | ( | ) | _ | + | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |caltde| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | RESET| + * `-------------------------------------------------------------------------------------------------' + */ + [_FN1] = LAYOUT( + _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_UNDS, KC_PLUS, _______, + CALTDEL, 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 + ), -/* Raise - * ,-------------------------------------------------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Taskmg| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ -[_FN2] = KEYMAP( - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, - TSKMGR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -) + /* Raise + * ,-------------------------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Taskmg| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_FN2] = LAYOUT( + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, _______, + TSKMGR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; @@ -102,4 +100,3 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return true; } - diff --git a/keyboards/eco/keymaps/hexwire/keymap.c b/keyboards/eco/keymaps/hexwire/keymap.c index c20d45c2b2..7c6616aac8 100644 --- a/keyboards/eco/keymaps/hexwire/keymap.c +++ b/keyboards/eco/keymaps/hexwire/keymap.c @@ -2,9 +2,7 @@ // Default ECO Layout // KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 -#include "eco.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -50,7 +48,7 @@ enum eco_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QWERTY] = KC_KEYMAP( + [_QWERTY] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. TAB , Q , W , E , R , T ,LPRN,RPRN, Y , U , I , O , P ,MINS, //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -63,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { ), - [_LOWER] = KC_KEYMAP( + [_LOWER] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. , 1 , 2 , 3 , 4 , 5 ,LPRN,RPRN, 6 , 7 , 8 , 9 , 0 , , //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -71,11 +69,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| ,CPYP, , ,DOWN,LCBR,LCBR,RCBR,RCBR, P1 , P2 , P3 ,MINS, , //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| - , , , , , , ,DEL ,DEL , , P0 ,PDOT, , + , , , , , , ,DEL ,DEL , , P0 ,PDOT, , //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), - [_RAISE] = KC_KEYMAP( + [_RAISE] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. ,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LPRN,RPRN, , //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -83,11 +81,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| MUTE,MSTP,MPLY,VOLD,PGDN,MINS, , ,PLUS,END , , , , , //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| - , , , , , , , , , , , , , + , , , , , , , , , , , , , //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), - [_FN3] = KC_KEYMAP( + [_FN3] = LAYOUT_kc( //,----+----+----+----+----+----+----+----+----+----+----+----+----+----. F12 , F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 ,F10 ,F11 , //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| @@ -95,7 +93,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| RST ,DBUG,RHUD,RSAD,RVAD, , , , , , , , , , //|----+----+----+----+----+----+----+----+----+----+----+----+----+----| - , , , , , , , , , , , , , + , , , , , , , , , , , , , //`----+----+----+----+----+----+----+----+----+----+----+----+----+----' ), diff --git a/keyboards/eco/keymaps/that_canadian/keymap.c b/keyboards/eco/keymaps/that_canadian/keymap.c index be0004dbbe..444bc48f80 100644 --- a/keyboards/eco/keymaps/that_canadian/keymap.c +++ b/keyboards/eco/keymaps/that_canadian/keymap.c @@ -1,12 +1,10 @@ // Below layout is based upon /u/That-Canadian's planck layout -#include "eco.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H #ifdef AUDIO_ENABLE #include "audio.h" #endif -#include "eeconfig.h" extern keymap_config_t keymap_config; @@ -37,95 +35,95 @@ enum eco_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-------------------------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | ( | ) | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | A | S | D | F | G | [ | ] | H | J | K | L | ; | Enter| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | { | } | N | M | , | . | / | ' | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Ctrl | ` | GUI | Alt |Lower | Space|Pg-dwn| Pg-up| Space|Raise | Left | Down | Up |Right | - * `-------------------------------------------------------------------------------------------------' - */ -[_QWERTY] = { - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, - {MO(_FUNCTION), 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_ENT}, - {OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT}, - {KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_PGDN, KC_PGUP, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, - -/* Lower - * ,-------------------------------------------------------------------------------------------------. - * | Esc | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | | | F6 | _ | + | { | } |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | Mute | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | |Lower | | | | Bksp |Raise | Next | Vol- | Vol+ | Play | - * `-------------------------------------------------------------------------------------------------' - */ -[_LOWER] = { - {KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL}, - {_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______}, - {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - -/* Raise - * ,-------------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | Del | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | 4 | 5 | 6 | + | | | | | - | = | [ | ] |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * |Enter | 7 | 8 | 9 | - | | | | | | | Mute | | \ | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | , | 0 | . |Lower | Bksp | | | |Raise | Next | Vol- | Vol+ | Play | - * `-------------------------------------------------------------------------------------------------' - */ -[_RAISE] = { - {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_MUTE, _______, KC_BSLS}, - {_______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - -/* Adjust (Lower + Raise) - * ,-------------------------------------------------------------------------------------------------. - * |Taskmg| Reset| | | | | | | | | | | |caltde| - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ -[_ADJUST] = { - {TSKMGR, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -}, - -/* Function - * ,-------------------------------------------------------------------------------------------------. - * | | | | | | | | | | | Up | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | Left | Down |Right | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | Caps | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ -[_FUNCTION] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______}, - {KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} -} + /* Qwerty + * ,-------------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | ( | ) | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Func | A | S | D | F | G | [ | ] | H | J | K | L | ; | Enter| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | { | } | N | M | , | . | / | ' | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | ` | GUI | Alt |Lower | Space|Pg-dwn| Pg-up| Space|Raise | Left | Down | Up |Right | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LPRN, KC_RPRN, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + MO(_FUNCTION), 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_ENT, + OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LCBR, KC_RCBR, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, + KC_LCTL, KC_GRV, KC_LGUI, KC_LALT, LOWER, KC_SPC, KC_PGDN, KC_PGUP, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT + ), + + /* Lower + * ,-------------------------------------------------------------------------------------------------. + * | Esc | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | | F6 | _ | + | { | } |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | | | F12 | | | Mute | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | | | | Bksp |Raise | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + KC_ESC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______, + _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, _______, _______, KC_F12, _______, _______, KC_MUTE, _______, KC_PIPE, + _______, _______, _______, _______, _______, _______, _______, _______, KC_BSPC, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Raise + * ,-------------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | 4 | 5 | 6 | + | | | | | - | = | [ | ] |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * |Enter | 7 | 8 | 9 | - | | | | | | | Mute | | \ | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | , | 0 | . |Lower | Bksp | | | |Raise | Next | Vol- | Vol+ | Play | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + 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_MUTE, _______, KC_BSLS, + _______, KC_COMM, KC_0, KC_DOT, _______, KC_BSPC, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY + ), + + /* Adjust (Lower + Raise) + * ,-------------------------------------------------------------------------------------------------. + * |Taskmg| Reset| | | | | | | | | | | |caltde| + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + TSKMGR, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, CALTDEL, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), + + /* Function + * ,-------------------------------------------------------------------------------------------------. + * | | | | | | | | | | | Up | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | Left | Down |Right | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | Caps | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_FUNCTION] = LAYOUT( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, + KC_CAPS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ) }; diff --git a/keyboards/eco/keymaps/xyverz/keymap.c b/keyboards/eco/keymaps/xyverz/keymap.c index b68f9f8580..b4ca0f1a5f 100644 --- a/keyboards/eco/keymaps/xyverz/keymap.c +++ b/keyboards/eco/keymaps/xyverz/keymap.c @@ -4,9 +4,7 @@ // Default ECO Layout // KLE here : http://www.keyboard-layout-editor.com/#/gists/0733eca6b4cb88ff9d7de746803f4039 -#include "eco.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -39,114 +37,114 @@ enum planck_keycodes { 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 | , | . | / |Shift | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | - * `-------------------------------------------------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, 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_NO, KC_NO, 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_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT -), - -/* 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 | | | N | M | , | . | / |Shift | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | - * `-------------------------------------------------------------------------------------------------' - */ -[_COLEMAK] = KEYMAP( - KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_NO, 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_NO, KC_NO, 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_NO, KC_NO, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT -), - -/* Dvorak - * ,-------------------------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | | | F | G | C | R | L | / | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Esc | A | O | E | U | I | | | D | H | T | N | S | - | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | | | B | M | W | V | Z | Shift| - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | - * `-------------------------------------------------------------------------------------------------' - */ -[_DVORAK] = KEYMAP( - KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, - KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, - KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_NO, KC_NO, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, - KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT -), - -/* Lower - * ,-------------------------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Caps | | Mute | Vol- | Vol+ | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | | Prev | Play | Next | | | | | | | | | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | Brite| | Home | End | | Del | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ -[_LOWER] = KEYMAP( - KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, - _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ -), - -/* Raise - * ,-------------------------------------------------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | - | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ -[_RAISE] = KEYMAP( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, _______, - KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, - _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, - _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ -), - - -/* Adjust - * ,-------------------------------------------------------------------------------------------------. - * | F11 | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F12 | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | Reset| | | | | | | |Qwerty|Colemk|Dvorak| | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| - * | | | | | | | | | | | | | | | - * `-------------------------------------------------------------------------------------------------' - */ -[_ADJUST] = KEYMAP( - KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , - _______, RESET, _______, _______, _______, _______, KC_NO, KC_NO, _______, QWERTY, COLEMAK, DVORAK, _______, _______, - _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ -), + /* 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 | , | . | / |Shift | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_NO, KC_NO, 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_NO, KC_NO, 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_NO, KC_NO, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + ), + + /* 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 | | | N | M | , | . | / |Shift | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ + [_COLEMAK] = LAYOUT( + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_NO, KC_NO, 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_NO, KC_NO, 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_NO, KC_NO, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + ), + + /* Dvorak + * ,-------------------------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | | | F | G | C | R | L | / | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Esc | A | O | E | U | I | | | D | H | T | N | S | - | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | | | B | M | W | V | Z | Shift| + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Ctrl | Alt | Left |Right |Lower | Bksp | GUI |Enter |Space |Raise | Up | Down | GUI |Enter | + * `-------------------------------------------------------------------------------------------------' + */ + [_DVORAK] = LAYOUT( + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_NO, KC_NO, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_NO, KC_NO, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_NO, KC_NO, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, + KC_LCTL, KC_LALT, KC_LEFT, KC_RGHT, LOWER, KC_BSPC, KC_LGUI, KC_ENT, KC_SPC, RAISE, KC_UP, KC_DOWN, KC_RGUI, KC_ENT + ), + + /* Lower + * ,-------------------------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Caps | | Mute | Vol- | Vol+ | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | Prev | Play | Next | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | Brite| | Home | End | | Del | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_LOWER] = LAYOUT( + KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_NO, KC_NO, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + ), + + /* Raise + * ,-------------------------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | | | 6 | 7 | 8 | 9 | 0 | - | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_RAISE] = LAYOUT( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_NO, KC_NO, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_CAPS, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, KC_NO, KC_NO, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, + _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, KC_HOME, KC_END, _______, KC_DEL, _______, _______, KC_INS, _______, KC_PGUP, KC_PGDN, _______, _______ + ), + + + /* Adjust + * ,-------------------------------------------------------------------------------------------------. + * | F11 | F1 | F2 | F3 | F4 | F5 | | | F6 | F7 | F8 | F9 | F10 | F12 | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | Reset| | | | | | | |Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * |------+------+------+------+------+------+------|------+------+------+------+------+------+------| + * | | | | | | | | | | | | | | | + * `-------------------------------------------------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( + KC_F11, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_NO, KC_NO, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F12 , + _______, RESET, _______, _______, _______, _______, KC_NO, KC_NO, _______, QWERTY, COLEMAK, DVORAK, _______, _______, + _______, _______, _______, _______, _______, _______, KC_NO, KC_NO, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ + ), }; diff --git a/keyboards/eco/readme.md b/keyboards/eco/readme.md index afa9d55598..0826337e75 100644 --- a/keyboards/eco/readme.md +++ b/keyboards/eco/readme.md @@ -5,8 +5,9 @@ ECO An economical 4x14 ortholinear keyboard -Keyboard Maintainer: BishopKeyboards and That-Canadian -Hardware Supported: ECO PCB rev1 Pro Micro +Keyboard Maintainer: BishopKeyboards and That-Canadian +Hardware Supported: ECO PCB rev1 Pro Micro +Hardware Availability: [BishopKeyboards](https://bishopkeyboards.com/product/eco-keyboard-pcb-4x14/) Make example for this keyboard (after setting up your build environment): diff --git a/keyboards/eco/rev1/rev1.h b/keyboards/eco/rev1/rev1.h index 41541ac05b..ba00615d34 100644 --- a/keyboards/eco/rev1/rev1.h +++ b/keyboards/eco/rev1/rev1.h @@ -8,17 +8,17 @@ //void promicro_bootloader_jmp(bool program); -#define KEYMAP( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ - ) \ - { \ - { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ - } +#define LAYOUT( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ + ) \ + { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ + } -#endif \ No newline at end of file +#endif diff --git a/keyboards/eco/rev2/rev2.h b/keyboards/eco/rev2/rev2.h index 5b377f2908..adc2c6d402 100644 --- a/keyboards/eco/rev2/rev2.h +++ b/keyboards/eco/rev2/rev2.h @@ -8,17 +8,17 @@ //void promicro_bootloader_jmp(bool program); -#define KEYMAP( \ - k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ - k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ - k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ - k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ - ) \ - { \ - { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ - { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ - { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ - { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ - } +#define LAYOUT( \ + k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014, \ + k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114, \ + k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214, \ + k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 \ + ) \ + { \ + { k01, k02, k03, k04, k05, k06, k07, k08, k09, k010, k011, k012, k013, k014 }, \ + { k11, k12, k13, k14, k15, k16, k17, k18, k19, k110, k111, k112, k113, k114 }, \ + { k21, k22, k23, k24, k25, k26, k27, k28, k29, k210, k211, k212, k213, k214 }, \ + { k31, k32, k33, k34, k35, k36, k37, k38, k39, k310, k311, k312, k313, k314 } \ + } -#endif \ No newline at end of file +#endif -- cgit v1.2.3 From 03c9deb7456d84a8d8cc31496ae2736305bbafd3 Mon Sep 17 00:00:00 2001 From: Dan Date: Thu, 7 Jun 2018 14:30:27 -0400 Subject: Add DCompact Layout for Chimera Ortho and Planck Keyboards (#3145) * Clone default chimera-o layout * Make changes for base layer * Enable mouse suppport flag * Implement majority of DAD layout * Add mouse movement keys * Fine tune mouse control and fix tap toggle * Fix mouse button locations * Set adpater LED colors for layers * Increase responsiveness of key taps * Update layout for thumb comfort * Rename layout and add README * Add comments to keymap * Implement DCompact layout for Planck * Copy over DCompact README to planck * Fix up odds and ends for Planck --- keyboards/chimera_ortho/keymaps/dcompact/README.md | 45 +++++ keyboards/chimera_ortho/keymaps/dcompact/config.h | 9 + keyboards/chimera_ortho/keymaps/dcompact/keymap.c | 119 ++++++++++++ keyboards/chimera_ortho/keymaps/dcompact/rules.mk | 1 + keyboards/planck/keymaps/dcompact/README.md | 45 +++++ keyboards/planck/keymaps/dcompact/config.h | 41 +++++ keyboards/planck/keymaps/dcompact/keymap.c | 201 +++++++++++++++++++++ keyboards/planck/keymaps/dcompact/rules.mk | 4 + 8 files changed, 465 insertions(+) create mode 100644 keyboards/chimera_ortho/keymaps/dcompact/README.md create mode 100644 keyboards/chimera_ortho/keymaps/dcompact/config.h create mode 100644 keyboards/chimera_ortho/keymaps/dcompact/keymap.c create mode 100644 keyboards/chimera_ortho/keymaps/dcompact/rules.mk create mode 100644 keyboards/planck/keymaps/dcompact/README.md create mode 100644 keyboards/planck/keymaps/dcompact/config.h create mode 100644 keyboards/planck/keymaps/dcompact/keymap.c create mode 100644 keyboards/planck/keymaps/dcompact/rules.mk (limited to 'keyboards') diff --git a/keyboards/chimera_ortho/keymaps/dcompact/README.md b/keyboards/chimera_ortho/keymaps/dcompact/README.md new file mode 100644 index 0000000000..04cb4fcb6e --- /dev/null +++ b/keyboards/chimera_ortho/keymaps/dcompact/README.md @@ -0,0 +1,45 @@ +# DCompact Layout + +**Dvorak, Layered, Mouse-Enabled, Compact** + +_See [the layout source](keymap.c) for the actual layout_ + +## Goals + +The following are the goals kept in mind when designing the DCompact +layout: + +- Provide minimal travel distance when typing English or coding +- Consistent muscle memory translation from standard QWERTY +- Statless typing experience +- OS-agnostic features, macros, and key placement +- Minimize dependence on mouse usage + +These are generally all met or balanced within reason. This layout is +not intended at all to be a familiar layout for much of anyone (except +maybe those who already type in Dvorak) -- this is meant to amplify the +best parts of having limited, ortholinear keys with layering. + +## As Reference Material + +If you're reading this hoping to find reference material to implement +your own layout, then please feel free to copy over this layout and +make edits where you see fit. I removed a lot of the features I felt +extraneous to my usage and simplified style where I felt needed. This +would hopefully mean that my code should feel like a good base to +develop from for those new to QMK. + +_Remember that settings defined in the layout directory override and +merge with those in the keyboard folder_ + +## Relevant Links + +- !(Online Dvorak Layout Trainer)[https://learn.dvorak.nl/] +- !(Dvorak Wikipedia Page)[https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard] +- !(QMK Docs)[https://docs.qmk.fm/#/] +- !(QMK KeyCode Reference)[https://docs.qmk.fm/#/keycodes] + +## Contact + +Maintainer: [Dan](https://github.com/loksonarius) + diff --git a/keyboards/chimera_ortho/keymaps/dcompact/config.h b/keyboards/chimera_ortho/keymaps/dcompact/config.h new file mode 100644 index 0000000000..d1e5c3aabf --- /dev/null +++ b/keyboards/chimera_ortho/keymaps/dcompact/config.h @@ -0,0 +1,9 @@ +#define TAPPING_TERM 150 +#define TAPPING_TOGGLE 2 + +#define MOUSEKEY_DELAY 200 +#define MOUSEKEY_INTERVAL 60 +#define MOUSEKEY_MAX_SPEED 50 +#define MOUSEKEY_TIME_TO_MAX 80 +#define MOUSEKEY_WHEEL_MAX_SPEED 8 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 15 diff --git a/keyboards/chimera_ortho/keymaps/dcompact/keymap.c b/keyboards/chimera_ortho/keymaps/dcompact/keymap.c new file mode 100644 index 0000000000..eab8db22c4 --- /dev/null +++ b/keyboards/chimera_ortho/keymaps/dcompact/keymap.c @@ -0,0 +1,119 @@ +#include "chimera_ortho.h" + +enum chimera_ortho_layers +{ + _BASE, + _NAV, + _SYM, + _FUNC, + _MOUSE +}; + +#define KC_NAV MO(_NAV) +#define KC_SYM MO(_SYM) +#define KC_FUNC MO(_FUNC) +#define KC_MOUSE TT(_MOUSE) + +#define KC_DELSHFT SFT_T(KC_DEL) +#define KC_CTLENT CTL_T(KC_ENT) +#define KC_SYMSPC LT(_SYM, KC_SPC) + +#define KC_WK_LEFT LCA(KC_LEFT) +#define KC_WK_DOWN LCA(KC_DOWN) +#define KC_WK_UP LCA(KC_UP) +#define KC_WK_RGHT LCA(KC_RGHT) + +#define KC_QUAKE LCTL(KC_GRAVE) + +#define LONGPRESS_DELAY 150 + +// These are needed because of the 'KC_'-adding macro +// This macro can be found in ../../chimera_ortho.h +#define KC_RESET RESET +#define KC_ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BASE] = KC_KEYMAP( + //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + LALT ,TAB ,QUOT ,COMM ,DOT ,P ,Y ,F ,G ,C ,R ,L ,SLSH ,FUNC + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + ,LGUI ,ESC ,A ,O ,E ,U ,I ,D ,H ,T ,N ,S ,MINS ,MOUSE + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + ,LCTL ,DELSHFT,SCLN ,Q ,J ,K ,X ,B ,M ,W ,V ,Z ,BSPC ,ENTER + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + ,LSHIFT ,NAV ,SYMSPC ,CTLENT + //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/ + ), + + [_NAV] = KC_KEYMAP( + //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + , , , , , , , ,HOME ,PGDOWN ,PGUP ,END , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , ,PSCR ,MENU , , , , , ,LEFT ,DOWN ,UP ,RIGHT , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , ,CAPS ,NLCK ,INS , , , , ,WK_LEFT,WK_DOWN,WK_UP ,WK_RGHT, , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , , , + //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/ + ), + + [_SYM] = KC_KEYMAP( + //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + ,QUAKE ,GRAVE ,TILDE ,BSLASH ,PIPE ,LPRN ,RPRN ,7 ,8 ,9 ,SLSH ,EQUAL , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , ,EXLM ,AT ,HASH ,DLR ,LCBR ,RCBR ,4 ,5 ,6 ,ASTR ,PLUS , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , ,PERC ,CIRC ,AMPR ,ASTR ,LBRC ,RBRC ,1 ,2 ,3 ,MINUS , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , , ,0 + //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/ + ), + + [_FUNC] = KC_KEYMAP( + //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + ,RESET ,SLEP ,MRWD ,MPLY ,MFFD , , ,F9 ,F10 ,F11 ,F12 , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , ,PWR ,MUTE ,VOLD ,VOLU , , ,F5 ,F6 ,F7 ,F8 , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , ,WAKE ,MPRV ,MPLY ,MNXT , , ,F1 ,F2 ,F3 ,F4 , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , , , + //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/ + ), + + [_MOUSE] = KC_KEYMAP( + //,-------+-------+-------+-------+-------+-------+-------. ,-------+-------+-------+-------+-------+-------+-------. + , , , , , , , , , , , , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , , ,BTN1 ,BTN3 ,BTN2 , , ,MS_L ,MS_D ,MS_U ,MS_R , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , , ,ACL0 ,ACL1 ,ACL2 , , ,WH_L ,WH_D ,WH_U ,WH_R , , + //|-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + , , , , + //\-------------------------------+-------+-------+-------/ \-------+-------+---------------------------------------/ + ), +}; + +# These control the color of the LED on the receiver +# For color reference, see ../../chimera_ortho.h +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + switch (layer) { + case _BASE: + set_led_cyan; + break; + case _NAV: + set_led_blue; + break; + case _SYM: + set_led_magenta; + break; + case _FUNC: + set_led_yellow; + default: + set_led_white; + break; + } +}; diff --git a/keyboards/chimera_ortho/keymaps/dcompact/rules.mk b/keyboards/chimera_ortho/keymaps/dcompact/rules.mk new file mode 100644 index 0000000000..6c605daecf --- /dev/null +++ b/keyboards/chimera_ortho/keymaps/dcompact/rules.mk @@ -0,0 +1 @@ +MOUSEKEY_ENABLE = yes diff --git a/keyboards/planck/keymaps/dcompact/README.md b/keyboards/planck/keymaps/dcompact/README.md new file mode 100644 index 0000000000..04cb4fcb6e --- /dev/null +++ b/keyboards/planck/keymaps/dcompact/README.md @@ -0,0 +1,45 @@ +# DCompact Layout + +**Dvorak, Layered, Mouse-Enabled, Compact** + +_See [the layout source](keymap.c) for the actual layout_ + +## Goals + +The following are the goals kept in mind when designing the DCompact +layout: + +- Provide minimal travel distance when typing English or coding +- Consistent muscle memory translation from standard QWERTY +- Statless typing experience +- OS-agnostic features, macros, and key placement +- Minimize dependence on mouse usage + +These are generally all met or balanced within reason. This layout is +not intended at all to be a familiar layout for much of anyone (except +maybe those who already type in Dvorak) -- this is meant to amplify the +best parts of having limited, ortholinear keys with layering. + +## As Reference Material + +If you're reading this hoping to find reference material to implement +your own layout, then please feel free to copy over this layout and +make edits where you see fit. I removed a lot of the features I felt +extraneous to my usage and simplified style where I felt needed. This +would hopefully mean that my code should feel like a good base to +develop from for those new to QMK. + +_Remember that settings defined in the layout directory override and +merge with those in the keyboard folder_ + +## Relevant Links + +- !(Online Dvorak Layout Trainer)[https://learn.dvorak.nl/] +- !(Dvorak Wikipedia Page)[https://en.wikipedia.org/wiki/Dvorak_Simplified_Keyboard] +- !(QMK Docs)[https://docs.qmk.fm/#/] +- !(QMK KeyCode Reference)[https://docs.qmk.fm/#/keycodes] + +## Contact + +Maintainer: [Dan](https://github.com/loksonarius) + diff --git a/keyboards/planck/keymaps/dcompact/config.h b/keyboards/planck/keymaps/dcompact/config.h new file mode 100644 index 0000000000..625cf903e5 --- /dev/null +++ b/keyboards/planck/keymaps/dcompact/config.h @@ -0,0 +1,41 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#ifdef AUDIO_ENABLE + #define STARTUP_SONG SONG(PLANCK_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 + +#endif diff --git a/keyboards/planck/keymaps/dcompact/keymap.c b/keyboards/planck/keymaps/dcompact/keymap.c new file mode 100644 index 0000000000..21245b7023 --- /dev/null +++ b/keyboards/planck/keymaps/dcompact/keymap.c @@ -0,0 +1,201 @@ +/* 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 . + */ + +#include "planck.h" +#include "action_layer.h" + +// Custom Keycodes and Combinations Used +#define DEL_SHF SFT_T(KC_DEL) +#define QUAKE LCTL(KC_GRV) + +#define WKSP_L LALT(LCTL(KC_LEFT)) +#define WKSP_D LALT(LCTL(KC_DOWN)) +#define WKSP_U LALT(LCTL(KC_UP)) +#define WKSP_R LALT(LCTL(KC_RGHT)) + +extern keymap_config_t keymap_config; + +enum planck_layers { + _BASE, + _LOWER, + _RAISE, + _FUNC, + _MOUSE, + _ADJUST +}; + +enum planck_keycodes { + BASE = SAFE_RANGE, + LOWER, + RAISE, + FUNC, + MOUSE, + ADJUST +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Base + * ,-----------------------------------------------------------------------------------. + * | Tab | " ' | < , | > . | P | Y | F | G | C | R | L | ? / | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | _ - | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |Del/Sf| : ; | Q | J | K | X | B | M | W | V | Z | Bspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Fn | GUI | Alt |Lower |Shift |Space |Raise | Alt | GUI | Fn |Enter | + * `-----------------------------------------------------------------------------------' + */ +[_BASE] = { + { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH}, + { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS}, + { DEL_SHF, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_BSPC}, + { KC_LCTL, FUNC, KC_LGUI, KC_LALT, LOWER, KC_LSFT, KC_SPC, RAISE, KC_RALT, KC_RGUI, FUNC, KC_ENT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | Home |PgDwn | PgUp | End | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | |PrScr | Menu | | | | | Left | Down | Up |Right | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |CapsLk|NumLck| Ins | | | |WkLeft|WkDown| WkUp |WkRigh| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | |Raise | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END, XXXXXXX}, + { XXXXXXX, KC_PSCR, KC_MENU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX}, + { XXXXXXX, KC_CAPS, KC_LNUM, KC_INS, XXXXXXX, XXXXXXX, XXXXXXX, WKSP_L, WKSP_D, WKSP_U, WKSP_R, XXXXXXX}, + { _______, XXXXXXX, _______, _______, _______, _______, XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * |Quake | ` | ~ | \ | | | ( | ) | 7 | 8 | 9 | / | = | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | ! | @ | # | $ | { | } | 4 | 5 | 6 | * | + | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | % | ^ | & | * | [ | ] | 1 | 2 | 3 | - |Bkspc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | |Lower | < | > | | 0 | . | , | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + { QUAKE, KC_GRV, KC_TILD, KC_BSLS, KC_PIPE, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_SLSH, KC_EQL}, + { XXXXXXX, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_LCBR, KC_RCBR, KC_4, KC_5, KC_6, KC_ASTR, KC_PLUS}, + { XXXXXXX, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LBRC, KC_RBRC, KC_1, KC_2, KC_3, KC_MINS, KC_BSPC}, + { _______, XXXXXXX, _______, _______, _______, KC_LABK, KC_RABK, _______, KC_0, KC_DOT, KC_COMM, XXXXXXX} +}, + +/* Func + * ,-----------------------------------------------------------------------------------. + * | |Sleep |Prev-W|Ply/Ps|Next-W| | | F9 | F10 | F11 | F12 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Wake | Mute | Vol- | Vol+ | | | F5 | F6 | F7 | F8 | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Power |Prev-M|Ply/Ps|Next-M| | | F1 | F2 | F3 | F4 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_FUNC] = { + { XXXXXXX, KC_SLEP, KC_MPRV, KC_MPLY, KC_MNXT, XXXXXXX, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX}, + { XXXXXXX, KC_WAKE, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX}, + { XXXXXXX, KC_PWR, KC_MRWD, KC_MPLY, KC_MFFD, XXXXXXX, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX}, + { _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX} +}, + +/* Mouse (Not Reachable on Planck) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | |Click1|Click3|Click2| | |MouseL|MouseD|MouseU|MouseR| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | |Accel0|Accel1|Accel2| | |ScrllL|ScrllD|ScrllU|ScrllR| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = { + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + { XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, XXXXXXX}, + { XXXXXXX, XXXXXXX, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_D, KC_WH_U, KC_WH_R, XXXXXXX}, + { _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap| | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + { _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL }, + { _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, _______, _______, _______, _______, _______}, + { _______, 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 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 FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + } else { + layer_off(_FUNC); + } + return false; + break; + case MOUSE: + if (record->event.pressed) { + layer_on(_MOUSE); + } else { + layer_off(_MOUSE); + } + return false; + break; + } + return true; +} diff --git a/keyboards/planck/keymaps/dcompact/rules.mk b/keyboards/planck/keymaps/dcompact/rules.mk new file mode 100644 index 0000000000..9c9280adb5 --- /dev/null +++ b/keyboards/planck/keymaps/dcompact/rules.mk @@ -0,0 +1,4 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + -- cgit v1.2.3 From 984621835d929b79a22ef33c0a4e602adb1ecc5b Mon Sep 17 00:00:00 2001 From: Eric Gebhart Date: Fri, 8 Jun 2018 19:06:25 +0200 Subject: Keyboard that works on Qwerty or Bepo OS keyboards. (#3149) * New layout. * new dvorak bepo layout. * first commit of new ergodox_ez dvorak keyboard for qwerty and bepo. --- keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c | 354 +++++++++++++++++++++ keyboards/ergodox_ez/keymaps/ericgebhart/readme.md | 5 + 2 files changed, 359 insertions(+) create mode 100644 keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c create mode 100644 keyboards/ergodox_ez/keymaps/ericgebhart/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c new file mode 100644 index 0000000000..bafa30eafc --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ericgebhart/keymap.c @@ -0,0 +1,354 @@ +/* + Copyright 2018 Eric Gebhart + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . +*/ +#include "keymap_bepo.h" +#include "ericgebhart.h" + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [DVORAK] = LAYOUT_wrapper ( + // left hand + KC_GRV, ___NUMBER_L___, DEF_OS_LAYER_SW, + KC_LOCK, ___DVORAK_L1___, KC_LBRC, + TAB_BKTAB, ___DVORAK_L2___, + KC_LSFT, ___DVORAK_L3___, KC_LPRN, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + // right hand + MDIA_SYMB, ___NUMBER_R___, KC_EQL, + KC_RBRC, ___DVORAK_R1___, KC_SLASH, + /* */ ___DVORAK_R2___, KC_MINUS, + KC_RPRN, ___DVORAK_R3___, KC_RSFT, + + ___ERGODOX_BOTTOM_RIGHT___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [XMONAD] = LAYOUT_wrapper ( + // left hand + ___, ___FUNC_L___, ___, + ___, ___DVORAK_L1___, ___, + ___, ___DVORAK_L2___, + ___, ___DVORAK_L3___, ___, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + // right hand + ___, ___FUNC_R___, ___, + ___, ___DVORAK_R1___, ___, + /**/ ___DVORAK_R2___, ___, + ___, ___DVORAK_R3___, ___, + + ___ERGODOX_BOTTOM_RIGHT___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [QWERTY] = LAYOUT_wrapper( + // left hand + KC_GRV, ___NUMBER_L___, DEF_OS_LAYER_SW, + KC_LOCK, ___QWERTY_L1___, KC_LBRC, + TAB_BKTAB, ___QWERTY_L2___, + KC_LSFT, ___QWERTY_L3___, KC_LPRN, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + // right hand + MDIA_SYMB, ___NUMBER_R___, KC_EQL, + KC_RBRC, ___QWERTY_R1___, KC_SLASH, + /* */ ___QWERTY_R2___, KC_MINUS, + KC_RPRN, ___QWERTY_R3___, KC_RSFT, + + ___ERGODOX_BOTTOM_RIGHT___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [COLEMAK] = LAYOUT_wrapper ( + // left hand + KC_GRV, ___NUMBER_L___, DEF_OS_LAYER_SW, + KC_LOCK, ___COLEMAK_L1___, KC_LBRC, + TAB_BKTAB, ___COLEMAK_L2___, + KC_LSFT, ___COLEMAK_L3___, KC_LPRN, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + // right hand + MDIA_SYMB, ___NUMBER_R___, KC_EQL, + KC_RBRC, ___COLEMAK_R1___, KC_SLASH, + /* */ ___COLEMAK_R2___, KC_MINUS, + KC_RPRN, ___COLEMAK_R3___, KC_RSFT, + + ___ERGODOX_BOTTOM_RIGHT___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [WORKMAN] = LAYOUT_wrapper ( + // left hand + KC_GRV, ___NUMBER_L___, DEF_OS_LAYER_SW, + KC_LOCK, ___WORKMAN_L1___, KC_LBRC, + TAB_BKTAB, ___WORKMAN_L2___, + KC_LSFT, ___WORKMAN_L3___, KC_LPRN, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + // right hand + MDIA_SYMB, ___NUMBER_R___, KC_EQL, + KC_RBRC, ___WORKMAN_R1___, KC_SLASH, + /* */ ___WORKMAN_R2___, KC_MINUS, + KC_RPRN, ___WORKMAN_R3___, KC_RSFT, + + ___ERGODOX_BOTTOM_RIGHT___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [NORMAN] = LAYOUT_wrapper( + // left hand + KC_GRV, ___NUMBER_L___, DEF_OS_LAYER_SW, + KC_LOCK, ___NORMAN_L1___, KC_LBRC, + TAB_BKTAB, ___NORMAN_L2___, + KC_LSFT, ___NORMAN_L3___, KC_LPRN, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + // right hand + MDIA_SYMB, ___NUMBER_R___, KC_EQL, + KC_RBRC, ___NORMAN_R1___, KC_SLASH, + /* */ ___NORMAN_R2___, KC_MINUS, + KC_RPRN, ___NORMAN_R3___, KC_RSFT, + + ___ERGODOX_BOTTOM_RIGHT___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [DVORAK_ON_BEPO] = LAYOUT_wrapper( + // left hand + DB_GRV, ___NUMBER_BEPO_L___, DEF_OS_LAYER_SW, + KC_LOCK, ___DVORAK_FR_L1___, DB_LBRC, + TAB_BKTAB, ___DVORAK_FR_L2___, + KC_LSFT, ___DVORAK_FR_L3___, DB_LPRN, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + + // right hand + MDIA_SYMB, ___NUMBER_BEPO_R___, DB_EQL, + DB_RBRC, ___DVORAK_FR_R1___, DB_SLASH, + + /* */ ___DVORAK_FR_R2___, DB_MINUS, + DB_RPRN, ___DVORAK_FR_R3___, KC_RSFT, + + ___ERGODOX_BOTTOM_RIGHT_FR___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [XMONAD_FR] = LAYOUT_wrapper( + // left hand + ___, ___FUNC_L___, ___, + ___, ___DVORAK_FR_L1___, ___, + ___, ___DVORAK_FR_L2___, + ___, ___DVORAK_FR_L3___, ___, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + + // right hand + ___, ___FUNC_R___, ___, + ___, ___DVORAK_FR_R1___, ___, + /**/ ___DVORAK_FR_R2___, ___, + ___, ___DVORAK_FR_R3___, ___, + + ___ERGODOX_BOTTOM_RIGHT_FR___, + ___ERGODOX_THUMB_RIGHT___ + ), + + [BEPO] = LAYOUT_wrapper ( + // Left hand + BP_DLR, ___SYMBOL_BEPO_L___, DEF_OS_LAYER_SW, + KC_LOCK, ___BEPO_FR_L1___, DB_LBRC, + TAB_BKTAB, ___BEPO_FR_L2___, + BP_SFT_T_ECRC, ___BEPO_FR_L3___, DB_RBRC, + + ___ERGODOX_BOTTOM_LEFT___, + ___ERGODOX_THUMB_LEFT___, + + + // Right hand + MDIA_SYMB, ___SYMBOL_BEPO_R___, BP_EQL, + BP_DCRC, ___BEPO_FR_R1___, BP_W, + /* */ ___BEPO_FR_R2___, BP_CCED, + BP_C, ___BEPO_FR_R3___, KC_RSFT, + + ___ERGODOX_BOTTOM_RIGHT___, + ___ERGODOX_THUMB_RIGHT___ + ), + + // SYMBOLS + [SYMB] = LAYOUT_wrapper( + // left hand + ___, ___FUNC_L___, ___, + ___, ___SYMBOLS_1___, ___, + ___, ___SYMBOLS_2___, + ___, ___SYMBOLS_3___, ___, + + ___ERGODOX_TRANS_BOTTOM___, + ___ERGODOX_TRANS_THUMBS___, + + + // right hand + ___, ___FUNC_R___, KC_F11, + ___, KC_UP, ___KEYPAD_1___, KC_F12, + /**/ KC_DOWN, ___KEYPAD_2___, KC_TRNS, + ___, KC_AMPR, ___KEYPAD_3___, KC_PENT, + /* */ ___KEYPAD_4___, ___, + + ___ERGODOX_TRANS_THUMBS___ + ), + + [SYMB_ON_BEPO] = LAYOUT_wrapper( + // left hand + ___, ___FUNC_L___, ___, + ___, ___SYMBOLS_1_BP___, ___, + ___, ___SYMBOLS_2_BP___, + ___, ___SYMBOLS_3_BP___, ___, + + ___ERGODOX_TRANS_BOTTOM___, + ___ERGODOX_TRANS_THUMBS___, + + + // right hand + ___, ___FUNC_R___, KC_F11, + ___, KC_UP, ___KEYPAD_1_BP___, KC_F12, + /**/ KC_DOWN, ___KEYPAD_2_BP___, KC_TRNS, + ___, KC_AMPR, ___KEYPAD_3_BP___, KC_PENT, + /* */ ___KEYPAD_4_BP___, ___, + + ___ERGODOX_TRANS_THUMBS___ + ), + + // MEDIA AND MOUSE + [MDIA] = LAYOUT_wrapper( + // left hand + ___, ___FUNC_L___, ___, + ___MOUSE_BTNS_L___, ___, ___, + ___, ___MOUSE_LDUR___, ___, + ___, ___MWHEEL_LDUR___, XXX, ___, + ___, ___, ___MOUSE_ACCL_012___, + ___ERGODOX_TRANS_THUMBS___, + + // right hand + ___, ___FUNC_R___, KC_F11, + KC_VOLU, ___, ___MUTE_PLAY_STOP___, ___, KC_F12, + /* */ KC_PGUP, ___VI_ARROWS___, ___, + KC_VOLD, KC_PGDN, ___MOUSE_BTNS_R___, + ___ERGODOX_TRANS_BOTTOM___, + ___ERGODOX_TRANS_THUMBS___ + ), + + [LAYERS] = LAYOUT_wrapper( + // left hand + ___, ___FUNC_L___, ___, + XXX, XXX, XXX, ___LAYERS_L1___, XXX, XXX, + XXX, XXX, XXX, ___LAYERS_L2___, XXX, + XXX, XXX, ___LAYERS_L3___, XXX, XXX, + ___, ___, ___LAYERS_L4___, + ___ERGODOX_TRANS_THUMBS___, + + // right hand + ___, ___FUNC_R___, KC_F11, + KC_VOLU, ___, ___MUTE_PLAY_STOP___, ___, KC_F12, + /* */ KC_PGUP, ___VI_ARROWS___, ___, + KC_VOLD, KC_PGDN, ___MOUSE_BTNS_R___, + ___ERGODOX_TRANS_BOTTOM___, + ___ERGODOX_TRANS_THUMBS___ + ), +}; + + + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + if(!on_qwerty()) + ergodox_right_led_1_on(); + switch (layer) { + //case DVORAK: + //ergodox_right_led_1_off(); + //break; + // first led on for a bepo software keyboard layer + case DVORAK_ON_BEPO: + ergodox_right_led_2_on(); + break; + case BEPO: + ergodox_right_led_1_on(); + ergodox_right_led_1_off(); + ergodox_right_led_1_on(); + ergodox_right_led_1_off(); + ergodox_right_led_1_on(); + break; + case SYMB: + ergodox_right_led_3_on(); + break; + case MDIA: + ergodox_right_led_3_on(); + break; + case LAYERS: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); + break; + default: + ergodox_board_led_off(); + break; + + /* default: */ + /* // none */ + /* break; */ + + } +} + + +/* + clear_oneshot_mods(); + set_oneshot_locked_mods(mods); + register_mods(mods); + + register_code(action.key.code); + unregister_code(action.key.code); + + layer_on(action.layer_tap.val); + layer_off(action.layer_tap.val); + + clear_oneshot_locked_mods(); + clear_oneshot_mods(); + unregister_mods(mods); + +*/ diff --git a/keyboards/ergodox_ez/keymaps/ericgebhart/readme.md b/keyboards/ergodox_ez/keymaps/ericgebhart/readme.md new file mode 100644 index 0000000000..4f71bf39ee --- /dev/null +++ b/keyboards/ergodox_ez/keymaps/ericgebhart/readme.md @@ -0,0 +1,5 @@ +Overview +======== + +These are my ergodox_ez keymaps. There isn't much here. Go take a look at my Userspace readme. +That's where all the code is. -- cgit v1.2.3 From 85efa35502beb878bf93136debd37506248ec939 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 8 Jun 2018 10:35:51 -0700 Subject: DZ60: Add LAYOUT_directional_625_space (#3148) --- keyboards/dz60/dz60.h | 14 +++++++++++- keyboards/dz60/info.json | 58 ++++++++++++++++++++++++++---------------------- 2 files changed, 44 insertions(+), 28 deletions(-) (limited to 'keyboards') diff --git a/keyboards/dz60/dz60.h b/keyboards/dz60/dz60.h index af8082da55..32fc1c99d0 100644 --- a/keyboards/dz60/dz60.h +++ b/keyboards/dz60/dz60.h @@ -105,6 +105,18 @@ { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, KC_NO, K413, K414 } \ } - +#define LAYOUT_directional_625_space( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014, \ + K100, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114, \ + K200, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, \ + K300, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314, \ + K400, K401, K403, K406, K410, K411, K412, K413, K414 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, K010, K011, K012, K013, K014 }, \ + { K100, KC_NO, K102, K103, K104, K105, K106, K107, K108, K109, K110, K111, K112, K113, K114 }, \ + { K200, KC_NO, K202, K203, K204, K205, K206, K207, K208, K209, K210, K211, K212, K213, KC_NO }, \ + { K300, KC_NO, K302, K303, K304, K305, K306, K307, K308, K309, K310, K311, K312, K313, K314 }, \ + { K400, K401, KC_NO, K403, KC_NO, KC_NO, K406, KC_NO, KC_NO, KC_NO, K410, K411, K412, K413, K414 } \ +} #endif diff --git a/keyboards/dz60/info.json b/keyboards/dz60/info.json index f02ecb8439..42d8941119 100644 --- a/keyboards/dz60/info.json +++ b/keyboards/dz60/info.json @@ -1,36 +1,40 @@ { - "keyboard_name": "DZ60", - "url": "", - "maintainer": "qmk", - "width": 15, - "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":"~", "x":13, "y":0}, {"label":"Del", "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":"|", "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":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":"Fn", "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] - }, + "keyboard_name": "DZ60", + "url": "", + "maintainer": "qmk", + "width": 15, + "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":"~", "x":13, "y":0}, {"label":"Del", "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":"|", "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":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":"Fn", "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, - "LAYOUT_hhkb": { - "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":"~", "x":13, "y":0}, {"label":"Del", "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "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":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":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}] - }, + "LAYOUT_hhkb": { + "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":"~", "x":13, "y":0}, {"label":"Del", "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "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":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":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}] + }, - "LAYOUT_true_hhkb": { - "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":"~", "x":13, "y":0}, {"label":"Del", "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "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":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":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}] - }, + "LAYOUT_true_hhkb": { + "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":"~", "x":13, "y":0}, {"label":"Del", "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":"|", "x":13.5, "y":1, "w":1.5}, {"label":"Ctrl", "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":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":"Fn", "x":14, "y":3}, {"label":"Alt", "x":1.5, "y":4}, {"x":2.5, "y":4, "w":1.5}, {"x":4, "y":4, "w":6}, {"x":10, "y":4, "w":1.5}, {"label":"Alt", "x":11.5, "y":4}] + }, - "LAYOUT_2_shifts": { - "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":"Del", "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":"|", "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}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] - }, + "LAYOUT_2_shifts": { + "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":"Del", "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":"|", "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}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, - "LAYOUT_directional": { - "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":"Del", "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":"|", "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}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] - }, + "LAYOUT_directional": { + "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":"Del", "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":"|", "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}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"label":"Fn", "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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, - "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}, {"x":13, "y":0}, {"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":"|", "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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] - }, + "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}, {"x":13, "y":0}, {"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":"|", "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}, {"x":12.75, "y":2}, {"label":"Enter", "x":13.75, "y":2, "w":1.25}, {"label":"Shift", "x":0, "y":3}, {"x":1, "y":3}, {"label":"Z", "x":2, "y":3}, {"label":"X", "x":3, "y":3}, {"label":"C", "x":4, "y":3}, {"label":"V", "x":5, "y":3}, {"label":"B", "x":6, "y":3}, {"label":"N", "x":7, "y":3}, {"label":"M", "x":8, "y":3}, {"label":"<", "x":9, "y":3}, {"label":">", "x":10, "y":3}, {"label":"?", "x":11, "y":3}, {"label":"Shift", "x":12, "y":3}, {"x":13, "y":3}, {"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":2.25}, {"x":6, "y":4, "w":1.25}, {"x":7.25, "y":4, "w":2.75}, {"x":10, "y":4}, {"label":"Alt", "x":11, "y":4}, {"label":"Win", "x":12, "y":4}, {"label":"Menu", "x":13, "y":4}, {"label":"Ctrl", "x":14, "y":4}] + }, - "LAYOUT_60_ansi": { - "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_ansi": { + "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_directional_625_space": { + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K004", "x":4, "y":0}, {"label":"K005", "x":5, "y":0}, {"label":"K006", "x":6, "y":0}, {"label":"K007", "x":7, "y":0}, {"label":"K008", "x":8, "y":0}, {"label":"K009", "x":9, "y":0}, {"label":"K010", "x":10, "y":0}, {"label":"K011", "x":11, "y":0}, {"label":"K012", "x":12, "y":0}, {"label":"K013", "x":13, "y":0}, {"label":"K014", "x":14, "y":0}, {"label":"K100", "x":0, "y":1, "w":1.5}, {"label":"K102", "x":1.5, "y":1}, {"label":"K103", "x":2.5, "y":1}, {"label":"K104", "x":3.5, "y":1}, {"label":"K105", "x":4.5, "y":1}, {"label":"K106", "x":5.5, "y":1}, {"label":"K107", "x":6.5, "y":1}, {"label":"K108", "x":7.5, "y":1}, {"label":"K109", "x":8.5, "y":1}, {"label":"K110", "x":9.5, "y":1}, {"label":"K111", "x":10.5, "y":1}, {"label":"K112", "x":11.5, "y":1}, {"label":"K113", "x":12.5, "y":1}, {"label":"K114", "x":13.5, "y":1, "w":1.5}, {"label":"K200", "x":0, "y":2, "w":1.75}, {"label":"K202", "x":1.75, "y":2}, {"label":"K203", "x":2.75, "y":2}, {"label":"K204", "x":3.75, "y":2}, {"label":"K205", "x":4.75, "y":2}, {"label":"K206", "x":5.75, "y":2}, {"label":"K207", "x":6.75, "y":2}, {"label":"K208", "x":7.75, "y":2}, {"label":"K209", "x":8.75, "y":2}, {"label":"K210", "x":9.75, "y":2}, {"label":"K211", "x":10.75, "y":2}, {"label":"K212", "x":11.75, "y":2}, {"label":"K213", "x":12.75, "y":2, "w":2.25}, {"label":"K300", "x":0, "y":3, "w":2}, {"label":"K301", "x":2, "y":3}, {"label":"K302", "x":3, "y":3}, {"label":"K303", "x":4, "y":3}, {"label":"K304", "x":5, "y":3}, {"label":"K305", "x":6, "y":3}, {"label":"K306", "x":7, "y":3}, {"label":"K307", "x":8, "y":3}, {"label":"K308", "x":9, "y":3}, {"label":"K309", "x":10, "y":3}, {"label":"K310", "x":11, "y":3}, {"label":"K312", "x":12, "y":3}, {"label":"K313", "x":13, "y":3}, {"label":"K314", "x":14, "y":3}, {"label":"K400", "x":0, "y":4, "w":1.25}, {"label":"K401", "x":1.25, "y":4, "w":1.25}, {"label":"K403", "x":2.5, "y":4, "w":1.25}, {"label":"K406", "x":3.75, "y":4, "w":6.25}, {"label":"K410", "x":10, "y":4}, {"label":"K411", "x":11, "y":4}, {"label":"K412", "x":12, "y":4}, {"label":"K413", "x":13, "y":4}, {"label":"K414", "x":14, "y":4}] } + } } -- cgit v1.2.3 From e08139b79c8921fbfe26860113d7cac2348a6f54 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Fri, 8 Jun 2018 10:58:12 -0700 Subject: Ergo42: Refactor and Configurator support (#3150) * Refactor * Configurator support * Switch macro names around --- keyboards/ergo42/ergo42.h | 6 +- keyboards/ergo42/info.json | 13 ++ keyboards/ergo42/keymaps/biacco-macOS/keymap.c | 151 ++++++++--------- keyboards/ergo42/keymaps/biacco/keymap.c | 151 ++++++++--------- .../ergo42/keymaps/default-illustrator/keymap.c | 188 ++++++++++----------- keyboards/ergo42/keymaps/default/keymap.c | 108 ++++++------ keyboards/ergo42/keymaps/hdbx/keymap.c | 185 ++++++++++---------- keyboards/ergo42/rev1/rev1.h | 6 +- 8 files changed, 399 insertions(+), 409 deletions(-) create mode 100644 keyboards/ergo42/info.json (limited to 'keyboards') diff --git a/keyboards/ergo42/ergo42.h b/keyboards/ergo42/ergo42.h index 5e4343cf0b..faa8170ef9 100644 --- a/keyboards/ergo42/ergo42.h +++ b/keyboards/ergo42/ergo42.h @@ -9,19 +9,19 @@ // Used to create a keymap using only KC_ prefixed keys -#define KC_KEYMAP( \ +#define LAYOUT_kc_ortho_4x14( \ 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 \ ) \ - KEYMAP( \ + LAYOUT( \ KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##L06, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, KC_##R06, \ KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##L16, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, KC_##R16, \ KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##L26, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, KC_##R26, \ KC_##L30, KC_##L31, KC_##L32, KC_##L33, KC_##L34, KC_##L35, KC_##L36, KC_##R30, KC_##R31, KC_##R32, KC_##R33, KC_##R34, KC_##R35, KC_##R36 \ ) -#define KC_LAYOUT_ortho_4x14 KC_KEYMAP +#define LAYOUT_kc LAYOUT_kc_ortho_4x14 #endif diff --git a/keyboards/ergo42/info.json b/keyboards/ergo42/info.json new file mode 100644 index 0000000000..6489e25a80 --- /dev/null +++ b/keyboards/ergo42/info.json @@ -0,0 +1,13 @@ +{ + "keyboard_name": "Ergo42", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 4, + "layouts": { + "LAYOUT_ortho_4x14": { + "key_count": 56, + "layout": [{"label":"L00", "x":0, "y":0}, {"label":"L01", "x":1, "y":0}, {"label":"L02", "x":2, "y":0}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0}, {"label":"L05", "x":5, "y":0}, {"label":"L06", "x":6, "y":0}, {"label":"R00", "x":8, "y":0}, {"label":"R01", "x":9, "y":0}, {"label":"R02", "x":10, "y":0}, {"label":"R03", "x":11, "y":0}, {"label":"R04", "x":12, "y":0}, {"label":"R05", "x":13, "y":0}, {"label":"R06", "x":14, "y":0}, {"label":"L10", "x":0, "y":1}, {"label":"L11", "x":1, "y":1}, {"label":"L12", "x":2, "y":1}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1}, {"label":"L15", "x":5, "y":1}, {"label":"L16", "x":6, "y":1}, {"label":"R10", "x":8, "y":1}, {"label":"R11", "x":9, "y":1}, {"label":"R12", "x":10, "y":1}, {"label":"R13", "x":11, "y":1}, {"label":"R14", "x":12, "y":1}, {"label":"R15", "x":13, "y":1}, {"label":"R16", "x":14, "y":1}, {"label":"L20", "x":0, "y":2}, {"label":"L21", "x":1, "y":2}, {"label":"L22", "x":2, "y":2}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2}, {"label":"L25", "x":5, "y":2}, {"label":"L26", "x":6, "y":2}, {"label":"R20", "x":8, "y":2}, {"label":"R21", "x":9, "y":2}, {"label":"R22", "x":10, "y":2}, {"label":"R23", "x":11, "y":2}, {"label":"R24", "x":12, "y":2}, {"label":"R25", "x":13, "y":2}, {"label":"R26", "x":14, "y":2}, {"label":"L30", "x":0, "y":3}, {"label":"L31", "x":1, "y":3}, {"label":"L32", "x":2, "y":3}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":4, "y":3}, {"label":"L35", "x":5, "y":3}, {"label":"L36", "x":6, "y":3}, {"label":"R30", "x":8, "y":3}, {"label":"R31", "x":9, "y":3}, {"label":"R32", "x":10, "y":3}, {"label":"R33", "x":11, "y":3}, {"label":"R34", "x":12, "y":3}, {"label":"R35", "x":13, "y":3}, {"label":"R36", "x":14, "y":3}] + } + } +} diff --git a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c index 559551fd63..7d897abbf8 100644 --- a/keyboards/ergo42/keymaps/biacco-macOS/keymap.c +++ b/keyboards/ergo42/keymaps/biacco-macOS/keymap.c @@ -1,6 +1,4 @@ -#include "ergo42.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -15,84 +13,81 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |Cmd |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ + /* BASE + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |Cmd |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [BASE] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), GUI_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + ), -[BASE] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), GUI_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ -), + /* META + * ,------------------------------------------------. ,------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |Ctrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [META] = LAYOUT( \ + 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \ + ), -/* META - * ,------------------------------------------------. ,------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |Ctrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ + /* SYMB + * ,------------------------------------------------. ,------------------------------------------------. + * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | | | | | | ( | | ) | | | | | + | * | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | | | | | | { | | } | | | < | > | ? | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |Ctrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [SYMB] = LAYOUT( \ + S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), -[META] = KEYMAP( \ - 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ - _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \ -), - -/* SYMB - * ,------------------------------------------------. ,------------------------------------------------. - * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | | | | | | ( | | ) | | | | | + | * | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | | | | | | { | | } | | | < | > | ? | \ | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |Ctrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ - -[SYMB] = KEYMAP( \ - S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* GAME - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | | | | | |Space | | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ -[GAME] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ -) + /* GAME + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | | | | | |Space | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [GAME] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + ) }; diff --git a/keyboards/ergo42/keymaps/biacco/keymap.c b/keyboards/ergo42/keymaps/biacco/keymap.c index 704cd47e1f..c567e5c758 100644 --- a/keyboards/ergo42/keymaps/biacco/keymap.c +++ b/keyboards/ergo42/keymaps/biacco/keymap.c @@ -1,6 +1,4 @@ -#include "ergo42.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -15,84 +13,81 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ + /* BASE + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [BASE] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ + ), -[BASE] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(SYMB), KC_JYEN \ -), + /* META + * ,------------------------------------------------. ,------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [META] = LAYOUT( \ + 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \ + ), -/* META - * ,------------------------------------------------. ,------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ + /* SYMB + * ,------------------------------------------------. ,------------------------------------------------. + * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | | | | | | ( | | ) | | | | | + | * | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | | | | | | { | | } | | | < | > | ? | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [SYMB] = LAYOUT( \ + S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), -[META] = KEYMAP( \ - 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ - _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, _______, _______, _______ \ -), - -/* SYMB - * ,------------------------------------------------. ,------------------------------------------------. - * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | | | | | | ( | | ) | | | | | + | * | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | | | | | | { | | } | | | < | > | ? | \ | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ - -[SYMB] = KEYMAP( \ - S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -), - -/* GAME - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |PrtSc | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ | - * | | | | | | | | |Space | | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ -[GAME] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ -) + /* GAME + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |PrtSc | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME|=>SYMB| \ | + * | | | | | | | | |Space | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [GAME] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, KC_PSCR, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, _______, KC_JYEN \ + ) }; diff --git a/keyboards/ergo42/keymaps/default-illustrator/keymap.c b/keyboards/ergo42/keymaps/default-illustrator/keymap.c index f46dbc4b8d..9e0f7fb2e9 100644 --- a/keyboards/ergo42/keymaps/default-illustrator/keymap.c +++ b/keyboards/ergo42/keymaps/default-illustrator/keymap.c @@ -1,6 +1,4 @@ -#include "ergo42.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -16,104 +14,100 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |=>ILST|ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>ILST| \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ + /* BASE + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |=>ILST|ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc |=>GAME|=>ILST| \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [BASE] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, TG(ILLUST), LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(ILLUST), KC_JYEN \ + ), -[BASE] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, TG(ILLUST), LT(SYMB, KC_ESC), RCTL_T(KC_SPC), SFT_T(KC_TAB), KC_BSPC, LT(META, KC_ENT), KC_DELT, KC_PSCR, TG(GAME), TG(ILLUST), KC_JYEN \ -), + /* META + * ,------------------------------------------------. ,------------------------------------------------. + * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App | |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset | | | \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [META] = LAYOUT( \ + 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ + _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, XXXXXXX, _______ \ + ), -/* META - * ,------------------------------------------------. ,------------------------------------------------. - * | 1 | 2 | 3 | 4 | 5 | 6 | [ | | ] | 7 | 8 | 9 | 0 | - | ^ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | F1 | |Muhen | Henk | | ( | | ) | Left | Down | Up |Right | | | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App | |ESC/ |Space/|Tab/ | |Back |Enter/| Del |Reset | | | \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ + /* SYMB + * ,------------------------------------------------. ,------------------------------------------------. + * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | | | | | | ( | | ) | | | | | + | * | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | | | | | | { | | } | | | < | > | ? | \ | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App | |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc | | | \ | + * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [SYMB] = LAYOUT( \ + S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ + _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______ \ + ), -[META] = KEYMAP( \ - 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_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, \ - _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, SFT_T(KC_RO), \ - _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, RESET, XXXXXXX, XXXXXXX, _______ \ -), + /* GAME + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App | | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME| | \ | + * | | | | | | | | |Space | | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [GAME] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ + KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ + KC_LCTRL, KC_LGUI, KC_APP, XXXXXXX, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, XXXXXXX, KC_JYEN \ + ), -/* SYMB - * ,------------------------------------------------. ,------------------------------------------------. - * | ! | " | # | $ | % | & | [ | | ] | ' | ( | ) | ~ | = | ~ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | | | | | | ( | | ) | | | | | + | * | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | | | | | | { | | } | | | < | > | ? | \ | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App | |ESC/ |Space/|Tab/ | |Back |Enter/| Del |PrtSc | | | \ | - * | | | | |~SYMB |RCtrl |Shift | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ - -[SYMB] = KEYMAP( \ - S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), S(KC_6), _______, _______, S(KC_7), S(KC_8), S(KC_9), S(KC_0), S(KC_MINS), S(KC_EQL), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_SCLN), S(KC_QUOT), \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, S(KC_COMM), S(KC_DOT), S(KC_SLSH), S(KC_RO), \ - _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______ \ -), - -/* GAME - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | Q | W | E | R | T | [ | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | A | S | D | F | G | ( | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | { | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App | | ESC |Space |Tab | |Back |Enter | Del |PrtSc |=>GAME| | \ | - * | | | | | | | | |Space | | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ -[GAME] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_RBRC, KC_BSLS, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, \ - KC_LALT, KC_A, KC_S, KC_D, KC_F, KC_G, S(KC_8), S(KC_9), KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, S(KC_RBRC), S(KC_BSLS), KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_T(KC_RO), \ - KC_LCTRL, KC_LGUI, KC_APP, XXXXXXX, KC_ESC, KC_SPC, KC_TAB, KC_BSPC, KC_ENT, KC_DELT, KC_PSCR, _______, XXXXXXX, KC_JYEN \ -), - -/* ILLUST - * ,------------------------------------------------. ,------------------------------------------------. - * | Tab | H | G | I | P | C+J | C+] | | ] | Y | U | I | O | P | @ | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Alt | R | S | A | V |Sft+W | C+[ | | ) | H | J | K | L | ; | : | - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | Sft | Z | X | C | V | B | F | | } | N | M | , | . | / |\/Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | Ctrl | GUI | App |=>ILST| ESC | Ctrl | Del | |Back |Enter/| Del |PrtSc |=>GAME|=>ILST| \ | - * | | | | | | | | |Space |~META | | | | | | - * `------------------------------------------------' `------------------------------------------------' - */ - -[ILLUST] = KEYMAP( \ - KC_TAB, KC_H, KC_G, KC_I, KC_P, LCTL(KC_J), LCTL(KC_BSLS), _______, _______, _______, _______, _______, _______, _______, \ - KC_LALT, KC_R, KC_S, KC_A, KC_V, S(KC_W), LCTL(KC_RBRC), _______, _______, _______, _______, _______, _______, _______, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F, _______, _______, _______, _______, _______, _______, _______, \ - KC_LCTRL, KC_LGUI, KC_APP, _______, KC_ESC, KC_RCTL, KC_DELT, _______, _______, _______, _______, XXXXXXX, _______, _______ \ -) + /* ILLUST + * ,------------------------------------------------. ,------------------------------------------------. + * | Tab | H | G | I | P | C+J | C+] | | ] | Y | U | I | O | P | @ | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Alt | R | S | A | V |Sft+W | C+[ | | ) | H | J | K | L | ; | : | + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | Sft | Z | X | C | V | B | F | | } | N | M | , | . | / |\/Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | Ctrl | GUI | App |=>ILST| ESC | Ctrl | Del | |Back |Enter/| Del |PrtSc |=>GAME|=>ILST| \ | + * | | | | | | | | |Space |~META | | | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [ILLUST] = LAYOUT( \ + KC_TAB, KC_H, KC_G, KC_I, KC_P, LCTL(KC_J), LCTL(KC_BSLS), _______, _______, _______, _______, _______, _______, _______, \ + KC_LALT, KC_R, KC_S, KC_A, KC_V, S(KC_W), LCTL(KC_RBRC), _______, _______, _______, _______, _______, _______, _______, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F, _______, _______, _______, _______, _______, _______, _______, \ + KC_LCTRL, KC_LGUI, KC_APP, _______, KC_ESC, KC_RCTL, KC_DELT, _______, _______, _______, _______, XXXXXXX, _______, _______ \ + ) }; diff --git a/keyboards/ergo42/keymaps/default/keymap.c b/keyboards/ergo42/keymaps/default/keymap.c index c06cda5db6..ced239c84b 100644 --- a/keyboards/ergo42/keymaps/default/keymap.c +++ b/keyboards/ergo42/keymaps/default/keymap.c @@ -1,6 +1,4 @@ -#include "ergo42.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H extern keymap_config_t keymap_config; @@ -15,61 +13,59 @@ extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE - * ,------------------------------------------------. ,------------------------------------------------. - * | ESC | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | Bksp | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Del | RCtrl| A | S | D | F | G | | H | J | K | L | ; | ] | Enter| - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | SYMB | LSft | Z | X | C | V | B | | N | M | , | . | / | UP | RSft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | LEFT | DOWN | RIGHT| - * `------------------------------------------------' `------------------------------------------------' - */ + /* BASE + * ,------------------------------------------------. ,------------------------------------------------. + * | ESC | Tab | Q | W | E | R | T | | Y | U | I | O | P | [ | Bksp | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Del | RCtrl| A | S | D | F | G | | H | J | K | L | ; | ] | Enter| + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | SYMB | LSft | Z | X | C | V | B | | N | M | , | . | / | UP | RSft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | LEFT | DOWN | RIGHT| + * `------------------------------------------------' `------------------------------------------------' + */ + [BASE] = LAYOUT( \ + KC_ESC, 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_BSPC, \ + KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RBRC, KC_ENT, \ + MO(SYMB), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ + MO(META), KC_LCTL, KC_GRV, KC_BSLS, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_QUOT, KC_MINS, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT \ + ), -[BASE] = KEYMAP( \ - KC_ESC, 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_BSPC, \ - KC_DELT, KC_RCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_RBRC, KC_ENT, \ - MO(SYMB), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_UP, KC_RSFT, \ - MO(META), KC_LCTL, KC_GRV, KC_BSLS, KC_LALT, KC_LGUI, KC_SPC, KC_SPC, KC_QUOT, KC_MINS, KC_EQL, KC_LEFT, KC_DOWN, KC_RGHT \ -), + /* META + * ,------------------------------------------------. ,------------------------------------------------. + * | Reset| 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Del | F1 | |Muhen | Henk | | | | Left | Down | Up |Right | | | Enter| + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | SYMB | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 | F12 | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | | | | + * `------------------------------------------------' `------------------------------------------------' + */ + [META] = LAYOUT( \ + RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ + _______, KC_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, _______, \ + _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_LBRC), S(KC_RBRC), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX \ + ), -/* META - * ,------------------------------------------------. ,------------------------------------------------. - * | Reset| 1 | 2 | 3 | 4 | 5 | [ | | ] | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Del | F1 | |Muhen | Henk | | | | Left | Down | Up |Right | | | Enter| - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | SYMB | F2 | F3 | F4 | F5 | F6 | { | | } | F7 | F8 | F9 | F10 | F11 | F12 | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | | | | - * `------------------------------------------------' `------------------------------------------------' - */ + /* SYMB + * ,------------------------------------------------. ,------------------------------------------------. + * | ESC | ! | @ | # | $ | % | [ | | ] | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| + * | Del | | | | | | ( | | ) | | | | | | Enter| + * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| + * | SYMB | | | | | | { | | } | | | | | UP | Sft | + * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | LEFT | DOWN | RIGHT| + * `------------------------------------------------' `------------------------------------------------' + */ + [SYMB] = LAYOUT( \ + _______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), KC_LBRC, KC_RBRC, S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_9), S(KC_0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_LBRC), S(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ) -[META] = KEYMAP( \ - RESET, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LBRC, KC_RBRC, KC_6, KC_7, KC_8, KC_9, KC_0, _______, \ - _______, KC_F1, XXXXXXX, KC_MHEN, KC_HENK, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, XXXXXXX, XXXXXXX, _______, \ - _______, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, S(KC_LBRC), S(KC_RBRC), KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX \ -), - -/* SYMB - * ,------------------------------------------------. ,------------------------------------------------. - * | ESC | ! | @ | # | $ | % | [ | | ] | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+------+------| |-------------+------+------+------+------+------| - * | Del | | | | | | ( | | ) | | | | | | Enter| - * |------+------+------+------+------+------+------| |------|------+------+------+------+------+------| - * | SYMB | | | | | | { | | } | | | | | UP | Sft | - * |------+------+------+------+------+------+------| |------+------+------+------+------+------+------| - * | META | LCtrl| ` | \ | LAlt | LGUI |Space | |Space | ' | - | = | LEFT | DOWN | RIGHT| - * `------------------------------------------------' `------------------------------------------------' - */ - -[SYMB] = KEYMAP( \ - _______, S(KC_1), S(KC_2), S(KC_3), S(KC_4), S(KC_5), KC_LBRC, KC_RBRC, S(KC_6), S(KC_7), S(KC_8), S(KC_9), S(KC_0), _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_9), S(KC_0), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, S(KC_LBRC), S(KC_RBRC), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, \ - _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ -) }; diff --git a/keyboards/ergo42/keymaps/hdbx/keymap.c b/keyboards/ergo42/keymaps/hdbx/keymap.c index 6a7430e499..b7bddd5531 100644 --- a/keyboards/ergo42/keymaps/hdbx/keymap.c +++ b/keyboards/ergo42/keymaps/hdbx/keymap.c @@ -1,9 +1,7 @@ // WindowsでJIS配列として認識しているときに、US配列として使うためのキーマップ // @leopard_gecko さんがPlanck用に作成されたキーマップをかなり参考にしています。 -#include "ergo42.h" -#include "action_layer.h" -#include "eeconfig.h" +#include QMK_KEYBOARD_H #include "keymap_jp.h" // qmk_firmware-master/quantum/keymap_extras/keymap_jp.h 日本語キーボード設定用 #include // macro sendstring for jis keyboard マクロ文字列送信時に日本語キーボード設定での文字化け回避 @@ -45,97 +43,96 @@ enum custom_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY // WindowsでJIS配列時のデフォルトキーマップ - * ,-------------------------------------------------------. ,-------------------------------------------------------. - * |Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * |ZH/Ctrl| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * |WN CAPS| GUI | \ | Esc |無変換 | Enter | Del | | End | Space | 変換 | Left | Down | Up | Right | - * | | | | | LOWER | | | | | | RAISE | | | | | - * `-------------------------------------------------------' `-------------------------------------------------------' - */ -[_QWERTY] = KEYMAP( \ - KC_ALTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, JP_TILD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - CTL_ZH, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LPRN, JP_RPRN, KC_H, KC_J, KC_K, KC_L, WN_SCLN, JP_QUOT, \ - KC_LSLB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSRB, \ - WN_CAPS, KC_LGUI, JP_YEN, KC_ESC, KC_LOWR, KC_ENT, KC_DEL, KC_END, KC_SPC, KC_RASE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* LOWER // 数字入力用レイヤー - * ,-------------------------------------------------------. ,-------------------------------------------------------. - * | | 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | . | = | | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | + | * | Shift | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | | |XXXXXXX| | | | | | | 0 | | | | | | - * `-------------------------------------------------------' `-------------------------------------------------------' - */ -[_LOWER] = KEYMAP( \ - _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_ESC, KC_7, KC_8, KC_9, KC_PDOT, JP_EQL, _______, \ - _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \ - KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \ - _______, _______, XXXXXXX, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______ \ -), - -/* RAISE // 記号入力用レイヤー - * ,-------------------------------------------------------. ,-------------------------------------------------------. - * | | ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift |M-PLAY |M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | | |PageDwn| | | | | | | - * `-------------------------------------------------------' `-------------------------------------------------------' - */ -[_RAISE] = KEYMAP( \ - _______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \ - _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \ - KC_LSFT, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ - _______, _______, JP_PIPE, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \ -), - -/* GAME // 左手はゲーム用レイヤー、右手はNumPad - * ,-------------------------------------------------------. ,-------------------------------------------------------. - * | Tab | Q | W | E | R | T |PrntScr| | Esc | 7 | 8 | 9 | . | = | BSPC | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Ctrl | A | S | D | F | G | F1 | | F2 | 4 | 5 | 6 | - | / | Enter | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift | Z | X | C | V | B | F2 | | Home | 1 | 2 | 3 | + | * | Shift | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Del | GUI | Alt | Esc | LOWER | Space | Enter | | End | 0 | RAISE | Left | Down | Up | Right | - * `-------------------------------------------------------' `-------------------------------------------------------' - */ -[_GAME] = KEYMAP( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ALPS, KC_ESC, KC_P7, KC_P8, KC_P9, KC_PDOT, JP_EQL, KC_BSPC, \ - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \ - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \ - KC_DEL, KC_LGUI, KC_LALT, KC_ESC, LOWER, KC_SPC, KC_ENT, KC_PGDN, KC_P0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), - -/* ADJUST // 設定用レイヤー (LOWER+RAISE) - * ,-------------------------------------------------------. ,-------------------------------------------------------. - * |RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC | - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | RESET | | | | | | | |XXXXXXX|XXXXXXX|QWERTY | GAME |XXXXXXX|XXXXXXX|XXXXXXX| - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | Shift | | | | | | | |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| - * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| - * | DEBUG |XXXXXXX|XXXXXXX| | |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX| | Left | Down | Up | Right | - * `-------------------------------------------------------' `-------------------------------------------------------' - */ - -[_ADJUST] = KEYMAP( \ - RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, KC_BSPC, \ - RESET, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, QWERTY, GAME, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \ - DEBUG, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ -), + /* QWERTY // WindowsでJIS配列時のデフォルトキーマップ + * ,-------------------------------------------------------. ,-------------------------------------------------------. + * |Tab/Alt| Q | W | E | R | T | - | | ~ | Y | U | I | O | P | BSPC | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |ZH/Ctrl| A | S | D | F | G | ( | | ) | H | J | K | L | : | ' | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | [/Sft | Z | X | C | V | B | F2 | | Home | N | M | , | . | / | ]/Sft | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * |WN CAPS| GUI | \ | Esc |無変換 | Enter | Del | | End | Space | 変換 | Left | Down | Up | Right | + * | | | | | LOWER | | | | | | RAISE | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_QWERTY] = LAYOUT( \ + KC_ALTB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_MINS, JP_TILD, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + CTL_ZH, KC_A, KC_S, KC_D, KC_F, KC_G, JP_LPRN, JP_RPRN, KC_H, KC_J, KC_K, KC_L, WN_SCLN, JP_QUOT, \ + KC_LSLB, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSRB, \ + WN_CAPS, KC_LGUI, JP_YEN, KC_ESC, KC_LOWR, KC_ENT, KC_DEL, KC_END, KC_SPC, KC_RASE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* LOWER // 数字入力用レイヤー + * ,-------------------------------------------------------. ,-------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | | Esc | 7 | 8 | 9 | . | = | | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F2 | 4 | 5 | 6 | - | / | Enter | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | Shift | F7 | F8 | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | + | * | Shift | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | | |XXXXXXX| | | | | | | 0 | | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_LOWER] = LAYOUT( \ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_ESC, KC_7, KC_8, KC_9, KC_PDOT, JP_EQL, _______, \ + _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \ + KC_LSFT, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \ + _______, _______, XXXXXXX, _______, _______, _______, _______, _______, KC_0, _______, _______, _______, _______, _______ \ + ), + + /* RAISE // 記号入力用レイヤー + * ,-------------------------------------------------------. ,-------------------------------------------------------. + * | | ! | @ | # | $ | % | _ | | ` | ^ | & | Ins | \ |PrntScr| | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | |XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX|XXXXXXX| { | | } | Left | Down | Up | Right | ; | " | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | Shift |M-PLAY |M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| |PageUp |XXXXXXX|XXXXXXX| < | > | ? | Shift | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | |PageDwn| | | | | | | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_RAISE] = LAYOUT( \ + _______, KC_EXLM, JP_AT, KC_HASH, KC_DLR, KC_PERC, JP_UNDS, JP_GRV, JP_CIRC, JP_AMPR, KC_INS, JP_YEN, KC_ALPS, _______, \ + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, JP_LCBR, JP_RCBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_SCLN, JP_DQT, \ + KC_LSFT, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, KC_PGUP, XXXXXXX, XXXXXXX, KC_LT, KC_GT, KC_QUES, KC_RSFT, \ + _______, _______, JP_PIPE, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______ \ + ), + + /* GAME // 左手はゲーム用レイヤー、右手はNumPad + * ,-------------------------------------------------------. ,-------------------------------------------------------. + * | Tab | Q | W | E | R | T |PrntScr| | Esc | 7 | 8 | 9 | . | = | BSPC | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | Ctrl | A | S | D | F | G | F1 | | F2 | 4 | 5 | 6 | - | / | Enter | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | Shift | Z | X | C | V | B | F2 | | Home | 1 | 2 | 3 | + | * | Shift | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | Del | GUI | Alt | Esc | LOWER | Space | Enter | | End | 0 | RAISE | Left | Down | Up | Right | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_GAME] = LAYOUT( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_ALPS, KC_ESC, KC_P7, KC_P8, KC_P9, KC_PDOT, JP_EQL, KC_BSPC, \ + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_F1, KC_F2, KC_P4, KC_P5, KC_P6, KC_PMNS, KC_PSLS, KC_ENT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_F2, KC_HOME, KC_P1, KC_P2, KC_P3, KC_PPLS, KC_PAST, KC_RSFT, \ + KC_DEL, KC_LGUI, KC_LALT, KC_ESC, LOWER, KC_SPC, KC_ENT, KC_PGDN, KC_P0, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), + + /* ADJUST // 設定用レイヤー (LOWER+RAISE) + * ,-------------------------------------------------------. ,-------------------------------------------------------. + * |RGB_TOG| MCR1 | MCR2 | MCR3 |XXXXXXX|XXXXXXX|XXXXXXX| |XXXXXXX|PLAY_M1|PLAY_M2|REC_M1 |REC_M2 |STP_REC| BSPC | + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | RESET | | | | | | | |XXXXXXX|XXXXXXX|QWERTY | GAME |XXXXXXX|XXXXXXX|XXXXXXX| + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | Shift | | | | | | | |XXXXXXX| M-PLAY|M-MUTE |VOL_DWN|VOL_UP |PREV_TR|NEXT_TR| + * |-------+-------+-------+-------+-------+-------+-------| |-------+-------+-------+-------+-------+-------+-------| + * | DEBUG |XXXXXXX|XXXXXXX| | |XXXXXXX|XXXXXXX| |XXXXXXX|XXXXXXX| | Left | Down | Up | Right | + * `-------------------------------------------------------' `-------------------------------------------------------' + */ + [_ADJUST] = LAYOUT( \ + RGB_TOG, MCR1, MCR2, MCR3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DYN_MACRO_PLAY1, DYN_MACRO_PLAY2, DYN_REC_START1, DYN_REC_START2, DYN_REC_STOP, KC_BSPC, \ + RESET, RGB_MOD, RGB_M_P, RGB_M_B, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, QWERTY, GAME, XXXXXXX, XXXXXXX, XXXXXXX, \ + KC_LSFT, RGB_M_R, RGB_M_SN,RGB_M_G, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPRV, KC_MNXT, \ + DEBUG, XXXXXXX, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + ), }; diff --git a/keyboards/ergo42/rev1/rev1.h b/keyboards/ergo42/rev1/rev1.h index cbb510efb0..64773c911b 100644 --- a/keyboards/ergo42/rev1/rev1.h +++ b/keyboards/ergo42/rev1/rev1.h @@ -20,7 +20,7 @@ #ifndef FLIP_HALF // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) -#define KEYMAP( \ +#define LAYOUT_ortho_4x14( \ 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, \ @@ -39,7 +39,7 @@ #else // Keymap with right side flipped // (TRRS jack on both halves are to the right) -#define KEYMAP( \ +#define LAYOUT_ortho_4x14( \ 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, \ @@ -57,6 +57,6 @@ } #endif -#define LAYOUT_ortho_4x14 KEYMAP +#define LAYOUT LAYOUT_ortho_4x14 #endif -- cgit v1.2.3 From 300cf977c93b9b37a57643ddbfa8d0bd13b29e18 Mon Sep 17 00:00:00 2001 From: Daniel Rose Date: Fri, 8 Jun 2018 22:06:14 +0200 Subject: citadel: new keymap for pegasushoof (#3146) [citadel] Markdown syntax: Added double spaces for line breaking [citadel] Added line breaks for keyboard layout, fixed headings. --- keyboards/pegasushoof/keymaps/citadel/config.h | 14 +++ keyboards/pegasushoof/keymaps/citadel/keymap.c | 128 ++++++++++++++++++++++++ keyboards/pegasushoof/keymaps/citadel/readme.md | 75 ++++++++++++++ keyboards/pegasushoof/keymaps/citadel/rules.mk | 22 ++++ 4 files changed, 239 insertions(+) create mode 100644 keyboards/pegasushoof/keymaps/citadel/config.h create mode 100644 keyboards/pegasushoof/keymaps/citadel/keymap.c create mode 100644 keyboards/pegasushoof/keymaps/citadel/readme.md create mode 100644 keyboards/pegasushoof/keymaps/citadel/rules.mk (limited to 'keyboards') diff --git a/keyboards/pegasushoof/keymaps/citadel/config.h b/keyboards/pegasushoof/keymaps/citadel/config.h new file mode 100644 index 0000000000..e8eafe2e17 --- /dev/null +++ b/keyboards/pegasushoof/keymaps/citadel/config.h @@ -0,0 +1,14 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* overridden settings: */ + +#undef PRODUCT +#define PRODUCT Pegasus Hoof Citadel + +/* necessary option for this keymap, because CAPS is redefined in Layer 0 */ +#define PREVENT_STUCK_MODIFIERS + +#endif diff --git a/keyboards/pegasushoof/keymaps/citadel/keymap.c b/keyboards/pegasushoof/keymaps/citadel/keymap.c new file mode 100644 index 0000000000..382854de9b --- /dev/null +++ b/keyboards/pegasushoof/keymaps/citadel/keymap.c @@ -0,0 +1,128 @@ +/* Copyright 2018 Daniel Rose + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#include "pegasushoof.h" + +/* Allow shortcuts for combos like RALT(KC_RBRC) that don't take up more than 7 characters: */ +#define G(kc) RALT(KC_##kc) +#define A(kc) LALT(KC_##kc) +#define C(kc) LCTL(KC_##kc) +#undef S /* Original shortcut (quantum_keycodes.h) takes full-sized keycodes: too long! */ +#define S(kc) LSFT(KC_##kc) +#define CTALDEL LCTL(LALT(KC_DEL)) + +enum layers { + DEF, + FUN, + RES, +}; + +enum tap_dance { + AF4, +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Layer 0: default layer (ISO-DE) + * .----. .-------------------. .-------------------. .-------------------. .--------------. + * |Esc | |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10 |F11 |F12 | |PrSc|SLck|2Tp:| + * | | | | | | | | | | | | | | | | | |SyRq| |A+F4| + * '----' '-------------------' '-------------------' '-------------------' '--------------' + * .------------------------------------------------------------------------. .--------------. + * |° |! |" |§ |$ |% |& |/ |( |) |= |? |` |Backspa| |Ins |Home|PgUp| + * |^ |1 |2 ²|3 ³|4 |5 |6 |7 {|8 [|9 ]|0 }|ß \|´ | | | | | | + * |------------------------------------------------------------------------| |--------------| + * |Tab |Q |W |E |R |T |Z |U |I |O |P |Ü |* | E | |Del |End |PgDn| + * | | | | €| | | | | | | | |+ ~| n | | | | | + * |------------------------------------------------------------------\ t | '--------------' + * |Fn: |A |S |D |F |G |H |J |K |L |Ö |Ä |' | e | + * |Layer 2| | | | | | | | | | | |# | r | + * |------------------------------------------------------------------------| .----. + * |Shift|> |Y |X |C |V |B |N |M |; |: |_ |Shift | |Up | + * | |< ¦| | | | | | | µ|, |. |- | | | | + * |------------------------------------------------------------------------| .--------------. + * |Ctrl |Super|Alt | |AltGr|Alt |Fn: |Ctrl | |Left|Down|Righ| + * | | | | | | |Lay 2| | | | | | + * '------------------------------------------------------------------------' '--------------' + * NUHS = true position of KC_NUHS + */ +[DEF] = KEYMAP( \ + 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,TD(AF4), \ + 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_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_NUHS, KC_DEL, KC_END, KC_PGDN, \ + MO(FUN),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT,/*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_UP, \ + KC_LCTL,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_LALT,MO(FUN),KC_RCTL, KC_LEFT,KC_DOWN,KC_RGHT), + + /* Layer 1: function layer + * .----. .-------------------. .-------------------. .-------------------. .--------------. + * |Ctl+| |My |WWW:|Calc|Medi| |Mus:|Mus:|Mus:|Mus:| |Vol:|Vol:|Vol:|See:| | | |Paus| + * |A+De| |Comp|Home| |Play| |Prev|Next|Paus|Stop| |Mute|Down|Up |[3] | | | |Brea| + * '----' '-------------------' '-------------------' '-------------------' '--------------' + * .------------------------------------------------------------------------. .--------------. + * | | | | | | | | | | | | | | | | | |Mou:| + * | | | | | | | |{ |[ |] |} |\ | | | | | |WhUp| + * |------------------------------------------------------------------------| |--------------| + * | | | | | | | | | | | | |~ | | | | |Mou:| + * | | | | | | | | | | | | | | | | | |WhDn| + * |------------------------------------------------------------------\ | '--------------' + * |CapsLck|Mou:|Mou:| | | | | | | | | | | | + * | |Fast|Slow| | | | | | | | | | | | + * |------------------------------------------------------------------------| .----. + * | | | | | | | | |µ | | | | | |Mou:| + * | | | | | | | | | | | | | | |Up | + * |------------------------------------------------------------------------| .--------------. + * |Mous:|Mous:| | | |Super|App | | |Mou:|Mou:|Mou:| + * |Bttn2|Bttn1| | | | | | | |Left|Down|Righ| + * '------------------------------------------------------------------------' '--------------' + * + */ +[FUN] = KEYMAP( \ + CTALDEL, KC_MYCM,KC_WHOM,KC_CALC,KC_MSEL,KC_MPRV,KC_MNXT,KC_MPLY,KC_MSTP,KC_MUTE,KC_VOLD,KC_VOLU,MO(RES), _______,KC_SLCK,KC_PAUS, \ + _______,_______,_______,_______,_______,_______,_______,G(7), G(8), G(9), G(0), G(MINS),_______,_______, _______,_______,KC_WH_U, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,G(RBRC),_______, _______,_______,KC_WH_D, \ + KC_CAPS,KC_ACL2,KC_ACL0,_______,_______,_______,_______,_______,_______,_______,_______,_______,/*NUHS*/_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,G(M), _______,_______,_______, _______, KC_MS_U, \ + KC_BTN2,KC_BTN1,_______, _______, _______,KC_RGUI,KC_APP ,_______, KC_MS_L,KC_MS_D,KC_MS_R), + + +/* Layer 3: Reset layer (prevents accidental resets) */ +[RES] = KEYMAP( \ + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ + _______,_______,_______,_______,RESET, _______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,/*NUHS*/_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______, _______, \ + _______,_______,_______, _______, _______,_______,_______,_______, _______,_______,_______), +}; + +qk_tap_dance_action_t tap_dance_actions[] = { + /* Tap once: nothing. Tap twice: Alt+F4 */ + [AF4] = ACTION_TAP_DANCE_DOUBLE(XXXXXXX,A(F4)), +}; + +void led_set_user(uint8_t usb_led) { + if (usb_led & (1 << USB_LED_CAPS_LOCK)) { + ph_caps_led_on(); + } else { + ph_caps_led_off(); + } + + if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { + ph_sclk_led_on(); + } else { + ph_sclk_led_off(); + } +} diff --git a/keyboards/pegasushoof/keymaps/citadel/readme.md b/keyboards/pegasushoof/keymaps/citadel/readme.md new file mode 100644 index 0000000000..3618bae861 --- /dev/null +++ b/keyboards/pegasushoof/keymaps/citadel/readme.md @@ -0,0 +1,75 @@ +# Citadel keymap for pegasushoof + +Designed for ISO-DE and similar ISO layouts. + +The central idea of this keymap is to avoid unergonomic key combos that force the user to either press +multiple keys with one hand or to use the left hand for right-sided keys. For instance, ISO-DE users +have to press `AltGr`+`7` to type _{_. The keymap allows ergonomic access to the right-sided keys of the +German AltGr-layer by turning `Caps Lock` into a hybrid Fn/AltGr-key. It can easily be adapted for other +ISO layouts. + +The _Function_ layer also offers mouse emulation and function/media keys in the F-Row. + +`Pause/Break` is used as a safe _close key_: A _single tap_ does nothing, a _double tap_ executes ALT+F4. + +Named after the homonymous space station from _Mass Effect_. Made by [Daniel Rose](https://github.com/droseger/). + +## [1] Layers + +### Layer 1 (Default) + .----. .-------------------. .-------------------. .-------------------. .--------------. + |Esc | |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10 |F11 |F12 | |PrSc|SLck|2Tp:| + | | | | | | | | | | | | | | | | | |SyRq| |A+F4| + '----' '-------------------' '-------------------' '-------------------' '--------------' + .------------------------------------------------------------------------. .--------------. + |° |! |" |§ |$ |% |& |/ |( |) |= |? |` |Backspa| |Ins |Home|PgUp| + |^ |1 |2 ²|3 ³|4 |5 |6 |7 {|8 [|9 ]|0 }|ß \|´ | | | | | | + |------------------------------------------------------------------------| |--------------| + |Tab |Q |W |E |R |T |Z |U |I |O |P |Ü |* | E | |Del |End |PgDn| + | | | | €| | | | | | | | |+ ~| n | | | | | + |------------------------------------------------------------------\ t | '--------------' + |Fn: |A |S |D |F |G |H |J |K |L |Ö |Ä |' | e | + |Layer 2| | | | | | | | | | | |# | r | + |------------------------------------------------------------------------| .----. + |Shift|> |Y |X |C |V |B |N |M |; |: |_ |Shift | |Up | + | |< ¦| | | | | | | µ|, |. |- | | | | + |------------------------------------------------------------------------| .--------------. + |Ctrl |Super|Alt | |AltGr|Alt |Fn: |Ctrl | |Left|Down|Righ| + | | | | | | |Lay 2| | | | | | + '------------------------------------------------------------------------' '--------------' + +### Layer 2 (Function) + .----. .-------------------. .-------------------. .-------------------. .--------------. + |Ctl+| |My |WWW:|Calc|Medi| |Mus:|Mus:|Mus:|Mus:| |Vol:|Vol:|Vol:|See:| | | |Paus| + |A+De| |Comp|Home| |Play| |Prev|Next|Paus|Stop| |Mute|Down|Up |[3] | | | |Brea| + '----' '-------------------' '-------------------' '-------------------' '--------------' + .------------------------------------------------------------------------. .--------------. + | | | | | | | | | | | | | | | | | |Mou:| + | | | | | | | |{ |[ |] |} |\ | | | | | |WhUp| + |------------------------------------------------------------------------| |--------------| + | | | | | | | | | | | | |~ | | | | |Mou:| + | | | | | | | | | | | | | | | | | |WhDn| + |------------------------------------------------------------------\ | '--------------' + |CapsLck|Mou:|Mou:| | | | | | | | | | | | + | |Fast|Slow| | | | | | | | | | | | + |------------------------------------------------------------------------| .----. + | | | | | | | | |µ | | | | | |Mou:| + | | | | | | | | | | | | | | |Up | + |------------------------------------------------------------------------| .--------------. + |Mous:|Mous:| | | |Super|App | | |Mou:|Mou:|Mou:| + |Bttn2|Bttn1| | | | | | | |Left|Down|Righ| + '------------------------------------------------------------------------' '--------------' + +Layer 3 exists solely to prevent users from accidentally activating boot mode: `R` is redefined +as `RESET` key [3]. + +## [2] How to build and install +1) Prerequisite: install the necessary [build tools](https://docs.qmk.fm/#/getting_started_build_tools) +such as [dfu-programmer](https://github.com/dfu-programmer/dfu-programmer). + - You might need to [add udev rules](https://docs.qmk.fm/#/faq_build?id=can39t-program-on-linux) under Linux. +2) To test if the keymap compiles, simply run `make pegasushoof:citadel` +3) Enter the `qmk_firmware` root directory and run `make pegasushoof:citadel:dfu` +4) Reset controller to _Boot mode_ by pressing the `RESET` key or by using a magnet. + +## [3] How to access Boot mode after install +Press `Fn+F12+R` diff --git a/keyboards/pegasushoof/keymaps/citadel/rules.mk b/keyboards/pegasushoof/keymaps/citadel/rules.mk new file mode 100644 index 0000000000..0dd8a79f4e --- /dev/null +++ b/keyboards/pegasushoof/keymaps/citadel/rules.mk @@ -0,0 +1,22 @@ +# Build Options +# change to "no" 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 = no # Console for debug(+400) +COMMAND_ENABLE = no # Commands for debug and configuration +CUSTOM_MATRIX = yes # Custom matrix file for the Pegasus Hoof due to the 2x74HC42 +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 this with audio at the same time. +TAP_DANCE_ENABLE = yes # see https://docs.qmk.fm/#/feature_tap_dance (+1000) + + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif -- cgit v1.2.3 From 710937e4ef1e14d82261fc439aa6fcfcdbd64bf5 Mon Sep 17 00:00:00 2001 From: Kosuke Adachi Date: Sat, 9 Jun 2018 07:28:28 +0900 Subject: Add corne keyboard (#3119) * Fork from helix * Move rev2 to rev1 * Remove unused settings * Move split_util to outof rev * Setup KEYMAP for crkbd * Remove old image * Move keymaps directory and glcdfont.c * Remove AUDIO in keymap * Show keylog * Show keylogs * Show time log * Remove EISU/KANA * Use KEYMAP_kc * Remove iota_gfx_record_user wrapping * Remove unused settings for layer * Add keylogger.c * Fix uppercase letters to lower * Add timelogger.c * Default RGBLED_NUM = 27 * Remove unused setting * Add mode icon reader * Add matrix_write_ln * Add layer_state_reader * Move to lib directory * Rename functions * Add host_led_state_reader * Add logo_reader * Cleaning of iota_gfx_task * Fix bugs and add key defines * Remove unnecessary comments * Update crkbd readme * Move libs to lib directories * Rename KEYMAP to LAYOUT --- keyboards/crkbd/config.h | 24 ++ keyboards/crkbd/crkbd.c | 1 + keyboards/crkbd/crkbd.h | 8 + keyboards/crkbd/i2c.c | 162 +++++++++ keyboards/crkbd/i2c.h | 49 +++ keyboards/crkbd/keymaps/default/config.h | 53 +++ keyboards/crkbd/keymaps/default/glcdfont.c | 244 ++++++++++++++ keyboards/crkbd/keymaps/default/keymap.c | 246 ++++++++++++++ keyboards/crkbd/keymaps/default/rules.mk | 25 ++ .../crkbd/keymaps/lib/host_led_state_reader.c | 13 + keyboards/crkbd/keymaps/lib/keylogger.c | 49 +++ keyboards/crkbd/keymaps/lib/layer_state_reader.c | 33 ++ keyboards/crkbd/keymaps/lib/logo_reader.c | 12 + keyboards/crkbd/keymaps/lib/mode_icon_reader.c | 15 + keyboards/crkbd/keymaps/lib/timelogger.c | 17 + keyboards/crkbd/pro_micro.h | 362 +++++++++++++++++++++ keyboards/crkbd/readme.md | 17 + keyboards/crkbd/rev1/config.h | 87 +++++ keyboards/crkbd/rev1/matrix.c | 348 ++++++++++++++++++++ keyboards/crkbd/rev1/rev1.c | 32 ++ keyboards/crkbd/rev1/rev1.h | 53 +++ keyboards/crkbd/rev1/rules.mk | 2 + keyboards/crkbd/rules.mk | 74 +++++ keyboards/crkbd/serial.c | 238 ++++++++++++++ keyboards/crkbd/serial.h | 32 ++ keyboards/crkbd/split_util.c | 71 ++++ keyboards/crkbd/split_util.h | 19 ++ keyboards/crkbd/ssd1306.c | 330 +++++++++++++++++++ keyboards/crkbd/ssd1306.h | 94 ++++++ 29 files changed, 2710 insertions(+) create mode 100644 keyboards/crkbd/config.h create mode 100644 keyboards/crkbd/crkbd.c create mode 100644 keyboards/crkbd/crkbd.h create mode 100644 keyboards/crkbd/i2c.c create mode 100644 keyboards/crkbd/i2c.h create mode 100644 keyboards/crkbd/keymaps/default/config.h create mode 100644 keyboards/crkbd/keymaps/default/glcdfont.c create mode 100644 keyboards/crkbd/keymaps/default/keymap.c create mode 100644 keyboards/crkbd/keymaps/default/rules.mk create mode 100644 keyboards/crkbd/keymaps/lib/host_led_state_reader.c create mode 100644 keyboards/crkbd/keymaps/lib/keylogger.c create mode 100644 keyboards/crkbd/keymaps/lib/layer_state_reader.c create mode 100644 keyboards/crkbd/keymaps/lib/logo_reader.c create mode 100644 keyboards/crkbd/keymaps/lib/mode_icon_reader.c create mode 100644 keyboards/crkbd/keymaps/lib/timelogger.c create mode 100644 keyboards/crkbd/pro_micro.h create mode 100644 keyboards/crkbd/readme.md create mode 100644 keyboards/crkbd/rev1/config.h create mode 100644 keyboards/crkbd/rev1/matrix.c create mode 100644 keyboards/crkbd/rev1/rev1.c create mode 100644 keyboards/crkbd/rev1/rev1.h create mode 100644 keyboards/crkbd/rev1/rules.mk create mode 100644 keyboards/crkbd/rules.mk create mode 100644 keyboards/crkbd/serial.c create mode 100644 keyboards/crkbd/serial.h create mode 100644 keyboards/crkbd/split_util.c create mode 100644 keyboards/crkbd/split_util.h create mode 100644 keyboards/crkbd/ssd1306.c create mode 100644 keyboards/crkbd/ssd1306.h (limited to 'keyboards') diff --git a/keyboards/crkbd/config.h b/keyboards/crkbd/config.h new file mode 100644 index 0000000000..c910d8f24f --- /dev/null +++ b/keyboards/crkbd/config.h @@ -0,0 +1,24 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#endif diff --git a/keyboards/crkbd/crkbd.c b/keyboards/crkbd/crkbd.c new file mode 100644 index 0000000000..5e8ba8bacf --- /dev/null +++ b/keyboards/crkbd/crkbd.c @@ -0,0 +1 @@ +#include "crkbd.h" diff --git a/keyboards/crkbd/crkbd.h b/keyboards/crkbd/crkbd.h new file mode 100644 index 0000000000..889bcb9ae3 --- /dev/null +++ b/keyboards/crkbd/crkbd.h @@ -0,0 +1,8 @@ +#ifndef CRKBD_H +#define CRKBD_H + +#ifdef KEYBOARD_crkbd_rev1 + #include "rev1.h" +#endif + +#endif diff --git a/keyboards/crkbd/i2c.c b/keyboards/crkbd/i2c.c new file mode 100644 index 0000000000..084c890c40 --- /dev/null +++ b/keyboards/crkbd/i2c.c @@ -0,0 +1,162 @@ +#include +#include +#include +#include +#include +#include +#include "i2c.h" + +#ifdef USE_I2C + +// Limits the amount of we wait for any one i2c transaction. +// Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is +// 9 bits, a single transaction will take around 90μs to complete. +// +// (F_CPU/SCL_CLOCK) => # of μC cycles to transfer a bit +// poll loop takes at least 8 clock cycles to execute +#define I2C_LOOP_TIMEOUT (9+1)*(F_CPU/SCL_CLOCK)/8 + +#define BUFFER_POS_INC() (slave_buffer_pos = (slave_buffer_pos+1)%SLAVE_BUFFER_SIZE) + +volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +static volatile uint8_t slave_buffer_pos; +static volatile bool slave_has_register_set = false; + +// Wait for an i2c operation to finish +inline static +void i2c_delay(void) { + uint16_t lim = 0; + while(!(TWCR & (1<10. + // Check datasheets for more info. + TWBR = ((F_CPU/SCL_CLOCK)-16)/2; +} + +// Start a transaction with the given i2c slave address. The direction of the +// transfer is set with I2C_READ and I2C_WRITE. +// returns: 0 => success +// 1 => error +uint8_t i2c_master_start(uint8_t address) { + TWCR = (1< slave ACK +// 1 => slave NACK +uint8_t i2c_master_write(uint8_t data) { + TWDR = data; + TWCR = (1<= SLAVE_BUFFER_SIZE ) { + ack = 0; + slave_buffer_pos = 0; + } + slave_has_register_set = true; + } else { + i2c_slave_buffer[slave_buffer_pos] = TWDR; + BUFFER_POS_INC(); + } + break; + + case TW_ST_SLA_ACK: + case TW_ST_DATA_ACK: + // master has addressed this device as a slave transmitter and is + // requesting data. + TWDR = i2c_slave_buffer[slave_buffer_pos]; + BUFFER_POS_INC(); + break; + + case TW_BUS_ERROR: // something went wrong, reset twi state + TWCR = 0; + default: + break; + } + // Reset everything, so we are ready for the next TWI interrupt + TWCR |= (1< + +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +#define I2C_READ 1 +#define I2C_WRITE 0 + +#define I2C_ACK 1 +#define I2C_NACK 0 + +#define SLAVE_BUFFER_SIZE 0x10 + +// i2c SCL clock frequency +#define SCL_CLOCK 400000L + +extern volatile uint8_t i2c_slave_buffer[SLAVE_BUFFER_SIZE]; + +void i2c_master_init(void); +uint8_t i2c_master_start(uint8_t address); +void i2c_master_stop(void); +uint8_t i2c_master_write(uint8_t data); +uint8_t i2c_master_read(int); +void i2c_reset_state(void); +void i2c_slave_init(uint8_t address); + + +static inline unsigned char i2c_start_read(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_READ); +} + +static inline unsigned char i2c_start_write(unsigned char addr) { + return i2c_master_start((addr << 1) | I2C_WRITE); +} + +// from SSD1306 scrips +extern unsigned char i2c_rep_start(unsigned char addr); +extern void i2c_start_wait(unsigned char addr); +extern unsigned char i2c_readAck(void); +extern unsigned char i2c_readNak(void); +extern unsigned char i2c_read(unsigned char ack); + +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + +#endif diff --git a/keyboards/crkbd/keymaps/default/config.h b/keyboards/crkbd/keymaps/default/config.h new file mode 100644 index 0000000000..15aeb098bc --- /dev/null +++ b/keyboards/crkbd/keymaps/default/config.h @@ -0,0 +1,53 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +/* Use I2C or Serial */ + +#define USE_I2C +#define USE_SERIAL +//#define USE_MATRIX_I2C + +/* Select hand configuration */ + +#define MASTER_LEFT +// #define MASTER_RIGHT +// #define EE_HANDS + +#define SSD1306OLED + +#define USE_SERIAL_PD2 + +#define PREVENT_STUCK_MODIFIERS +#define TAPPING_FORCE_HOLD +#define TAPPING_TERM 100 + +#undef RGBLED_NUM +#define RGBLIGHT_ANIMATIONS +#define RGBLED_NUM 27 +#define RGBLIGHT_LIMIT_VAL 120 +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 +#endif diff --git a/keyboards/crkbd/keymaps/default/glcdfont.c b/keyboards/crkbd/keymaps/default/glcdfont.c new file mode 100644 index 0000000000..4e7b27bc0c --- /dev/null +++ b/keyboards/crkbd/keymaps/default/glcdfont.c @@ -0,0 +1,244 @@ +// This is the 'classic' fixed-space bitmap font for Adafruit_GFX since 1.0. +// See gfxfont.h for newer custom bitmap font info. + +#ifndef FONT5X7_H +#define FONT5X7_H + +#ifdef __AVR__ + #include + #include +#elif defined(ESP8266) + #include +#else + #define PROGMEM +#endif + +// Standard ASCII 5x7 font + +static const unsigned char font[] PROGMEM = { +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x3E, 0x5B, 0x4F, 0x5B, 0x3E, 0x00, +0x3E, 0x6B, 0x4F, 0x6B, 0x3E, 0x00, +0x1C, 0x3E, 0x7C, 0x3E, 0x1C, 0x00, +0x18, 0x3C, 0x7E, 0x3C, 0x18, 0x00, +0x1C, 0x57, 0x7D, 0x57, 0x1C, 0x00, +0x1C, 0x5E, 0x7F, 0x5E, 0x1C, 0x00, +0x00, 0x18, 0x3C, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xC3, 0xE7, 0xFF, 0x00, +0x00, 0x18, 0x24, 0x18, 0x00, 0x00, +0xFF, 0xE7, 0xDB, 0xE7, 0xFF, 0x00, +0x30, 0x48, 0x3A, 0x06, 0x0E, 0x00, +0x26, 0x29, 0x79, 0x29, 0x26, 0x00, +0x40, 0x7F, 0x05, 0x05, 0x07, 0x00, +0x40, 0x7F, 0x05, 0x25, 0x3F, 0x00, +0x5A, 0x3C, 0xE7, 0x3C, 0x5A, 0x00, +0x7F, 0x3E, 0x1C, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x1C, 0x3E, 0x7F, 0x00, +0x14, 0x22, 0x7F, 0x22, 0x14, 0x00, +0x5F, 0x5F, 0x00, 0x5F, 0x5F, 0x00, +0x06, 0x09, 0x7F, 0x01, 0x7F, 0x00, +0x00, 0x66, 0x89, 0x95, 0x6A, 0x00, +0x60, 0x60, 0x60, 0x60, 0x60, 0x00, +0x94, 0xA2, 0xFF, 0xA2, 0x94, 0x00, +0x08, 0x04, 0x7E, 0x04, 0x08, 0x00, +0x10, 0x20, 0x7E, 0x20, 0x10, 0x00, +0x08, 0x08, 0x2A, 0x1C, 0x08, 0x00, +0x08, 0x1C, 0x2A, 0x08, 0x08, 0x00, +0x1E, 0x10, 0x10, 0x10, 0x10, 0x00, +0x0C, 0x1E, 0x0C, 0x1E, 0x0C, 0x00, +0x30, 0x38, 0x3E, 0x38, 0x30, 0x00, +0x06, 0x0E, 0x3E, 0x0E, 0x06, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x5F, 0x00, 0x00, 0x00, +0x00, 0x07, 0x00, 0x07, 0x00, 0x00, +0x14, 0x7F, 0x14, 0x7F, 0x14, 0x00, +0x24, 0x2A, 0x7F, 0x2A, 0x12, 0x00, +0x23, 0x13, 0x08, 0x64, 0x62, 0x00, +0x36, 0x49, 0x56, 0x20, 0x50, 0x00, +0x00, 0x08, 0x07, 0x03, 0x00, 0x00, +0x00, 0x1C, 0x22, 0x41, 0x00, 0x00, +0x00, 0x41, 0x22, 0x1C, 0x00, 0x00, +0x2A, 0x1C, 0x7F, 0x1C, 0x2A, 0x00, +0x08, 0x08, 0x3E, 0x08, 0x08, 0x00, +0x00, 0x80, 0x70, 0x30, 0x00, 0x00, +0x08, 0x08, 0x08, 0x08, 0x08, 0x00, +0x00, 0x00, 0x60, 0x60, 0x00, 0x00, +0x20, 0x10, 0x08, 0x04, 0x02, 0x00, +0x3E, 0x51, 0x49, 0x45, 0x3E, 0x00, +0x00, 0x42, 0x7F, 0x40, 0x00, 0x00, +0x72, 0x49, 0x49, 0x49, 0x46, 0x00, +0x21, 0x41, 0x49, 0x4D, 0x33, 0x00, +0x18, 0x14, 0x12, 0x7F, 0x10, 0x00, +0x27, 0x45, 0x45, 0x45, 0x39, 0x00, +0x3C, 0x4A, 0x49, 0x49, 0x31, 0x00, +0x41, 0x21, 0x11, 0x09, 0x07, 0x00, +0x36, 0x49, 0x49, 0x49, 0x36, 0x00, +0x46, 0x49, 0x49, 0x29, 0x1E, 0x00, +0x00, 0x00, 0x14, 0x00, 0x00, 0x00, +0x00, 0x40, 0x34, 0x00, 0x00, 0x00, +0x00, 0x08, 0x14, 0x22, 0x41, 0x00, +0x14, 0x14, 0x14, 0x14, 0x14, 0x00, +0x00, 0x41, 0x22, 0x14, 0x08, 0x00, +0x02, 0x01, 0x59, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x5D, 0x59, 0x4E, 0x00, +0x7C, 0x12, 0x11, 0x12, 0x7C, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x36, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x22, 0x00, +0x7F, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x49, 0x49, 0x49, 0x41, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x01, 0x00, +0x3E, 0x41, 0x41, 0x51, 0x73, 0x00, +0x7F, 0x08, 0x08, 0x08, 0x7F, 0x00, +0x00, 0x41, 0x7F, 0x41, 0x00, 0x00, +0x20, 0x40, 0x41, 0x3F, 0x01, 0x00, +0x7F, 0x08, 0x14, 0x22, 0x41, 0x00, +0x7F, 0x40, 0x40, 0x40, 0x40, 0x00, +0x7F, 0x02, 0x1C, 0x02, 0x7F, 0x00, +0x7F, 0x04, 0x08, 0x10, 0x7F, 0x00, +0x3E, 0x41, 0x41, 0x41, 0x3E, 0x00, +0x7F, 0x09, 0x09, 0x09, 0x06, 0x00, +0x3E, 0x41, 0x51, 0x21, 0x5E, 0x00, +0x7F, 0x09, 0x19, 0x29, 0x46, 0x00, +0x26, 0x49, 0x49, 0x49, 0x32, 0x00, +0x03, 0x01, 0x7F, 0x01, 0x03, 0x00, +0x3F, 0x40, 0x40, 0x40, 0x3F, 0x00, +0x1F, 0x20, 0x40, 0x20, 0x1F, 0x00, +0x3F, 0x40, 0x38, 0x40, 0x3F, 0x00, +0x63, 0x14, 0x08, 0x14, 0x63, 0x00, +0x03, 0x04, 0x78, 0x04, 0x03, 0x00, +0x61, 0x59, 0x49, 0x4D, 0x43, 0x00, +0x00, 0x7F, 0x41, 0x41, 0x41, 0x00, +0x02, 0x04, 0x08, 0x10, 0x20, 0x00, +0x00, 0x41, 0x41, 0x41, 0x7F, 0x00, +0x04, 0x02, 0x01, 0x02, 0x04, 0x00, +0x40, 0x40, 0x40, 0x40, 0x40, 0x00, +0x00, 0x03, 0x07, 0x08, 0x00, 0x00, +0x20, 0x54, 0x54, 0x78, 0x40, 0x00, +0x7F, 0x28, 0x44, 0x44, 0x38, 0x00, +0x38, 0x44, 0x44, 0x44, 0x28, 0x00, +0x38, 0x44, 0x44, 0x28, 0x7F, 0x00, +0x38, 0x54, 0x54, 0x54, 0x18, 0x00, +0x00, 0x08, 0x7E, 0x09, 0x02, 0x00, +0x18, 0xA4, 0xA4, 0x9C, 0x78, 0x00, +0x7F, 0x08, 0x04, 0x04, 0x78, 0x00, +0x00, 0x44, 0x7D, 0x40, 0x00, 0x00, +0x20, 0x40, 0x40, 0x3D, 0x00, 0x00, +0x7F, 0x10, 0x28, 0x44, 0x00, 0x00, +0x00, 0x41, 0x7F, 0x40, 0x00, 0x00, +0x7C, 0x04, 0x78, 0x04, 0x78, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x78, 0x00, +0x38, 0x44, 0x44, 0x44, 0x38, 0x00, +0xFC, 0x18, 0x24, 0x24, 0x18, 0x00, +0x18, 0x24, 0x24, 0x18, 0xFC, 0x00, +0x7C, 0x08, 0x04, 0x04, 0x08, 0x00, +0x48, 0x54, 0x54, 0x54, 0x24, 0x00, +0x04, 0x04, 0x3F, 0x44, 0x24, 0x00, +0x3C, 0x40, 0x40, 0x20, 0x7C, 0x00, +0x1C, 0x20, 0x40, 0x20, 0x1C, 0x00, +0x3C, 0x40, 0x30, 0x40, 0x3C, 0x00, +0x44, 0x28, 0x10, 0x28, 0x44, 0x00, +0x4C, 0x90, 0x90, 0x90, 0x7C, 0x00, +0x44, 0x64, 0x54, 0x4C, 0x44, 0x00, +0x00, 0x08, 0x36, 0x41, 0x00, 0x00, +0x00, 0x00, 0x77, 0x00, 0x00, 0x00, +0x00, 0x41, 0x36, 0x08, 0x00, 0x00, +0x02, 0x01, 0x02, 0x04, 0x02, 0x00, +0x3C, 0x26, 0x23, 0x26, 0x3C, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x0E, 0x3F, 0xFF, 0xFF, +0xFF, 0xFF, 0xFE, 0xE0, 0x80, 0x00, +0x00, 0x00, 0x00, 0x00, 0x1E, 0xBE, +0x7F, 0xFF, 0xFF, 0xFE, 0xFE, 0xF0, +0xE0, 0xC0, 0x80, 0x00, 0x0E, 0xEF, +0xDF, 0xDE, 0xBE, 0x3C, 0x38, 0x70, +0xE0, 0xDD, 0xBB, 0x7B, 0x07, 0x0E, +0x0E, 0x0C, 0x98, 0xF0, 0xE0, 0xF0, +0xF0, 0xF8, 0x78, 0x3C, 0x1C, 0x1E, +0x0E, 0x0E, 0x0F, 0x0F, 0x0F, 0x0F, +0x1F, 0xFE, 0xFE, 0xF8, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0xE0, 0xF0, 0xF0, 0xF0, 0xE0, 0xEC, +0xEE, 0xF7, 0xF3, 0x70, 0x20, 0x00, +0x7C, 0x7C, 0x7C, 0x7E, 0x00, 0x7E, +0x7E, 0x7E, 0x7F, 0x7F, 0x7F, 0x00, +0x00, 0x80, 0xC0, 0xE0, 0x7E, 0x5B, +0x4F, 0x5B, 0xFE, 0xC0, 0x00, 0x00, +0xC0, 0x00, 0xDC, 0xD7, 0xDE, 0xDE, +0xDE, 0xD7, 0xDC, 0x00, 0xC0, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x01, 0x03, +0x0F, 0x3F, 0xFF, 0xFF, 0xFF, 0xFE, +0xF8, 0xF0, 0xE0, 0xC0, 0x80, 0x7F, +0xFF, 0xFE, 0xFD, 0xFB, 0x1B, 0x07, +0x07, 0x0F, 0x1F, 0x1F, 0x1E, 0x1D, +0x0B, 0x07, 0x01, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0xE0, +0xF8, 0xFE, 0xFF, 0xFF, 0x1F, 0x07, +0x01, 0x01, 0x01, 0x03, 0x06, 0x06, +0x0C, 0x0C, 0x08, 0x0C, 0x0C, 0x0E, +0x07, 0x83, 0xC1, 0xE0, 0x70, 0x30, +0x18, 0x1C, 0x7C, 0xCC, 0x8C, 0xDC, +0xF8, 0xC0, 0xE0, 0xE0, 0x70, 0xB8, +0xF0, 0x60, 0x00, 0x00, 0x80, 0xC0, +0xE0, 0xF0, 0x70, 0xF8, 0xFC, 0xFC, +0x3C, 0x30, 0x38, 0xF8, 0xF8, 0xF8, +0x78, 0x00, 0x80, 0x80, 0xC0, 0xE0, +0x70, 0x38, 0x38, 0x9C, 0xDC, 0xFC, +0x7C, 0x38, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x0F, 0x1F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7F, 0x7F, 0x3F, 0x1E, 0x0C, 0x00, +0x1F, 0x1F, 0x1F, 0x3F, 0x00, 0x3F, +0x3F, 0x3F, 0x7F, 0x7F, 0x7F, 0x00, +0x30, 0x7B, 0x7F, 0x78, 0x30, 0x20, +0x20, 0x30, 0x78, 0x7F, 0x3B, 0x00, +0x03, 0x00, 0x0F, 0x7F, 0x0F, 0x0F, +0x0F, 0x7F, 0x0F, 0x00, 0x03, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x01, 0x03, 0x07, +0x1F, 0x3F, 0x3F, 0x7F, 0x7F, 0x7F, +0x7E, 0x7D, 0x3B, 0x17, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x07, +0x0F, 0x1F, 0x3F, 0x3F, 0x7E, 0x7C, +0x78, 0x70, 0x70, 0x70, 0x70, 0x70, +0x70, 0x78, 0x38, 0x18, 0x1C, 0x0E, +0x07, 0x0F, 0x1F, 0x3F, 0x3C, 0x38, +0x38, 0x18, 0x0C, 0x06, 0x03, 0x01, +0x01, 0x01, 0x01, 0x0E, 0x1F, 0x1F, +0x1C, 0x1C, 0x1E, 0x0F, 0x0F, 0x03, +0x1D, 0x0E, 0x07, 0x03, 0x01, 0x00, +0x00, 0x0E, 0x1F, 0x1F, 0x1D, 0x1E, +0x0F, 0x07, 0x03, 0x03, 0x0F, 0x1F, +0x1F, 0x19, 0x19, 0x19, 0x19, 0x0C, +0x0C, 0x04, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +0x00, 0x00, 0x00, 0x00, 0x00, 0x00, +}; +#endif // FONT5X7_H diff --git a/keyboards/crkbd/keymaps/default/keymap.c b/keyboards/crkbd/keymaps/default/keymap.c new file mode 100644 index 0000000000..ac3b7215cd --- /dev/null +++ b/keyboards/crkbd/keymaps/default/keymap.c @@ -0,0 +1,246 @@ +#include "crkbd.h" +#include "bootloader.h" +#include "action_layer.h" +#include "action_util.h" +#include "eeconfig.h" +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#include "split_util.h" +#endif +#include "LUFA/Drivers/Peripheral/TWI.h" +#ifdef SSD1306OLED + #include "ssd1306.h" +#endif + +#include "../lib/mode_icon_reader.c" +#include "../lib/layer_state_reader.c" +#include "../lib/host_led_state_reader.c" +#include "../lib/logo_reader.c" +#include "../lib/keylogger.c" +#include "../lib/timelogger.c" + +extern keymap_config_t keymap_config; + +#ifdef RGBLIGHT_ENABLE +//Following line allows macro to read current RGB settings +extern rgblight_config_t rgblight_config; +#endif + +extern uint8_t is_master; + +// 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 _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + LOWER, + RAISE, + ADJUST, + BACKLIT, + RGBRST +}; + +enum macro_keycodes { + KC_SAMPLEMACRO, +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_RST RESET +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LSMOD RGB_SMOD +#define KC_CTLTB CTL_T(KC_TAB) +#define KC_GUIEI GUI_T(KC_LANG2) +#define KC_ALTKN ALT_T(KC_LANG1) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, Q, W, E, R, T, Y, U, I, O, P, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_LOWER] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, F11, F12, F13, F14, F15, F16, F17, F18, F19, F20, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_RAISE] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + ESC, EXLM, AT, HASH, DLR, PERC, CIRC, AMPR, ASTR, LPRN, RPRN, BSPC,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + CTLTB, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, MINS, EQL, LCBR, RCBR, PIPE, GRV,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSFT, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, UNDS, PLUS, LBRC, RBRC, BSLS, TILD,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ), + + [_ADJUST] = LAYOUT_kc( \ + //,-----------------------------------------. ,-----------------------------------------. + RST, LRST, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LTOG, LHUI, LSAI, LVAI, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------| |------+------+------+------+------+------| + LSMOD, LHUD, LSAD, LVAD, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX,\ + //|------+------+------+------+------+------+------| |------+------+------+------+------+------+------| + GUIEI, LOWER, SPC, ENT, RAISE, ALTKN \ + //`--------------------' `--------------------' + ) +}; + +int RGB_current_mode; + +void persistent_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +// 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)) { + layer_on(layer3); + } else { + layer_off(layer3); + } +} + +void matrix_init_user(void) { + #ifdef RGBLIGHT_ENABLE + RGB_current_mode = rgblight_config.mode; + #endif + //SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h + #ifdef SSD1306OLED + TWI_Init(TWI_BIT_PRESCALE_1, TWI_BITLENGTH_FROM_FREQ(1, 800000)); + iota_gfx_init(!has_usb()); // turns on the display + #endif +} + +//SSD1306 OLED update loop, make sure to add #define SSD1306OLED in config.h +#ifdef SSD1306OLED + +void matrix_scan_user(void) { + iota_gfx_task(); +} + +void matrix_render_user(struct CharacterMatrix *matrix) { + if (is_master) { + matrix_write_ln(matrix, read_layer_state()); + matrix_write_ln(matrix, read_keylog()); + matrix_write_ln(matrix, read_keylogs()); + //matrix_write_ln(matrix, read_mode_icon(keymap_config.swap_lalt_lgui)); + //matrix_write_ln(matrix, read_host_led_state()); + //matrix_write_ln(matrix, read_timelog()); + } else { + matrix_write(matrix, read_logo()); + } +} + +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) { + struct CharacterMatrix matrix; + matrix_clear(&matrix); + matrix_render_user(&matrix); + matrix_update(&display, &matrix); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + set_keylog(keycode, record); + set_timelog(); + } + + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + persistent_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer_RGB(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + case RGB_MOD: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + rgblight_mode(RGB_current_mode); + rgblight_step(); + RGB_current_mode = rgblight_config.mode; + } + #endif + return false; + break; + case RGBRST: + #ifdef RGBLIGHT_ENABLE + if (record->event.pressed) { + eeconfig_update_rgblight_default(); + rgblight_enable(); + RGB_current_mode = rgblight_config.mode; + } + #endif + break; + } + return true; +} + +#endif diff --git a/keyboards/crkbd/keymaps/default/rules.mk b/keyboards/crkbd/keymaps/default/rules.mk new file mode 100644 index 0000000000..33ddd82a43 --- /dev/null +++ b/keyboards/crkbd/keymaps/default/rules.mk @@ -0,0 +1,25 @@ + +# 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 = 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 = 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 = yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +ONEHAND_ENABLE = no # Enable one-hand typing + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/crkbd/keymaps/lib/host_led_state_reader.c b/keyboards/crkbd/keymaps/lib/host_led_state_reader.c new file mode 100644 index 0000000000..c19af11f8a --- /dev/null +++ b/keyboards/crkbd/keymaps/lib/host_led_state_reader.c @@ -0,0 +1,13 @@ +#include "crkbd.h" + +char host_led_state[40]; + +char *read_host_led_state(void) +{ + snprintf(host_led_state, sizeof(host_led_state), "\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" : " "); + + return host_led_state; +} diff --git a/keyboards/crkbd/keymaps/lib/keylogger.c b/keyboards/crkbd/keymaps/lib/keylogger.c new file mode 100644 index 0000000000..ee14ff0335 --- /dev/null +++ b/keyboards/crkbd/keymaps/lib/keylogger.c @@ -0,0 +1,49 @@ +#include "crkbd.h" + +char keylog[40] = {}; +char keylogs[21] = {}; +int keylogs_idx = 0; + +char code_to_name[60] = { + ' ', ' ', ' ', ' ', 'a', 'b', 'c', 'd', 'e', 'f', + 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', + 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z', + '1', '2', '3', '4', '5', '6', '7', '8', '9', '0', + 'R', 'E', 'B', 'T', ' ', ' ', ' ', ' ', ' ', ' ', + ' ', ';', '\'', ' ', ',', '.', '/', ' ', ' ', ' '}; + +void set_keylog(uint16_t keycode, keyrecord_t *record) +{ + char name = ' '; + if (keycode < 60) + { + name = code_to_name[keycode]; + } + + // update keylog + snprintf(keylog, sizeof(keylog), "%dx%d, k%2d : %c", + record->event.key.row, + record->event.key.col, + keycode, + name); + + // update keylogs + if (keylogs_idx == sizeof(keylogs) - 1) + { + keylogs_idx = 0; + for (int i = 0; i < sizeof(keylogs) - 1; i++) + { + keylogs[i] = ' '; + } + } + keylogs[keylogs_idx] = name; + keylogs_idx++; +} + +char *read_keylog(void) { + return keylog; +} + +char *read_keylogs(void) { + return keylogs; +} diff --git a/keyboards/crkbd/keymaps/lib/layer_state_reader.c b/keyboards/crkbd/keymaps/lib/layer_state_reader.c new file mode 100644 index 0000000000..f79720d6f9 --- /dev/null +++ b/keyboards/crkbd/keymaps/lib/layer_state_reader.c @@ -0,0 +1,33 @@ +#include "crkbd.h" + +#define L_BASE 0 +#define L_LOWER 8 +#define L_RAISE 16 +#define L_ADJUST 65536 +#define L_ADJUST_TRI 65560 + +char layer_state_str[40]; + +char *read_layer_state(void) +{ + switch (layer_state) + { + case L_BASE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Default"); + break; + case L_RAISE: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Raise"); + break; + case L_LOWER: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Lower"); + break; + case L_ADJUST: + case L_ADJUST_TRI: + snprintf(layer_state_str, sizeof(layer_state_str), "Layer: Adjust"); + break; + default: + snprintf(layer_state_str,sizeof(layer_state_str), "Layer: Undef-%ld", layer_state); + } + + return layer_state_str; +} diff --git a/keyboards/crkbd/keymaps/lib/logo_reader.c b/keyboards/crkbd/keymaps/lib/logo_reader.c new file mode 100644 index 0000000000..46de17bfe0 --- /dev/null +++ b/keyboards/crkbd/keymaps/lib/logo_reader.c @@ -0,0 +1,12 @@ +#include "crkbd.h" + +char *read_logo(void) +{ + static char logo[]={ + 0x80,0x81,0x82,0x83,0x84,0x85,0x86,0x87,0x88,0x89,0x8a,0x8b,0x8c,0x8d,0x8e,0x8f,0x90,0x91,0x92,0x93,0x94, + 0xa0,0xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,0xad,0xae,0xaf,0xb0,0xb1,0xb2,0xb3,0xb4, + 0xc0,0xc1,0xc2,0xc3,0xc4,0xc5,0xc6,0xc7,0xc8,0xc9,0xca,0xcb,0xcc,0xcd,0xce,0xcf,0xd0,0xd1,0xd2,0xd3,0xd4, + 0}; + + return logo; +} diff --git a/keyboards/crkbd/keymaps/lib/mode_icon_reader.c b/keyboards/crkbd/keymaps/lib/mode_icon_reader.c new file mode 100644 index 0000000000..cb3d8adb12 --- /dev/null +++ b/keyboards/crkbd/keymaps/lib/mode_icon_reader.c @@ -0,0 +1,15 @@ +#include "crkbd.h" + +char mode_icon[40]; + +char *read_mode_icon(bool swap) +{ + static char logo[][2][3]={{{0x95,0x96,0},{0xb5,0xb6,0}},{{0x97,0x98,0},{0xb7,0xb8,0}}}; + if(swap == false){ + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[0][0], logo[0][1]); + }else{ + snprintf(mode_icon, sizeof(mode_icon), "%s\n%s", logo[1][0], logo[1][1]); + } + + return mode_icon; +} diff --git a/keyboards/crkbd/keymaps/lib/timelogger.c b/keyboards/crkbd/keymaps/lib/timelogger.c new file mode 100644 index 0000000000..0e22bafe7f --- /dev/null +++ b/keyboards/crkbd/keymaps/lib/timelogger.c @@ -0,0 +1,17 @@ +#include "crkbd.h" + +char timelog[40] = {}; +int last_time = 0; +int elapsed_time = 0; + +void set_timelog(void) +{ + elapsed_time = timer_elapsed(last_time); + last_time = timer_read(); + snprintf(timelog, sizeof(timelog), "lt:%5d, et:%5d", last_time, elapsed_time); +} + +char *read_timelog(void) +{ + return timelog; +} diff --git a/keyboards/crkbd/pro_micro.h b/keyboards/crkbd/pro_micro.h new file mode 100644 index 0000000000..f9e7ed75d9 --- /dev/null +++ b/keyboards/crkbd/pro_micro.h @@ -0,0 +1,362 @@ +/* + pins_arduino.h - Pin definition functions for Arduino + Part of Arduino - http://www.arduino.cc/ + + Copyright (c) 2007 David A. Mellis + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Lesser General Public + License as published by the Free Software Foundation; either + version 2.1 of the License, or (at your option) any later version. + + This library 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 + Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General + Public License along with this library; if not, write to the + Free Software Foundation, Inc., 59 Temple Place, Suite 330, + Boston, MA 02111-1307 USA + + $Id: wiring.h 249 2007-02-03 16:52:51Z mellis $ +*/ + +#ifndef Pins_Arduino_h +#define Pins_Arduino_h + +#include + +// Workaround for wrong definitions in "iom32u4.h". +// This should be fixed in the AVR toolchain. +#undef UHCON +#undef UHINT +#undef UHIEN +#undef UHADDR +#undef UHFNUM +#undef UHFNUML +#undef UHFNUMH +#undef UHFLEN +#undef UPINRQX +#undef UPINTX +#undef UPNUM +#undef UPRST +#undef UPCONX +#undef UPCFG0X +#undef UPCFG1X +#undef UPSTAX +#undef UPCFG2X +#undef UPIENX +#undef UPDATX +#undef TCCR2A +#undef WGM20 +#undef WGM21 +#undef COM2B0 +#undef COM2B1 +#undef COM2A0 +#undef COM2A1 +#undef TCCR2B +#undef CS20 +#undef CS21 +#undef CS22 +#undef WGM22 +#undef FOC2B +#undef FOC2A +#undef TCNT2 +#undef TCNT2_0 +#undef TCNT2_1 +#undef TCNT2_2 +#undef TCNT2_3 +#undef TCNT2_4 +#undef TCNT2_5 +#undef TCNT2_6 +#undef TCNT2_7 +#undef OCR2A +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 +#undef OCR2B +#undef OCR2_0 +#undef OCR2_1 +#undef OCR2_2 +#undef OCR2_3 +#undef OCR2_4 +#undef OCR2_5 +#undef OCR2_6 +#undef OCR2_7 + +#define NUM_DIGITAL_PINS 30 +#define NUM_ANALOG_INPUTS 12 + +#define TX_RX_LED_INIT DDRD |= (1<<5), DDRB |= (1<<0) +#define TXLED0 PORTD |= (1<<5) +#define TXLED1 PORTD &= ~(1<<5) +#define RXLED0 PORTB |= (1<<0) +#define RXLED1 PORTB &= ~(1<<0) + +static const uint8_t SDA = 2; +static const uint8_t SCL = 3; +#define LED_BUILTIN 13 + +// Map SPI port to 'new' pins D14..D17 +static const uint8_t SS = 17; +static const uint8_t MOSI = 16; +static const uint8_t MISO = 14; +static const uint8_t SCK = 15; + +// Mapping of analog pins as digital I/O +// A6-A11 share with digital pins +static const uint8_t ADC0 = 18; +static const uint8_t ADC1 = 19; +static const uint8_t ADC2 = 20; +static const uint8_t ADC3 = 21; +static const uint8_t ADC4 = 22; +static const uint8_t ADC5 = 23; +static const uint8_t ADC6 = 24; // D4 +static const uint8_t ADC7 = 25; // D6 +static const uint8_t ADC8 = 26; // D8 +static const uint8_t ADC9 = 27; // D9 +static const uint8_t ADC10 = 28; // D10 +static const uint8_t ADC11 = 29; // D12 + +#define digitalPinToPCICR(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCICR) : ((uint8_t *)0)) +#define digitalPinToPCICRbit(p) 0 +#define digitalPinToPCMSK(p) ((((p) >= 8 && (p) <= 11) || ((p) >= 14 && (p) <= 17) || ((p) >= A8 && (p) <= A10)) ? (&PCMSK0) : ((uint8_t *)0)) +#define digitalPinToPCMSKbit(p) ( ((p) >= 8 && (p) <= 11) ? (p) - 4 : ((p) == 14 ? 3 : ((p) == 15 ? 1 : ((p) == 16 ? 2 : ((p) == 17 ? 0 : (p - A8 + 4)))))) + +// __AVR_ATmega32U4__ has an unusual mapping of pins to channels +extern const uint8_t PROGMEM analog_pin_to_channel_PGM[]; +#define analogPinToChannel(P) ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) ) + +#define digitalPinToInterrupt(p) ((p) == 0 ? 2 : ((p) == 1 ? 3 : ((p) == 2 ? 1 : ((p) == 3 ? 0 : ((p) == 7 ? 4 : NOT_AN_INTERRUPT))))) + +#ifdef ARDUINO_MAIN + +// On the Arduino board, digital pins are also used +// for the analog output (software PWM). Analog input +// pins are a separate set. + +// ATMEL ATMEGA32U4 / ARDUINO LEONARDO +// +// D0 PD2 RXD1/INT2 +// D1 PD3 TXD1/INT3 +// D2 PD1 SDA SDA/INT1 +// D3# PD0 PWM8/SCL OC0B/SCL/INT0 +// D4 A6 PD4 ADC8 +// D5# PC6 ??? OC3A/#OC4A +// D6# A7 PD7 FastPWM #OC4D/ADC10 +// D7 PE6 INT6/AIN0 +// +// D8 A8 PB4 ADC11/PCINT4 +// D9# A9 PB5 PWM16 OC1A/#OC4B/ADC12/PCINT5 +// D10# A10 PB6 PWM16 OC1B/0c4B/ADC13/PCINT6 +// D11# PB7 PWM8/16 0C0A/OC1C/#RTS/PCINT7 +// D12 A11 PD6 T1/#OC4D/ADC9 +// D13# PC7 PWM10 CLK0/OC4A +// +// A0 D18 PF7 ADC7 +// A1 D19 PF6 ADC6 +// A2 D20 PF5 ADC5 +// A3 D21 PF4 ADC4 +// A4 D22 PF1 ADC1 +// A5 D23 PF0 ADC0 +// +// New pins D14..D17 to map SPI port to digital pins +// +// MISO D14 PB3 MISO,PCINT3 +// SCK D15 PB1 SCK,PCINT1 +// MOSI D16 PB2 MOSI,PCINT2 +// SS D17 PB0 RXLED,SS/PCINT0 +// +// Connected LEDs on board for TX and RX +// TXLED D24 PD5 XCK1 +// RXLED D17 PB0 +// HWB PE2 HWB + +// these arrays map port names (e.g. port B) to the +// appropriate addresses for various functions (e.g. reading +// and writing) +const uint16_t PROGMEM port_to_mode_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &DDRB, + (uint16_t) &DDRC, + (uint16_t) &DDRD, + (uint16_t) &DDRE, + (uint16_t) &DDRF, +}; + +const uint16_t PROGMEM port_to_output_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PORTB, + (uint16_t) &PORTC, + (uint16_t) &PORTD, + (uint16_t) &PORTE, + (uint16_t) &PORTF, +}; + +const uint16_t PROGMEM port_to_input_PGM[] = { + NOT_A_PORT, + NOT_A_PORT, + (uint16_t) &PINB, + (uint16_t) &PINC, + (uint16_t) &PIND, + (uint16_t) &PINE, + (uint16_t) &PINF, +}; + +const uint8_t PROGMEM digital_pin_to_port_PGM[] = { + PD, // D0 - PD2 + PD, // D1 - PD3 + PD, // D2 - PD1 + PD, // D3 - PD0 + PD, // D4 - PD4 + PC, // D5 - PC6 + PD, // D6 - PD7 + PE, // D7 - PE6 + + PB, // D8 - PB4 + PB, // D9 - PB5 + PB, // D10 - PB6 + PB, // D11 - PB7 + PD, // D12 - PD6 + PC, // D13 - PC7 + + PB, // D14 - MISO - PB3 + PB, // D15 - SCK - PB1 + PB, // D16 - MOSI - PB2 + PB, // D17 - SS - PB0 + + PF, // D18 - A0 - PF7 + PF, // D19 - A1 - PF6 + PF, // D20 - A2 - PF5 + PF, // D21 - A3 - PF4 + PF, // D22 - A4 - PF1 + PF, // D23 - A5 - PF0 + + PD, // D24 - PD5 + PD, // D25 / D6 - A7 - PD7 + PB, // D26 / D8 - A8 - PB4 + PB, // D27 / D9 - A9 - PB5 + PB, // D28 / D10 - A10 - PB6 + PD, // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_bit_mask_PGM[] = { + _BV(2), // D0 - PD2 + _BV(3), // D1 - PD3 + _BV(1), // D2 - PD1 + _BV(0), // D3 - PD0 + _BV(4), // D4 - PD4 + _BV(6), // D5 - PC6 + _BV(7), // D6 - PD7 + _BV(6), // D7 - PE6 + + _BV(4), // D8 - PB4 + _BV(5), // D9 - PB5 + _BV(6), // D10 - PB6 + _BV(7), // D11 - PB7 + _BV(6), // D12 - PD6 + _BV(7), // D13 - PC7 + + _BV(3), // D14 - MISO - PB3 + _BV(1), // D15 - SCK - PB1 + _BV(2), // D16 - MOSI - PB2 + _BV(0), // D17 - SS - PB0 + + _BV(7), // D18 - A0 - PF7 + _BV(6), // D19 - A1 - PF6 + _BV(5), // D20 - A2 - PF5 + _BV(4), // D21 - A3 - PF4 + _BV(1), // D22 - A4 - PF1 + _BV(0), // D23 - A5 - PF0 + + _BV(5), // D24 - PD5 + _BV(7), // D25 / D6 - A7 - PD7 + _BV(4), // D26 / D8 - A8 - PB4 + _BV(5), // D27 / D9 - A9 - PB5 + _BV(6), // D28 / D10 - A10 - PB6 + _BV(6), // D29 / D12 - A11 - PD6 +}; + +const uint8_t PROGMEM digital_pin_to_timer_PGM[] = { + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + TIMER0B, /* 3 */ + NOT_ON_TIMER, + TIMER3A, /* 5 */ + TIMER4D, /* 6 */ + NOT_ON_TIMER, + + NOT_ON_TIMER, + TIMER1A, /* 9 */ + TIMER1B, /* 10 */ + TIMER0A, /* 11 */ + + NOT_ON_TIMER, + TIMER4A, /* 13 */ + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, + NOT_ON_TIMER, +}; + +const uint8_t PROGMEM analog_pin_to_channel_PGM[] = { + 7, // A0 PF7 ADC7 + 6, // A1 PF6 ADC6 + 5, // A2 PF5 ADC5 + 4, // A3 PF4 ADC4 + 1, // A4 PF1 ADC1 + 0, // A5 PF0 ADC0 + 8, // A6 D4 PD4 ADC8 + 10, // A7 D6 PD7 ADC10 + 11, // A8 D8 PB4 ADC11 + 12, // A9 D9 PB5 ADC12 + 13, // A10 D10 PB6 ADC13 + 9 // A11 D12 PD6 ADC9 +}; + +#endif /* ARDUINO_MAIN */ + +// These serial port names are intended to allow libraries and architecture-neutral +// sketches to automatically default to the correct port name for a particular type +// of use. For example, a GPS module would normally connect to SERIAL_PORT_HARDWARE_OPEN, +// the first hardware serial port whose RX/TX pins are not dedicated to another use. +// +// SERIAL_PORT_MONITOR Port which normally prints to the Arduino Serial Monitor +// +// SERIAL_PORT_USBVIRTUAL Port which is USB virtual serial +// +// SERIAL_PORT_LINUXBRIDGE Port which connects to a Linux system via Bridge library +// +// SERIAL_PORT_HARDWARE Hardware serial port, physical RX & TX pins. +// +// SERIAL_PORT_HARDWARE_OPEN Hardware serial ports which are open for use. Their RX & TX +// pins are NOT connected to anything by default. +#define SERIAL_PORT_MONITOR Serial +#define SERIAL_PORT_USBVIRTUAL Serial +#define SERIAL_PORT_HARDWARE Serial1 +#define SERIAL_PORT_HARDWARE_OPEN Serial1 + +#endif /* Pins_Arduino_h */ diff --git a/keyboards/crkbd/readme.md b/keyboards/crkbd/readme.md new file mode 100644 index 0000000000..2f9f047a47 --- /dev/null +++ b/keyboards/crkbd/readme.md @@ -0,0 +1,17 @@ +Crkbd +=== + +![Crkbd](https://user-images.githubusercontent.com/736191/40575636-6fba63a4-6123-11e8-9ca0-3f990f1f9f4c.jpg) + +![Crkbd](https://user-images.githubusercontent.com/736191/40887871-0eead5dc-678a-11e8-9518-e3ad9e5d2bac.png) + +A split keyboard with 3x6 vertically staggered keys and 3 thumb keys. + +Keyboard Maintainer: [foostan](https://github.com/foostan/) [@foostan](https://twitter.com/foostan) +Hardware Supported: Crkbd PCB, Pro Micro +Hardware Availability: [PCB & Case Data](https://github.com/foostan/crkbd) +Make example for this keyboard (after setting up your build environment): + + make crkbd: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/crkbd/rev1/config.h b/keyboards/crkbd/rev1/config.h new file mode 100644 index 0000000000..6321136a73 --- /dev/null +++ b/keyboards/crkbd/rev1/config.h @@ -0,0 +1,87 @@ +/* +Copyright 2012 Jun Wako +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 . +*/ + +#ifndef REV1_CONFIG_H +#define REV1_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER foostan +#define PRODUCT Crkbd +#define DESCRIPTION A split keyboard with 3x6 vertically staggered keys and 3 thumb keys + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 7 +#define MATRIX_ROW_PINS { D4, C6, D7, E6 } + +// wiring of each half +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3, B2 } +// #define MATRIX_COL_PINS { B2, B3, B1, F7, F6, F5, F4 } //uncomment this line and comment line above if you need to reverse left-to-right key order + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define ws2812_PORTREG PORTD +#define ws2812_DDRREG DDRD + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + + +#endif diff --git a/keyboards/crkbd/rev1/matrix.c b/keyboards/crkbd/rev1/matrix.c new file mode 100644 index 0000000000..117ff8d37f --- /dev/null +++ b/keyboards/crkbd/rev1/matrix.c @@ -0,0 +1,348 @@ +/* +Copyright 2012 Jun Wako + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include +#include +#include +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "split_util.h" +#include "pro_micro.h" +#include "config.h" + +#ifdef USE_MATRIX_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +#define ERROR_DISCONNECT_COUNT 5 + +static uint8_t debouncing = DEBOUNCE; +static const int ROWS_PER_HAND = MATRIX_ROWS/2; +static uint8_t error_count = 0; +uint8_t is_master = 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]; + +static matrix_row_t read_cols(void); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); +static uint8_t matrix_master_scan(void); + + +__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; + } + + is_master = has_usb(); + + matrix_init_quantum(); +} + +uint8_t _matrix_scan(void) +{ + // Right hand is stored after the left in the matirx so, we need to offset it + int offset = isLeftHand ? 0 : (ROWS_PER_HAND); + + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + select_row(i); + _delay_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(); + if (matrix_debouncing[i+offset] != cols) { + matrix_debouncing[i+offset] = cols; + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < ROWS_PER_HAND; i++) { + matrix[i+offset] = matrix_debouncing[i+offset]; + } + } + } + + return 1; +} + +#ifdef USE_MATRIX_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; + int ret=serial_update_buffers(); + if (ret ) { + if(ret==2)RXLED1; + return 1; + } +RXLED0; + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[slaveOffset+i] = serial_slave_buffer[i]; + } + return 0; +} +#endif + +uint8_t matrix_scan(void) +{ + if (is_master) { + matrix_master_scan(); + }else{ + matrix_slave_scan(); + +// if(serial_slave_DATA_CORRUPT()){ +// TXLED0; + int offset = (isLeftHand) ? ROWS_PER_HAND : 0; + + for (int i = 0; i < ROWS_PER_HAND; ++i) { + matrix[offset+i] = serial_master_buffer[i]; + } + +// }else{ +// TXLED1; +// } + + matrix_scan_quantum(); + } + return 1; +} + + +uint8_t matrix_master_scan(void) { + + int ret = _matrix_scan(); + + int offset = (isLeftHand) ? 0 : ROWS_PER_HAND; + +#ifdef USE_MATRIX_I2C +// for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+i]; */ +// i2c_slave_buffer[i] = matrix[offset+i]; +// } +#else // USE_SERIAL + for (int i = 0; i < ROWS_PER_HAND; ++i) { + serial_master_buffer[i] = matrix[offset+i]; + } +#endif + +#ifdef USE_MATRIX_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_MATRIX_I2C + for (int i = 0; i < ROWS_PER_HAND; ++i) { + /* i2c_slave_buffer[i] = matrix[offset+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<> 4) + 1) &= ~_BV(col_pins[x] & 0xF); + _SFR_IO8((col_pins[x] >> 4) + 2) |= _BV(col_pins[x] & 0xF); + } +} + +static matrix_row_t read_cols(void) +{ + matrix_row_t result = 0; + for(int x = 0; x < MATRIX_COLS; x++) { + result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); + } + return result; +} + +static void unselect_rows(void) +{ + for(int x = 0; x < ROWS_PER_HAND; x++) { + _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); + _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); + } +} + +static void select_row(uint8_t row) +{ + _SFR_IO8((row_pins[row] >> 4) + 1) |= _BV(row_pins[row] & 0xF); + _SFR_IO8((row_pins[row] >> 4) + 2) &= ~_BV(row_pins[row] & 0xF); +} diff --git a/keyboards/crkbd/rev1/rev1.c b/keyboards/crkbd/rev1/rev1.c new file mode 100644 index 0000000000..6523feebad --- /dev/null +++ b/keyboards/crkbd/rev1/rev1.c @@ -0,0 +1,32 @@ +#include "crkbd.h" + + +#ifdef AUDIO_ENABLE + float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + +#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) { + + #ifdef AUDIO_ENABLE + _delay_ms(20); // gets rid of tick + PLAY_SONG(tone_startup); + #endif + + matrix_init_user(); +}; + +void shutdown_kb(void) { + #ifdef AUDIO_ENABLE + PLAY_SONG(tone_goodbye); + _delay_ms(150); + stop_all_notes(); + #endif +} diff --git a/keyboards/crkbd/rev1/rev1.h b/keyboards/crkbd/rev1/rev1.h new file mode 100644 index 0000000000..d02c51f30e --- /dev/null +++ b/keyboards/crkbd/rev1/rev1.h @@ -0,0 +1,53 @@ +#ifndef REV1_H +#define REV1_CONFIG_H + +#include "../crkbd.h" + +//void promicro_bootloader_jmp(bool program); +#include "quantum.h" + +#ifdef RGBLIGHT_ENABLE +//rgb led driver +#include "ws2812.h" +#endif + +#ifdef USE_I2C +#include +#ifdef __AVR__ + #include + #include +#endif +#endif + +//void promicro_bootloader_jmp(bool program); +#define LAYOUT( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, R30, R31, R32 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { KC_NO, KC_NO, KC_NO, L30, L31, L32 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { KC_NO, KC_NO, KC_NO, R32, R31, R30 } \ + } + +#define LAYOUT_kc( \ + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, R30, R31, R32 \ + ) \ + LAYOUT( \ + KC_##L00, KC_##L01, KC_##L02, KC_##L03, KC_##L04, KC_##L05, KC_##R00, KC_##R01, KC_##R02, KC_##R03, KC_##R04, KC_##R05, \ + KC_##L10, KC_##L11, KC_##L12, KC_##L13, KC_##L14, KC_##L15, KC_##R10, KC_##R11, KC_##R12, KC_##R13, KC_##R14, KC_##R15, \ + KC_##L20, KC_##L21, KC_##L22, KC_##L23, KC_##L24, KC_##L25, KC_##R20, KC_##R21, KC_##R22, KC_##R23, KC_##R24, KC_##R25, \ + KC_##L30, KC_##L31, KC_##L32, KC_##R30, KC_##R31, KC_##R32 \ + ) + +#endif diff --git a/keyboards/crkbd/rev1/rules.mk b/keyboards/crkbd/rev1/rules.mk new file mode 100644 index 0000000000..7af7ffdb8a --- /dev/null +++ b/keyboards/crkbd/rev1/rules.mk @@ -0,0 +1,2 @@ +SRC += rev1/matrix.c \ + ws2812.c diff --git a/keyboards/crkbd/rules.mk b/keyboards/crkbd/rules.mk new file mode 100644 index 0000000000..d88daebf3a --- /dev/null +++ b/keyboards/crkbd/rules.mk @@ -0,0 +1,74 @@ +SRC += i2c.c \ + serial.c \ + split_util.c \ + ssd1306.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) + +# 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 = 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 = 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 = 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. +SUBPROJECT_rev1 = no +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 + +DEFAULT_FOLDER = crkbd/rev1 diff --git a/keyboards/crkbd/serial.c b/keyboards/crkbd/serial.c new file mode 100644 index 0000000000..e918ab6ee6 --- /dev/null +++ b/keyboards/crkbd/serial.c @@ -0,0 +1,238 @@ +/* + * WARNING: be careful changing this code, it is very timing dependent + */ + +#ifndef F_CPU +#define F_CPU 16000000 +#endif + +#include +#include +#include +#include +#include "serial.h" + +#ifdef USE_SERIAL + +// 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); +} +void serial_delay_short(void) { + _delay_us(SERIAL_DELAY-1); +} +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(); + +#ifndef USE_SERIAL_PD2 + // Enable INT0 + EIMSK |= _BV(INT0); + // Trigger on falling edge of INT0 + EICRA &= ~(_BV(ISC00) | _BV(ISC01)); +#else + // Enable INT2 + EIMSK |= _BV(INT2); + // Trigger on falling edge of INT2 + EICRA &= ~(_BV(ISC20) | _BV(ISC21)); +#endif +} + +// 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(); + _delay_us(SERIAL_DELAY-5); +} + +// 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 2; + } + + 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/crkbd/serial.h b/keyboards/crkbd/serial.h new file mode 100644 index 0000000000..43e51f7fa4 --- /dev/null +++ b/keyboards/crkbd/serial.h @@ -0,0 +1,32 @@ +#ifndef MY_SERIAL_H +#define MY_SERIAL_H + +#include "config.h" +#include + +/* TODO: some defines for interrupt setup */ +#define SERIAL_PIN_DDR DDRD +#define SERIAL_PIN_PORT PORTD +#define SERIAL_PIN_INPUT PIND + +#ifndef USE_SERIAL_PD2 +#define SERIAL_PIN_MASK _BV(PD0) +#define SERIAL_PIN_INTERRUPT INT0_vect +#else +#define SERIAL_PIN_MASK _BV(PD2) +#define SERIAL_PIN_INTERRUPT INT2_vect +#endif + +#define SERIAL_SLAVE_BUFFER_LENGTH MATRIX_ROWS/2 +#define SERIAL_MASTER_BUFFER_LENGTH MATRIX_ROWS/2 + +// 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/crkbd/split_util.c b/keyboards/crkbd/split_util.c new file mode 100644 index 0000000000..8bc064174e --- /dev/null +++ b/keyboards/crkbd/split_util.c @@ -0,0 +1,71 @@ +#include +#include +#include +#include +#include +#include +#include "split_util.h" +#include "matrix.h" +#include "keyboard.h" +#include "config.h" + +#ifdef USE_MATRIX_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_MATRIX_I2C + i2c_master_init(); +#else + serial_master_init(); +#endif +} + +static void keyboard_slave_setup(void) { + +#ifdef USE_MATRIX_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< +#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 matrix_master_OLED_init (void); + +#endif diff --git a/keyboards/crkbd/ssd1306.c b/keyboards/crkbd/ssd1306.c new file mode 100644 index 0000000000..d079001199 --- /dev/null +++ b/keyboards/crkbd/ssd1306.c @@ -0,0 +1,330 @@ +#ifdef SSD1306OLED + +#include "ssd1306.h" +#include "i2c.h" +#include +#include "print.h" +#include "glcdfont.c" +#ifdef ADAFRUIT_BLE_ENABLE +#include "adafruit_ble.h" +#endif +#ifdef PROTOCOL_LUFA +#include "lufa.h" +#endif +#include "sendchar.h" +#include "timer.h" + +// Set this to 1 to help diagnose early startup problems +// when testing power-on with ble. Turn it off otherwise, +// as the latency of printing most of the debug info messes +// with the matrix scan, causing keys to drop. +#define DEBUG_TO_SCREEN 0 + +//static uint16_t last_battery_update; +//static uint32_t vbat; +//#define BatteryUpdateInterval 10000 /* milliseconds */ +#define ScreenOffInterval 300000 /* milliseconds */ +#if DEBUG_TO_SCREEN +static uint8_t displaying; +#endif +static uint16_t last_flush; + +// Write command sequence. +// Returns true on success. +static inline bool _send_cmd1(uint8_t cmd) { + bool res = false; + + if (i2c_start_write(SSD1306_ADDRESS)) { + xprintf("failed to start write to %d\n", SSD1306_ADDRESS); + goto done; + } + + if (i2c_master_write(0x0 /* command byte follows */)) { + print("failed to write control byte\n"); + + goto done; + } + + if (i2c_master_write(cmd)) { + xprintf("failed to write command %d\n", cmd); + goto done; + } + res = true; +done: + i2c_master_stop(); + return res; +} + +// Write 2-byte command sequence. +// Returns true on success +static inline bool _send_cmd2(uint8_t cmd, uint8_t opr) { + if (!_send_cmd1(cmd)) { + return false; + } + return _send_cmd1(opr); +} + +// Write 3-byte command sequence. +// Returns true on success +static inline bool _send_cmd3(uint8_t cmd, uint8_t opr1, uint8_t opr2) { + if (!_send_cmd1(cmd)) { + return false; + } + if (!_send_cmd1(opr1)) { + return false; + } + return _send_cmd1(opr2); +} + +#define send_cmd1(c) if (!_send_cmd1(c)) {goto done;} +#define send_cmd2(c,o) if (!_send_cmd2(c,o)) {goto done;} +#define send_cmd3(c,o1,o2) if (!_send_cmd3(c,o1,o2)) {goto done;} + +static void clear_display(void) { + matrix_clear(&display); + + // Clear all of the display bits (there can be random noise + // in the RAM on startup) + send_cmd3(PageAddr, 0, (DisplayHeight / 8) - 1); + send_cmd3(ColumnAddr, 0, DisplayWidth - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < DisplayWidth; ++col) { + i2c_master_write(0); + } + } + + display.dirty = false; + +done: + i2c_master_stop(); +} + +#if DEBUG_TO_SCREEN +#undef sendchar +static int8_t capture_sendchar(uint8_t c) { + sendchar(c); + iota_gfx_write_char(c); + + if (!displaying) { + iota_gfx_flush(); + } + return 0; +} +#endif + +bool iota_gfx_init(bool rotate) { + bool success = false; + + send_cmd1(DisplayOff); + send_cmd2(SetDisplayClockDiv, 0x80); + send_cmd2(SetMultiPlex, DisplayHeight - 1); + + send_cmd2(SetDisplayOffset, 0); + + + send_cmd1(SetStartLine | 0x0); + send_cmd2(SetChargePump, 0x14 /* Enable */); + send_cmd2(SetMemoryMode, 0 /* horizontal addressing */); + + if(rotate){ + // the following Flip the display orientation 180 degrees + send_cmd1(SegRemap); + send_cmd1(ComScanInc); + }else{ + // Flips the display orientation 0 degrees + send_cmd1(SegRemap | 0x1); + send_cmd1(ComScanDec); + } + + send_cmd2(SetComPins, 0x2); + send_cmd2(SetContrast, 0x8f); + send_cmd2(SetPreCharge, 0xf1); + send_cmd2(SetVComDetect, 0x40); + send_cmd1(DisplayAllOnResume); + send_cmd1(NormalDisplay); + send_cmd1(DeActivateScroll); + send_cmd1(DisplayOn); + + send_cmd2(SetContrast, 0); // Dim + + clear_display(); + + success = true; + + iota_gfx_flush(); + +#if DEBUG_TO_SCREEN + print_set_sendchar(capture_sendchar); +#endif + +done: + return success; +} + +bool iota_gfx_off(void) { + bool success = false; + + send_cmd1(DisplayOff); + success = true; + +done: + return success; +} + +bool iota_gfx_on(void) { + bool success = false; + + send_cmd1(DisplayOn); + success = true; + +done: + return success; +} + +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c) { + *matrix->cursor = c; + ++matrix->cursor; + + if (matrix->cursor - &matrix->display[0][0] == sizeof(matrix->display)) { + // We went off the end; scroll the display upwards by one line + memmove(&matrix->display[0], &matrix->display[1], + MatrixCols * (MatrixRows - 1)); + matrix->cursor = &matrix->display[MatrixRows - 1][0]; + memset(matrix->cursor, ' ', MatrixCols); + } +} + +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c) { + matrix->dirty = true; + + if (c == '\n') { + // Clear to end of line from the cursor and then move to the + // start of the next line + uint8_t cursor_col = (matrix->cursor - &matrix->display[0][0]) % MatrixCols; + + while (cursor_col++ < MatrixCols) { + matrix_write_char_inner(matrix, ' '); + } + return; + } + + matrix_write_char_inner(matrix, c); +} + +void iota_gfx_write_char(uint8_t c) { + matrix_write_char(&display, c); +} + +void matrix_write(struct CharacterMatrix *matrix, const char *data) { + const char *end = data + strlen(data); + while (data < end) { + matrix_write_char(matrix, *data); + ++data; + } +} + +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data) { + char data_ln[strlen(data)+2]; + snprintf(data_ln, sizeof(data_ln), "%s\n", data); + matrix_write(matrix, data_ln); +} + +void iota_gfx_write(const char *data) { + matrix_write(&display, data); +} + +void matrix_write_P(struct CharacterMatrix *matrix, const char *data) { + while (true) { + uint8_t c = pgm_read_byte(data); + if (c == 0) { + return; + } + matrix_write_char(matrix, c); + ++data; + } +} + +void iota_gfx_write_P(const char *data) { + matrix_write_P(&display, data); +} + +void matrix_clear(struct CharacterMatrix *matrix) { + memset(matrix->display, ' ', sizeof(matrix->display)); + matrix->cursor = &matrix->display[0][0]; + matrix->dirty = true; +} + +void iota_gfx_clear_screen(void) { + matrix_clear(&display); +} + +void matrix_render(struct CharacterMatrix *matrix) { + last_flush = timer_read(); + iota_gfx_on(); +#if DEBUG_TO_SCREEN + ++displaying; +#endif + + // Move to the home position + send_cmd3(PageAddr, 0, MatrixRows - 1); + send_cmd3(ColumnAddr, 0, (MatrixCols * FontWidth) - 1); + + if (i2c_start_write(SSD1306_ADDRESS)) { + goto done; + } + if (i2c_master_write(0x40)) { + // Data mode + goto done; + } + + for (uint8_t row = 0; row < MatrixRows; ++row) { + for (uint8_t col = 0; col < MatrixCols; ++col) { + const uint8_t *glyph = font + (matrix->display[row][col] * FontWidth); + + for (uint8_t glyphCol = 0; glyphCol < FontWidth; ++glyphCol) { + uint8_t colBits = pgm_read_byte(glyph + glyphCol); + i2c_master_write(colBits); + } + + // 1 column of space between chars (it's not included in the glyph) + //i2c_master_write(0); + } + } + + matrix->dirty = false; + +done: + i2c_master_stop(); +#if DEBUG_TO_SCREEN + --displaying; +#endif +} + +void iota_gfx_flush(void) { + matrix_render(&display); +} + +__attribute__ ((weak)) +void iota_gfx_task_user(void) { +} + +void iota_gfx_task(void) { + iota_gfx_task_user(); + + if (display.dirty) { + iota_gfx_flush(); + } + + if (timer_elapsed(last_flush) > ScreenOffInterval) { + iota_gfx_off(); + } +} +#endif diff --git a/keyboards/crkbd/ssd1306.h b/keyboards/crkbd/ssd1306.h new file mode 100644 index 0000000000..59d31c9f32 --- /dev/null +++ b/keyboards/crkbd/ssd1306.h @@ -0,0 +1,94 @@ +#ifndef SSD1306_H +#define SSD1306_H + +#include +#include +#include "pincontrol.h" +#include "config.h" + +enum ssd1306_cmds { + DisplayOff = 0xAE, + DisplayOn = 0xAF, + + SetContrast = 0x81, + DisplayAllOnResume = 0xA4, + + DisplayAllOn = 0xA5, + NormalDisplay = 0xA6, + InvertDisplay = 0xA7, + SetDisplayOffset = 0xD3, + SetComPins = 0xda, + SetVComDetect = 0xdb, + SetDisplayClockDiv = 0xD5, + SetPreCharge = 0xd9, + SetMultiPlex = 0xa8, + SetLowColumn = 0x00, + SetHighColumn = 0x10, + SetStartLine = 0x40, + + SetMemoryMode = 0x20, + ColumnAddr = 0x21, + PageAddr = 0x22, + + ComScanInc = 0xc0, + ComScanDec = 0xc8, + SegRemap = 0xa0, + SetChargePump = 0x8d, + ExternalVcc = 0x01, + SwitchCapVcc = 0x02, + + ActivateScroll = 0x2f, + DeActivateScroll = 0x2e, + SetVerticalScrollArea = 0xa3, + RightHorizontalScroll = 0x26, + LeftHorizontalScroll = 0x27, + VerticalAndRightHorizontalScroll = 0x29, + VerticalAndLeftHorizontalScroll = 0x2a, +}; + +// Controls the SSD1306 128x32 OLED display via i2c + +#ifndef SSD1306_ADDRESS +#define SSD1306_ADDRESS 0x3C +#endif + +#define DisplayHeight 32 +#define DisplayWidth 128 + +#define FontHeight 8 +#define FontWidth 6 + +#define MatrixRows (DisplayHeight / FontHeight) +#define MatrixCols (DisplayWidth / FontWidth) + +struct CharacterMatrix { + uint8_t display[MatrixRows][MatrixCols]; + uint8_t *cursor; + bool dirty; +}; + +struct CharacterMatrix display; + +bool iota_gfx_init(bool rotate); +void iota_gfx_task(void); +bool iota_gfx_off(void); +bool iota_gfx_on(void); +void iota_gfx_flush(void); +void iota_gfx_write_char(uint8_t c); +void iota_gfx_write(const char *data); +void iota_gfx_write_P(const char *data); +void iota_gfx_clear_screen(void); + +void iota_gfx_task_user(void); + +void matrix_clear(struct CharacterMatrix *matrix); +void matrix_write_char_inner(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write_char(struct CharacterMatrix *matrix, uint8_t c); +void matrix_write(struct CharacterMatrix *matrix, const char *data); +void matrix_write_ln(struct CharacterMatrix *matrix, const char *data); +void matrix_write_P(struct CharacterMatrix *matrix, const char *data); +void matrix_render(struct CharacterMatrix *matrix); + + + +#endif -- cgit v1.2.3 From aaeaf27e116e3386301963e37d61341a65256543 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 9 Jun 2018 13:25:22 -0700 Subject: Adding Singa Repo w/ Config Support (#3155) * Adding Singa Repo w/ Config Support * Used Tilde instead of GRV * PR Fixes * oops, forgot to change the keymaps * splitbs -> split_bs --- keyboards/singa/config.h | 49 ++++ keyboards/singa/i2c.c | 106 +++++++ keyboards/singa/i2c.h | 27 ++ keyboards/singa/info.json | 36 +++ keyboards/singa/keymaps/amnesia0287/config.h | 24 ++ keyboards/singa/keymaps/amnesia0287/keymap.c | 41 +++ keyboards/singa/keymaps/amnesia0287/readme.md | 1 + keyboards/singa/keymaps/amnesia0287/rules.mk | 0 keyboards/singa/keymaps/default/config.h | 24 ++ keyboards/singa/keymaps/default/keymap.c | 39 +++ keyboards/singa/keymaps/default/readme.md | 1 + keyboards/singa/keymaps/default/rules.mk | 0 keyboards/singa/keymaps/test/config.h | 24 ++ keyboards/singa/keymaps/test/keymap.c | 47 +++ keyboards/singa/keymaps/test/readme.md | 1 + keyboards/singa/keymaps/test/rules.mk | 0 keyboards/singa/matrix.c | 112 ++++++++ keyboards/singa/readme.md | 19 ++ keyboards/singa/rules.mk | 50 ++++ keyboards/singa/singa.c | 44 +++ keyboards/singa/singa.h | 143 ++++++++++ keyboards/singa/usbconfig.h | 396 ++++++++++++++++++++++++++ 22 files changed, 1184 insertions(+) create mode 100644 keyboards/singa/config.h create mode 100644 keyboards/singa/i2c.c create mode 100644 keyboards/singa/i2c.h create mode 100644 keyboards/singa/info.json create mode 100644 keyboards/singa/keymaps/amnesia0287/config.h create mode 100644 keyboards/singa/keymaps/amnesia0287/keymap.c create mode 100644 keyboards/singa/keymaps/amnesia0287/readme.md create mode 100644 keyboards/singa/keymaps/amnesia0287/rules.mk create mode 100644 keyboards/singa/keymaps/default/config.h create mode 100644 keyboards/singa/keymaps/default/keymap.c create mode 100644 keyboards/singa/keymaps/default/readme.md create mode 100644 keyboards/singa/keymaps/default/rules.mk create mode 100644 keyboards/singa/keymaps/test/config.h create mode 100644 keyboards/singa/keymaps/test/keymap.c create mode 100644 keyboards/singa/keymaps/test/readme.md create mode 100644 keyboards/singa/keymaps/test/rules.mk create mode 100644 keyboards/singa/matrix.c create mode 100644 keyboards/singa/readme.md create mode 100644 keyboards/singa/rules.mk create mode 100644 keyboards/singa/singa.c create mode 100644 keyboards/singa/singa.h create mode 100644 keyboards/singa/usbconfig.h (limited to 'keyboards') diff --git a/keyboards/singa/config.h b/keyboards/singa/config.h new file mode 100644 index 0000000000..a76a4b98ff --- /dev/null +++ b/keyboards/singa/config.h @@ -0,0 +1,49 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +#define VENDOR_ID 0x20A0 +#define PRODUCT_ID 0x422D +#define MANUFACTURER Singa Keyboards +#define PRODUCT Singa + +#define RGBLED_NUM 16 + +#define MATRIX_ROWS 7 +#define MATRIX_COLS 15 + +#define MATRIX_ROW_PINS { B0, B1, B2, B3, B4, B5, B6 } +#define MATRIX_COL_PINS { A0, A1, A2, A3, A4, A5, A6, A7, C7, C6, C5, C4, C3, C2, D7 } +#define UNUSED_PINS + +#define DIODE_DIRECTION COL2ROW +#define DEBOUNCING_DELAY 5 + +#define NO_BACKLIGHT_CLOCK +#define BACKLIGHT_LEVELS 1 +#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))) + +#endif diff --git a/keyboards/singa/i2c.c b/keyboards/singa/i2c.c new file mode 100644 index 0000000000..e8c4455ad1 --- /dev/null +++ b/keyboards/singa/i2c.c @@ -0,0 +1,106 @@ +/* +Copyright 2016 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +// Please do not modify this file + +#include +#include + +#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< + +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 . +*/ + +// Please do not modify this file + +#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/singa/info.json b/keyboards/singa/info.json new file mode 100644 index 0000000000..04ef14d3b9 --- /dev/null +++ b/keyboards/singa/info.json @@ -0,0 +1,36 @@ +{ + "keyboard_name": "Singa", + "url": "http://singakbd.com/", + "maintainer": "qmk", + "width": 16, + "height": 6, + "layouts": { + "LAYOUT": { + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3}, {"label":"KD2", "x":13.75, "y":3, "w":1.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":1.25}, {"label":"K01", "x":1.25, "y":4}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K00", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":2.25}, {"label":"K20", "x":6, "y":5, "w":1.25}, {"label":"K56", "x":7.25, "y":5, "w":2.75}, {"label":"K57", "x":10, "y":5}, {"label":"K57", "x":11, "y":5}, {"label":"K57", "x":12, "y":5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + }, + + "LAYOUT_wkl": { + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + }, + + "LAYOUT_wkl_splitbs": { + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + }, + + "LAYOUT_tsangan": { + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K00", "x":1.5, "y":5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + }, + + "LAYOUT_tsangan_splitbs": { + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K00", "x":1.5, "y":5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + }, + + "LAYOUT_wk": { + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K00", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":6.25}, {"label":"K57", "x":10, "y":5, "w":1.5}, {"label":"K57", "x":11.5, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + }, + + "LAYOUT_wk_splitbs": { + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K00", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":6.25}, {"label":"K57", "x":10, "y":5, "w":1.5}, {"label":"K57", "x":11.5, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + } + } + } diff --git a/keyboards/singa/keymaps/amnesia0287/config.h b/keyboards/singa/keymaps/amnesia0287/config.h new file mode 100644 index 0000000000..0f75635051 --- /dev/null +++ b/keyboards/singa/keymaps/amnesia0287/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/singa/keymaps/amnesia0287/keymap.c b/keyboards/singa/keymaps/amnesia0287/keymap.c new file mode 100644 index 0000000000..cb0ceac1a8 --- /dev/null +++ b/keyboards/singa/keymaps/amnesia0287/keymap.c @@ -0,0 +1,41 @@ +/* Copyright 2018 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 . + */ + +#include QMK_KEYBOARD_H + +#define _BL 0 +#define _FL 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_BL] = LAYOUT_wkl( /* Base */ + 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_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_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_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_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, LT(_FL, KC_END), \ + KC_LGUI, KC_LALT, KC_SPC, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [_FL] = LAYOUT_wkl( + 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_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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_TRNS, KC_PGUP, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_MPLY, KC_TRNS, KC_HOME, KC_PGDN, KC_END \ + ) +}; diff --git a/keyboards/singa/keymaps/amnesia0287/readme.md b/keyboards/singa/keymaps/amnesia0287/readme.md new file mode 100644 index 0000000000..1f19a96b46 --- /dev/null +++ b/keyboards/singa/keymaps/amnesia0287/readme.md @@ -0,0 +1 @@ +# The default keymap for singa \ No newline at end of file diff --git a/keyboards/singa/keymaps/amnesia0287/rules.mk b/keyboards/singa/keymaps/amnesia0287/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/singa/keymaps/default/config.h b/keyboards/singa/keymaps/default/config.h new file mode 100644 index 0000000000..0f75635051 --- /dev/null +++ b/keyboards/singa/keymaps/default/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/singa/keymaps/default/keymap.c b/keyboards/singa/keymaps/default/keymap.c new file mode 100644 index 0000000000..d201f413b7 --- /dev/null +++ b/keyboards/singa/keymaps/default/keymap.c @@ -0,0 +1,39 @@ +/* Copyright 2018 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 . + */ + +#include QMK_KEYBOARD_H + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT_wkl( /* Base */ + 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_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_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_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_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, LT(1, KC_END), \ + KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [1] = LAYOUT_wkl( /* Base */ + 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_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_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, 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/singa/keymaps/default/readme.md b/keyboards/singa/keymaps/default/readme.md new file mode 100644 index 0000000000..1f19a96b46 --- /dev/null +++ b/keyboards/singa/keymaps/default/readme.md @@ -0,0 +1 @@ +# The default keymap for singa \ No newline at end of file diff --git a/keyboards/singa/keymaps/default/rules.mk b/keyboards/singa/keymaps/default/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/singa/keymaps/test/config.h b/keyboards/singa/keymaps/test/config.h new file mode 100644 index 0000000000..0f75635051 --- /dev/null +++ b/keyboards/singa/keymaps/test/config.h @@ -0,0 +1,24 @@ +/* Copyright 2018 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 . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "config_common.h" + +// place overrides here + +#endif diff --git a/keyboards/singa/keymaps/test/keymap.c b/keyboards/singa/keymaps/test/keymap.c new file mode 100644 index 0000000000..30f8de3b3d --- /dev/null +++ b/keyboards/singa/keymaps/test/keymap.c @@ -0,0 +1,47 @@ +/* Copyright 2018 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 . + */ + +#include QMK_KEYBOARD_H + +/* + Bottom Row Pins to columns group as: + 0 (LCtl) | 1 (LGui) | 2 (LAlt) | 3 (1u**) | 4 (LSplt) | 5 (Spc) | 6 (RSplt) | 8 (RAlt) | 9 (RGui) | 10 (RCtrl) | 11 (1.25 Menu) | 12 (Left) | 13 (Down) | 14 (Right) + 1-3 | 4-6 | 7-10 | 11 | 12-13 | 14-18 | 19-20 | 21-23,25 | 24,26,29 | 27,28,32,33 | 30 | 31 | 34 | 35 + + ** Can seemingly be used if all the bottom row keys besides space are 1u +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [0] = LAYOUT( /* Base */ + KC_ESC, RESET, 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_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_NO, 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_NO, KC_ENT, KC_PGDN, \ + 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, LT(1, KC_END), \ + KC_LCTL, KC_LGUI, KC_LALT, KC_NO, KC_NO, KC_SPC, KC_NO, KC_RALT, KC_NO, KC_RCTL, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT \ + ), + + [1] = LAYOUT( /* Base */ + 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_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_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, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, 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/singa/keymaps/test/readme.md b/keyboards/singa/keymaps/test/readme.md new file mode 100644 index 0000000000..1f19a96b46 --- /dev/null +++ b/keyboards/singa/keymaps/test/readme.md @@ -0,0 +1 @@ +# The default keymap for singa \ No newline at end of file diff --git a/keyboards/singa/keymaps/test/rules.mk b/keyboards/singa/keymaps/test/rules.mk new file mode 100644 index 0000000000..e69de29bb2 diff --git a/keyboards/singa/matrix.c b/keyboards/singa/matrix.c new file mode 100644 index 0000000000..245813dfd2 --- /dev/null +++ b/keyboards/singa/matrix.c @@ -0,0 +1,112 @@ +/* +Copyright 2017 Luiz Ribeiro + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include +#include + +#include "matrix.h" + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif + +static uint8_t debouncing = DEBOUNCE; + +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +void matrix_set_row_status(uint8_t row); +uint8_t bit_reverse(uint8_t x); + +void matrix_init(void) { + // all outputs for rows high + DDRB = 0xFF; + PORTB = 0xFF; + // all inputs for columns + DDRA = 0x00; + DDRC &= ~(0x111111<<2); + DDRD &= ~(1< 7 + (~PINA) & 0xFF + ) | ( + // cols 8..13, PORTC 7 -> 0 + bit_reverse((~PINC) & 0xFF) << 8 + ) | ( + // col 14, PORTD 7 + ((~PIND) & (1 << PIND7)) << 7 + ); + + if (matrix_debouncing[row] != cols) { + matrix_debouncing[row] = cols; + debouncing = DEBOUNCE; + } + } + + if (debouncing) { + if (--debouncing) { + _delay_ms(1); + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_quantum(); + + return 1; +} + +// declarations +void matrix_set_row_status(uint8_t row) { + DDRB = (1 << row); + PORTB = ~(1 << row); +} + +uint8_t bit_reverse(uint8_t x) { + x = ((x >> 1) & 0x55) | ((x << 1) & 0xaa); + x = ((x >> 2) & 0x33) | ((x << 2) & 0xcc); + x = ((x >> 4) & 0x0f) | ((x << 4) & 0xf0); + return x; +} + +inline matrix_row_t matrix_get_row(uint8_t row) { + return matrix[row]; +} + +void matrix_print(void) { +} diff --git a/keyboards/singa/readme.md b/keyboards/singa/readme.md new file mode 100644 index 0000000000..c0325d1a02 --- /dev/null +++ b/keyboards/singa/readme.md @@ -0,0 +1,19 @@ +# Singa + + +![Singa](https://i.imgur.com/VVO27Tr.jpg) + + +A short description of the keyboard/project + + +Keyboard Maintainer: [amnesia0287](https://github.com/amnesia0287) +Hardware Supported: TGR-Elaine v1.0 PCB +Hardware Availability: http://singakbd.com/ + + +Make example for this keyboard (after setting up your build environment): + + make singa: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/singa/rules.mk b/keyboards/singa/rules.mk new file mode 100644 index 0000000000..68d50aec67 --- /dev/null +++ b/keyboards/singa/rules.mk @@ -0,0 +1,50 @@ +# Copyright 2017 Luiz Ribeiro +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + +# MCU name +MCU = atmega32a +PROTOCOL = VUSB + +# 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 = yes +MOUSEKEY_ENABLE = yes +EXTRAKEY_ENABLE = yes +CONSOLE_ENABLE = yes +COMMAND_ENABLE = yes +BACKLIGHT_ENABLE = no +RGBLIGHT_ENABLE = no +RGBLIGHT_CUSTOM_DRIVER = yes + +OPT_DEFS = -DDEBUG_LEVEL=0 + +# custom matrix setup +CUSTOM_MATRIX = yes +SRC = matrix.c i2c.c + +# programming options +PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex diff --git a/keyboards/singa/singa.c b/keyboards/singa/singa.c new file mode 100644 index 0000000000..0f5ec471a8 --- /dev/null +++ b/keyboards/singa/singa.c @@ -0,0 +1,44 @@ +/* Copyright 2018 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 . + */ +#include QMK_KEYBOARD_H + +#include +#include "action_layer.h" +#include "i2c.h" +#include "quantum.h" + + +// for keyboard subdirectory level init functions +// @Override +void matrix_init_kb(void) { + // call user level keymaps, if any + matrix_init_user(); +} + +void matrix_scan_kb(void) { + 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/singa/singa.h b/keyboards/singa/singa.h new file mode 100644 index 0000000000..8221176c15 --- /dev/null +++ b/keyboards/singa/singa.h @@ -0,0 +1,143 @@ +/* Copyright 2018 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 . + */ +#ifndef SINGA_H +#define SINGA_H + +#include "quantum.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( \ + 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, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, k76, \ + k77, k78, k79, k80, k81, k82, k83, k84, k85, k86, k87, k88, k89, k90 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k30 }, \ + { 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, k66, k67, k68, k69, k70, k71, k72, k73, k74, k75, k76 }, \ + { k77, k78, k79, k80, k81, k82, KC_NO, k83, k84, k85, k86, k87, k88, k89, k90 }, \ + { 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, k15, k31 } \ +} + +#define LAYOUT_wkl( \ + 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, k66, k67, k68, k69, k70, k71, k72, k73, \ + k74, k75, k76, k77, k78, k79, k80 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, KC_NO }, \ + { 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, KC_NO, k58, k59 }, \ + { k60, KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73 }, \ + { k74, KC_NO, k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, KC_NO, KC_NO, k78, k79, k80 }, \ + { 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, k15, k30 } \ +} + +#define LAYOUT_wkl_split_bs( \ + 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, k81, 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, k66, k67, k68, k69, k70, k71, k72, k73, \ + k74, k75, k76, k77, k78, k79, k80 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k81 }, \ + { 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, KC_NO, k58, k59 }, \ + { k60, KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73 }, \ + { k74, KC_NO, k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, KC_NO, KC_NO, k78, k79, k80 }, \ + { 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, k15, k30 } \ +} + +#define LAYOUT_tsangan( \ + 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, k66, k67, k68, k69, k70, k71, k72, k73, \ + k74, k81, k75, k76, k77, k78, k79, k80 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, KC_NO }, \ + { 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, KC_NO, k58, k59 }, \ + { k60, KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73 }, \ + { k74, k81, k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, KC_NO, KC_NO, k78, k79, k80 }, \ + { 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, k15, k30 } \ +} + +#define LAYOUT_tsangan_split_bs( \ + 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, k82, 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, k66, k67, k68, k69, k70, k71, k72, k73, \ + k74, k81, k75, k76, k77, k78, k79, k80 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k82 }, \ + { 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, KC_NO, k58, k59 }, \ + { k60, KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73 }, \ + { k74, k81, k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, KC_NO, KC_NO, k78, k79, k80 }, \ + { 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, k15, k30 } \ +} + +#define LAYOUT_wk( \ + 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, k66, k67, k68, k69, k70, k71, k72, k73, \ + k74, k81, k75, k76, k77, k82, k78, k79, k80 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, KC_NO }, \ + { 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, KC_NO, k58, k59 }, \ + { k60, KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73 }, \ + { k74, k81 , k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, k82, KC_NO, k78, k79, k80 }, \ + { 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, k15, k30 } \ +} + +#define LAYOUT_wk_split_bs( \ + 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, k83, 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, k66, k67, k68, k69, k70, k71, k72, k73, \ + k74, k81, k75, k76, k77, k82, k78, k79, k80 \ +){ \ + { k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k10, k11, k12, k13, k14 }, \ + { k16, k17, k18, k19, k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k83 }, \ + { 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, KC_NO, k58, k59 }, \ + { k60, KC_NO, k61, k62, k63, k64, k65, k66, k67, k68, k69, k70, k71, k72, k73 }, \ + { k74, k81, k75, KC_NO, KC_NO, k76, KC_NO, KC_NO, k77, KC_NO, k82, KC_NO, k78, k79, k80 }, \ + { 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, k15, k30 } \ +} + +#endif diff --git a/keyboards/singa/usbconfig.h b/keyboards/singa/usbconfig.h new file mode 100644 index 0000000000..d2d848fcdc --- /dev/null +++ b/keyboards/singa/usbconfig.h @@ -0,0 +1,396 @@ +/* Name: usbconfig.h + * Project: V-USB, virtual USB port for Atmel's(r) AVR(r) microcontrollers + * Author: Christian Starkjohann + * Creation Date: 2005-04-01 + * Tabsize: 4 + * Copyright: (c) 2005 by OBJECTIVE DEVELOPMENT Software GmbH + * License: GNU GPL v2 (see License.txt), GNU GPL v3 or proprietary (CommercialLicense.txt) + * This Revision: $Id: usbconfig-prototype.h 785 2010-05-30 17:57:07Z cs $ + */ + +#ifndef __usbconfig_h_included__ +#define __usbconfig_h_included__ + +#include "config.h" + +/* +General Description: +This file is an example configuration (with inline documentation) for the USB +driver. It configures V-USB for USB D+ connected to Port D bit 2 (which is +also hardware interrupt 0 on many devices) and USB D- to Port D bit 4. You may +wire the lines to any other port, as long as D+ is also wired to INT0 (or any +other hardware interrupt, as long as it is the highest level interrupt, see +section at the end of this file). +*/ + +/* ---------------------------- Hardware Config ---------------------------- */ + +#define USB_CFG_IOPORTNAME D +/* This is the port where the USB bus is connected. When you configure it to + * "B", the registers PORTB, PINB and DDRB will be used. + */ +#define USB_CFG_DMINUS_BIT 3 +/* This is the bit number in USB_CFG_IOPORT where the USB D- line is connected. + * This may be any bit in the port. + */ +#define USB_CFG_DPLUS_BIT 2 +/* This is the bit number in USB_CFG_IOPORT where the USB D+ line is connected. + * This may be any bit in the port. Please note that D+ must also be connected + * to interrupt pin INT0! [You can also use other interrupts, see section + * "Optional MCU Description" below, or you can connect D- to the interrupt, as + * it is required if you use the USB_COUNT_SOF feature. If you use D- for the + * interrupt, the USB interrupt will also be triggered at Start-Of-Frame + * markers every millisecond.] + */ +#define USB_CFG_CLOCK_KHZ (F_CPU/1000) +/* Clock rate of the AVR in kHz. Legal values are 12000, 12800, 15000, 16000, + * 16500, 18000 and 20000. The 12.8 MHz and 16.5 MHz versions of the code + * require no crystal, they tolerate +/- 1% deviation from the nominal + * frequency. All other rates require a precision of 2000 ppm and thus a + * crystal! + * Since F_CPU should be defined to your actual clock rate anyway, you should + * not need to modify this setting. + */ +#define USB_CFG_CHECK_CRC 0 +/* Define this to 1 if you want that the driver checks integrity of incoming + * data packets (CRC checks). CRC checks cost quite a bit of code size and are + * currently only available for 18 MHz crystal clock. You must choose + * USB_CFG_CLOCK_KHZ = 18000 if you enable this option. + */ + +/* ----------------------- Optional Hardware Config ------------------------ */ + +/* #define USB_CFG_PULLUP_IOPORTNAME D */ +/* If you connect the 1.5k pullup resistor from D- to a port pin instead of + * V+, you can connect and disconnect the device from firmware by calling + * the macros usbDeviceConnect() and usbDeviceDisconnect() (see usbdrv.h). + * This constant defines the port on which the pullup resistor is connected. + */ +/* #define USB_CFG_PULLUP_BIT 4 */ +/* This constant defines the bit number in USB_CFG_PULLUP_IOPORT (defined + * above) where the 1.5k pullup resistor is connected. See description + * above for details. + */ + +/* --------------------------- Functional Range ---------------------------- */ + +#define USB_CFG_HAVE_INTRIN_ENDPOINT 1 +/* Define this to 1 if you want to compile a version with two endpoints: The + * default control endpoint 0 and an interrupt-in endpoint (any other endpoint + * number). + */ +#define USB_CFG_HAVE_INTRIN_ENDPOINT3 1 +/* Define this to 1 if you want to compile a version with three endpoints: The + * default control endpoint 0, an interrupt-in endpoint 3 (or the number + * configured below) and a catch-all default interrupt-in endpoint as above. + * You must also define USB_CFG_HAVE_INTRIN_ENDPOINT to 1 for this feature. + */ +#define USB_CFG_EP3_NUMBER 3 +/* If the so-called endpoint 3 is used, it can now be configured to any other + * endpoint number (except 0) with this macro. Default if undefined is 3. + */ +/* #define USB_INITIAL_DATATOKEN USBPID_DATA1 */ +/* The above macro defines the startup condition for data toggling on the + * interrupt/bulk endpoints 1 and 3. Defaults to USBPID_DATA1. + * Since the token is toggled BEFORE sending any data, the first packet is + * sent with the oposite value of this configuration! + */ +#define USB_CFG_IMPLEMENT_HALT 0 +/* Define this to 1 if you also want to implement the ENDPOINT_HALT feature + * for endpoint 1 (interrupt endpoint). Although you may not need this feature, + * it is required by the standard. We have made it a config option because it + * bloats the code considerably. + */ +#define USB_CFG_SUPPRESS_INTR_CODE 0 +/* Define this to 1 if you want to declare interrupt-in endpoints, but don't + * want to send any data over them. If this macro is defined to 1, functions + * usbSetInterrupt() and usbSetInterrupt3() are omitted. This is useful if + * you need the interrupt-in endpoints in order to comply to an interface + * (e.g. HID), but never want to send any data. This option saves a couple + * of bytes in flash memory and the transmit buffers in RAM. + */ +#define USB_CFG_INTR_POLL_INTERVAL 1 +/* If you compile a version with endpoint 1 (interrupt-in), this is the poll + * interval. The value is in milliseconds and must not be less than 10 ms for + * low speed devices. + */ +#define USB_CFG_IS_SELF_POWERED 0 +/* Define this to 1 if the device has its own power supply. Set it to 0 if the + * device is powered from the USB bus. + */ +#define USB_CFG_MAX_BUS_POWER 500 +/* Set this variable to the maximum USB bus power consumption of your device. + * The value is in milliamperes. [It will be divided by two since USB + * communicates power requirements in units of 2 mA.] + */ +#define USB_CFG_IMPLEMENT_FN_WRITE 1 +/* Set this to 1 if you want usbFunctionWrite() to be called for control-out + * transfers. Set it to 0 if you don't need it and want to save a couple of + * bytes. + */ +#define USB_CFG_IMPLEMENT_FN_READ 0 +/* Set this to 1 if you need to send control replies which are generated + * "on the fly" when usbFunctionRead() is called. If you only want to send + * data from a static buffer, set it to 0 and return the data from + * usbFunctionSetup(). This saves a couple of bytes. + */ +#define USB_CFG_IMPLEMENT_FN_WRITEOUT 0 +/* Define this to 1 if you want to use interrupt-out (or bulk out) endpoints. + * You must implement the function usbFunctionWriteOut() which receives all + * interrupt/bulk data sent to any endpoint other than 0. The endpoint number + * can be found in 'usbRxToken'. + */ +#define USB_CFG_HAVE_FLOWCONTROL 0 +/* Define this to 1 if you want flowcontrol over USB data. See the definition + * of the macros usbDisableAllRequests() and usbEnableAllRequests() in + * usbdrv.h. + */ +#define USB_CFG_DRIVER_FLASH_PAGE 0 +/* If the device has more than 64 kBytes of flash, define this to the 64 k page + * where the driver's constants (descriptors) are located. Or in other words: + * Define this to 1 for boot loaders on the ATMega128. + */ +#define USB_CFG_LONG_TRANSFERS 0 +/* Define this to 1 if you want to send/receive blocks of more than 254 bytes + * in a single control-in or control-out transfer. Note that the capability + * for long transfers increases the driver size. + */ +/* #define USB_RX_USER_HOOK(data, len) if(usbRxToken == (uchar)USBPID_SETUP) blinkLED(); */ +/* This macro is a hook if you want to do unconventional things. If it is + * defined, it's inserted at the beginning of received message processing. + * If you eat the received message and don't want default processing to + * proceed, do a return after doing your things. One possible application + * (besides debugging) is to flash a status LED on each packet. + */ +/* #define USB_RESET_HOOK(resetStarts) if(!resetStarts){hadUsbReset();} */ +/* This macro is a hook if you need to know when an USB RESET occurs. It has + * one parameter which distinguishes between the start of RESET state and its + * end. + */ +/* #define USB_SET_ADDRESS_HOOK() hadAddressAssigned(); */ +/* This macro (if defined) is executed when a USB SET_ADDRESS request was + * received. + */ +#define USB_COUNT_SOF 1 +/* define this macro to 1 if you need the global variable "usbSofCount" which + * counts SOF packets. This feature requires that the hardware interrupt is + * connected to D- instead of D+. + */ +/* #ifdef __ASSEMBLER__ + * macro myAssemblerMacro + * in YL, TCNT0 + * sts timer0Snapshot, YL + * endm + * #endif + * #define USB_SOF_HOOK myAssemblerMacro + * This macro (if defined) is executed in the assembler module when a + * Start Of Frame condition is detected. It is recommended to define it to + * the name of an assembler macro which is defined here as well so that more + * than one assembler instruction can be used. The macro may use the register + * YL and modify SREG. If it lasts longer than a couple of cycles, USB messages + * immediately after an SOF pulse may be lost and must be retried by the host. + * What can you do with this hook? Since the SOF signal occurs exactly every + * 1 ms (unless the host is in sleep mode), you can use it to tune OSCCAL in + * designs running on the internal RC oscillator. + * Please note that Start Of Frame detection works only if D- is wired to the + * interrupt, not D+. THIS IS DIFFERENT THAN MOST EXAMPLES! + */ +#define USB_CFG_CHECK_DATA_TOGGLING 0 +/* define this macro to 1 if you want to filter out duplicate data packets + * sent by the host. Duplicates occur only as a consequence of communication + * errors, when the host does not receive an ACK. Please note that you need to + * implement the filtering yourself in usbFunctionWriteOut() and + * usbFunctionWrite(). Use the global usbCurrentDataToken and a static variable + * for each control- and out-endpoint to check for duplicate packets. + */ +#define USB_CFG_HAVE_MEASURE_FRAME_LENGTH 0 +/* define this macro to 1 if you want the function usbMeasureFrameLength() + * compiled in. This function can be used to calibrate the AVR's RC oscillator. + */ +#define USB_USE_FAST_CRC 0 +/* The assembler module has two implementations for the CRC algorithm. One is + * faster, the other is smaller. This CRC routine is only used for transmitted + * messages where timing is not critical. The faster routine needs 31 cycles + * per byte while the smaller one needs 61 to 69 cycles. The faster routine + * may be worth the 32 bytes bigger code size if you transmit lots of data and + * run the AVR close to its limit. + */ + +/* -------------------------- Device Description --------------------------- */ + +#define USB_CFG_VENDOR_ID (VENDOR_ID & 0xFF), ((VENDOR_ID >> 8) & 0xFF) +/* USB vendor ID for the device, low byte first. If you have registered your + * own Vendor ID, define it here. Otherwise you may use one of obdev's free + * shared VID/PID pairs. Be sure to read USB-IDs-for-free.txt for rules! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_ID (PRODUCT_ID & 0xFF), ((PRODUCT_ID >> 8) & 0xFF) +/* This is the ID of the product, low byte first. It is interpreted in the + * scope of the vendor ID. If you have registered your own VID with usb.org + * or if you have licensed a PID from somebody else, define it here. Otherwise + * you may use one of obdev's free shared VID/PID pairs. See the file + * USB-IDs-for-free.txt for details! + * *** IMPORTANT NOTE *** + * This template uses obdev's shared VID/PID pair for Vendor Class devices + * with libusb: 0x16c0/0x5dc. Use this VID/PID pair ONLY if you understand + * the implications! + */ +#define USB_CFG_DEVICE_VERSION 0x00, 0x02 +/* Version number of the device: Minor number first, then major number. + */ +#define USB_CFG_VENDOR_NAME 'w', 'i', 'n', 'k', 'e', 'y', 'l', 'e', 's', 's', '.', 'k', 'r' +#define USB_CFG_VENDOR_NAME_LEN 13 +/* These two values define the vendor name returned by the USB device. The name + * must be given as a list of characters under single quotes. The characters + * are interpreted as Unicode (UTF-16) entities. + * If you don't want a vendor name string, undefine these macros. + * ALWAYS define a vendor name containing your Internet domain name if you use + * obdev's free shared VID/PID pair. See the file USB-IDs-for-free.txt for + * details. + */ +#define USB_CFG_DEVICE_NAME 'p', 's', '2', 'a', 'v', 'r', 'G', 'B' +#define USB_CFG_DEVICE_NAME_LEN 8 +/* Same as above for the device name. If you don't want a device name, undefine + * the macros. See the file USB-IDs-for-free.txt before you assign a name if + * you use a shared VID/PID. + */ +/*#define USB_CFG_SERIAL_NUMBER 'N', 'o', 'n', 'e' */ +/*#define USB_CFG_SERIAL_NUMBER_LEN 0 */ +/* Same as above for the serial number. If you don't want a serial number, + * undefine the macros. + * It may be useful to provide the serial number through other means than at + * compile time. See the section about descriptor properties below for how + * to fine tune control over USB descriptors such as the string descriptor + * for the serial number. + */ +#define USB_CFG_DEVICE_CLASS 0 +#define USB_CFG_DEVICE_SUBCLASS 0 +/* See USB specification if you want to conform to an existing device class. + * Class 0xff is "vendor specific". + */ +#define USB_CFG_INTERFACE_CLASS 3 /* HID */ +#define USB_CFG_INTERFACE_SUBCLASS 1 /* Boot */ +#define USB_CFG_INTERFACE_PROTOCOL 1 /* Keyboard */ +/* See USB specification if you want to conform to an existing device class or + * protocol. The following classes must be set at interface level: + * HID class is 3, no subclass and protocol required (but may be useful!) + * CDC class is 2, use subclass 2 and protocol 1 for ACM + */ +#define USB_CFG_HID_REPORT_DESCRIPTOR_LENGTH 0 +/* Define this to the length of the HID report descriptor, if you implement + * an HID device. Otherwise don't define it or define it to 0. + * If you use this define, you must add a PROGMEM character array named + * "usbHidReportDescriptor" to your code which contains the report descriptor. + * Don't forget to keep the array and this define in sync! + */ + +/* #define USB_PUBLIC static */ +/* Use the define above if you #include usbdrv.c instead of linking against it. + * This technique saves a couple of bytes in flash memory. + */ + +/* ------------------- Fine Control over USB Descriptors ------------------- */ +/* If you don't want to use the driver's default USB descriptors, you can + * provide our own. These can be provided as (1) fixed length static data in + * flash memory, (2) fixed length static data in RAM or (3) dynamically at + * runtime in the function usbFunctionDescriptor(). See usbdrv.h for more + * information about this function. + * Descriptor handling is configured through the descriptor's properties. If + * no properties are defined or if they are 0, the default descriptor is used. + * Possible properties are: + * + USB_PROP_IS_DYNAMIC: The data for the descriptor should be fetched + * at runtime via usbFunctionDescriptor(). If the usbMsgPtr mechanism is + * used, the data is in FLASH by default. Add property USB_PROP_IS_RAM if + * you want RAM pointers. + * + USB_PROP_IS_RAM: The data returned by usbFunctionDescriptor() or found + * in static memory is in RAM, not in flash memory. + * + USB_PROP_LENGTH(len): If the data is in static memory (RAM or flash), + * the driver must know the descriptor's length. The descriptor itself is + * found at the address of a well known identifier (see below). + * List of static descriptor names (must be declared PROGMEM if in flash): + * char usbDescriptorDevice[]; + * char usbDescriptorConfiguration[]; + * char usbDescriptorHidReport[]; + * char usbDescriptorString0[]; + * int usbDescriptorStringVendor[]; + * int usbDescriptorStringDevice[]; + * int usbDescriptorStringSerialNumber[]; + * Other descriptors can't be provided statically, they must be provided + * dynamically at runtime. + * + * Descriptor properties are or-ed or added together, e.g.: + * #define USB_CFG_DESCR_PROPS_DEVICE (USB_PROP_IS_RAM | USB_PROP_LENGTH(18)) + * + * The following descriptors are defined: + * USB_CFG_DESCR_PROPS_DEVICE + * USB_CFG_DESCR_PROPS_CONFIGURATION + * USB_CFG_DESCR_PROPS_STRINGS + * USB_CFG_DESCR_PROPS_STRING_0 + * USB_CFG_DESCR_PROPS_STRING_VENDOR + * USB_CFG_DESCR_PROPS_STRING_PRODUCT + * USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER + * USB_CFG_DESCR_PROPS_HID + * USB_CFG_DESCR_PROPS_HID_REPORT + * USB_CFG_DESCR_PROPS_UNKNOWN (for all descriptors not handled by the driver) + * + * Note about string descriptors: String descriptors are not just strings, they + * are Unicode strings prefixed with a 2 byte header. Example: + * int serialNumberDescriptor[] = { + * USB_STRING_DESCRIPTOR_HEADER(6), + * 'S', 'e', 'r', 'i', 'a', 'l' + * }; + */ + +#define USB_CFG_DESCR_PROPS_DEVICE 0 +#define USB_CFG_DESCR_PROPS_CONFIGURATION USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_CONFIGURATION 0 +#define USB_CFG_DESCR_PROPS_STRINGS 0 +#define USB_CFG_DESCR_PROPS_STRING_0 0 +#define USB_CFG_DESCR_PROPS_STRING_VENDOR 0 +#define USB_CFG_DESCR_PROPS_STRING_PRODUCT 0 +#define USB_CFG_DESCR_PROPS_STRING_SERIAL_NUMBER 0 +#define USB_CFG_DESCR_PROPS_HID USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID 0 +#define USB_CFG_DESCR_PROPS_HID_REPORT USB_PROP_IS_DYNAMIC +//#define USB_CFG_DESCR_PROPS_HID_REPORT 0 +#define USB_CFG_DESCR_PROPS_UNKNOWN 0 + +#define usbMsgPtr_t unsigned short +/* If usbMsgPtr_t is not defined, it defaults to 'uchar *'. We define it to + * a scalar type here because gcc generates slightly shorter code for scalar + * arithmetics than for pointer arithmetics. Remove this define for backward + * type compatibility or define it to an 8 bit type if you use data in RAM only + * and all RAM is below 256 bytes (tiny memory model in IAR CC). + */ + +/* ----------------------- Optional MCU Description ------------------------ */ + +/* The following configurations have working defaults in usbdrv.h. You + * usually don't need to set them explicitly. Only if you want to run + * the driver on a device which is not yet supported or with a compiler + * which is not fully supported (such as IAR C) or if you use a differnt + * interrupt than INT0, you may have to define some of these. + */ +/* #define USB_INTR_CFG MCUCR */ +/* #define USB_INTR_CFG_SET ((1 << ISC00) | (1 << ISC01)) */ +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE GIMSK */ +/* #define USB_INTR_ENABLE_BIT INT0 */ +/* #define USB_INTR_PENDING GIFR */ +/* #define USB_INTR_PENDING_BIT INTF0 */ +/* #define USB_INTR_VECTOR INT0_vect */ + +/* Set INT1 for D- falling edge to count SOF */ +/* #define USB_INTR_CFG EICRA */ +#define USB_INTR_CFG_SET ((1 << ISC11) | (0 << ISC10)) +/* #define USB_INTR_CFG_CLR 0 */ +/* #define USB_INTR_ENABLE EIMSK */ +#define USB_INTR_ENABLE_BIT INT1 +/* #define USB_INTR_PENDING EIFR */ +#define USB_INTR_PENDING_BIT INTF1 +#define USB_INTR_VECTOR INT1_vect + +#endif /* __usbconfig_h_included__ */ -- cgit v1.2.3 From 4c9641f06818ba1d1d4ce36cf3afdf6fd0383642 Mon Sep 17 00:00:00 2001 From: Jason Date: Sat, 9 Jun 2018 17:32:51 -0700 Subject: Fixsingakeymaps (#3156) * Tweak info.json * fix default for info.json * typo --- keyboards/singa/info.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/singa/info.json b/keyboards/singa/info.json index 04ef14d3b9..9ef498b294 100644 --- a/keyboards/singa/info.json +++ b/keyboards/singa/info.json @@ -6,14 +6,14 @@ "height": 6, "layouts": { "LAYOUT": { - "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3}, {"label":"KD2", "x":13.75, "y":3, "w":1.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":1.25}, {"label":"K01", "x":1.25, "y":4}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K00", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":2.25}, {"label":"K20", "x":6, "y":5, "w":1.25}, {"label":"K56", "x":7.25, "y":5, "w":2.75}, {"label":"K57", "x":10, "y":5}, {"label":"K57", "x":11, "y":5}, {"label":"K57", "x":12, "y":5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] + "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3}, {"label":"KD2", "x":13.75, "y":3, "w":1.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":1.25}, {"label":"K01", "x":1.25, "y":4}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K00", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":1}, {"label":"K56", "x":4.75, "y":5, "w":1.25}, {"label":"K20", "x":6, "y":5, "w":1.75}, {"label":"K56", "x":7.75, "y":5, "w":1.25}, {"label":"K56", "x":9, "y":5, "w":1}, {"label":"K57", "x":10, "y":5}, {"label":"K57", "x":11, "y":5}, {"label":"K57", "x":12, "y":5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] }, "LAYOUT_wkl": { "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] }, - "LAYOUT_wkl_splitbs": { + "LAYOUT_wkl_split_bs": { "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] }, @@ -21,7 +21,7 @@ "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K00", "x":1.5, "y":5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] }, - "LAYOUT_tsangan_splitbs": { + "LAYOUT_tsangan_split_bs": { "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.5}, {"label":"K00", "x":1.5, "y":5}, {"label":"K20", "x":2.5, "y":5, "w":1.5}, {"label":"K56", "x":4, "y":5, "w":7}, {"label":"K57", "x":11, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] }, @@ -29,7 +29,7 @@ "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1, "w":2}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K00", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":6.25}, {"label":"K57", "x":10, "y":5, "w":1.5}, {"label":"K57", "x":11.5, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] }, - "LAYOUT_wk_splitbs": { + "LAYOUT_wk_split_bs": { "layout": [{"label":"K05", "x":0, "y":0}, {"label":"K25", "x":1, "y":0}, {"label":"K35", "x":2, "y":0}, {"label":"K45", "x":3, "y":0}, {"label":"K55", "x":4, "y":0}, {"label":"K06", "x":5, "y":0}, {"label":"KA6", "x":6, "y":0}, {"label":"KA7", "x":7, "y":0}, {"label":"K07", "x":8, "y":0}, {"label":"KB5", "x":9, "y":0}, {"label":"KC5", "x":10, "y":0}, {"label":"KD5", "x":11, "y":0}, {"label":"KE5", "x":12, "y":0}, {"label":"KD1", "x":13, "y":0}, {"label":"KE1", "x":14, "y":0}, {"label":"KE2", "x":15, "y":0}, {"label":"K04", "x":0, "y":1}, {"label":"K14", "x":1, "y":1}, {"label":"K24", "x":2, "y":1}, {"label":"K34", "x":3, "y":1}, {"label":"K44", "x":4, "y":1}, {"label":"K54", "x":5, "y":1}, {"label":"K16", "x":6, "y":1}, {"label":"KB6", "x":7, "y":1}, {"label":"KB7", "x":8, "y":1}, {"label":"K17", "x":9, "y":1}, {"label":"KA4", "x":10, "y":1}, {"label":"KB4", "x":11, "y":1}, {"label":"KC4", "x":12, "y":1}, {"label":"KE4", "x":13, "y":1}, {"label":"KE4", "x":14, "y":1}, {"label":"KD0", "x":15, "y":1}, {"label":"K03", "x":0, "y":2, "w":1.5}, {"label":"K13", "x":1.5, "y":2}, {"label":"K23", "x":2.5, "y":2}, {"label":"K33", "x":3.5, "y":2}, {"label":"K43", "x":4.5, "y":2}, {"label":"K53", "x":5.5, "y":2}, {"label":"K26", "x":6.5, "y":2}, {"label":"KC6", "x":7.5, "y":2}, {"label":"KC7", "x":8.5, "y":2}, {"label":"K27", "x":9.5, "y":2}, {"label":"KA3", "x":10.5, "y":2}, {"label":"KB3", "x":11.5, "y":2}, {"label":"KC3", "x":12.5, "y":2}, {"label":"KD3", "x":13.5, "y":2, "w":1.5}, {"label":"K67", "x":15, "y":2}, {"label":"K02", "x":0, "y":3, "w":1.75}, {"label":"K12", "x":1.75, "y":3}, {"label":"K22", "x":2.75, "y":3}, {"label":"K32", "x":3.75, "y":3}, {"label":"K42", "x":4.75, "y":3}, {"label":"K52", "x":5.75, "y":3}, {"label":"K36", "x":6.75, "y":3}, {"label":"KD6", "x":7.75, "y":3}, {"label":"KD7", "x":8.75, "y":3}, {"label":"K37", "x":9.75, "y":3}, {"label":"KA2", "x":10.75, "y":3}, {"label":"KB2", "x":11.75, "y":3}, {"label":"KD2", "x":12.75, "y":3, "w":2.25}, {"label":"KE0", "x":15, "y":3}, {"label":"K01", "x":0, "y":4, "w":2.25}, {"label":"K11", "x":2.25, "y":4}, {"label":"K21", "x":3.25, "y":4}, {"label":"K31", "x":4.25, "y":4}, {"label":"K41", "x":5.25, "y":4}, {"label":"K51", "x":6.25, "y":4}, {"label":"K46", "x":7.25, "y":4}, {"label":"KE6", "x":8.25, "y":4}, {"label":"KE7", "x":9.25, "y":4}, {"label":"K47", "x":10.25, "y":4}, {"label":"KA1", "x":11.25, "y":4}, {"label":"KB1", "x":12.25, "y":4, "w":1.75}, {"label":"K86", "x":14, "y":4}, {"label":"K77", "x":15, "y":4}, {"label":"K00", "x":0, "y":5, "w":1.25}, {"label":"K00", "x":1.25, "y":5, "w":1.25}, {"label":"K20", "x":2.5, "y":5, "w":1.25}, {"label":"K56", "x":3.75, "y":5, "w":6.25}, {"label":"K57", "x":10, "y":5, "w":1.5}, {"label":"K57", "x":11.5, "y":5, "w":1.5}, {"label":"K66", "x":13, "y":5}, {"label":"K76", "x":14, "y":5}, {"label":"K96", "x":15, "y":5}] } } -- cgit v1.2.3 From b0348063a62e8efc797e45aaa296e58fdb176dcf Mon Sep 17 00:00:00 2001 From: Yan-Fa Li Date: Sat, 9 Jun 2018 18:18:56 -0700 Subject: Add TKC keymap (#3157) - disable i2c to avoid hid spam - set capslock -> lctl_t(kc_esc) - OSX mode - reverse GUI and ALT --- keyboards/tkc1800/keymaps/yanfali/config.h | 29 ++++++ keyboards/tkc1800/keymaps/yanfali/keymap.c | 145 +++++++++++++++++++++++++++++ 2 files changed, 174 insertions(+) create mode 100644 keyboards/tkc1800/keymaps/yanfali/config.h create mode 100644 keyboards/tkc1800/keymaps/yanfali/keymap.c (limited to 'keyboards') diff --git a/keyboards/tkc1800/keymaps/yanfali/config.h b/keyboards/tkc1800/keymaps/yanfali/config.h new file mode 100644 index 0000000000..e5de001a50 --- /dev/null +++ b/keyboards/tkc1800/keymaps/yanfali/config.h @@ -0,0 +1,29 @@ +/* Copyright 2017 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +//#define USE_I2C +//#define SSD1306OLED +//#define OLED_ROTATE180 +#define SSD1306_ADDRESS 0x3C + +// place overrides here + +#endif diff --git a/keyboards/tkc1800/keymaps/yanfali/keymap.c b/keyboards/tkc1800/keymaps/yanfali/keymap.c new file mode 100644 index 0000000000..292bdb0bba --- /dev/null +++ b/keyboards/tkc1800/keymaps/yanfali/keymap.c @@ -0,0 +1,145 @@ +/* Copyright 2017 Mathias Andersson + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +#include "tkc1800.h" +#include "LUFA/Drivers/Peripheral/TWI.h" +#include "i2c.h" +#include "ssd1306.h" + + +#define MODS_SHFT_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 +#define ______ KC_TRNS +#define XXXXXX KC_NO + +//Layers + +enum { + BASE = 0, + FUNCTION, +}; + +//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 + * ,-------------------------------------------------------. ,-------------------. + * |Esc| F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12| |Ins |Home|PgUp|PrSc| + * `-------------------------------------------------------' |-------------------| + * |Del |End |PgDn|ScrL| + * ,-----------------------------------------------------------. |-------------------| + * | ~ | 1 | 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp | |NumL| / | * |Paus| + * |-----------------------------------------------------------| |-------------------| + * |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 | Up | 1 | 2 | 3 | Ent| + * |--------------------------------------------------------'----`--------------| | + * |Ctrl|Gui |Alt | Space |Alt |Gui|Ctr|Left |Down|Rght| 0 | . | | + * `---------------------------------------------------------------------------------' + */ + [BASE] = 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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + 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, KC_PMNS, \ + LCTL_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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, XXXXXX, 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_P1, KC_P2, KC_P3, XXXXXX, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, MO(FUNCTION), KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), + [FUNCTION] = 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_INS, KC_HOME, KC_PGUP, KC_PSCR, \ + KC_DEL, KC_END, KC_PGDN, KC_SLCK, \ + 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, XXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PAUS, \ + 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, KC_PMNS, \ + LCTL_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, XXXXXX, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, \ + KC_LSFT, XXXXXX, RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD, KC_DOT,KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, XXXXXX, \ + KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RALT, ______, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT + ), +}; + +// const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {}; + +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)); + iota_gfx_init(); // turns on the display + #endif + #endif + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +void matrix_scan_user(void) { + #ifdef SSD1306OLED + 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("TKC1800")); + + 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< Date: Sun, 10 Jun 2018 09:38:45 +0800 Subject: Add Tetris keyboard to QMK (#3158) * Add Tetris keyboard to QMK * fix * disable the music mode to save size --- keyboards/tetris/config.h | 65 +++ keyboards/tetris/keymaps/default/keymap.c | 848 ++++++++++++++++++++++++++++++ keyboards/tetris/readme.md | 15 + keyboards/tetris/rules.mk | 58 ++ keyboards/tetris/tetris.c | 1 + keyboards/tetris/tetris.h | 18 + 6 files changed, 1005 insertions(+) create mode 100644 keyboards/tetris/config.h create mode 100644 keyboards/tetris/keymaps/default/keymap.c create mode 100644 keyboards/tetris/readme.md create mode 100644 keyboards/tetris/rules.mk create mode 100644 keyboards/tetris/tetris.c create mode 100644 keyboards/tetris/tetris.h (limited to 'keyboards') diff --git a/keyboards/tetris/config.h b/keyboards/tetris/config.h new file mode 100644 index 0000000000..9c7f525a71 --- /dev/null +++ b/keyboards/tetris/config.h @@ -0,0 +1,65 @@ +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Fengz +#define PRODUCT Tetris +#define DESCRIPTION Planck mit +#define QMK_ESC_OUTPUT B0 +#define QMK_ESC_INPUT D7 +#define QMK_LED B7 +#define QMK_SPEAKER B5 + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* key matrix pins */ +#define MATRIX_ROW_PINS { B3, B2, B1, B0 } +#define MATRIX_COL_PINS { D7, B4, B6, C6, C7, F6, F7, D4, D2, D3, D5, D6 } +#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 + +/* 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 + +#define TAPPING_TERM 200 +#define PERMISSIVE_HOLD + +#ifdef AUDIO_ENABLE + #define B5_AUDIO + #define STARTUP_SONG SONG(ONE_UP_SOUND) + #define NO_MUSIC_MODE +#endif + +#define RGB_DI_PIN F5 +#ifdef RGB_DI_PIN +#define RGBLIGHT_ANIMATIONS +#define RGBLIGHT_SLEEP +#define RGBLED_NUM 47 +#define RGBLIGHT_EFFECT_KNIGHT_LED_NUM 12 +//#define RGBLIGHT_LIMIT_VAL 128 +#endif + +#endif \ No newline at end of file diff --git a/keyboards/tetris/keymaps/default/keymap.c b/keyboards/tetris/keymaps/default/keymap.c new file mode 100644 index 0000000000..b0d22c533e --- /dev/null +++ b/keyboards/tetris/keymaps/default/keymap.c @@ -0,0 +1,848 @@ +#include "tetris.h" +#include "action_layer.h" + +#ifdef AUDIO_ENABLE + #include "audio.h" + float tone_caps[][2] = SONG( CAPS_LOCK_ON_SOUND ); + float tone_taps[][2] = SONG( E__NOTE( _A6 ) ); +#endif + +/* Fillers to make layering more clear */ +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +#define _BASE 0 +#define _CODE 1 +#define _NAVI 2 +#define _FUNC 3 +#define _SYMB 4 +#define _NUMB 5 +#define _MARO 6 +#define _RGB 7 +#define _ADJUST 8 +#define _GAME 9 + +/* RGB colors */ +#define RGB_Layer_1_Base_Color 0, 128, 0 +#define RGB_Layer_2_Base_Color 0,0,0 +#define RGB_Layer_3_Base_Color 0,0,0 +#define RGB_Layer_4_Base_Color 0,0,0 +#define RGB_Layer_5_Base_Color 0,0,0 +#define RGB_Layer_6_Base_Color 64, 0, 64 +#define RGB_Layer_7_Base_Color 0, 0,0 +#define RGB_Layer_8_Base_Color 0,0,0 +#define RGB_Layer_9_Base_Color 0,0,0 +#define RGB_Caps_Color 6,50,50 +#define RGB_TAP_On_Color 0,128,0 +#define RGB_TAP_Off_Color 128,0,0 +#define RGB_TAP_Base_Color 0,0,0 + +extern rgblight_config_t rgblight_config; +bool NUMLAY_STATUS = false; +int RGB_LAYER0_mode = 6; +bool RGB_TAP_STATE = false; +static uint8_t current_layer = 0; +static bool has_layer_changed = true; +static bool save_rgbmode = true; +static bool caps = false; + +/* Tap Dance function */ +void dance_cln_finished( qk_tap_dance_state_t* state, void* user_data ) +{ + if ( state->count == 1 ) + { + register_code( KC_LSFT ); + } else { + layer_on( _SYMB ); + #ifdef AUDIO_ENABLE + PLAY_SONG( tone_taps ); + #endif + } +} + + +void dance_cln_reset( qk_tap_dance_state_t* state, void* user_data ) +{ + if ( state->count == 1 ) + { + unregister_code( KC_LSFT ); + }else { + uint8_t layer = biton32( layer_state ); + if ( layer == _SYMB ) + { + layer_off( _SYMB ); + rgblight_mode( RGB_LAYER0_mode ); + } + } +} + +enum my_keycodes { + RGB_TAP = SAFE_RANGE, + KC_00 +}; + +/* Tap Dance Declarations */ +enum { + TD_Mute_Next = 0, + TD_SFT, + TD_LBRC, + TD_RBRC +}; + +/* Tap Dance Definitions */ +qk_tap_dance_action_t tap_dance_actions[] = { + [TD_Mute_Next] = ACTION_TAP_DANCE_DOUBLE( KC_MUTE, KC_MNXT ) + ,[TD_SFT] = ACTION_TAP_DANCE_FN_ADVANCED( NULL, dance_cln_finished, dance_cln_reset ) + ,[TD_LBRC] = ACTION_TAP_DANCE_DOUBLE( KC_LBRC, KC_LCBR ) + ,[TD_RBRC] = ACTION_TAP_DANCE_DOUBLE( KC_RBRC, KC_RCBR ) +}; + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* BASE - QWERTY + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | BS | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * shift + Esc = ~ --> | Esc | A | S | D | F | G | H | J | K | L | ; | Enter| <-- shift + Enter = " + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / | Mute | + * |------+------+------+------+------+------+------+------+------+------+------+------| <-- tap: 1.Mute 2.Next + * | Ctrl | GUI | Alt | [ | - | Space | = | ] | Fx | \ | Del | + * `-----------------------------------------------------------------------------------' + */ + +[_BASE] = LAYOUT_planck_mit( + LT( _ADJUST,KC_TAB), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, + LT( _NUMB,KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, LT( _RGB, KC_L ), KC_SCLN, KC_ENT, + TD( TD_SFT ), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, TD( TD_Mute_Next ), + KC_LCTL, KC_LGUI, KC_LALT, TD( TD_LBRC ), LT( _NAVI, KC_MINS ), LT( _CODE, KC_SPC ), LT( _FUNC, KC_EQL ), TD( TD_RBRC ), KC_LEFT, KC_DOWN, KC_RGHT ), + +/* Code + * ,-----------------------------------------------------------------------------------. + * | | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ` | < | [ | { | ( | & | Left | Down | Up | Down | ; | ' | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | > | ] | } | ) | | | | | , | . | / | Play | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | [ | BkSp | ======= | Del | ] | | \ | | + * `-----------------------------------------------------------------------------------' + */ + +[_CODE] = LAYOUT_planck_mit( /* 1 - Code */ + _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_GRV, KC_LABK, KC_LBRC, KC_LCBR, KC_LPRN, KC_AMPR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, KC_QUOT, + _______, KC_RABK, KC_RBRC, KC_RCBR, KC_RPRN, KC_PIPE, XXXXXXX, XXXXXXX, _______, _______, KC_SLSH, KC_MPLY, + _______, _______, _______, KC_LBRC, KC_BSPC, _______, KC_DEL, KC_RBRC, _______, KC_BSLS, _______ ), + +/* Navi + * ,-----------------------------------------------------------------------------------. + * | | | | PgUp | | | | |Insert| |Prtsc | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | ~ | | Home | PgDn | End | | | | |SrcLck| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | Break| | | | | PgUp | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | Home | PgDn | End | + * `-----------------------------------------------------------------------------------' + */ + +[_NAVI] = LAYOUT_planck_mit( + _______, XXXXXXX, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_INS, XXXXXXX, KC_PSCR, _______, + KC_TILD, XXXXXXX, KC_HOME, KC_PGDN, KC_END, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLCK, _______, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END ), + +/* Func + * ,-----------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | F11 | F12 | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_FUNC] = LAYOUT_planck_mit( + _______ , KC_F1, KC_F2 , KC_F3, KC_F4, KC_F5, KC_F6 , KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______ , KC_F12, KC_F12 , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______ , XXXXXXX, XXXXXXX , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, + _______ , _______, _______ , _______, _______, _______, _______ , _______, _______, _______, _______ ), + + +/* Symb - double tap shift + * ,-----------------------------------------------------------------------------------. + * | | | ! | @ | # | $ | % | ^ | & | * | ( | ) | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | : | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | < | > | ? | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | { | _ | | + | } | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_SYMB] = LAYOUT_planck_mit( + KC_PIPE, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______, + KC_TILD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_COLN, KC_DQUO, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LABK, KC_RABK, KC_QUES, _______, + _______, _______, _______, KC_LCBR, KC_UNDS, _______, KC_PLUS, KC_RCBR, _______, KC_PIPE, _______ ), + +/* Number + * ,-----------------------------------------------------------------------------------. + * | | + | - | | | | | 7 | 8 | 9 | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | * | / | = | | | | 4 | 5 | 6 | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | 1 | 2 | 3 | |Layer0| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | 0 | 00 | . | | | + * `-----------------------------------------------------------------------------------' + */ + +[_NUMB] = LAYOUT_planck_mit( /* 5 - Numpad */ + _______, KC_PPLS, KC_PMNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_7, KC_8, KC_9, XXXXXXX, _______, + _______, KC_PAST, KC_PSLS, KC_EQL, XXXXXXX, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, XXXXXXX, _______, + _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, XXXXXXX, TO( 0 ), + _______, _______, _______, _______, _______, XXXXXXX, KC_0, KC_00, KC_DOT, XXXXXXX, _______ ), + +/* MARO Empty + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_MARO] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + +/* RGB + * ,-----------------------------------------------------------------------------------. + * | | | | | | _TAP | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | MOD | M_R | M_SW | M_K | M_X | M_G | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | HUI | SAI | VAI | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | HUD | SAD | VAD | | | RGB_TOG | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_RGB] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, RGB_TAP, _______, _______, _______, _______, _______, _______, + RGB_MOD, RGB_M_R, RGB_M_SW, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______, + RGB_HUI, RGB_SAI, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + RGB_HUD, RGB_SAD, RGB_VAD, _______, _______, RGB_TOG, _______, _______, _______, _______, _______ ), + +/* Func + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | |Layer0| Rest | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Caps | | | | | Game | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | Numb | Music| | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_ADJUST] = LAYOUT_planck_mit( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, TO( 0 ), RESET , + KC_CAPS, _______, _______, _______, _______, TO(_GAME), _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, TO(_NUMB), MU_TOG, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), + +[_GAME] = LAYOUT_planck_mit( + XXXXXXX,KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, XXXXXXX, + XXXXXXX,KC_Q, KC_W, KC_E, KC_R, KC_T, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, + XXXXXXX,KC_LCTL, KC_A, KC_S, KC_D, KC_B, KC_N, KC_M, XXXXXXX, XXXXXXX, KC_UP, TO( 0 ), + XXXXXXX,KC_LSFT, KC_Z, KC_X, KC_C, KC_SPC, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT ), +}; + +/* Encoder */ +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 }; + +/* Timer */ +static uint16_t TAP_RGB_timer; +static uint16_t RGB_encoder_timer; + +/* Encoder state RGB_display */ +static uint8_t RGB_encoder_count=6; +static bool RGB_encoder_bool = false; + +/* RGB tap HUE */ +static uint16_t Type_Hue=270; + +void matrix_init_user( void ) +{ + _delay_ms( 200 ); + + /* Encoder init */ + encoder_state = PIND & 0x3; + + /* Timer init */ + RGB_encoder_timer= timer_read(); + TAP_RGB_timer= timer_read(); +} + + +void matrix_scan_user( void ) +{ +/* Layer */ + uint8_t layer = biton32( layer_state ); + +/* Encoder */ + encoder_state <<= 2; + encoder_state |= (PIND & 0x3); + encoder_value += encoder_LUT[encoder_state & 0xF]; + +/* Encoder state RGB display */ + if (RGB_encoder_bool){ + if (timer_elapsed(RGB_encoder_timer) > 2500) { + RGB_encoder_bool=false; + if (RGB_TAP_STATE) { + rgblight_mode( 1 ); + rgblight_setrgb( RGB_TAP_Base_Color ); + }else{ + rgblight_mode( RGB_LAYER0_mode ); + } + } + } + +/* Display the Caps state */ + if (caps==true){ + rgblight_setrgb_at(RGB_Caps_Color,12); + } + +/* Start of Encoder clockwise */ + if ( encoder_value >= 4 ) { + + /* Start of Encoder state RGB_display */ + if (!RGB_encoder_bool){ + RGB_encoder_timer=timer_read(); + RGB_encoder_bool=true; + RGB_encoder_count=5; + rgblight_mode(1); + rgblight_setrgb( 0,0,0 ); + }else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) { + RGB_encoder_timer=timer_read(); + RGB_encoder_count-=1; + if (RGB_encoder_count>5 || RGB_encoder_count<1){ + RGB_encoder_count=5; + rgblight_setrgb(0, 0, 0); + } + } + rgblight_setrgb_at(0,255,0,5); + if (RGB_encoder_count<1) {RGB_encoder_count=1;} + switch (RGB_encoder_count) { + case 5: + rgblight_setrgb_at(0, 255, 0,4); + break; + case 4: + rgblight_setrgb_at(0, 255, 0,3); + break; + case 3: + rgblight_setrgb_at(0, 255, 0,2); + break; + case 2: + rgblight_setrgb_at(0, 255, 0,1); + break; + case 1: + rgblight_setrgb_at(0, 255, 0,0); + break; + } + /* End of Encoder state RGB_display */ + + /* Start of Set Encoder Keycode */ + switch ( layer ) + { + case 0: + register_code( KC_VOLD ); + unregister_code( KC_VOLD ); + break; + case _CODE: + register_code( KC_LEFT ); + unregister_code( KC_LEFT ); + break; + case _RGB: + rgblight_decrease_val(); + break; + case _NUMB: + register_code( KC_LEFT ); + unregister_code( KC_LEFT ); + break; + case _MARO: + register_code( KC_UP ); + unregister_code( KC_UP ); + break; + default: + register_code( KC_VOLD ); + unregister_code( KC_VOLD ); + } + /* End of Set Encoder Keycode */ + + } + +/* End of Encoder clockwise */ + +/* Start of Encoder anti-clockwise */ + if ( encoder_value <= -4 ) + { + /* Start of Encoder state RGB_display */ + if (!RGB_encoder_bool){ + RGB_encoder_timer=timer_read(); + RGB_encoder_bool=true; + RGB_encoder_count=6; + rgblight_mode(1); + rgblight_setrgb( 0,0,0 ); + }else if (RGB_encoder_bool && timer_elapsed(RGB_encoder_timer) < 800) { + RGB_encoder_timer=timer_read(); + RGB_encoder_count+=1; + if (RGB_encoder_count<6 || RGB_encoder_count> 10){ + RGB_encoder_count=6; + rgblight_setrgb(0, 0, 0); + } + } + rgblight_setrgb_at(0, 0,255,6); + if (RGB_encoder_count>11) { + RGB_encoder_count=11; + } + switch (RGB_encoder_count) { + case 6: + rgblight_setrgb_at(0, 0,255,7); + break; + case 7: + rgblight_setrgb_at(0, 0,255,8); + break; + case 8: + rgblight_setrgb_at(0, 0,255,9); + break; + case 9: + rgblight_setrgb_at(0, 0,255,10); + break; + case 10: + rgblight_setrgb_at(0, 0,128,11); + break; + } + /* End of Encoder state RGB_display */ + + /* Start of Set Encoder Keycode */ + switch ( layer ) + { + case 0: + register_code( KC_VOLU ); + unregister_code( KC_VOLU ); + break; + case _CODE: + register_code( KC_RGHT ); + unregister_code( KC_RGHT ); + break; + case _RGB: + rgblight_increase_val(); + break; + case _NUMB: + register_code( KC_RGHT ); + unregister_code( KC_RGHT ); + break; + case _MARO: + register_code( KC_DOWN ); + unregister_code( KC_DOWN ); + break; + default: + register_code( KC_VOLU ); + unregister_code( KC_VOLU ); + } + /* End of Set Encoder Keycode */ + +} + +/* End of Encoder anti-clockwise */ + + encoder_value %= 4; + +/* Start of RGB with Layer change */ + + /* Save the Layer0 RGB state */ + if ( save_rgbmode == true ) { + if (RGB_TAP_STATE==false) + { + RGB_LAYER0_mode = rgblight_config.mode; + } + } + save_rgbmode = false; + + /* When the layer is changed */ + if ( layer != current_layer && caps == false) { + has_layer_changed = true; + current_layer = layer; /* update layer information */ + } + /* Check for layer change, and apply color if its changed since last check */ + if ( has_layer_changed ) + { + /* change backlight based on layer. These should be numbers or whatever you defined the layers as */ + switch ( layer ) + { + case 0: + + /* if the key tap RGB effect is enable */ + if (RGB_TAP_STATE==true){ + rgblight_mode(1); + rgblight_setrgb( RGB_TAP_Base_Color ); + } + else{ + rgblight_mode( RGB_LAYER0_mode ); + } + break; + + case _CODE: //1 +/* Save Layer0 RGB state */ + RGB_LAYER0_mode = rgblight_config.mode; + +/* set all the RGB color under the switch */ + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_1_Base_Color); + + /* set each of the RGB led color under the switch */ + rgblight_setrgb_at(64, 64, 64,1); // Q + rgblight_setrgb_at(64, 64, 64,2); // W + rgblight_setrgb_at(64, 64, 64,3); // E + rgblight_setrgb_at(64, 64, 64,4); // R + rgblight_setrgb_at(64, 64, 64,5); // T + rgblight_setrgb_at(64, 64, 64,6); // Y + rgblight_setrgb_at(64, 64, 64,7); // U + rgblight_setrgb_at(64, 64, 64,8); // I + rgblight_setrgb_at(64, 64, 64,9); // O + rgblight_setrgb_at(64, 64, 64,10); // P + rgblight_setrgb_at(64, 0, 0,40); // - + rgblight_setrgb_at(64, 0, 0,42); // = + break; + + case _NAVI: //2 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_2_Base_Color); + + rgblight_setrgb_at(64, 0, 64,3); + rgblight_setrgb_at(64, 0, 64,14); + rgblight_setrgb_at(64, 0, 64,15); + rgblight_setrgb_at(64, 0, 64,16); + rgblight_setrgb_at(64, 64, 0,8); + rgblight_setrgb_at(64, 64, 0,10); + rgblight_setrgb_at(64, 64, 0,21); + rgblight_setrgb_at(64, 64, 0,29); + rgblight_setrgb_at(64, 0, 0,11); + rgblight_setrgb_at(0, 0, 64,34); + rgblight_setrgb_at(0, 0, 64,44); + rgblight_setrgb_at(0, 0, 64,45); + rgblight_setrgb_at(0, 0, 64,46); + break; + case _FUNC: //3 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_3_Base_Color); + + rgblight_setrgb_at(0, 0, 64,1); + rgblight_setrgb_at(0, 0, 64,2); + rgblight_setrgb_at(0, 0, 64,3); + rgblight_setrgb_at(0, 0, 64,4); + rgblight_setrgb_at(0, 0, 64,5); + rgblight_setrgb_at(0, 0, 64,6); + rgblight_setrgb_at(0, 0, 64,7); + rgblight_setrgb_at(0, 0, 64,8); + rgblight_setrgb_at(0, 0, 64,9); + rgblight_setrgb_at(0, 0, 64,10); + rgblight_setrgb_at(0, 0, 64,13); + rgblight_setrgb_at(0, 0, 64,14); + break; + + case _SYMB: //4 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_4_Base_Color); + + rgblight_setrgb_at(0, 64, 64,1); + rgblight_setrgb_at(0, 64, 64,2); + rgblight_setrgb_at(0, 64, 64,3); + rgblight_setrgb_at(0, 64, 64,4); + rgblight_setrgb_at(0, 64, 64,5); + rgblight_setrgb_at(0, 64, 64,6); + rgblight_setrgb_at(0, 64, 64,7); + rgblight_setrgb_at(0, 64, 64,8); + rgblight_setrgb_at(0, 64, 64,9); + rgblight_setrgb_at(0, 64, 64,10); + rgblight_setrgb_at(0, 64, 64,12); + rgblight_setrgb_at(0, 64, 64,22); + rgblight_setrgb_at(0, 64, 64,23); + rgblight_setrgb_at(0, 64, 64,32); + rgblight_setrgb_at(0, 64, 64,33); + rgblight_setrgb_at(0, 64, 64,34); + rgblight_setrgb_at(0, 64, 64,39); + rgblight_setrgb_at(0, 64, 64,40); + rgblight_setrgb_at(0, 64, 64,42); + rgblight_setrgb_at(0, 64, 64,43); + break; + + case _NUMB: //5 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_5_Base_Color); + + rgblight_setrgb_at(0,64,0,1); + rgblight_setrgb_at(0,64,0,2); + rgblight_setrgb_at(0,64,0,13); + rgblight_setrgb_at(0,64,0,14); + rgblight_setrgb_at(0,64,64,15); + rgblight_setrgb_at(64,64,64,7); + rgblight_setrgb_at(64,64,64,8); + rgblight_setrgb_at(64,64,64,9); + rgblight_setrgb_at(64,64,64,19); + rgblight_setrgb_at(64,64,64,20); + rgblight_setrgb_at(64,64,64,21); + rgblight_setrgb_at(64,64,64,31); + rgblight_setrgb_at(64,64,64,32); + rgblight_setrgb_at(64,64,64,33); + rgblight_setrgb_at(64,64,64,42); + rgblight_setrgb_at(64,64,64,43); + rgblight_setrgb_at(0,128,0,44); + break; + case _MARO: //6 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_6_Base_Color); + break; + + case _RGB: //7 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_7_Base_Color); + + rgblight_setrgb_at(1,143,225,0); + rgblight_setrgb_at(39,21,107,1); + rgblight_setrgb_at(208,0,0,2); + rgblight_setrgb_at(64,64,64,21); + break; + case _ADJUST: //8 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_8_Base_Color); + + rgblight_setrgb_at(0,64,0,10); + rgblight_setrgb_at(64,0,0,11); + rgblight_setrgb_at(0,64,0,17); + rgblight_setrgb_at(0,64,0,30); + rgblight_setrgb_at(6,50,50,12); + break; + + case _GAME: //9 + RGB_LAYER0_mode = rgblight_config.mode; + + rgblight_mode( 1 ); + rgblight_setrgb(RGB_Layer_9_Base_Color); + + rgblight_setrgb_at(0,0,64,15); + rgblight_setrgb_at(0,0,64,26); + rgblight_setrgb_at(0,0,64,27); + rgblight_setrgb_at(0,0,64,28); + rgblight_setrgb_at(64,0,0,35); + break; + + default: + rgblight_mode( RGB_LAYER0_mode ); + } + has_layer_changed = false; + } +/* End of RGB with Layer change */ + +} // End of matrix_scan_user + + + +/* shift + enter = " from:https://github.com/qmk/qmk_firmware/blob/e899cb8940da04fa2610604f0aab417db7fac119/keyboards/mitosis/keymaps/datagrok/keymap.c */ + +bool comm_shifted = false; +bool ques_shifted = false; +static uint8_t key_index = 0; +uint8_t shifted; +uint16_t s_keycode; +bool *k_shifted; + +bool process_record_user( uint16_t keycode, keyrecord_t *record ){ + +/* Start of key tap RGB effect */ + if ( RGB_TAP_STATE ==true ) { + key_index=(record->event.key.col)+(record->event.key.row)*12; + +/* Change the Hue of the RGB color with the type speed */ + if (timer_elapsed(TAP_RGB_timer) >10000){ + TAP_RGB_timer=timer_read(); + Type_Hue=270; + }else if (timer_elapsed(TAP_RGB_timer) >1000){ + Type_Hue+=30; + if (Type_Hue>270) { + Type_Hue=270;} + }else{ + TAP_RGB_timer=timer_read(); + Type_Hue-=10; + if (Type_Hue<10) { + Type_Hue=10;} + } + if (key_index>42){ //fix the RGB index of the MIT layout position + key_index=key_index-1; + } + if ( record->event.pressed ) { + rgblight_sethsv_at(Type_Hue,255,255,key_index); + } else { + rgblight_setrgb_at(RGB_TAP_Base_Color,key_index); + } + } +/* End of key tap RGB effect */ + + switch ( keycode ) + { + /* save the RGB state when set the new */ + case RGB_M_R: + save_rgbmode = true; + break; + case RGB_M_SW: + save_rgbmode = true; + break; + case RGB_M_X: + save_rgbmode = true; + break; + case RGB_M_G: + save_rgbmode = true; + break; + case RGB_MODE_KNIGHT: + save_rgbmode = true; + break; + +/* Define a New Keycode: double zero */ + case KC_00: + if (record->event.pressed) { + // Do something when pressed + } else { + register_code( KC_0 ); // send 0 + unregister_code( KC_0 ); + + register_code( KC_0 ); // send 0 twice without macro + unregister_code( KC_0 ); + } + return false; // Skip all further processing of this key + + /* when the REST key is pressed the 'R' key will RED,the "Bottom Left"(esc of qmk-dfu) will be GREEN */ + case RESET: + rgblight_mode( 1 ); + rgblight_setrgb( 0, 0, 0 ); + rgblight_setrgb_at(128, 0, 0,4); // R + rgblight_setrgb_at(6, 128, 24,36); // Bottom Left key + break; + +/* Define a New Keycode: key tap RGB effect toggle */ + case RGB_TAP: + if ( !(record->event.pressed)) { + /* If enable,the 'On' key will be green */ + if (RGB_TAP_STATE) { + RGB_TAP_STATE=false; + rgblight_mode( 1 ); + rgblight_setrgb( RGB_TAP_Base_Color ); + rgblight_setrgb_at(RGB_TAP_Off_Color,16); // O - on + }else{ + /* If disenable,the 'oFf' key will be red */ + RGB_TAP_STATE=true; + rgblight_mode( 1 ); + rgblight_setrgb( RGB_TAP_Base_Color ); + rgblight_setrgb_at(RGB_TAP_On_Color,9); // F - off + } + } + break; + +/* special shift keys */ + case KC_ENT: + s_keycode = KC_QUOT; + k_shifted = &ques_shifted; + break; + case KC_UP: + s_keycode = KC_SLSH; + k_shifted = &ques_shifted; + break; + case KC_DOWN: + s_keycode = KC_BSLS; + k_shifted = &ques_shifted; + break; + default: + return(true); + } + + shifted = get_mods() & (MOD_BIT( KC_LSHIFT ) | MOD_BIT( KC_RSHIFT ) ); + + /* Keydown. If shift is currently pressed, register its alternate keycode. */ + if ( record->event.pressed && shifted ) + { + *k_shifted = true; + register_code( s_keycode ); + return(false); + /* + * Keyup. If shift was pressed back when the key was pressed, unregister + * its alternate keycode. + */ + } else if ( !(record->event.pressed) && *k_shifted ) { + *k_shifted = false; + unregister_code( s_keycode ); + return(false); + /* Otherwise, behave as normal. */ + } else { + return(true); + } + +} // End ofprocess_record_user + + +void led_set_user( uint8_t usb_led ) +{ + static uint8_t old_usb_led = 0; + _delay_ms( 10 ); /* gets rid of tick */ + + if ( (usb_led & (1 << USB_LED_CAPS_LOCK) ) && !(old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) { +/* CAPS on */ + caps= true; + rgblight_setrgb( 0,0,0 ); + rgblight_setrgb_at(RGB_Caps_Color,12); // caps key + #ifdef AUDIO_ENABLE + PLAY_SONG( tone_caps ); + #endif + }else if ( !(usb_led & (1 << USB_LED_CAPS_LOCK) ) && (old_usb_led & (1 << USB_LED_CAPS_LOCK) ) ) { + +/* CAPS off */ + caps= false; + if (RGB_TAP_STATE==false){ + rgblight_mode( RGB_LAYER0_mode ); + }else{ + rgblight_mode(1); + rgblight_setrgb( 0,0,0 ); + } + #ifdef AUDIO_ENABLE + PLAY_SONG( tone_caps ); + #endif + } + old_usb_led = usb_led; +} // End of led_set_user + diff --git a/keyboards/tetris/readme.md b/keyboards/tetris/readme.md new file mode 100644 index 0000000000..b74740854a --- /dev/null +++ b/keyboards/tetris/readme.md @@ -0,0 +1,15 @@ +Tetris +=== +A compact 40% (12x4) ortholinear keyboard (Planck Mit layout) with per switch RGB and encoder made by Fengz. + +![TetrisPhoto](https://i.imgur.com/quwEY0f.jpg) + +More: [Imgur](https://imgur.com/gallery/Azq2zUm). + +Keyboard Maintainer: [Fengz](https://github.com/ycf) + +Make example for this keyboard (after setting up your build environment): + + make tetris: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. \ No newline at end of file diff --git a/keyboards/tetris/rules.mk b/keyboards/tetris/rules.mk new file mode 100644 index 0000000000..40b098ae60 --- /dev/null +++ b/keyboards/tetris/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 + +BOOTLOADER =qmk-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 +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 ?= yes +RGBLIGHT_ENABLE ?= yes +TAP_DANCE_ENABLE = yes +EXTRAFLAGS += -flto # Make the hex smaller \ No newline at end of file diff --git a/keyboards/tetris/tetris.c b/keyboards/tetris/tetris.c new file mode 100644 index 0000000000..8d494c17f3 --- /dev/null +++ b/keyboards/tetris/tetris.c @@ -0,0 +1 @@ +#include "tetris.h" diff --git a/keyboards/tetris/tetris.h b/keyboards/tetris/tetris.h new file mode 100644 index 0000000000..0a036ec3b3 --- /dev/null +++ b/keyboards/tetris/tetris.h @@ -0,0 +1,18 @@ +#ifndef TETRIS_H +#define TETRIS_H + +#include "quantum.h" + +#define LAYOUT_planck_mit( \ + K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, 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, \ + K300, K301, K302, K303, K304, K305, K307, K308, K309, K310, K311 \ +) { \ + { K000, K001, K002, K003, K004, K005, K006, K007, K008, K009, 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 }, \ + { K300, K301, K302, K303, K304, K305, KC_NO, K307, K308, K309, K310, K311 } \ +} + +#endif \ No newline at end of file -- cgit v1.2.3 From 769854b8a2678488c22145c0aede764d7710afa6 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 10 Jun 2018 07:12:09 -0700 Subject: Felix: Refactor, Rules, and Configurator Support (#3160) * Refactor * Configurator support * Add LAYOUTS = ortho_5x4 to rules.mk --- keyboards/felix/felix.h | 4 +++- keyboards/felix/info.json | 12 ++++++++++++ keyboards/felix/keymaps/default/keymap.c | 18 +++++++++--------- keyboards/felix/rules.mk | 4 +++- 4 files changed, 27 insertions(+), 11 deletions(-) create mode 100644 keyboards/felix/info.json (limited to 'keyboards') diff --git a/keyboards/felix/felix.h b/keyboards/felix/felix.h index 48110e8500..86a9b4e72e 100644 --- a/keyboards/felix/felix.h +++ b/keyboards/felix/felix.h @@ -3,7 +3,7 @@ #include "quantum.h" -#define KEYMAP( \ +#define LAYOUT_ortho_5x4( \ K000, K001, K002, K003, \ K100, K101, K102, K103, \ K200, K201, K202, K203, \ @@ -17,4 +17,6 @@ { K400, K401, K402, K403 } \ } +#define LAYOUT LAYOUT_ortho_5x4 + #endif \ No newline at end of file diff --git a/keyboards/felix/info.json b/keyboards/felix/info.json new file mode 100644 index 0000000000..2d324df1a0 --- /dev/null +++ b/keyboards/felix/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Felix", + "url": "", + "maintainer": "qmk", + "width": 4, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"K000", "x":0, "y":0}, {"label":"K001", "x":1, "y":0}, {"label":"K002", "x":2, "y":0}, {"label":"K003", "x":3, "y":0}, {"label":"K100", "x":0, "y":1}, {"label":"K101", "x":1, "y":1}, {"label":"K102", "x":2, "y":1}, {"label":"K103", "x":3, "y":1}, {"label":"K200", "x":0, "y":2}, {"label":"K201", "x":1, "y":2}, {"label":"K202", "x":2, "y":2}, {"label":"K203", "x":3, "y":2}, {"label":"K300", "x":0, "y":3}, {"label":"K301", "x":1, "y":3}, {"label":"K302", "x":2, "y":3}, {"label":"K303", "x":3, "y":3}, {"label":"K400", "x":0, "y":4}, {"label":"K401", "x":1, "y":4}, {"label":"K402", "x":2, "y":4}, {"label":"K403", "x":3, "y":4}] + } + } +} diff --git a/keyboards/felix/keymaps/default/keymap.c b/keyboards/felix/keymaps/default/keymap.c index 25e4bc130b..a0093bf8e4 100644 --- a/keyboards/felix/keymaps/default/keymap.c +++ b/keyboards/felix/keymaps/default/keymap.c @@ -1,20 +1,20 @@ -#include "felix.h" -#include "action_layer.h" +#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - KEYMAP( - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, - KC_P7, KC_P8, KC_P9, KC_PPLS, - KC_P4, KC_P5, KC_P6, KC_HOME, - KC_P1, KC_P2, KC_P3, KC_END, - KC_P0, KC_PEQL, KC_PDOT, KC_PENT), + LAYOUT( + KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, + KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_P4, KC_P5, KC_P6, KC_HOME, + KC_P1, KC_P2, KC_P3, KC_END, + KC_P0, KC_PEQL, KC_PDOT, KC_PENT + ), }; void persistant_default_layer_set(uint16_t default_layer) { } - + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { } diff --git a/keyboards/felix/rules.mk b/keyboards/felix/rules.mk index 58798b761f..e8f8343416 100644 --- a/keyboards/felix/rules.mk +++ b/keyboards/felix/rules.mk @@ -53,4 +53,6 @@ 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 +RGBLIGHT_ENABLE = no + +LAYOUTS = ortho_5x4 -- cgit v1.2.3 From ca02b0dde0c2916e7228148962d71d82ff158b03 Mon Sep 17 00:00:00 2001 From: noroadsleft <18669334+noroadsleft@users.noreply.github.com> Date: Sun, 10 Jun 2018 07:13:01 -0700 Subject: Fortitude60: Refactor and Configurator support (#3161) * Removed LAYOUT_ortho_5x12 alias * Configurator support --- keyboards/fortitude60/info.json | 12 +++++++++++ keyboards/fortitude60/rev1/rev1.h | 42 +++++++++++++++++++-------------------- 2 files changed, 32 insertions(+), 22 deletions(-) create mode 100644 keyboards/fortitude60/info.json (limited to 'keyboards') diff --git a/keyboards/fortitude60/info.json b/keyboards/fortitude60/info.json new file mode 100644 index 0000000000..ceb2cf4f04 --- /dev/null +++ b/keyboards/fortitude60/info.json @@ -0,0 +1,12 @@ +{ + "keyboard_name": "Fortitude60", + "url": "", + "maintainer": "qmk", + "width": 15, + "height": 5, + "layouts": { + "LAYOUT": { + "layout": [{"label":"L00", "x":0, "y":0}, {"label":"L01", "x":1, "y":0}, {"label":"L02", "x":2, "y":0}, {"label":"L03", "x":3, "y":0}, {"label":"L04", "x":4, "y":0}, {"label":"L05", "x":5, "y":0}, {"label":"R00", "x":9, "y":0}, {"label":"R01", "x":10, "y":0}, {"label":"R02", "x":11, "y":0}, {"label":"R03", "x":12, "y":0}, {"label":"R04", "x":13, "y":0}, {"label":"R05", "x":14, "y":0}, {"label":"L10", "x":0, "y":1}, {"label":"L11", "x":1, "y":1}, {"label":"L12", "x":2, "y":1}, {"label":"L13", "x":3, "y":1}, {"label":"L14", "x":4, "y":1}, {"label":"L15", "x":5, "y":1}, {"label":"R10", "x":9, "y":1}, {"label":"R11", "x":10, "y":1}, {"label":"R12", "x":11, "y":1}, {"label":"R13", "x":12, "y":1}, {"label":"R14", "x":13, "y":1}, {"label":"R15", "x":14, "y":1}, {"label":"L20", "x":0, "y":2}, {"label":"L21", "x":1, "y":2}, {"label":"L22", "x":2, "y":2}, {"label":"L23", "x":3, "y":2}, {"label":"L24", "x":4, "y":2}, {"label":"L25", "x":5, "y":2}, {"label":"R20", "x":9, "y":2}, {"label":"R21", "x":10, "y":2}, {"label":"R22", "x":11, "y":2}, {"label":"R23", "x":12, "y":2}, {"label":"R24", "x":13, "y":2}, {"label":"R25", "x":14, "y":2}, {"label":"L30", "x":0, "y":3}, {"label":"L31", "x":1, "y":3}, {"label":"L32", "x":2, "y":3}, {"label":"L33", "x":3, "y":3}, {"label":"L34", "x":4, "y":3}, {"label":"L35", "x":5, "y":3}, {"label":"LT5", "x":6, "y":3}, {"label":"RT5", "x":8, "y":3}, {"label":"R30", "x":9, "y":3}, {"label":"R31", "x":10, "y":3}, {"label":"R32", "x":11, "y":3}, {"label":"R33", "x":12, "y":3}, {"label":"R34", "x":13, "y":3}, {"label":"R35", "x":14, "y":3}, {"label":"LT0", "x":2, "y":4}, {"label":"LT1", "x":3, "y":4}, {"label":"LT2", "x":4, "y":4}, {"label":"LT3", "x":5, "y":4}, {"label":"LT4", "x":6, "y":4}, {"label":"RT4", "x":8, "y":4}, {"label":"RT3", "x":9, "y":4}, {"label":"RT2", "x":10, "y":4}, {"label":"RT1", "x":11, "y":4}, {"label":"RT0", "x":12, "y":4}] + } + } +} diff --git a/keyboards/fortitude60/rev1/rev1.h b/keyboards/fortitude60/rev1/rev1.h index b941a60354..5b35720bc3 100644 --- a/keyboards/fortitude60/rev1/rev1.h +++ b/keyboards/fortitude60/rev1/rev1.h @@ -10,8 +10,8 @@ #ifdef USE_I2C #include #ifdef __AVR__ - #include - #include + #include + #include #endif #endif @@ -20,25 +20,23 @@ // Standard Keymap // (TRRS jack on the left half is to the right, TRRS jack on the right half is to the left) #define LAYOUT( \ - L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ - L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ - L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ - L30, L31, L32, L33, L34, L35, LT5, RT5, R30, R31, R32, R33, R34, R35, \ - LT0, LT1, LT2, LT3, LT4, RT4, RT3, RT2, RT1, RT0 \ - ) \ - { \ - { L00, L01, L02, L03, L04, L05 }, \ - { L10, L11, L12, L13, L14, L15 }, \ - { L20, L21, L22, L23, L24, L25 }, \ - { L30, L31, L32, L33, L34, L35 }, \ - { LT0, LT1, LT2, LT3, LT4, LT5 }, \ - { R05, R04, R03, R02, R01, R00 }, \ - { R15, R14, R13, R12, R11, R10 }, \ - { R25, R24, R23, R22, R21, R20 }, \ - { R35, R34, R33, R32, R31, R30 }, \ - { RT0, RT1, RT2, RT3, RT4, RT5 } \ - } - -#define LAYOUT_ortho_5x12 LAYOUT + L00, L01, L02, L03, L04, L05, R00, R01, R02, R03, R04, R05, \ + L10, L11, L12, L13, L14, L15, R10, R11, R12, R13, R14, R15, \ + L20, L21, L22, L23, L24, L25, R20, R21, R22, R23, R24, R25, \ + L30, L31, L32, L33, L34, L35, LT5, RT5, R30, R31, R32, R33, R34, R35, \ + LT0, LT1, LT2, LT3, LT4, RT4, RT3, RT2, RT1, RT0 \ + ) \ + { \ + { L00, L01, L02, L03, L04, L05 }, \ + { L10, L11, L12, L13, L14, L15 }, \ + { L20, L21, L22, L23, L24, L25 }, \ + { L30, L31, L32, L33, L34, L35 }, \ + { LT0, LT1, LT2, LT3, LT4, LT5 }, \ + { R05, R04, R03, R02, R01, R00 }, \ + { R15, R14, R13, R12, R11, R10 }, \ + { R25, R24, R23, R22, R21, R20 }, \ + { R35, R34, R33, R32, R31, R30 }, \ + { RT0, RT1, RT2, RT3, RT4, RT5 } \ + } #endif -- cgit v1.2.3 From 06487daaddf923d635e8a528d1eb644b875a73f6 Mon Sep 17 00:00:00 2001 From: Breno Reis Date: Sun, 10 Jun 2018 16:05:56 -0300 Subject: Added a multiple layout keymap for DZ60 (#3159) * Added files for my new layout. * Added layout template * Qwerty layout done * Qwerty layout done * Test commit * Qwerty, colemak e dvorak layouts done. * Added templates for extra layers * Added templates for extra layers * Small adjustments on function layer * Minor updates * Minor updates * daily update * added my dz60 layout * added my niu mini layout * made the suggested corrections --- keyboards/dz60/keymaps/hailbreno/README.md | 1 + keyboards/dz60/keymaps/hailbreno/keymap.c | 253 +++++++++++++++++++++++ keyboards/dz60/keymaps/hailbreno/rules.mk | 2 + keyboards/niu_mini/keymaps/framtava/config.h | 32 +++ keyboards/niu_mini/keymaps/framtava/keymap.c | 279 ++++++++++++++++++++++++++ keyboards/niu_mini/keymaps/framtava/readme.md | 2 + keyboards/niu_mini/keymaps/framtava/rules.mk | 3 + 7 files changed, 572 insertions(+) create mode 100644 keyboards/dz60/keymaps/hailbreno/README.md create mode 100644 keyboards/dz60/keymaps/hailbreno/keymap.c create mode 100644 keyboards/dz60/keymaps/hailbreno/rules.mk create mode 100644 keyboards/niu_mini/keymaps/framtava/config.h create mode 100644 keyboards/niu_mini/keymaps/framtava/keymap.c create mode 100644 keyboards/niu_mini/keymaps/framtava/readme.md create mode 100644 keyboards/niu_mini/keymaps/framtava/rules.mk (limited to 'keyboards') diff --git a/keyboards/dz60/keymaps/hailbreno/README.md b/keyboards/dz60/keymaps/hailbreno/README.md new file mode 100644 index 0000000000..f7f8ff4802 --- /dev/null +++ b/keyboards/dz60/keymaps/hailbreno/README.md @@ -0,0 +1 @@ +Split spacebar and multiple layouts for DZ60. \ No newline at end of file diff --git a/keyboards/dz60/keymaps/hailbreno/keymap.c b/keyboards/dz60/keymaps/hailbreno/keymap.c new file mode 100644 index 0000000000..cc718c3935 --- /dev/null +++ b/keyboards/dz60/keymaps/hailbreno/keymap.c @@ -0,0 +1,253 @@ +/* +* @Author: hailbreno +* @Date: 2018-04-30 14:32:13 +* @Last Modified by: hailbreno +* @Last Modified time: 2018-05-03 11:19:34 +*/ + +#include QMK_KEYBOARD_H + +#define X KC_NO +#define _______ KC_TRNS + +extern keymap_config_t keymap_config; + +enum layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _FUNC, + _FUNC2, + _ADJUST, + _RGB +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + FUNC, + FUNC2, + RGB, +}; + +/*layout template + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + + [LAYOUT] = LAYOUT_2_shifts( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, X, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), +*/ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* QWERTY + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ~ | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Del | + * |-----------------------------------------------------------------------------------------+ + * | Caps | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / |Shift| Up | Bl | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| + * `-----------------------------------------------------------------------------------------' + */ +[_QWERTY] = LAYOUT_2_shifts( + 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_DEL, + LT(_FUNC,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_LSPO, X, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, RGB, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, FUNC2, KC_SPC, KC_RALT, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT), + +/* COLEMAK + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ~ | Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | + * |-----------------------------------------------------------------------------------------+ + * | Caps | A | R | S | T | D | H | N | E | I | O | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | K | M | , | . | / |Shift| Up | Bl | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| + * `-----------------------------------------------------------------------------------------' + */ +[_COLEMAK] = LAYOUT_2_shifts( + 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_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_DEL, + LT(_FUNC,KC_CAPS), 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_LSPO, X, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, KC_UP, RGB, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, FUNC2, KC_SPC, KC_RALT, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT), + +/* DVORAK + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | ~ | Del | + * |-----------------------------------------------------------------------------------------+ + * | Tab | " | , | . | P | Y | F | G | C | R | L | / | = | \ | + * |-----------------------------------------------------------------------------------------+ + * | Bckspc | A | O | E | U | I | D | H | T | N | S | - | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | ; | Q | J | K | X | B | M | W | V | Z |Shift| Up | Bl | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | Alt | Gui | Backspace | Fn2 | Space | Alt | App | Left| Down|Right| + * `-----------------------------------------------------------------------------------------' + */ +[_DVORAK] = LAYOUT_2_shifts( + KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV, + KC_TAB, KC_QUOTE, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_DEL, + LT(_FUNC,KC_CAPS), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, + KC_LSPO, X, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSPC, KC_UP, RGB, + KC_LCTL, KC_LALT, KC_LGUI, KC_BSPC, FUNC2, KC_SPC, KC_RALT, KC_APP, KC_LEFT, KC_DOWN, KC_RGHT), + +/* FUNC + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Prnt| Ins | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | Up | | | | | Bspc | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | Left| Down| Rght| | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | PgUp| | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | Home| PgDn| End | + * `-----------------------------------------------------------------------------------------' + */ +[_FUNC] = LAYOUT_2_shifts( + _______, 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_INS, + _______, _______, _______, _______, _______, _______, _______, KC_PGUP, KC_UP, KC_PGDN, KC_CIRC, _______, _______, KC_BSPC, + _______, _______, _______, _______, _______, _______, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_TILD, _______, + _______, X, _______, _______, _______, _______, _______, KC_END, _______, _______, _______, _______, _______, KC_PGUP, _______, + _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_END), + +/* FUNC2 + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ +[_FUNC2] = LAYOUT_2_shifts( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, X, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +/* RGB + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | Tog | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------' + */ +[_RGB] = LAYOUT_2_shifts( + _______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______, _______, _______, _______, + _______, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, RGB_HUD, RGB_VAD, RGB_HUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, X, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_TOG, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______), + +/* Adjust (Func + Func2) + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | |Reset| + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | |Qwerty|Colemk|Dvorak| + * `-----------------------------------------------------------------------------------------' + */ +[_ADJUST] = LAYOUT_2_shifts( + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, X, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, QWERTY, COLEMAK, DVORAK), +}; + +#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) { + 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 FUNC: + if (record->event.pressed) { + layer_on(_FUNC); + update_tri_layer(_FUNC, _FUNC2, _ADJUST); + } else { + layer_off(_FUNC); + update_tri_layer(_FUNC, _FUNC2, _ADJUST); + } + return false; + break; + case FUNC2: + if (record->event.pressed) { + layer_on(_FUNC2); + update_tri_layer(_FUNC, _FUNC2, _ADJUST); + } else { + layer_off(_FUNC2); + update_tri_layer(_FUNC, _FUNC2, _ADJUST); + } + return false; + break; + case RGB: + if (record->event.pressed) { + layer_on(_RGB); + } else { + layer_off(_RGB); + } + return false; + break; + } + return true; +} diff --git a/keyboards/dz60/keymaps/hailbreno/rules.mk b/keyboards/dz60/keymaps/hailbreno/rules.mk new file mode 100644 index 0000000000..ad188f7dd5 --- /dev/null +++ b/keyboards/dz60/keymaps/hailbreno/rules.mk @@ -0,0 +1,2 @@ +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = no # Mouse keys(+4700) \ No newline at end of file diff --git a/keyboards/niu_mini/keymaps/framtava/config.h b/keyboards/niu_mini/keymaps/framtava/config.h new file mode 100644 index 0000000000..26387986dd --- /dev/null +++ b/keyboards/niu_mini/keymaps/framtava/config.h @@ -0,0 +1,32 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#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 + +#endif diff --git a/keyboards/niu_mini/keymaps/framtava/keymap.c b/keyboards/niu_mini/keymaps/framtava/keymap.c new file mode 100644 index 0000000000..81426e85e3 --- /dev/null +++ b/keyboards/niu_mini/keymaps/framtava/keymap.c @@ -0,0 +1,279 @@ +/* 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 . + */ + +#include QMK_KEYBOARD_H + +extern keymap_config_t keymap_config; + +enum layers { + _QWERTY, + _COLEMAK, + _DVORAK, + _LOWER, + _RAISE, + _PLOVER, + _ADJUST, + _BACKLIT +}; + +enum keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + 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 | Alt | GUI |Brite |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC}, + {KC_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, BACKLIT, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |Brite |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {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 }, + {KC_LCTL, KC_LGUI, KC_LALT, BACKLIT, 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 | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | Alt | GUI |Brite |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {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 }, + {KC_LCTL, KC_LGUI, KC_LALT, BACKLIT, 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 | | | End | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {_______, 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_TILD}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, KC_PIPE, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_PGDN, KC_PGUP, KC_END} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | 4 | 5 | 6 | | | | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 7 | 8 | 9 | | | |ISO # |ISO / |Pg Up |Pg Dn | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | 0 | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {KC_NLCK, 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_4, KC_5, KC_6, _______, _______, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_GRV}, + {_______, KC_7, KC_8, KC_9, _______, _______, _______, _______, KC_PSCR, _______, KC_BSLS, _______}, + {_______, _______, _______, KC_0, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, 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] = { + {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] = { + {_______, 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, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | TOG | | | | | | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | MOD | HUI | HUD | + * `-----------------------------------------------------------------------------------' + */ +[_BACKLIT] = { + {_______, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, _______, _______, _______}, + {RGB_TOG, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_VAI, RGB_VAD}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RGB_SAI, RGB_SAD}, + {_______, _______, _______, _______, _______, _______, _______, _______, RGB_MOD, RGB_RMOD, RGB_HUI, RGB_HUD} +} + + +}; + +#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) { + layer_on(_BACKLIT); + // update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_BACKLIT); + // update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + 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; + } + return true; +} diff --git a/keyboards/niu_mini/keymaps/framtava/readme.md b/keyboards/niu_mini/keymaps/framtava/readme.md new file mode 100644 index 0000000000..de9680b498 --- /dev/null +++ b/keyboards/niu_mini/keymaps/framtava/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + diff --git a/keyboards/niu_mini/keymaps/framtava/rules.mk b/keyboards/niu_mini/keymaps/framtava/rules.mk new file mode 100644 index 0000000000..8cf6f7d5cb --- /dev/null +++ b/keyboards/niu_mini/keymaps/framtava/rules.mk @@ -0,0 +1,3 @@ +CONSOLE_ENABLE = no # Console for debug(+400) +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode \ No newline at end of file -- cgit v1.2.3