diff --git a/keyboards/fingerpunch/arachnophobe/arachnophobe.c b/keyboards/fingerpunch/arachnophobe/arachnophobe.c new file mode 100644 index 0000000000..d80367de32 --- /dev/null +++ b/keyboards/fingerpunch/arachnophobe/arachnophobe.c @@ -0,0 +1,16 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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 "arachnophobe.h" diff --git a/keyboards/fingerpunch/arachnophobe/arachnophobe.h b/keyboards/fingerpunch/arachnophobe/arachnophobe.h new file mode 100644 index 0000000000..2358a36157 --- /dev/null +++ b/keyboards/fingerpunch/arachnophobe/arachnophobe.h @@ -0,0 +1,41 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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 . + */ +#pragma once + +#include "quantum.h" + +/* This a shortcut to help you visually see your layout. + * + * The first section contains all of the arguments representing the physical + * layout of the board and position of the keys. + * + * The second converts the arguments into a two-dimensional array which + * represents the switch matrix. + */ + +#define LAYOUT_arachnophobe( \ + K02, K03, K08, K09, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K34, K35, K36, K37, K38, K39 \ +) \ +{ \ + { K39, K02, K03, K34, K35, K17 }, \ + { K11, K12, K13, K14, K15, K16 }, \ + { K21, K22, K23, K24, K25, K26 }, \ + { K36, K18, K29, K09, K1A, K2A }, \ + { K37, K28, K08, K19, K38, K27 }, \ +} diff --git a/keyboards/fingerpunch/arachnophobe/config.h b/keyboards/fingerpunch/arachnophobe/config.h new file mode 100644 index 0000000000..b13226c23b --- /dev/null +++ b/keyboards/fingerpunch/arachnophobe/config.h @@ -0,0 +1,50 @@ +/* +Copyright 2021 Sadek Baroudi + +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 . +*/ + +#pragma once +#include "config_common.h" + + +/* USB Device descriptor parameter */ +#define DEVICE_VER 0x0001 +#define VENDOR_ID 0xFEFE +#define PRODUCT_ID 0xA17A +#define MANUFACTURER sadekbaroudi +#define PRODUCT sadekbaroudi arachnophobe + +/* key matrix size */ +/* Rows are doubled up */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 6 + +// Use the micropython pin numbers from here: https://wiki.seeedstudio.com/XIAO-RP2040/ +#define MATRIX_ROW_PINS \ + { GP26, GP27, GP28, GP29, GP3 } +#define MATRIX_COL_PINS \ + { GP6, GP7, GP0, GP4, GP2, GP1 } +#define UNUSED_PINS + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCE 5 + +/* COL2ROW, ROW2COL*/ +#define DIODE_DIRECTION COL2ROW + +/* 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 diff --git a/keyboards/fingerpunch/arachnophobe/keymaps/default/keymap.c b/keyboards/fingerpunch/arachnophobe/keymaps/default/keymap.c new file mode 100644 index 0000000000..643db2cffc --- /dev/null +++ b/keyboards/fingerpunch/arachnophobe/keymaps/default/keymap.c @@ -0,0 +1,155 @@ +#include QMK_KEYBOARD_H + +// Defines names for use in layer keycodes and the keymap +enum layer_names { + _QWERTY, + _COLEMAK, + _LOWER, + _RAISE, + _ADJUST +}; + +#define LOWER MO(_LOWER) +#define RAISE MO(_RAISE) + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | |ALTTAB| | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_QWERTY] = LAYOUT_arachnophobe( + 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, LCTL_T(KC_A), LGUI_T(KC_S), LALT_T(KC_D), LSFT_T(KC_F), KC_G, KC_H, RSFT_T(KC_J), RALT_T(KC_K), RGUI_T(KC_L), RCTL_T(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_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC), + LALT(KC_TAB) +), + +/* Colemak-dh + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ESC | Q | W | E | R | T | | Y | U | I | O | P |BckSpc| + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | TAB | A | S | D | F | G | |ALTTAB| | H | J | K | L | ; | ' | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | SFT | Z | X | C | V | B | | N | M | , | . | / | SFT | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +// Default config uses home row mods. So hold each of the keys on the home row to use ctrl, gui, alt, or shift +[_COLEMAK] = LAYOUT_arachnophobe( + KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, + KC_TAB, LCTL_T(KC_A), LGUI_T(KC_R), LALT_T(KC_S), LSFT_T(KC_T), KC_G, KC_M, RSFT_T(KC_N), RALT_T(KC_E), RGUI_T(KC_I), RCTL_T(KC_O), KC_QUOT, + KC_LSFT, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + KC_MUTE, KC_BSLS, KC_ENT, LOWER, RAISE, KC_SPC, KC_DEL, LCTL(KC_BSPC), + LALT(KC_TAB) +), + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | Home | Left | Down | Up | Right| End | |ALTTAB| | | - | = | [ | ] | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | | PgDn | PgUp | | | | | | | | | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_arachnophobe( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), + + + +/* Raise + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | | | | | | |ALTTAB| | | _ | + | { | } | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ + +[_RAISE] = LAYOUT_arachnophobe( + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______, + KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_TAB, _______, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______, + _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), +/* Lower + * + * ,-----------------------------------------. ,-----------------------------------------. + * | | ! | @ | # | $ | % | | ^ | & | * | ( | ) | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | | | | | | |ALTTAB| | | _ | + | { | } | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | Caps| | | | | | | | | | | " | | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_LOWER] = LAYOUT_arachnophobe( + _______, 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_CAPS, _______, _______, _______, _______, _______, _______, _______, KC_PIPE, KC_DQT, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +), + +/* Adjust (Lower + Raise) + + * ,-----------------------------------------. ,-----------------------------------------. + * | | RGB_T| RGB_R| RGB_F| |QWERTY| | F1 | F2 | F3 | F4 | F5 | | + * |------+------+------+------+------+------| ,------. |------+------+------+------+------+------| + * | | SPD_I| HUE_I| SAT_I| VAL_I|COLEMK| |ALTTAB| | F6 | F7 | F8 | F9 | F10 | | + * |------+------+------+------+------+------| `------' |------+------+------+------+------+------| + * | | SPD_D| HUE_D| SAT_D| VAL_D| | | F11 | F12 | | | Reset| | + * `-----------------------------------------' `-----------------------------------------' + * ,------. ,--------------------. ,--------------------. ,------. + * | MUTE | | \ | Enter| LOWER| | RAISE| Space| Del | | DELW | + * `------' `--------------------' `--------------------. `------' + */ +[_ADJUST] = LAYOUT_arachnophobe( + _______, RGB_TOG, RGB_RMOD, RGB_MOD, _______, TO(_QWERTY), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, + _______, RGB_SPI, RGB_HUI, RGB_SAI, RGB_VAI, TO(_COLEMAK), KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, _______, + _______, RGB_SPD, RGB_HUD, RGB_SAD, RGB_VAD, _______, KC_F11, KC_F12, _______, _______, RESET, _______, + _______, _______, _______, _______, _______, _______, _______, _______, + _______ +) +}; + +layer_state_t layer_state_set_user(layer_state_t state) { + return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST); +} diff --git a/keyboards/fingerpunch/arachnophobe/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/arachnophobe/keymaps/sadekbaroudi/keymap.c new file mode 100644 index 0000000000..d0bdd22f9e --- /dev/null +++ b/keyboards/fingerpunch/arachnophobe/keymaps/sadekbaroudi/keymap.c @@ -0,0 +1,97 @@ +/* Copyright 2021 Sadek Baroudi + * + * 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 "sadekbaroudi.h" +#include QMK_KEYBOARD_H + +/* + * The `LAYOUT_arachnophobe_base` macro is a template to allow the use of identical + * modifiers for the default layouts (eg ALPHA_ALT, Colemak, Dvorak, etc), so + * that there is no need to set them up for each layout, and modify all of + * them if I want to change them. This helps to keep consistency and ease + * of use. K## is a placeholder to pass through the individual keycodes + */ + +// clang-format off +#define LAYOUT_arachnophobe_base( \ + K02, K03, K08, K09, \ + K11, K12, K13, K14, K15, K16, K17, K18, K19, K1A, \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K33, K34, K35, K36, K37, K38 \ + ) \ + LAYOUT_wrapper( \ + K02, K03, K08, K09, \ + LCTL_T(K11), LGUI_T(K12), LALT_T(K13), LSFT_T(K14), K15, LT(_MOUSE, K16), RSFT_T(K17), RALT_T(K18), RGUI_T(K19), RCTL_T(K1A), \ + K21, K22, K23, K24, K25, K26, K27, K28, K29, K2A, \ + K33, LT(_NAVIGATION,K34), LT(_FUNCTION,K35), LT(_MEDIA,K36), LT(_SYMBOLS,K37), K38 \ + ) + +/* Re-pass though to allow templates to be used */ +#define LAYOUT_arachnophobe_base_wrapper(...) LAYOUT_arachnophobe_base(__VA_ARGS__) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_ALPHA_ALT] = LAYOUT_arachnophobe_base_wrapper( + __ALPHA_ALT_L1_K2__, __ALPHA_ALT_L1_K3__, __ALPHA_ALT_R1_K3__, __ALPHA_ALT_R1_K4__, + _________________ALPHA_ALT_L2_________________, _________________ALPHA_ALT_R2_________________, + _________________ALPHA_ALT_L3_________________, _________________ALPHA_ALT_R3_________________, + __ALPHA_ALT_THUMBS_6__ + ), + + [_ALPHA] = LAYOUT_arachnophobe_base_wrapper( + __ALPHA_L1_K2__, __ALPHA_L1_K3__, __ALPHA_R1_K3__, __ALPHA_R1_K4__, + __________________ALPHA_L2____________________, __________________ALPHA_R2____________________, + __________________ALPHA_L3____________________, __________________ALPHA_R3____________________, + __ALPHA_THUMBS_6__ + ), + + [_NAVIGATION] = LAYOUT_wrapper( + __NAV_1_K2__, __NAV_1_K3__, __NUMPAD_1_K3__, __NUMPAD_1_K4__, + ________________NAVIGATION_2_______________, __NUMPAD_1_K2__, __NUMPAD_2_K2__, __NUMPAD_2_K3__, __NUMPAD_2_K4__, __NUMPAD_2_K5__, + ________________NAVIGATION_3_______________, _________________NUMPAD_3__________________, + _______, _______, KC_TAB, KC_BSPC, KC_SPACE, KC_DOT + ), + + [_SYMBOLS] = LAYOUT_wrapper( + __SYMBOLS_L1_K2__, __SYMBOLS_L1_K3__, __SYMBOLS_R1_K3__, __SYMBOLS_R1_K4__, + __SYMBOLS_L2_K1__, __SYMBOLS_L1_K1__, __SYMBOLS_L1_K4__, __SYMBOLS_L1_K5__, _______, _______, __SYMBOLS_R1_K1__, __SYMBOLS_R1_K2__, __SYMBOLS_R1_K5__, __SYMBOLS_R2_K5__, + ________________SYMBOLS_L3_________________, ________________SYMBOLS_R3_________________, + _______, KC_ENT, KC_DEL, KC_BSPC, _______, _______ + ), + + [_FUNCTION] = LAYOUT_wrapper( + __SHIFTNAV_1_K2__, __SHIFTNAV_1_K3__, __FUNCION_1_K3__, __FUNCION_1_K4__, + ________________SHIFTNAV_2_________________, __FUNCION_1_K2__, __FUNCION_2_K2__, __FUNCION_2_K3__, __FUNCION_2_K4__, __FUNCION_1_K5__, + ________________SHIFTNAV_3_________________, __FUNCION_3_K5__, __FUNCION_3_K2__, __FUNCION_3_K3__, __FUNCION_3_K4__, __FUNCION_2_K5__, + _______, _______, _______, N_DEL_LINE, KC_SPACE, _______ + ), + + [_MEDIA] = LAYOUT_wrapper( + // Note that I used __RGB_1_K1__ instead of __RGB_1_K2__ because that's my firmware reset key + __RGB_1_K1__, __RGB_1_K3__, __MACROS_1_K3__, __MACROS_1_K4__, + ___________________RGB_2___________________, _________________MACROS_2__________________, + ___________________RGB_3___________________, _________________MACROS_3__________________, + _______, _______, _______, _______, _______, _______ + ), + + [_MOUSE] = LAYOUT_wrapper( + __MOUSE_1_K2__, __MOUSE_1_K3__, _______, _______, + __________________MOUSE_2__________________, ___________________BLANK___________________, + __________________MOUSE_3__________________, ___________________BLANK___________________, + _______, KC_MS_BTN1, KC_MS_BTN3, KC_MS_BTN3, KC_MS_BTN2, _______ + ) +}; + diff --git a/keyboards/fingerpunch/arachnophobe/readme.md b/keyboards/fingerpunch/arachnophobe/readme.md new file mode 100644 index 0000000000..13fb0d1f12 --- /dev/null +++ b/keyboards/fingerpunch/arachnophobe/readme.md @@ -0,0 +1,15 @@ +# arachnophobe + +An ergonomic 30% keyboard + +* Keyboard Maintainer: [sadekbaroudi](https://github.com/sadekbaroudi) + +Make example for this keyboard (after setting up your build environment): + + make fingerpunch/arachnophobe:default + +Example of flashing this keyboard: + + make fingerpunch/arachnophobe:default:flash + +See the [build environment setup](https://docs.qmk.fm/#/getting_started_build_tools) and the [make instructions](https://docs.qmk.fm/#/getting_started_make_guide) for more information. Brand new to QMK? Start with our [Complete Newbs Guide](https://docs.qmk.fm/#/newbs). diff --git a/keyboards/fingerpunch/arachnophobe/rules.mk b/keyboards/fingerpunch/arachnophobe/rules.mk new file mode 100644 index 0000000000..dd24a3e8d7 --- /dev/null +++ b/keyboards/fingerpunch/arachnophobe/rules.mk @@ -0,0 +1,31 @@ +# MCU name +MCU = RP2040 +BOOTLOADER = rp2040 + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration +EXTRAKEY_ENABLE = yes # Audio control and System control +CONSOLE_ENABLE = no # Console for debug +COMMAND_ENABLE = no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE = no # USB Nkey Rollover +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality + +# Either do RGBLIGHT_ENABLE or RGB_MATRIX_ENABLE and RGB_MATRIX_DRIVER +RGBLIGHT_ENABLE = no +RGB_MATRIX_ENABLE = no +RGB_MATRIX_DRIVER = WS2812 + +MIDI_ENABLE = no # MIDI support +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 +ENCODER_ENABLE = no +OLED_DRIVER_ENABLE = no # this can be yes or no depending on if you have an OLED +EXTRAFLAGS += -flto # macros enable or disable +MOUSEKEY_ENABLE = yes diff --git a/keyboards/fingerpunch/osprette/keymaps/sadekbaroudi/keymap.c b/keyboards/fingerpunch/osprette/keymaps/sadekbaroudi/keymap.c index eb35e64df8..18dddf7b28 100644 --- a/keyboards/fingerpunch/osprette/keymaps/sadekbaroudi/keymap.c +++ b/keyboards/fingerpunch/osprette/keymaps/sadekbaroudi/keymap.c @@ -61,7 +61,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NAVIGATION] = LAYOUT_wrapper( __META_NAV_1_K2__, __META_NAV_1_K3__, __META_NAV_1_K4__, __META_NAV_1_K5__, __NUMPAD_1_K1__, __NUMPAD_1_K2__, __NUMPAD_1_K3__, __NUMPAD_1_K4__, - __META_NAV_1_K1__, ________________NAVIGATION_2_______________, _________________NUMPAD_2__________________, __NUMPAD_1_K5__, + __NAV_1_K1__, ________________NAVIGATION_2_______________, _________________NUMPAD_2__________________, __NUMPAD_1_K5__, ________________NAVIGATION_3_______________, _________________NUMPAD_3__________________, _______, _______, KC_SPACE, KC_DOT ), diff --git a/users/sadekbaroudi/combos.c b/users/sadekbaroudi/combos.c index 919d33d850..4588ba7756 100644 --- a/users/sadekbaroudi/combos.c +++ b/users/sadekbaroudi/combos.c @@ -1,32 +1,59 @@ #include "combos.h" +#include "sadekbaroudi.h" // COMBOS - https://beta.docs.qmk.fm/using-qmk/software-features/feature_combo const uint16_t PROGMEM undo_combo[] = {KC_Z, KC_X, COMBO_END}; -//const uint16_t PROGMEM redo_combo[] = {KC_DOT, KC_SLSH, COMBO_END}; -const uint16_t PROGMEM enter_combo[] = {KC_DOT, KC_SLSH, COMBO_END}; -const uint16_t PROGMEM delete_combo[] = {KC_D, KC_V, COMBO_END}; -const uint16_t PROGMEM backspace_combo[] = {KC_K, KC_H, COMBO_END}; -const uint16_t PROGMEM apostrophe_combo[] = {KC_Z, KC_SLSH, COMBO_END}; -const uint16_t PROGMEM q_combo[] = {KC_X, KC_C, COMBO_END}; -const uint16_t PROGMEM semicolon_combo[] = {KC_COMMA, KC_DOT, COMBO_END}; -const uint16_t PROGMEM tab_combo[] = {KC_COMMA, KC_SLSH, COMBO_END}; +//const uint16_t PROGMEM redo_combo[] = {KC_C, KC_D, COMBO_END}; +//const uint16_t PROGMEM enter_combo[] = {KC_K, KC_H, COMBO_END}; +//const uint16_t PROGMEM delete_combo[] = {KC_D, KC_V, COMBO_END}; +//const uint16_t PROGMEM backspace_combo[] = {KC_M, KC_N, COMBO_END}; +//const uint16_t PROGMEM apostrophe_combo[] = {KC_Z, KC_SLSH, COMBO_END}; +//const uint16_t PROGMEM tab_combo[] = {KC_COMMA, KC_SLSH, COMBO_END}; //const uint16_t PROGMEM capsword_combo[] = {KC_X, KC_C, COMBO_END}; +const uint16_t PROGMEM q_combo[] = {KC_X, KC_C, COMBO_END}; +const uint16_t PROGMEM p_combo[] = {LSFT_T(KC_T), KC_G, COMBO_END}; +const uint16_t PROGMEM b_combo[] = {KC_D, KC_V, COMBO_END}; +const uint16_t PROGMEM j_combo[] = {KC_K, KC_H, COMBO_END}; +const uint16_t PROGMEM l_combo[] = {LT(_MOUSE, KC_M), RSFT_T(KC_N), COMBO_END}; +const uint16_t PROGMEM semicolon_combo[] = {KC_COMMA, KC_DOT, COMBO_END}; + +const uint16_t PROGMEM lbracket_combo[] = {LGUI_T(KC_R), KC_X, COMBO_END}; +const uint16_t PROGMEM lcurly_combo[] = {LALT_T(KC_S), KC_C, COMBO_END}; +const uint16_t PROGMEM lparen_combo[] = {LSFT_T(KC_T), KC_D, COMBO_END}; +const uint16_t PROGMEM langle_combo[] = {KC_G, KC_V, COMBO_END}; +const uint16_t PROGMEM rangle_combo[] = {KC_M, KC_K, COMBO_END}; +const uint16_t PROGMEM rparen_combo[] = {RSFT_T(KC_N), KC_H, COMBO_END}; +const uint16_t PROGMEM rcurly_combo[] = {RALT_T(KC_E), KC_COMMA, COMBO_END}; +const uint16_t PROGMEM rbracket_combo[] = {RGUI_T(KC_I), KC_DOT, COMBO_END}; combo_t key_combos[COMBO_COUNT] = { [UNDO] = COMBO_ACTION(undo_combo), // [REDO] = COMBO_ACTION(redo_combo), - [ENTER] = COMBO_ACTION(enter_combo), - [DELETE] = COMBO_ACTION(delete_combo), - [BACKSPACE] = COMBO_ACTION(backspace_combo), - [APOSTROPHE] = COMBO_ACTION(apostrophe_combo), - [Q] = COMBO_ACTION(q_combo), - [SEMICOLON] = COMBO_ACTION(semicolon_combo), - [TAB] = COMBO_ACTION(tab_combo), +// [ENTER] = COMBO_ACTION(enter_combo), +// [DELETE] = COMBO_ACTION(delete_combo), +// [BACKSPACE] = COMBO_ACTION(backspace_combo), +// [APOSTROPHE] = COMBO_ACTION(apostrophe_combo), +// [TAB] = COMBO_ACTION(tab_combo), // [CAPSWORD] = COMBO_ACTION(capsword_combo), + [Q] = COMBO_ACTION(q_combo), + [P] = COMBO_ACTION(p_combo), + [B] = COMBO_ACTION(b_combo), + [J] = COMBO_ACTION(j_combo), + [L] = COMBO_ACTION(l_combo), + [SEMICOLON] = COMBO_ACTION(semicolon_combo), + [LBRACKET] = COMBO_ACTION(lbracket_combo), + [LCURLY] = COMBO_ACTION(lcurly_combo), + [LPAREN] = COMBO_ACTION(lparen_combo), + [LANGLE] = COMBO_ACTION(langle_combo), + [RANGLE] = COMBO_ACTION(rangle_combo), + [RPAREN] = COMBO_ACTION(rparen_combo), + [RCURLY] = COMBO_ACTION(rcurly_combo), + [RBRACKET] = COMBO_ACTION(rbracket_combo), }; void process_combo_event(uint16_t combo_index, bool pressed) { - static uint16_t kc; + // can comment out if I use the apostrophe below + //static uint16_t kc; switch(combo_index) { case UNDO: if (pressed) { @@ -39,7 +66,6 @@ void process_combo_event(uint16_t combo_index, bool pressed) { tap_code16(LCTL(KC_Y)); } break; -*/ case ENTER: if (pressed) { tap_code16(KC_ENT); @@ -65,27 +91,88 @@ void process_combo_event(uint16_t combo_index, bool pressed) { tap_code16(kc); } break; + case TAB: + if (pressed) { + tap_code16(KC_TAB); + } + break; + case CAPSWORD: + // NOTE: if you change this behavior, may want to update in process_records.c for capsword macro behavior + if (pressed) { + enable_caps_word(); + } + break; +*/ case Q: if (pressed) { tap_code16(KC_Q); } break; + case P: + if (pressed) { + tap_code16(KC_P); + } + break; + case B: + if (pressed) { + tap_code16(KC_B); + } + break; + case J: + if (pressed) { + tap_code16(KC_J); + } + break; + case L: + if (pressed) { + tap_code16(KC_L); + } + break; case SEMICOLON: if (pressed) { tap_code16(KC_SCOLON); } break; - case TAB: + case LBRACKET: if (pressed) { - tap_code16(KC_TAB); + tap_code16(KC_LBRACKET); + } + break; + case LCURLY: + if (pressed) { + tap_code16(KC_LCBR); + } + break; + case LPAREN: + if (pressed) { + tap_code16(KC_LPRN); + } + break; + case LANGLE: + if (pressed) { + tap_code16(KC_LABK); + } + break; + case RANGLE: + if (pressed) { + tap_code16(KC_RABK); + } + break; + case RPAREN: + if (pressed) { + tap_code16(KC_RPRN); + } + break; + case RCURLY: + if (pressed) { + tap_code16(KC_RCBR); + } + break; + case RBRACKET: + if (pressed) { + tap_code16(KC_RBRACKET); } break; - // case CAPSWORD: - // // NOTE: if you change this behavior, may want to update in process_records.c for capsword macro behavior - // if (pressed) { - // enable_caps_word(); - // } - // break; } } // END COMBOS diff --git a/users/sadekbaroudi/combos.h b/users/sadekbaroudi/combos.h index 6785008473..10b5f455df 100644 --- a/users/sadekbaroudi/combos.h +++ b/users/sadekbaroudi/combos.h @@ -5,12 +5,24 @@ enum combo_events { UNDO, // REDO, - ENTER, - DELETE, - BACKSPACE, - APOSTROPHE, +// ENTER, +// DELETE, +// BACKSPACE, +// APOSTROPHE, +// TAB, +// CAPSWORD, Q, + P, + B, + J, + L, SEMICOLON, - TAB, - //CAPSWORD, + LBRACKET, + LCURLY, + LPAREN, + LANGLE, + RANGLE, + RPAREN, + RCURLY, + RBRACKET, }; diff --git a/users/sadekbaroudi/config.h b/users/sadekbaroudi/config.h index b3a524a971..6cbb3671af 100755 --- a/users/sadekbaroudi/config.h +++ b/users/sadekbaroudi/config.h @@ -1,6 +1,6 @@ #pragma once -#define COMBO_COUNT 8 +#define COMBO_COUNT 15 #define COMBO_TERM 75 #ifdef RGBLIGHT_ENABLE @@ -92,9 +92,8 @@ #define TAP_CODE_DELAY 25 -#define LEADER_TIMEOUT 500 +#define LEADER_TIMEOUT 300 #define LEADER_PER_KEY_TIMING #define TAPPING_FORCE_HOLD #define IGNORE_MOD_TAP_INTERRUPT - diff --git a/users/sadekbaroudi/rules.mk b/users/sadekbaroudi/rules.mk index 57d5022584..17fe2cc883 100755 --- a/users/sadekbaroudi/rules.mk +++ b/users/sadekbaroudi/rules.mk @@ -19,8 +19,6 @@ LTO_ENABLE = no SPACE_CADET_ENABLE = no GRAVE_ESC_ENABLE = no - - ifneq ($(strip $(NO_SECRETS)), yes) ifneq ("$(wildcard $(USER_PATH)/secrets.c)","") SRC += secrets.c diff --git a/users/sadekbaroudi/sadekbaroudi.c b/users/sadekbaroudi/sadekbaroudi.c index 95720ffa68..e4bf09b180 100755 --- a/users/sadekbaroudi/sadekbaroudi.c +++ b/users/sadekbaroudi/sadekbaroudi.c @@ -28,11 +28,6 @@ void matrix_scan_leader_key(void) { leading = false; leader_end(); - SEQ_ONE_KEY(KC_Q) { - // Anything you can do in a macro. - SEND_STRING("QMK is awesome."); - } - // Time shortcuts SEQ_TWO_KEYS(KC_H, KC_SLSH) { SEND_STRING("1:00"); @@ -106,20 +101,6 @@ void matrix_scan_leader_key(void) { SEQ_THREE_KEYS(KC_H, KC_COMM, KC_DOT) { SEND_STRING("12:30"); } - - // - SEQ_TWO_KEYS(KC_D, KC_D) { - SEND_STRING(SS_LCTL("a") SS_LCTL("c")); - } - SEQ_THREE_KEYS(KC_D, KC_D, KC_S) { - SEND_STRING("https://start.duckduckgo.com\n"); - } - SEQ_TWO_KEYS(KC_A, KC_S) { - register_code(KC_LGUI); - register_code(KC_S); - unregister_code(KC_S); - unregister_code(KC_LGUI); - } } } #endif diff --git a/users/sadekbaroudi/wrappers.h b/users/sadekbaroudi/wrappers.h index 9536bd29df..b790f46cd4 100755 --- a/users/sadekbaroudi/wrappers.h +++ b/users/sadekbaroudi/wrappers.h @@ -111,6 +111,11 @@ expanded before being used as arguments to the LAYOUT_xxx macro. # define LAYOUT LAYOUT_bigbarobord #endif +// Since arachnophobe uses the name LAYOUT_arachnophobe instead of LAYOUT +#if (!defined(LAYOUT) && defined(LAYOUT_arachnophobe)) +# define LAYOUT LAYOUT_arachnophobe +#endif + // clang-format off #define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__) @@ -172,12 +177,23 @@ NOTE: These are all the same length. If you do a search/replace #define __ALPHA_ALT_THUMBS_5__ __ALPHA_ALT_THUMB_L1__, __ALPHA_ALT_THUMB_L2__, __ALPHA_ALT_THUMB_R1__, __ALPHA_ALT_THUMB_R2__, __ALPHA_ALT_THUMB_R3__ #define __ALPHA_ALT_THUMBS_6__ __ALPHA_ALT_THUMBS_LEFT_3__, __ALPHA_ALT_THUMBS_RIGHT_3__ +#define __ALPHA_ALT_L1_K1__ KC_Q +#define __ALPHA_ALT_L1_K2__ KC_W +#define __ALPHA_ALT_L1_K3__ KC_F +#define __ALPHA_ALT_L1_K4__ KC_P +#define __ALPHA_ALT_L1_K5__ KC_B -#define _________________ALPHA_ALT_L1_________________ KC_Q, KC_W, KC_F, KC_P, KC_B +#define __ALPHA_ALT_R1_K1__ KC_J +#define __ALPHA_ALT_R1_K2__ KC_L +#define __ALPHA_ALT_R1_K3__ KC_U +#define __ALPHA_ALT_R1_K4__ KC_Y +#define __ALPHA_ALT_R1_K5__ KC_SCLN + +#define _________________ALPHA_ALT_L1_________________ __ALPHA_ALT_L1_K1__, __ALPHA_ALT_L1_K2__, __ALPHA_ALT_L1_K3__, __ALPHA_ALT_L1_K4__, __ALPHA_ALT_L1_K5__ #define _________________ALPHA_ALT_L2_________________ KC_A, KC_R, KC_S, KC_T, KC_G #define _________________ALPHA_ALT_L3_________________ KC_Z, KC_X, KC_C, KC_D, KC_V -#define _________________ALPHA_ALT_R1_________________ KC_J, KC_L, KC_U, KC_Y, KC_SCLN +#define _________________ALPHA_ALT_R1_________________ __ALPHA_ALT_R1_K1__, __ALPHA_ALT_R1_K2__, __ALPHA_ALT_R1_K3__, __ALPHA_ALT_R1_K4__, __ALPHA_ALT_R1_K5__ #define _________________ALPHA_ALT_R2_________________ KC_M, KC_N, KC_E, KC_I, KC_H #define _________________ALPHA_ALT_R3_________________ KC_K, KC_NO, KC_COMM, KC_DOT, KC_SLASH @@ -191,6 +207,18 @@ NOTE: These are all the same length. If you do a search/replace #define _________________ALPHA_ALT_R3_________________ KC_K, KC_M, KC_COMM, KC_DOT, KC_SLASH */ +#define __ALPHA_L1_K1__ KC_Q +#define __ALPHA_L1_K2__ KC_W +#define __ALPHA_L1_K3__ KC_F +#define __ALPHA_L1_K4__ KC_P +#define __ALPHA_L1_K5__ KC_B + +#define __ALPHA_R1_K1__ KC_J +#define __ALPHA_R1_K2__ KC_L +#define __ALPHA_R1_K3__ KC_U +#define __ALPHA_R1_K4__ KC_Y +#define __ALPHA_R1_K5__ KC_SCLN + // ALPHA #define __________________ALPHA_L1____________________ KC_Q, KC_W, KC_F, KC_P, KC_B #define __________________ALPHA_L2____________________ KC_A, KC_R, KC_S, KC_T, KC_G @@ -205,29 +233,26 @@ NOTE: These are all the same length. If you do a search/replace // NAVIGATION -#define __META_NAV_1_K1__ KC_ESC -#define __META_NAV_1_K2__ KC_PGUP -#define __META_NAV_1_K3__ KC_UP -#define __META_NAV_1_K4__ KC_PGDN -#define __META_NAV_1_K5__ _______ +#define __NAV_1_K1__ KC_ESC +#define __NAV_1_K2__ KC_PGUP +#define __NAV_1_K3__ KC_UP +#define __NAV_1_K4__ KC_PGDN +#define __NAV_1_K5__ _______ -#define __META_NAV_2_K1__ KC_HOME -#define __META_NAV_2_K2__ KC_LEFT -#define __META_NAV_2_K3__ KC_DOWN -#define __META_NAV_2_K4__ KC_RGHT -#define __META_NAV_2_K5__ KC_END +#define __NAV_2_K1__ KC_HOME +#define __NAV_2_K2__ KC_LEFT +#define __NAV_2_K3__ KC_DOWN +#define __NAV_2_K4__ KC_RGHT +#define __NAV_2_K5__ KC_END -#define _________________META_NAV_1________________ __META_NAV_1_K1__, __META_NAV_1_K2__, __META_NAV_1_K3__, __META_NAV_1_K4__, __META_NAV_1_K5__ -#define _________________META_NAV_2________________ __META_NAV_2_K1__, __META_NAV_2_K2__, __META_NAV_2_K3__, __META_NAV_2_K4__, __META_NAV_2_K5__ +#define __NAV_3_K1__ KC_ESC +#define __NAV_3_K2__ KC_PGUP +#define __NAV_3_K3__ KC_PGDN +#define __NAV_3_K4__ LCTL(LGUI(KC_LEFT)) +#define __NAV_3_K5__ LCTL(LGUI(KC_RIGHT)) -#define __NAV_3_K1__ LCTL(LSFT(KC_TAB)) -#define __NAV_3_K2__ LCTL(KC_TAB) -#define __NAV_3_K3__ LCTL(LGUI(KC_LEFT)) -#define __NAV_3_K4__ LCTL(LGUI(KC_RIGHT)) -#define __NAV_3_K5__ MOD_MEH - -#define ________________NAVIGATION_1_______________ _________________META_NAV_1________________ -#define ________________NAVIGATION_2_______________ _________________META_NAV_2________________ +#define ________________NAVIGATION_1_______________ __NAV_1_K1__, __NAV_1_K2__, __NAV_1_K3__, __NAV_1_K4__, __NAV_1_K5__ +#define ________________NAVIGATION_2_______________ __NAV_2_K1__, __NAV_2_K2__, __NAV_2_K3__, __NAV_2_K4__, __NAV_2_K5__ #define ________________NAVIGATION_3_______________ __NAV_3_K1__, __NAV_3_K2__, __NAV_3_K3__, __NAV_3_K4__, __NAV_3_K5__ #define __NUMPAD_1_K1__ KC_ASTR @@ -316,11 +341,11 @@ NOTE: These are all the same length. If you do a search/replace #define __SHIFTNAV_2_K4__ LSFT(KC_RGHT) #define __SHIFTNAV_2_K5__ LSFT(KC_END) -#define __SHIFTNAV_3_K1__ LCTL(KC_Z) -#define __SHIFTNAV_3_K2__ LCTL(KC_X) -#define __SHIFTNAV_3_K3__ LCTL(KC_C) -#define __SHIFTNAV_3_K4__ KC_MUTE -#define __SHIFTNAV_3_K5__ LCTL(KC_V) +#define __SHIFTNAV_3_K1__ _______ +#define __SHIFTNAV_3_K2__ LSFT(KC_PGUP) +#define __SHIFTNAV_3_K3__ LSFT(KC_PGDN) +#define __SHIFTNAV_3_K4__ _______ +#define __SHIFTNAV_3_K5__ _______ #define ________________SHIFTNAV_1_________________ __SHIFTNAV_1_K1__, __SHIFTNAV_1_K2__, __SHIFTNAV_1_K3__, __SHIFTNAV_1_K4__, __SHIFTNAV_1_K5__ #define ________________SHIFTNAV_2_________________ __SHIFTNAV_2_K1__, __SHIFTNAV_2_K2__, __SHIFTNAV_2_K3__, __SHIFTNAV_2_K4__, __SHIFTNAV_2_K5__ @@ -415,8 +440,8 @@ NOTE: These are all the same length. If you do a search/replace #define __MOUSE_2_K5__ KC_MS_WH_RIGHT #define __MOUSE_3_K1__ EEP_RST -#define __MOUSE_3_K2__ _______ -#define __MOUSE_3_K3__ KC_MS_ACCEL0 +#define __MOUSE_3_K2__ KC_MS_WH_UP +#define __MOUSE_3_K3__ KC_MS_WH_DOWN #define __MOUSE_3_K4__ KC_MS_ACCEL1 #define __MOUSE_3_K5__ KC_MS_ACCEL2