forked from qmk/qmk_firmware
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
josh
committed
May 27, 2022
1 parent
82828c3
commit 55c03bb
Showing
7 changed files
with
250 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#pragma once | ||
|
||
#undef ROTATIONAL_TRANSFORM_ANGLE | ||
#define ROTATIONAL_TRANSFORM_ANGLE -105 | ||
|
||
|
||
#define TAPPING_FORCE_HOLD | ||
#define TAPPING_TERM 150 | ||
#define PERMISSIVE_HOLD | ||
#define IGNORE_MOD_TAP_INTERRUPT |
174 changes: 174 additions & 0 deletions
174
keyboards/bastardkb/charybdis/3x5/keymaps/joshi/keymap.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,174 @@ | ||
/** | ||
* Copyright 2021 Charly Delay <charly@codesink.dev> (@0xcharly) | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License as published by | ||
* the Free Software Foundation, either version 2 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
#include QMK_KEYBOARD_H | ||
|
||
|
||
// Todo: ZMK Combos; Caps Word | ||
|
||
enum charybdis_keymap_layers { | ||
LAYER_BASE = 0, | ||
LAYER_NAV, | ||
LAYER_NUM, | ||
LAYER_FUNC, | ||
LAYER_SYM, | ||
LAYER_PNTR, | ||
LAYER_EMPTY | ||
}; | ||
|
||
#define TMB_1 LT(LAYER_NAV, KC_BACKSPACE) | ||
#define TMB_2 LT(LAYER_NUM, KC_DELETE) | ||
#define TMB_3 LT(LAYER_FUNC, KC_ENTER) | ||
#define TMB_4 LT(LAYER_SYM, KC_SPACE) | ||
#define TMB_5 LT(LAYER_PNTR, KC_MINUS) | ||
|
||
|
||
enum custom_keycodes { | ||
BALL_SCROLL = SAFE_RANGE, | ||
BALL_SNIPING | ||
}; | ||
|
||
bool is_scrolling = false; | ||
bool is_sniping = false; | ||
|
||
|
||
#define DPI_NORMAL 700 | ||
#define DPI_SNIPE 2000 | ||
#define DPI_SCROLL 100 | ||
|
||
|
||
// clang-format off | ||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { | ||
[LAYER_BASE] = LAYOUT_charybdis_3x5( | ||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮ | ||
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, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, | ||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ | ||
TMB_1, TMB_2, TMB_3, TMB_4, TMB_5 | ||
// ╰────────────────╯ ╰────────────────────────────╯ | ||
), | ||
|
||
[LAYER_NAV] = LAYOUT_charybdis_3x5( | ||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮ | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, KC_END, XXXXXXX, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BSPC, KC_DEL, XXXXXXX, XXXXXXX, | ||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ | ||
_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
// ╰──────────────────╯ ╰───────────────────────────╯ | ||
), | ||
|
||
|
||
[LAYER_NUM] = LAYOUT_charybdis_3x5( | ||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮ | ||
KC_PLUS, KC_MINS, KC_ASTR, KC_SLSH, KC_EQL, XXXXXXX, KC_7, KC_8, KC_9, KC_0, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
KC_LGUI, KC_LALT, KC_LSFT, KC_LCTL, XXXXXXX, XXXXXXX, KC_4, KC_5, KC_6, KC_0, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
XXXXXXX, XXXXXXX, KC_DOT, KC_COMM, XXXXXXX, XXXXXXX, KC_1, KC_2, KC_3, KC_0, | ||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ | ||
XXXXXXX, _______, XXXXXXX, XXXXXXX, XXXXXXX | ||
// ╰──────────────────╯ ╰───────────────────────────╯ | ||
), | ||
|
||
|
||
|
||
|
||
[LAYER_SYM] = LAYOUT_charybdis_3x5( | ||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮ | ||
KC_GRV, KC_DLR, KC_EXLM, KC_LCBR, KC_RCBR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
KC_BSLS, KC_NUHS, KC_AMPR, KC_LPRN, KC_RPRN, XXXXXXX, KC_RCTL, KC_RSFT, KC_RALT, KC_RGUI, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
KC_MINS, KC_UNDS, KC_PIPE, KC_LBRC, KC_RBRC, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ | ||
XXXXXXX, XXXXXXX, _______, XXXXXXX, XXXXXXX | ||
// ╰──────────────────╯ ╰───────────────────────────╯ | ||
), | ||
|
||
[LAYER_FUNC] = LAYOUT_charybdis_3x5( | ||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮ | ||
KC_F12, KC_F7, KC_F8, KC_F9, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
KC_F11, KC_F4, KC_F5, KC_F6, XXXXXXX, XXXXXXX, KC_RCTL, KC_RSFT, KC_RALT, KC_RGUI, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
KC_F10, KC_F1, KC_F2, KC_F3, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ | ||
XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX | ||
// ╰──────────────────╯ ╰───────────────────────────╯ | ||
), | ||
|
||
|
||
[LAYER_PNTR] = LAYOUT_charybdis_3x5( | ||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮ | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_BTN1, KC_BTN3, KC_BTN2, BALL_SCROLL, | ||
// ├─────────────────────────────────────────────┤ ├─────────────────────────────────────────────┤ | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BALL_SNIPING, | ||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______ | ||
// ╰──────────────────╯ ╰───────────────────────────╯ | ||
), | ||
|
||
[LAYER_EMPTY] = LAYOUT_charybdis_3x5( | ||
// ╭─────────────────────────────────────────────╮ ╭─────────────────────────────────────────────╮ | ||
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, XXXXXXX, XXXXXXX, | ||
// ╰─────────────────────────────────────────────┤ ├─────────────────────────────────────────────╯ | ||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX | ||
// ╰──────────────────╯ ╰───────────────────────────╯ | ||
), | ||
}; | ||
// clang-format on | ||
|
||
|
||
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) { | ||
if (is_scrolling) { | ||
mouse_report.h = mouse_report.x; | ||
mouse_report.v = mouse_report.y; | ||
mouse_report.x = 0; | ||
mouse_report.y = 0; | ||
} | ||
return mouse_report; | ||
} | ||
|
||
bool process_record_user(uint16_t keycode, keyrecord_t *record) { | ||
|
||
switch (keycode) { | ||
case BALL_SCROLL: | ||
is_scrolling = !is_scrolling; | ||
pointing_device_set_cpi(is_scrolling ? DPI_SCROLL : DPI_NORMAL); | ||
|
||
return false; | ||
|
||
case BALL_SNIPING: | ||
is_sniping = !is_sniping; | ||
pointing_device_set_cpi(is_sniping ? DPI_SNIPE : DPI_NORMAL); | ||
|
||
return false; | ||
} | ||
|
||
return true; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Charybdis (3x5) default keymap | ||
|
||
> :bulb: Have a look at the [`via` keymap](../via) for a more feature-rich layout. | ||
The Charydbis (3x5) default keymap is inspired from the original [Dactyl Manuform](../../../../../handwired/dactyl_manuform) default keymap. | ||
|
||
This layout supports RGB matrix. However, due to space constraints on the MCU, only a limited number of effect can be enabled at once. Look at the `config.h` file and enable your favorite effect. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# MCU name | ||
MCU = atmega32u4 | ||
|
||
# Bootloader selection | ||
BOOTLOADER = atmel-dfu | ||
|
||
# Build Options | ||
# change yes to no to disable | ||
# | ||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite | ||
MOUSEKEY_ENABLE = yes # Mouse keys | ||
EXTRAKEY_ENABLE = yes # Audio control and System control | ||
CONSOLE_ENABLE = no # Console for debug | ||
COMMAND_ENABLE = no # Commands for debug and configuration | ||
NKRO_ENABLE = no # Enable N-Key Rollover | ||
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality | ||
RGBLIGHT_ENABLE = no # Enable keyboard RGB underglow | ||
AUDIO_ENABLE = no # Audio output | ||
|
||
AUDIO_SUPPORTED = no # Audio is not supported | ||
RGB_MATRIX_SUPPORTED = no # RGB matrix is supported and enabled by default | ||
RGBLIGHT_SUPPORTED = no # RGB underglow is supported, but not enabled by default | ||
RGB_MATRIX_ENABLE = no # Enable keyboard RGB matrix functionality | ||
RGB_MATRIX_DRIVER = WS2812 | ||
|
||
# Enable link-time optimization by default. The Charybdis packs a lot of | ||
# features (RGB, Via, trackball) in a small atmega32u4 package. | ||
LTO_ENABLE = yes | ||
|
||
# Charybdis nano is a split 3x5 keyboard with a maximum of 3 thumb keys (2 on | ||
# the trackball side). | ||
SPLIT_KEYBOARD = yes | ||
LAYOUTS = split_3x5_3 # Support community layout, in particular Manna-Harbour's Miryoku layout | ||
|
||
POINTING_DEVICE_ENABLE = yes # Enable trackball | ||
POINTING_DEVICE_DRIVER = pmw3360 | ||
# https://qmk.fm/changes/2018-11-16-use-a-single-endpoint-for-hid-reports | ||
MOUSE_SHARED_EP = no # Unify multiple HID interfaces into a single Endpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters