Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
165 changes: 165 additions & 0 deletions qmk/kyria/keymap.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
// Copyright 2024 splitkb.com ([email protected])
// SPDX-License-Identifier: GPL-2.0-or-later

#include QMK_KEYBOARD_H

enum layers {
_QWERTY = 0,
_SYMBOLS,
_NUMPAD,
};


// Aliases for readability
#define MACLOCK LGUI(LCTL(KC_Q))

#define BROWSER_SEARCH LGUI(KC_F)
#define BROWSER_NEWTAB LGUI(KC_T)
#define BROWSER_CLOSETTAB LGUI(KC_W)
#define BROWSER_NEXTTAB LAG(KC_RIGHT)
#define BROWSER_PREVTAB LAG(KC_LEFT)

#define CTL_QUOT MT(MOD_RCTL, KC_QUOTE)

// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/*
* Base Layer: QWERTY
*
* ,-------------------------------------------. ,-------------------------------------------.
* | Tab | Q | W | E | R | T | | Y | U | I | O | P | Bksp |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | Ctrl | A | S | D | F | G | | H | J | K | L | ; : |Ctrl/' |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | LShift | Z | X | C | V | B | Shift|Hyper | | LOCK | ESC | N | M | , < | . > | / ? | RShift |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* |Left | Right| GUI | Bspc | ALT | | TAB | Enter| Space| Up | Down |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-----------------------------------. ,-----------------------------------.
* | MUTE | ____ | _____ | ____ | ____ | | MUTE | ____ | _____ | ____ | ____ |
* `-----------------------------------' `-----------------------------------'
*/
[_QWERTY] = LAYOUT_split_3x6_5_hlc(
KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y, KC_U , KC_I , KC_O , KC_P , KC_BSLS,
KC_LCTL , KC_A , KC_S , KC_D , LT(_NUMPAD, KC_F) , LSFT_T(KC_G), RSFT_T(KC_H), KC_J , KC_K , KC_L , KC_SCLN, CTL_QUOT,
KC_LSFT , KC_Z , KC_X , KC_C , KC_V , KC_B , OSM(MOD_LSFT), HYPR(KC_5), MACLOCK, KC_ESC , KC_N, KC_M , KC_COMM, KC_DOT ,KC_SLSH, KC_RSFT,
KC_LEFT , KC_RIGHT, KC_LGUI, KC_BSPC , LALT_T(KC_TAB), RALT_T(KC_TAB) , KC_ENT , LT(_SYMBOLS, KC_SPC), KC_UP, KC_DOWN,
KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO, KC_MUTE, KC_NO, KC_NO, KC_NO, KC_NO
),

/*
* Symbol Layer template
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | ! | @ | { | { | | | | F1 | F2 | VOLU | VOLD | * | |
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
* | | & | $ | ( | ) | ` | | Left | Down | Up | Right| + | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
* | | # | ^ | [ | ] | ~ | | | | | | _ | - | = | % | | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | | | | | | | | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-----------------------------------. ,-----------------------------------.
* | | | | | | | | | | | |
* `-----------------------------------' `-----------------------------------'
*/
[_SYMBOLS] = LAYOUT_split_3x6_5_hlc(
_______, KC_EXCLAIM, KC_AT, KC_LEFT_CURLY_BRACE, KC_RIGHT_CURLY_BRACE, KC_PIPE, KC_F1, KC_F2, KC_VOLU, KC_VOLD, KC_ASTERISK, KC_MUTE,
BROWSER_NEWTAB, KC_AMPERSAND, KC_DOLLAR, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_GRAVE, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, KC_PLUS, _______,
_______, KC_HASH, KC_CIRCUMFLEX,KC_LBRC, KC_RBRC, KC_TILDE,_______, _______, _______, _______, KC_UNDERSCORE, KC_MINUS,KC_EQUAL,KC_PERCENT,_______, _______,
_______, _______, BROWSER_PREVTAB, BROWSER_NEXTTAB, BROWSER_CLOSETTAB, _______, _______, _______, _______, _______,

_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),

/*
* Numpad Layer template
*
* ,-------------------------------------------. ,-------------------------------------------.
* | | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | - | |
* |--------+------+------+------+------+------| |------+------+------+------+------+-------|
* | | | | | | | | | 4 | 5 | 6 | + | |
* |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+-------|
* | | | | | | | | | | | | | 1 | 2 | 3 | / | |
* `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
* | | | GUI | BSPC | | | | Ent | 0 | | |
* | | | | | | | | | | | |
* `----------------------------------' `----------------------------------'
* ,-----------------------------------. ,-----------------------------------.
* | | | | | | | | | | | |
* `-----------------------------------' `-----------------------------------'
*/
[_NUMPAD] = LAYOUT_split_3x6_5_hlc(
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_MINUS, QK_BOOT,
_______, _______, _______, _______, _______, _______, KC_COMM, KC_4, KC_5, KC_6, KC_PLUS, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, _______,
_______, _______, KC_LGUI, KC_BSPC, _______, KC_SPC, KC_ENTER, KC_0, _______, _______,

_______, _______, _______, _______, _______, _______, _______, _______, _______, _______
),


// /*
// * Halcyon Layer template
// *
// * ,-------------------------------------------. ,-------------------------------------------.
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------| |------+------+------+------+------+--------|
// * | | | | | | | | | | | | | |
// * |--------+------+------+------+------+------+-------------. ,-------------+------+------+------+------+------+--------|
// * | | | | | | | | | | | | | | | | | |
// * `----------------------+------+------+------+------+------| |------+------+------+------+------+----------------------'
// * | | | | | | | | | | | |
// * | | | | | | | | | | | |
// * `----------------------------------' `----------------------------------'
// * ,-----------------------------------. ,-----------------------------------.
// * | | | | | | | | | | | |
// * `-----------------------------------' `-----------------------------------'
// */
// [_LAYERINDEX] = LAYOUT_split_3x6_5_hlc(
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
//
// _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
// ),
};

#ifdef ENCODER_ENABLE
bool encoder_update_user(uint8_t index, bool clockwise) {

if (index == 0) {
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 1) {
// Volume control
if (clockwise) {
tap_code(KC_VOLU);
} else {
tap_code(KC_VOLD);
}
} else if (index == 2) {
// Page up/Page down
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
} else if (index == 3) {
// Page up/Page down
if (clockwise) {
tap_code(KC_PGDN);
} else {
tap_code(KC_PGUP);
}
}
return false;
}
#endif
47 changes: 47 additions & 0 deletions qmk/kyria/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# My custom keymap for the Kyria Halcyon

Setup:


```
# Install QMK if not yet installed
brew install qmk/qmk/qmk

# Clone qmk repository with
qmk setup

# Clone qmk user repository repository with
cd ~/Code
git clone [email protected]:fatih/qmk_userspace.git

# Add userspace to the config
qmk config user.overlay_dir="$(realpath qmk_userspace)"

# Add userspace configs for each target
qmk userspace-add -kb splitkb/halcyon/kyria/rev4 -km fatih -e HLC_TFT_DISPLAY=1 -e TARGET=splitkb_halcyon_kyria_rev4_default_hlc_display
qmk userspace-add -kb splitkb/halcyon/kyria/rev4 -km fatih -e HLC_ENCODER=1 -e TARGET=splitkb_halcyon_kyria_rev4_default_hlc_encoder

# link keymap into the qmk folder
ln -s ~/Code/dotfiles/qmk/kyria/ ~/qmk_firmware/keyboards/splitkb/halcyon/kyria/keymaps/fatih

# compile the firmware, for left with display, for right with the encoder
# this is for verification, we only need do it once, we'll use qmk flash later
qmk compile -kb splitkb/halcyon/kyria/rev4 -km fatih -e HLC_TFT_DISPLAY=1 -e TARGET=splitkb_halcyon_kyria_rev4_default_hlc_display
qmk compile -kb splitkb/halcyon/kyria/rev4 -km fatih -e HLC_ENCODER=1 -e TARGET=splitkb_halcyon_kyria_rev4_default_hlc_encoder

# flash the layout with our layout
qmk flash -kb splitkb/halcyon/kyria/rev4 -km fatih -e HLC_TFT_DISPLAY=1 -e TARGET=splitkb_halcyon_kyria_rev4_default_hlc_display
qmk flash -kb splitkb/halcyon/kyria/rev4 -km fatih -e HLC_ENCODER=1 -e TARGET=splitkb_halcyon_kyria_rev4_default_hlc_encoder
```

Notes:

To flash each side:

1. Plug first left side
2. Run the `qmk flash` command above with the `display` option
3. Press reset button twice (next to the host USB-C input)

4. Plug the right side
5. Run the `qmk flash` command above with the `encoder` option

2 changes: 2 additions & 0 deletions qmk/kyria/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This adds module functionality to your keyboard (files found in users/halcyon_modules)
USER_NAME := halcyon_modules