Skip to content

Commit

Permalink
Import keymap from scylla branch
Browse files Browse the repository at this point in the history
Basing this branch off of qmk/develop, because it has a fix I need[1].

[1] qmk#19593
  • Loading branch information
Philipp Albrecht committed Jul 18, 2023
1 parent a992dc8 commit e09a9f7
Show file tree
Hide file tree
Showing 3 changed files with 176 additions and 0 deletions.
33 changes: 33 additions & 0 deletions keyboards/bastardkb/scylla/keymaps/pylbrecht/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
/*
* Copyright 2021 Quentin LEBASTARD <[email protected]>
*
* 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

/* Tapping this number of times holds the key until tapped once again. */
#define ONESHOT_TAP_TOGGLE 5
/* Time (in ms) before the one shot key is released */
#define ONESHOT_TIMEOUT 5000

#define TAPPING_TERM 140
#define IGNORE_MOD_TAP_INTERRUPT
#define TAPPING_FORCE_HOLD

#define SPLIT_USB_DETECT
#define SPLIT_USB_TIMEOUT 2000

#define SPLIT_WATCHDOG_ENABLE
#define SPLIT_WATCHDOG_TIMEOUT 3000
141 changes: 141 additions & 0 deletions keyboards/bastardkb/scylla/keymaps/pylbrecht/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
/*
* Copyright 2021 Quentin LEBASTARD <[email protected]>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#include QMK_KEYBOARD_H

#define HRM_F SFT_T(KC_F)
#define HRM_J SFT_T(KC_J)
#define HRM_K ALT_T(KC_K)
#define HRM_D ALT_T(KC_D)

#define CTL_Z CTL_T(KC_Z)
#define CTL_SL CTL_T(KC_SLSH)

enum scylla_layers {
_QWERTY,
_LOWER,
_RAISE,
_ADJUST,
};

enum scylla_keycodes {
LOWER,
RAISE,
};

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

[_QWERTY] = LAYOUT_split_4x6_5(
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
KC_ESC, KC_A, KC_S, HRM_D, HRM_F, KC_G, KC_H, HRM_J, HRM_K, KC_L, KC_SCLN, CW_TOGG,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
KC_LCTL, CTL_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, CTL_SL, KC_BSLS,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|

// |---------|---------|---------| |---------|---------|---------|
LOWER, KC_SPC, KC_BSPC, KC_ENTER, RAISE, KC_TAB,
// |---------|---------|---------| |---------|---------|---------|
_______, _______, _______, _______
// |---------|---------| |---------|---------|

),

[_RAISE] = LAYOUT_split_4x6_5(
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, _______, _______, _______, _______, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_TILD, _______, _______, _______, _______, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, KC_QUOT, KC_DQUO, KC_LPRN, KC_RPRN, KC_GRV, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_PIPE, _______, _______, _______, _______, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
//
// |---------|---------|---------| |---------|---------|---------|
_______, _______, KC_DEL, _______, _______, _______,
// |---------|---------|---------| |---------|---------|---------|
_______, _______, _______, _______
// |---------|---------| |---------|---------|

),

[_LOWER] = LAYOUT_split_4x6_5(
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, _______, _______, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, _______, _______, KC_EQL, KC_7, KC_8, KC_9, KC_ASTR, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, _______, _______, KC_MINS, KC_4, KC_5, KC_6, KC_PLUS, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, _______, _______, KC_UNDS, KC_1, KC_2, KC_3, KC_BSLS, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|

// |---------|---------|---------| |---------|---------|---------|
_______, _______, _______, _______, _______, KC_0,
// |---------|---------|---------| |---------|---------|---------|
_______, _______, _______, _______
// |---------|---------| |---------|---------|
),

[_ADJUST] = LAYOUT_split_4x6_5(
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, QK_BOOT, _______, _______, _______, _______, _______, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// |---------|---------|---------|---------|---------|---------| |---------|---------|---------|---------|---------|---------|

// |---------|---------|---------| |---------|---------|---------|
_______, _______, _______, _______, _______, _______,
// |---------|---------|---------| |---------|---------|---------|
_______, _______, _______, _______
// |---------|---------| |---------|---------|
),
};

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;
}
return true;
};
2 changes: 2 additions & 0 deletions keyboards/bastardkb/scylla/keymaps/pylbrecht/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CAPS_WORD_ENABLE = yes
BOOTLOADER = rp2040

0 comments on commit e09a9f7

Please sign in to comment.