Add files via upload
This commit is contained in:
parent
41ee8332d1
commit
885b3154f2
15 changed files with 2044 additions and 0 deletions
84
users/smathev/autoshift.c
Normal file
84
users/smathev/autoshift.c
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
bool get_custom_auto_shifted_key(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case DK_MINS:
|
||||
case DK_SLSH:
|
||||
case DK_LPRN:
|
||||
case DK_LBRC:
|
||||
case DK_LCBR:
|
||||
case DK_LABK:
|
||||
case DK_QUOT:
|
||||
return true;
|
||||
default:
|
||||
// Enable Auto-Shift for mod-tap keys (for Retro-Shift to work)
|
||||
if (IS_RETRO(keycode)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
void autoshift_press_user(uint16_t keycode, bool shifted, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case DK_MINS:
|
||||
register_code16((!shifted) ? DK_MINS : DK_UNDS);
|
||||
break;
|
||||
case DK_SLSH:
|
||||
register_code16((!shifted) ? DK_SLSH : DK_BSLS);
|
||||
break;
|
||||
case DK_LPRN:
|
||||
register_code16((!shifted) ? DK_LPRN : DK_RPRN);
|
||||
break;
|
||||
case DK_LBRC:
|
||||
register_code16((!shifted) ? DK_LBRC : DK_RBRC);
|
||||
break;
|
||||
case DK_LCBR:
|
||||
register_code16((!shifted) ? DK_LCBR : DK_RCBR);
|
||||
break;
|
||||
case DK_LABK:
|
||||
register_code16((!shifted) ? DK_LABK : DK_RABK);
|
||||
break;
|
||||
case DK_QUOT:
|
||||
register_code16((!shifted) ? DK_QUOT : DK_DQUO);
|
||||
break;
|
||||
case DK_DLR:
|
||||
register_code16((!shifted) ? DK_DLR : DK_EURO);
|
||||
break;
|
||||
default:
|
||||
if (shifted) {
|
||||
add_weak_mods(MOD_BIT(KC_LSFT));
|
||||
}
|
||||
// & 0xFF gets the Tap key for Tap Holds, required when using Retro Shift
|
||||
register_code16((IS_RETRO(keycode)) ? keycode & 0xFF : keycode);
|
||||
}
|
||||
}
|
||||
|
||||
void autoshift_release_user(uint16_t keycode, bool shifted, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case DK_MINS:
|
||||
unregister_code16((!shifted) ? DK_MINS : DK_UNDS);
|
||||
break;
|
||||
case DK_SLSH:
|
||||
unregister_code16((!shifted) ? DK_SLSH : DK_BSLS);
|
||||
break;
|
||||
case DK_LPRN:
|
||||
unregister_code16((!shifted) ? DK_LPRN : DK_RPRN);
|
||||
break;
|
||||
case DK_LBRC:
|
||||
unregister_code16((!shifted) ? DK_LBRC : DK_RBRC);
|
||||
break;
|
||||
case DK_LCBR:
|
||||
unregister_code16((!shifted) ? DK_LCBR : DK_RCBR);
|
||||
break;
|
||||
case DK_LABK:
|
||||
unregister_code16((!shifted) ? DK_LABK : DK_RABK);
|
||||
break;
|
||||
case DK_QUOT:
|
||||
unregister_code16((!shifted) ? DK_QUOT : DK_DQUO);
|
||||
break;
|
||||
default:
|
||||
// & 0xFF gets the Tap key for Tap Holds, required when using Retro Shift
|
||||
// The IS_RETRO check isn't really necessary here, always using
|
||||
// keycode & 0xFF would be fine.
|
||||
unregister_code16((IS_RETRO(keycode)) ? keycode & 0xFF : keycode);
|
||||
}
|
||||
}
|
||||
266
users/smathev/casemodes.c
Normal file
266
users/smathev/casemodes.c
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
/* Copyright 2021 Andrew Rae ajrae.nv@gmail.com @andrewjrae
|
||||
*
|
||||
* 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 "casemodes.h"
|
||||
|
||||
/* The caps word concept started with me @iaap on splitkb.com discord.
|
||||
* However it has been implemented and extended by many splitkb.com users:
|
||||
* - @theol0403 made many improvements to initial implementation
|
||||
* - @precondition used caps lock rather than shifting
|
||||
* - @dnaq his own implementation which also used caps lock
|
||||
* - @sevanteri added underscores on spaces
|
||||
* - @metheon extended on @sevanteri's work and added specific modes for
|
||||
* snake_case and SCREAMING_SNAKE_CASE
|
||||
* - @baffalop came up with the idea for xcase, which he implements in his own
|
||||
* repo, however this is implemented by @iaap with support also for one-shot-shift.
|
||||
* - @sevanteri
|
||||
* - fixed xcase waiting mode to allow more modified keys and keys from other layers.
|
||||
* - Added @baffalop's separator defaulting on first keypress, with a
|
||||
* configurable default separator and overrideable function to determine
|
||||
* if the default should be used.
|
||||
*/
|
||||
|
||||
|
||||
#ifndef DEFAULT_XCASE_SEPARATOR
|
||||
#define DEFAULT_XCASE_SEPARATOR KC_UNDS
|
||||
#endif
|
||||
|
||||
#define IS_OSM(keycode) (keycode >= QK_ONE_SHOT_MOD && keycode <= QK_ONE_SHOT_MOD_MAX)
|
||||
|
||||
// bool to keep track of the caps word state
|
||||
static bool caps_word_on = false;
|
||||
|
||||
// enum to keep track of the xcase state
|
||||
static enum xcase_state xcase_state = XCASE_OFF;
|
||||
// the keycode of the xcase delimiter
|
||||
static uint16_t xcase_delimiter;
|
||||
// the number of keys to the last delimiter
|
||||
static int8_t distance_to_last_delim = -1;
|
||||
|
||||
// Check whether caps word is on
|
||||
bool caps_word_enabled(void) {
|
||||
return caps_word_on;
|
||||
}
|
||||
|
||||
// Enable caps word
|
||||
void enable_caps_word(void) {
|
||||
caps_word_on = true;
|
||||
#ifndef CAPSWORD_USE_SHIFT
|
||||
if (!host_keyboard_led_state().caps_lock) {
|
||||
tap_code(KC_CAPS);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
// Disable caps word
|
||||
void disable_caps_word(void) {
|
||||
caps_word_on = false;
|
||||
#ifndef CAPSWORD_USE_SHIFT
|
||||
if (host_keyboard_led_state().caps_lock) {
|
||||
tap_code(KC_CAPS);
|
||||
}
|
||||
#else
|
||||
unregister_mods(MOD_LSFT);
|
||||
#endif
|
||||
}
|
||||
|
||||
// Toggle caps word
|
||||
void toggle_caps_word(void) {
|
||||
if (caps_word_on) {
|
||||
disable_caps_word();
|
||||
}
|
||||
else {
|
||||
enable_caps_word();
|
||||
}
|
||||
}
|
||||
|
||||
// Get xcase state
|
||||
enum xcase_state get_xcase_state(void) {
|
||||
return xcase_state;
|
||||
}
|
||||
|
||||
// Enable xcase and pickup the next keystroke as the delimiter
|
||||
void enable_xcase(void) {
|
||||
xcase_state = XCASE_WAIT;
|
||||
}
|
||||
|
||||
// Enable xcase with the specified delimiter
|
||||
void enable_xcase_with(uint16_t delimiter) {
|
||||
xcase_state = XCASE_ON;
|
||||
xcase_delimiter = delimiter;
|
||||
distance_to_last_delim = -1;
|
||||
}
|
||||
|
||||
// Disable xcase
|
||||
void disable_xcase(void) {
|
||||
xcase_state = XCASE_OFF;
|
||||
}
|
||||
|
||||
// Place the current xcase delimiter
|
||||
static void place_delimiter(void) {
|
||||
if (IS_OSM(xcase_delimiter)) {
|
||||
// apparently set_oneshot_mods() is dumb and doesn't deal with handedness for you
|
||||
uint8_t mods = xcase_delimiter & 0x10 ? (xcase_delimiter & 0x0F) << 4 : xcase_delimiter & 0xFF;
|
||||
set_oneshot_mods(mods);
|
||||
} else {
|
||||
tap_code16(xcase_delimiter);
|
||||
}
|
||||
}
|
||||
|
||||
// Removes a delimiter, used for double tap space exit
|
||||
static void remove_delimiter(void) {
|
||||
if (IS_OSM(xcase_delimiter)) {
|
||||
clear_oneshot_mods();
|
||||
} else {
|
||||
tap_code(KC_BSPC);
|
||||
}
|
||||
}
|
||||
|
||||
// overrideable function to determine whether the case mode should stop
|
||||
__attribute__ ((weak))
|
||||
bool terminate_case_modes(uint16_t keycode, const keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// Keycodes to ignore (don't disable caps word)
|
||||
case KC_A ... KC_Z:
|
||||
case KC_1 ... KC_0:
|
||||
case KC_MINS:
|
||||
case KC_UNDS:
|
||||
case KC_BSPC:
|
||||
case DK_ARNG:
|
||||
case DK_OSTR:
|
||||
case DK_AE:
|
||||
// If mod chording disable the mods
|
||||
if (record->event.pressed && (get_mods() != 0)) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
if (record->event.pressed) {
|
||||
return true;
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/* overrideable function to determine whether to use the default separator on
|
||||
* first keypress when waiting for the separator. */
|
||||
__attribute__ ((weak))
|
||||
bool use_default_xcase_separator(uint16_t keycode, const keyrecord_t *record) {
|
||||
// for example:
|
||||
/* switch (keycode) { */
|
||||
/* case KC_A ... KC_Z: */
|
||||
/* case KC_1 ... KC_0: */
|
||||
/* return true; */
|
||||
/* } */
|
||||
return false;
|
||||
}
|
||||
|
||||
bool process_case_modes(uint16_t keycode, const keyrecord_t *record) {
|
||||
if (caps_word_on || xcase_state) {
|
||||
if ((QK_MOD_TAP <= keycode && keycode <= QK_MOD_TAP_MAX)
|
||||
|| (QK_LAYER_TAP <= keycode && keycode <= QK_LAYER_TAP_MAX)) {
|
||||
// Earlier return if this has not been considered tapped yet
|
||||
if (record->tap.count == 0)
|
||||
return true;
|
||||
keycode = keycode & 0xFF;
|
||||
}
|
||||
|
||||
if (keycode >= QK_LAYER_TAP && keycode <= QK_ONE_SHOT_LAYER_MAX) {
|
||||
// let special keys and normal modifiers go through
|
||||
return true;
|
||||
}
|
||||
|
||||
if (xcase_state == XCASE_WAIT) {
|
||||
// grab the next input to be the delimiter
|
||||
if (use_default_xcase_separator(keycode, record)) {
|
||||
enable_xcase_with(DEFAULT_XCASE_SEPARATOR);
|
||||
}
|
||||
else if (record->event.pressed) {
|
||||
// factor in mods
|
||||
if (get_mods() & MOD_MASK_SHIFT) {
|
||||
keycode = LSFT(keycode);
|
||||
}
|
||||
else if (get_mods() & MOD_BIT(KC_RALT)) {
|
||||
keycode = RALT(keycode);
|
||||
}
|
||||
enable_xcase_with(keycode);
|
||||
return false;
|
||||
}
|
||||
else {
|
||||
if (IS_OSM(keycode)) {
|
||||
// this catches the OSM release if no other key was pressed
|
||||
set_oneshot_mods(0);
|
||||
enable_xcase_with(keycode);
|
||||
return false;
|
||||
}
|
||||
// let other special keys go through
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (record->event.pressed) {
|
||||
// handle xcase mode
|
||||
if (xcase_state == XCASE_ON) {
|
||||
// place the delimiter if space is tapped
|
||||
if (keycode == KC_SPACE) {
|
||||
if (distance_to_last_delim != 0) {
|
||||
place_delimiter();
|
||||
distance_to_last_delim = 0;
|
||||
return false;
|
||||
}
|
||||
// remove the delimiter and disable modes
|
||||
else {
|
||||
remove_delimiter();
|
||||
disable_xcase();
|
||||
disable_caps_word();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
// decrement distance to delimiter on back space
|
||||
else if (keycode == KC_BSPC) {
|
||||
--distance_to_last_delim;
|
||||
}
|
||||
// don't increment distance to last delim if negative
|
||||
else if (distance_to_last_delim >= 0) {
|
||||
// puts back a one shot delimiter if you we're back to the delimiter pos
|
||||
if (distance_to_last_delim == 0 && (IS_OSM(xcase_delimiter))) {
|
||||
place_delimiter();
|
||||
}
|
||||
++distance_to_last_delim;
|
||||
}
|
||||
|
||||
} // end XCASE_ON
|
||||
|
||||
// check if the case modes have been terminated
|
||||
if (terminate_case_modes(keycode, record)) {
|
||||
disable_caps_word();
|
||||
disable_xcase();
|
||||
}
|
||||
|
||||
#ifdef CAPSWORD_USE_SHIFT
|
||||
else if (keycode >= KC_A && keycode <= KC_Z){
|
||||
tap_code16(LSFT(keycode));
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
} // end if event.pressed
|
||||
|
||||
return true;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
51
users/smathev/casemodes.h
Normal file
51
users/smathev/casemodes.h
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
/* Copyright 2021 Andrew Rae ajrae.nv@gmail.com @andrewjrae
|
||||
*
|
||||
* 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
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#ifndef CASEMODES_ENABLE
|
||||
#define CASEMODES_ENABLE true
|
||||
#endif
|
||||
|
||||
// Check whether caps word is on
|
||||
bool caps_word_enabled(void);
|
||||
// Enable caps word
|
||||
void enable_caps_word(void);
|
||||
// Disable caps word
|
||||
void disable_caps_word(void);
|
||||
// Toggle caps word
|
||||
void toggle_caps_word(void);
|
||||
|
||||
// enum for the xcase states
|
||||
enum xcase_state {
|
||||
XCASE_OFF = 0, // xcase is off
|
||||
XCASE_ON, // xcase is actively on
|
||||
XCASE_WAIT, // xcase is waiting for the delimiter input
|
||||
};
|
||||
|
||||
// Get xcase state
|
||||
enum xcase_state get_xcase_state(void);
|
||||
// Enable xcase and pickup the next keystroke as the delimiter
|
||||
void enable_xcase(void);
|
||||
// Enable xcase with the specified delimiter
|
||||
void enable_xcase_with(uint16_t delimiter);
|
||||
// Disable xcase
|
||||
void disable_xcase(void);
|
||||
|
||||
// Function to be put in process user
|
||||
bool process_case_modes(uint16_t keycode, const keyrecord_t *record);
|
||||
43
users/smathev/combos.c
Normal file
43
users/smathev/combos.c
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
#include "combos.h"
|
||||
#include "smathev.h"
|
||||
|
||||
// COMBOS - https://github.com/qmk/qmk_firmware/blob/master/docs/feature_combo.md
|
||||
const uint16_t PROGMEM undo_combo[] = {KC_Y, DK_ARNG, COMBO_END}; // L3_K1 + L3_K2
|
||||
const uint16_t PROGMEM ent_combo[] = {KC_S, KC_D, COMBO_END}; // R2_K4 + R2_K5
|
||||
const uint16_t PROGMEM tab_combo[] = {KC_O, KC_I, COMBO_END}; // L2_K1 + L2_K2
|
||||
const uint16_t PROGMEM cut_combo[] = {DK_ARNG, KC_V, COMBO_END}; //L3_K2 + L3_K3
|
||||
const uint16_t PROGMEM copy_combo[] = {KC_V, KC_C, COMBO_END}; // L3_K3 + L3_K4
|
||||
const uint16_t PROGMEM paste_combo[] = {KC_C, KC_COMM, COMBO_END}; // L3_K4 + L3_K5
|
||||
const uint16_t PROGMEM del_combo[] = {KC_L, KC_H, COMBO_END}; // R1_K3 + R1_K4
|
||||
const uint16_t PROGMEM bcksp_combo[] = {KC_H, KC_X, COMBO_END}; // R1_K4 + R1_K5
|
||||
const uint16_t PROGMEM cttb_combo[] = {KC_G, KC_J, COMBO_END}; // L1_K4 + L1_K5
|
||||
const uint16_t PROGMEM esc_combo[] = {DK_OSTR, DK_AE, COMBO_END}; // L1_K1 + L1_K2
|
||||
const uint16_t PROGMEM svfile_combo[] = {KC_Q, KC_Z, COMBO_END}; // R3_K3 + R3_K4
|
||||
const uint16_t PROGMEM srch_combo[] = {KC_F, KC_B, COMBO_END}; // R1_K1 + R1_K2
|
||||
const uint16_t PROGMEM ctcl_combo[] = {FP_SUPER_TAB, KC_PGDN, COMBO_END}; // L1_K4 + L1_K5
|
||||
const uint16_t PROGMEM cancel_combo[] = {KC_LEFT, KC_HOME, COMBO_END}; // l2_K1 + L2_K2
|
||||
const uint16_t PROGMEM ctrop_combo[] = {FP_SUPER_TAB, KC_PGDN, KC_UP, COMBO_END}; // L1_K3 + L1_K4 + L1_K5
|
||||
const uint16_t PROGMEM ffive_combo[] = {KC_U, KC_G, COMBO_END}; // L1_K3 + L1_K4
|
||||
const uint16_t PROGMEM reset_keyboard_combo[] = {KC_U, KC_G, KC_J, COMBO_END}; // L1_K3 + L1_K4 + L1_K5
|
||||
combo_t key_combos[COMBO_COUNT] = {
|
||||
COMBO(undo_combo, LCTL(KC_Z)),
|
||||
COMBO(copy_combo, LCTL(KC_C)),
|
||||
COMBO(cut_combo, LCTL(KC_X)),
|
||||
COMBO(paste_combo, LCTL(KC_V)),
|
||||
COMBO(cttb_combo, LCTL(KC_T)),
|
||||
COMBO(ctcl_combo, LCTL(KC_W)),
|
||||
COMBO(cancel_combo, LCTL(KC_C)),
|
||||
COMBO(ctrop_combo, RCS(KC_T)),
|
||||
COMBO(svfile_combo, LCTL(KC_S)),
|
||||
COMBO(srch_combo, LCTL(KC_F)),
|
||||
COMBO(ffive_combo, KC_F5),
|
||||
COMBO(ent_combo, KC_ENT),
|
||||
COMBO(tab_combo, KC_TAB),
|
||||
COMBO(bcksp_combo, KC_BSPC),
|
||||
COMBO(del_combo, KC_DEL),
|
||||
COMBO(esc_combo, KC_ESC),
|
||||
COMBO(reset_keyboard_combo, QK_BOOT),
|
||||
};
|
||||
|
||||
|
||||
|
||||
28
users/smathev/combos.h
Normal file
28
users/smathev/combos.h
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
#pragma once
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Explicit extern declaration for introspection system with correct size
|
||||
extern combo_t key_combos[COMBO_COUNT];
|
||||
|
||||
enum combo_events {
|
||||
UNDO,
|
||||
ENT,
|
||||
TAB,
|
||||
CUT,
|
||||
COPY,
|
||||
PASTE,
|
||||
DEL,
|
||||
BCKSP,
|
||||
CTTB,
|
||||
ESC,
|
||||
SVFILE,
|
||||
SRCH,
|
||||
CTCL,
|
||||
CANCEL,
|
||||
CTROP,
|
||||
FFIVE,
|
||||
RESET_KEYBOARD
|
||||
};
|
||||
|
||||
extern combo_t key_combos[];
|
||||
91
users/smathev/config.h
Normal file
91
users/smathev/config.h
Normal file
|
|
@ -0,0 +1,91 @@
|
|||
/* Copyright 2022 Sadek Baroudi <sadekbaroudi@gmail.com>
|
||||
*#define TAPPING_TERM 140
|
||||
#define AUTO_SHIFT_TIMEOUT 170 // Slightly longer than TAPPING_TERM
|
||||
#define RETRO_SHIFT
|
||||
#define RETRO_TAPPINGThis 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/>.
|
||||
*/
|
||||
#define ENABLE_COMPILE_KEYCODE
|
||||
#pragma once
|
||||
|
||||
// #include "config_common.h"
|
||||
|
||||
/*
|
||||
* 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)
|
||||
* NO_DIODE = switches are directly connected to AVR pins
|
||||
*
|
||||
*/
|
||||
#define DIRECT_PINS { \
|
||||
{ B5, F7, F6, F5, F4 }, \
|
||||
{ B4, D4, C6, D7, E6 }, \
|
||||
{ B3, B2, B6, B7, D5 }, \
|
||||
{ F0, F1, C7, NO_PIN, NO_PIN } \
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
#define OLED_DISPLAY_128X32
|
||||
#endif
|
||||
|
||||
// #define SSD1306OLED
|
||||
#undef USE_I2C
|
||||
//#undef SSD1306OLED
|
||||
|
||||
/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */
|
||||
#define DEBOUNCE 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
|
||||
|
||||
/* Serial settings */
|
||||
#define USE_SERIAL
|
||||
/* serial.c configuration for split keyboard */
|
||||
#define SOFT_SERIAL_PIN D2
|
||||
|
||||
#define TAPPING_TERM 140
|
||||
#define PERMISSIVE_HOLD // Activate mod immediately when another key pressed
|
||||
#define AUTO_SHIFT_TIMEOUT 170
|
||||
#define RETRO_SHIFT
|
||||
#define RETRO_TAPPING
|
||||
|
||||
// #define MASTER_LEFT
|
||||
|
||||
// Use EE_HANDS to allow USB connection on either side
|
||||
// Flash each half with appropriate handedness bootloader
|
||||
#define EE_HANDS
|
||||
|
||||
/*#define SPLIT_USB_DETECT
|
||||
#define SPLIT_LAYER_STATE_ENABLE */
|
||||
#define SPLIT_WPM_ENABLE
|
||||
#define SPLIT_MODS_ENABLE
|
||||
#define SPLIT_LAYER_STATE_ENABLE
|
||||
// Smathev - define combos
|
||||
#define COMBO_COUNT 17
|
||||
|
||||
#define CASEMODES_ENABLE
|
||||
|
||||
#define COMBO_REF_DEFAULT _NORTO
|
||||
|
||||
/* Backwards compatibility with existing out-of-tree keymaps */
|
||||
#define LAYOUT_sweeeeep LAYOUT_split_3x5_3
|
||||
|
||||
|
||||
|
||||
#define OLED_FONT_H "keyboards/fingerpunch/sweeeeep/keymaps/smathev/glcdfont.c"
|
||||
60
users/smathev/process_records.c
Normal file
60
users/smathev/process_records.c
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
#include "smathev.h"
|
||||
#include "casemodes.h"
|
||||
#include "autoshift.c"
|
||||
|
||||
// for alternating between 45 degree angle routing and free angle routing with one key
|
||||
bool kicad_free_angle_routing = false;
|
||||
|
||||
__attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t *record) { return true; }
|
||||
|
||||
__attribute__((weak)) bool process_record_secrets(uint16_t keycode, keyrecord_t *record) { return true; }
|
||||
|
||||
// Defines actions tor my global custom keycodes. Defined in smathev.h file
|
||||
// Then runs the _keymap's record handler if not processed here
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
#ifdef CASEMODES_ENABLE
|
||||
// Process case modes
|
||||
if (!process_case_modes(keycode, record)) {
|
||||
return false;
|
||||
}
|
||||
// If console is enabled, it will print the matrix position and status of each key pressed
|
||||
#endif
|
||||
|
||||
if (!(process_record_keymap(keycode, record) && process_record_secrets(keycode, record))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
switch (keycode) {
|
||||
case C_CAPSWORD:
|
||||
// NOTE: if you change this behavior, may want to update in keymap.c for COMBO behavior
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_caps_word();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case C_HYPHENCASE:
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_xcase_with(KC_MINS);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case C_ANYCASE:
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_xcase();
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case C_UNDERSCORECASE:
|
||||
#ifdef CASEMODES_ENABLE
|
||||
if (record->event.pressed) {
|
||||
enable_xcase_with(KC_UNDS);
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
// COMMENT TO DISABLE MACROS
|
||||
}
|
||||
return true;
|
||||
}
|
||||
31
users/smathev/process_records.h
Normal file
31
users/smathev/process_records.h
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
#pragma once
|
||||
#include "smathev.h"
|
||||
|
||||
#if defined(KEYBOARD_fingerpunch_arachnophobe) \
|
||||
|| defined(KEYBOARD_fingerpunch_sweeeeep)
|
||||
# define PLACEHOLDER_SAFE_RANGE FP_SAFE_RANGE
|
||||
#elif defined(KEYMAP_SAFE_RANGE)
|
||||
# define PLACEHOLDER_SAFE_RANGE KEYMAP_SAFE_RANGE
|
||||
#else
|
||||
# define PLACEHOLDER_SAFE_RANGE SAFE_RANGE
|
||||
#endif
|
||||
|
||||
enum userspace_custom_keycodes {
|
||||
C_CAPSWORD = PLACEHOLDER_SAFE_RANGE, // Toggles RGB Layer Indication mode
|
||||
C_HYPHENCASE,
|
||||
C_UNDERSCORECASE,
|
||||
C_ANYCASE,
|
||||
NEW_SAFE_RANGE
|
||||
};
|
||||
|
||||
bool process_record_secrets(uint16_t keycode, keyrecord_t *record);
|
||||
bool process_record_keymap(uint16_t keycode, keyrecord_t *record);
|
||||
|
||||
#define KC_SEC1 KC_SECRET_1
|
||||
#define KC_SEC2 KC_SECRET_2
|
||||
#define KC_SEC3 KC_SECRET_3
|
||||
#define KC_SEC4 KC_SECRET_4
|
||||
#define KC_SEC5 KC_SECRET_5
|
||||
|
||||
#define KC_RESET RESET
|
||||
#define KC_RST KC_RESET
|
||||
53
users/smathev/rules.mk
Normal file
53
users/smathev/rules.mk
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
SRC += smathev.c \
|
||||
process_records.c \
|
||||
combos.c \
|
||||
casemodes.c
|
||||
|
||||
# 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
|
||||
|
||||
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_ENABLE = YES
|
||||
OLED_DRIVER_ENABLE = yes
|
||||
OLED_DRIVER = ssd1306
|
||||
# EXTRAFLAGS += -flto # macros disabled, if you need the extra space
|
||||
MOUSEKEY_ENABLE = no
|
||||
|
||||
SPLIT_KEYBOARD = yes # Use shared split_common code
|
||||
|
||||
LAYOUTS = split_3x5_3 # Community layout support
|
||||
|
||||
DEFERRED_EXEC_ENABLE = yes
|
||||
# Smathev added from: https://getreuer.info/posts/keyboards/repeat-key/index.html
|
||||
COMBO_ENABLE = yes
|
||||
|
||||
# Smathev implemented from: https://docs.qmk.fm/#/feature_auto_shift
|
||||
AUTO_SHIFT_ENABLE = yes
|
||||
|
||||
# Implemented from https://github.com/samhocevar-forks/qmk-firmware/blob/master/docs/feature_tap_dance.md
|
||||
# TAP_DANCE_ENABLE = yes
|
||||
|
||||
# https://github.com/qmk/qmk_firmware/blob/master/docs/feature_leader_key.md
|
||||
# LEADER_ENABLE = yes
|
||||
|
||||
# CASEMODE_ENABLE
|
||||
CASEMODE_ENABLE = yes
|
||||
|
||||
#WPM ENABLE
|
||||
WPM_ENABLE = yes
|
||||
|
||||
145
users/smathev/smathev.c
Normal file
145
users/smathev/smathev.c
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
#include "smathev.h"
|
||||
|
||||
|
||||
userspace_config_t userspace_config;
|
||||
|
||||
__attribute__((weak)) void keyboard_pre_init_keymap(void) {}
|
||||
|
||||
void keyboard_pre_init_user(void) {
|
||||
// Set our LED pin as output
|
||||
setPinOutput(24);
|
||||
// Turn the LED off
|
||||
// (Due to technical reasons, high is off and low is on)
|
||||
writePinHigh(24);
|
||||
userspace_config.raw = eeconfig_read_user();
|
||||
|
||||
// hack for a weird issue where userspace_config.val gets set to 0 on keyboard restart
|
||||
userspace_config.val = 255;
|
||||
|
||||
keyboard_pre_init_keymap();
|
||||
}
|
||||
// Add reconfigurable functions here, for keymap customization
|
||||
// This allows for a global, userspace functions, and continued
|
||||
// customization of the keymap. Use _keymap instead of _user
|
||||
// functions in the keymaps
|
||||
__attribute__((weak)) void matrix_init_keymap(void) {}
|
||||
|
||||
// Call user matrix init, set default RGB colors and then
|
||||
// call the keymap's init function
|
||||
void matrix_init_user(void) {
|
||||
matrix_init_keymap();
|
||||
}
|
||||
|
||||
__attribute__((weak)) void keyboard_post_init_keymap(void) {}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
#if defined(PIMORONI_TRACKBALL_ENABLE) && !defined(USERSPACE_RGBLIGHT_ENABLE)
|
||||
pimoroni_trackball_set_rgbw(RGB_BLUE, 0x00);
|
||||
#endif
|
||||
#if defined(USERSPACE_RGBLIGHT_ENABLE)
|
||||
keyboard_post_init_rgb_light();
|
||||
#endif
|
||||
keyboard_post_init_keymap();
|
||||
}
|
||||
|
||||
__attribute__((weak)) void shutdown_keymap(void) {}
|
||||
|
||||
void rgb_matrix_update_pwm_buffers(void);
|
||||
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
shutdown_keymap();
|
||||
return true;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void suspend_power_down_keymap(void) {}
|
||||
|
||||
void suspend_power_down_user(void) { suspend_power_down_keymap(); }
|
||||
|
||||
__attribute__((weak)) void suspend_wakeup_init_keymap(void) {}
|
||||
|
||||
void suspend_wakeup_init_user(void) { suspend_wakeup_init_keymap(); }
|
||||
|
||||
__attribute__((weak)) void matrix_scan_keymap(void) {}
|
||||
|
||||
__attribute__((weak)) layer_state_t layer_state_set_keymap(layer_state_t state) { return state; }
|
||||
|
||||
// on layer change, no matter where the change was initiated
|
||||
// Then runs keymap's layer change check
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
#if defined(USERSPACE_RGBLIGHT_ENABLE)
|
||||
state = layer_state_set_rgb_light(state);
|
||||
#endif // USERSPACE_RGBLIGHT_ENABLE
|
||||
#if defined(HAPTIC_ENABLE)
|
||||
state = layer_state_set_haptic(state);
|
||||
#endif // HAPTIC_ENABLE
|
||||
#if defined(POINTING_DEVICE_ENABLE)
|
||||
// all handled in keyboards/fingerpunch/fp_pointing.c now
|
||||
// state = layer_state_set_pointing(state);
|
||||
#endif // HAPTIC_ENABLE
|
||||
return layer_state_set_keymap(state);
|
||||
}
|
||||
|
||||
__attribute__((weak)) layer_state_t default_layer_state_set_keymap(layer_state_t state) { return state; }
|
||||
|
||||
// Runs state check and changes underglow color and animation
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
state = default_layer_state_set_keymap(state);
|
||||
return state;
|
||||
}
|
||||
|
||||
__attribute__((weak)) void led_set_keymap(uint8_t usb_led) {}
|
||||
|
||||
// Any custom LED code goes here.
|
||||
// So far, I only have keyboard specific code,
|
||||
// So nothing goes here.
|
||||
void led_set_user(uint8_t usb_led) { led_set_keymap(usb_led); }
|
||||
|
||||
__attribute__((weak)) void eeconfig_init_keymap(void) {}
|
||||
|
||||
void eeconfig_init_user(void) {
|
||||
userspace_config.raw = 0;
|
||||
userspace_config.rgb_base_layer_override = false;
|
||||
userspace_config.rgb_layer_change = true;
|
||||
#ifdef USERSPACE_RGBLIGHT_ENABLE
|
||||
userspace_config.mode = RGBLIGHT_MODE_STATIC_LIGHT;
|
||||
#endif
|
||||
userspace_config.hue = 167; // BLUE
|
||||
userspace_config.sat = 255;
|
||||
userspace_config.val = 255;
|
||||
userspace_config.speed = 1;
|
||||
eeconfig_update_user(userspace_config.raw);
|
||||
eeconfig_init_keymap();
|
||||
keyboard_init();
|
||||
}
|
||||
|
||||
bool hasAllBitsInMask(uint8_t value, uint8_t mask) {
|
||||
value &= 0xF;
|
||||
mask &= 0xF;
|
||||
|
||||
return (value & mask) == mask;
|
||||
}
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// I always type the shift keys too fast, so tapping term of 200 is way too high
|
||||
case LSFT_T(KC_T):
|
||||
case RSFT_T(KC_N):
|
||||
return 75;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// This was added to deal with this issue:
|
||||
// * https://www.reddit.com/r/olkb/comments/mwf5re/help_needed_controlling_individual_rgb_leds_on_a/
|
||||
// * https://github.com/qmk/qmk_firmware/issues/12037
|
||||
#ifdef SPLIT_KEYBOARD
|
||||
void housekeeping_task_user(void) {
|
||||
static layer_state_t old_layer_state = 0;
|
||||
if (!is_keyboard_master() && old_layer_state != layer_state) {
|
||||
old_layer_state = layer_state;
|
||||
layer_state_set_user(layer_state);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
74
users/smathev/smathev.h
Normal file
74
users/smathev/smathev.h
Normal file
|
|
@ -0,0 +1,74 @@
|
|||
/* Copyright 2020 Christopher Courtney, aka Drashna Jael're (@drashna) <drashna@live.com>
|
||||
*
|
||||
* 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
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
#include "version.h"
|
||||
#include "eeprom.h"
|
||||
#include "wrappers.h"
|
||||
#include "process_records.h"
|
||||
#include "keymap_danish.h"
|
||||
|
||||
#if defined(USERSPACE_RGBLIGHT_ENABLE)
|
||||
# include "rgb_stuff.h"
|
||||
#endif
|
||||
#if defined(HAPTIC_ENABLE)
|
||||
# include "haptic_stuff.h"
|
||||
#endif
|
||||
|
||||
/* Define layer names */
|
||||
enum userspace_layers {
|
||||
_NORTO= 0,
|
||||
_QWERTY,
|
||||
_NORTNAVIGATION,
|
||||
_SYMFKEYS
|
||||
};
|
||||
|
||||
void press_super_alt_tab(bool shift);
|
||||
void matrix_init_keymap(void);
|
||||
void shutdown_keymap(void);
|
||||
void suspend_power_down_keymap(void);
|
||||
void suspend_wakeup_init_keymap(void);
|
||||
void matrix_scan_keymap(void);
|
||||
layer_state_t layer_state_set_keymap(layer_state_t state);
|
||||
layer_state_t default_layer_state_set_keymap(layer_state_t state);
|
||||
void led_set_keymap(uint8_t usb_led);
|
||||
void eeconfig_init_keymap(void);
|
||||
bool hasAllBitsInMask(uint8_t value, uint8_t mask);
|
||||
|
||||
// clang-format off
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool rgb_layer_change :1;
|
||||
bool rgb_base_layer_override :1;
|
||||
bool rgb_matrix_idle_anim :1;
|
||||
uint8_t mode;
|
||||
uint8_t hue;
|
||||
uint8_t sat;
|
||||
uint8_t val;
|
||||
uint8_t speed;
|
||||
uint8_t caps_lock_hue;
|
||||
};
|
||||
} userspace_config_t;
|
||||
// clang-format on
|
||||
|
||||
extern userspace_config_t userspace_config;
|
||||
|
||||
#if defined(COMBO_ENABLE)
|
||||
# include "combos.h"
|
||||
#endif
|
||||
302
users/smathev/wrappers.h
Normal file
302
users/smathev/wrappers.h
Normal file
|
|
@ -0,0 +1,302 @@
|
|||
#pragma once
|
||||
#include "smathev.h"
|
||||
#include "keymap_danish.h"
|
||||
//#include "features/repeat_key.h"
|
||||
//#include "features/sentence_case.h"
|
||||
|
||||
/*
|
||||
Since our quirky block definitions are basically a list of comma separated
|
||||
arguments, we need a wrapper in order for these definitions to be
|
||||
expanded before being used as arguments to the LAYOUT_xxx macro.
|
||||
*/
|
||||
|
||||
// Since sweeeeep uses the name LAYOUT_sweeeeep instead of LAYOUT
|
||||
#if (!defined(LAYOUT) && defined(LAYOUT_sweeeeep))
|
||||
# define LAYOUT LAYOUT_sweeeeep
|
||||
#endif
|
||||
|
||||
// clang-format off
|
||||
#define LAYOUT_ergodox_wrapper(...) LAYOUT_ergodox(__VA_ARGS__)
|
||||
#define LAYOUT_ergodox_pretty_wrapper(...) LAYOUT_ergodox_pretty(__VA_ARGS__)
|
||||
#define KEYMAP_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_wrapper(...) LAYOUT(__VA_ARGS__)
|
||||
#define LAYOUT_ortho_4x12_wrapper(...) LAYOUT_ortho_4x12(__VA_ARGS__)
|
||||
#define LAYOUT_ortho_5x12_wrapper(...) LAYOUT_ortho_5x12(__VA_ARGS__)
|
||||
#define LAYOUT_gergo_wrapper(...) LAYOUT_gergo(__VA_ARGS__)
|
||||
#define LAYOUT_split_3x6_3_wrapper(...) LAYOUT_split_3x6_3(__VA_ARGS__)
|
||||
#define LAYOUT_reviung39_wrapper(...) LAYOUT_reviung39(__VA_ARGS__)
|
||||
#define LAYOUT_pteron38_wrapper(...) LAYOUT_pteron38(__VA_ARGS__)
|
||||
#define LAYOUT_ffkbhw_wrapper(...) LAYOUT_ffkbhw(__VA_ARGS__)
|
||||
|
||||
/*
|
||||
Blocks for each of the four major keyboard layouts
|
||||
Organized so we can quickly adapt and modify all of them
|
||||
at once, rather than for each keyboard, one at a time.
|
||||
And this allows for much cleaner blocks in the keymaps.
|
||||
For instance Tap/Hold for Control on all of the layouts
|
||||
|
||||
NOTE: These are all the same length. If you do a search/replace
|
||||
then you need to add/remove underscores to keep the
|
||||
lengths consistent.
|
||||
*/
|
||||
|
||||
|
||||
#define ____QWERTY_L1_K1__ KC_Q
|
||||
#define ____QWERTY_L1_K2__ KC_W
|
||||
#define ____QWERTY_L1_K3__ KC_E
|
||||
#define ____QWERTY_L1_K4__ KC_R
|
||||
#define ____QWERTY_L1_K5__ KC_T
|
||||
|
||||
#define ____QWERTY_L2_K1__ KC_A
|
||||
#define ____QWERTY_L2_K2__ KC_S
|
||||
#define ____QWERTY_L2_K3__ KC_D
|
||||
#define ____QWERTY_L2_K4__ KC_F
|
||||
#define ____QWERTY_L2_K5__ KC_G
|
||||
|
||||
#define ____QWERTY_L3_K1__ LGUI_T(KC_Z)
|
||||
#define ____QWERTY_L3_K2__ LALT_T(KC_X)
|
||||
#define ____QWERTY_L3_K3__ LSFT_T(KC_C)
|
||||
#define ____QWERTY_L3_K4__ LCTL_T(KC_V)
|
||||
#define ____QWERTY_L3_K5__ KC_B
|
||||
|
||||
|
||||
|
||||
#define ____QWERTY_R1_K1__ KC_Y
|
||||
#define ____QWERTY_R1_K2__ KC_U
|
||||
#define ____QWERTY_R1_K3__ KC_I
|
||||
#define ____QWERTY_R1_K4__ KC_O
|
||||
#define ____QWERTY_R1_K5__ KC_P
|
||||
|
||||
#define ____QWERTY_R2_K1__ KC_H
|
||||
#define ____QWERTY_R2_K2__ KC_J
|
||||
#define ____QWERTY_R2_K3__ KC_K
|
||||
#define ____QWERTY_R2_K4__ KC_L
|
||||
#define ____QWERTY_R2_K5__ DK_ARNG
|
||||
|
||||
#define ____QWERTY_R3_K1__ KC_N
|
||||
#define ____QWERTY_R3_K2__ RCTL_T(KC_M)
|
||||
#define ____QWERTY_R3_K3__ RSFT_T(DK_AE)
|
||||
#define ____QWERTY_R3_K4__ RALT_T(DK_OSTR)
|
||||
#define ____QWERTY_R3_K5__ RGUI_T(KC_MINS)
|
||||
|
||||
#define __________________QWERTY_L1____________________ ____QWERTY_L1_K1__, ____QWERTY_L1_K2__, ____QWERTY_L1_K3__, ____QWERTY_L1_K4__, ____QWERTY_L1_K5__
|
||||
#define __________________QWERTY_L2____________________ ____QWERTY_L2_K1__, ____QWERTY_L2_K2__, ____QWERTY_L2_K3__, ____QWERTY_L2_K4__, ____QWERTY_L2_K5__
|
||||
#define __________________QWERTY_L3____________________ ____QWERTY_L3_K1__, ____QWERTY_L3_K2__, ____QWERTY_L3_K3__, ____QWERTY_L3_K4__, ____QWERTY_L3_K5__
|
||||
|
||||
#define __________________QWERTY_R1____________________ ____QWERTY_R1_K1__, ____QWERTY_R1_K2__, ____QWERTY_R1_K3__, ____QWERTY_R1_K4__, ____QWERTY_R1_K5__
|
||||
#define __________________QWERTY_R2____________________ ____QWERTY_R2_K1__, ____QWERTY_R2_K2__, ____QWERTY_R2_K3__, ____QWERTY_R2_K4__, ____QWERTY_R2_K5__
|
||||
#define __________________QWERTY_R3____________________ ____QWERTY_R3_K1__, ____QWERTY_R3_K2__, ____QWERTY_R3_K3__, ____QWERTY_R3_K4__, ____QWERTY_R3_K5__
|
||||
|
||||
|
||||
#define _QWERTY_THUMB_L1__ KC_DEL
|
||||
#define _QWERTY_THUMB_L2__ DK_COMM
|
||||
#define _QWERTY_THUMB_L3__ KC_BSPC
|
||||
|
||||
#define _QWERTY_THUMB_R1__ KC_SPACE
|
||||
#define _QWERTY_THUMB_R2__ DK_DOT
|
||||
#define _QWERTY_THUMB_R3__ KC_ENT
|
||||
|
||||
#define _QWERTY_THUMBS_LEFT_2__ _QWERTY_THUMB_L2__, _QWERTY_THUMB_L3__
|
||||
#define _QWERTY_THUMBS_RIGHT_2__ _QWERTY_THUMB_R1__, _QWERTY_THUMB_R2__
|
||||
|
||||
#define _QWERTY_THUMBS_LEFT_3__ _QWERTY_THUMB_L1__, _QWERTY_THUMB_L2__, _QWERTY_THUMB_L3__
|
||||
#define _QWERTY_THUMBS_RIGHT_3__ _QWERTY_THUMB_R1__, _QWERTY_THUMB_R2__, _QWERTY_THUMB_R3__
|
||||
|
||||
#define __QWERTY_THUMBS_4__ _QWERTY_THUMBS_LEFT_2__, _QWERTY_THUMBS_RIGHT_2__
|
||||
#define __QWERTY_THUMBS_5__ _QWERTY_THUMB_L1__, _QWERTY_THUMB_L2__, _QWERTY_THUMB_R1__, _QWERTY_THUMB_R2__, _QWERTY_THUMB_R3__
|
||||
#define __QWERTY_THUMBS_6__ _QWERTY_THUMBS_LEFT_3__, _QWERTY_THUMBS_RIGHT_3__
|
||||
|
||||
/* Norto https://lykt.xyz/skl/norto/#da
|
||||
*
|
||||
* ,----------------------------------. ,----------------------------------.
|
||||
* | Ø | Æ | U | G | J | | B | F | L | H | X |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | O | I | A | T | M | | P | N | R | S | D |
|
||||
* |------+------+------+------+------| |------+------+------+------+------|
|
||||
* | Y | Å | V | C | , | | . | W | K | Z | Q |
|
||||
* `----------------------------------' `----------------------------------'
|
||||
* ,--------------------. ,--------------------.
|
||||
* | LOWER| Enter| E | |BckSpc| Space| RAISE|
|
||||
* `--------------------' `--------------------.
|
||||
*/
|
||||
|
||||
#define __NORTO_THUMB_L1__ _______
|
||||
#define __NORTO_THUMB_L2__ DK_MINS
|
||||
#define __NORTO_THUMB_L3__ KC_E
|
||||
#define __NORTO_THUMB_R1__ KC_SPACE
|
||||
#define __NORTO_THUMB_R2__ KC_BSPC
|
||||
#define __NORTO_THUMB_R3__ _______
|
||||
|
||||
#define __NORTO_THUMBS_LEFT_2__ __NORTO_THUMB_L2__, __NORTO_THUMB_L3__
|
||||
#define __NORTO_THUMBS_RIGHT_2__ __NORTO_THUMB_R1__, __NORTO_THUMB_R2__
|
||||
|
||||
#define __NORTO_THUMBS_LEFT_3__ __NORTO_THUMB_L1__, __NORTO_THUMB_L2__, __NORTO_THUMB_L3__
|
||||
#define __NORTO_THUMBS_RIGHT_3__ __NORTO_THUMB_R1__, __NORTO_THUMB_R2__, __NORTO_THUMB_R3__
|
||||
|
||||
#define __NORTO_THUMBS_4__ __NORTO_THUMBS_LEFT_2__, __NORTO_THUMBS_RIGHT_2__
|
||||
#define __NORTO_THUMBS_5__ __NORTO_THUMB_L1__, __NORTO_THUMB_L2__, __NORTO_THUMB_R1__, __NORTO_THUMB_R2__, __NORTO_THUMB_R3__
|
||||
#define __NORTO_THUMBS_6__ __NORTO_THUMBS_LEFT_3__, __NORTO_THUMBS_RIGHT_3__
|
||||
|
||||
#define ____NORTO_L1_K1__ DK_OSTR
|
||||
#define ____NORTO_L1_K2__ DK_AE
|
||||
#define ____NORTO_L1_K3__ KC_U
|
||||
#define ____NORTO_L1_K4__ KC_G
|
||||
#define ____NORTO_L1_K5__ KC_J
|
||||
|
||||
#define ____NORTO_L2_K1__ KC_O
|
||||
#define ____NORTO_L2_K2__ KC_I
|
||||
#define ____NORTO_L2_K3__ KC_A
|
||||
#define ____NORTO_L2_K4__ KC_T
|
||||
#define ____NORTO_L2_K5__ KC_M
|
||||
|
||||
#define ____NORTO_L3_K1__ LGUI_T(DK_COMM)
|
||||
#define ____NORTO_L3_K2__ LALT_T(KC_Y)
|
||||
#define ____NORTO_L3_K3__ LSFT_T(DK_ARNG)
|
||||
#define ____NORTO_L3_K4__ LCTL_T(KC_V)
|
||||
#define ____NORTO_L3_K5__ KC_C
|
||||
|
||||
#define ____NORTO_R1_K1__ KC_B
|
||||
#define ____NORTO_R1_K2__ KC_F
|
||||
#define ____NORTO_R1_K3__ KC_L
|
||||
#define ____NORTO_R1_K4__ KC_H
|
||||
#define ____NORTO_R1_K5__ KC_X
|
||||
|
||||
#define ____NORTO_R2_K1__ KC_P
|
||||
#define ____NORTO_R2_K2__ KC_N
|
||||
#define ____NORTO_R2_K3__ KC_R
|
||||
#define ____NORTO_R2_K4__ KC_S
|
||||
#define ____NORTO_R2_K5__ KC_D
|
||||
|
||||
#define ____NORTO_R3_K1__ KC_W
|
||||
#define ____NORTO_R3_K2__ RCTL_T(KC_K)
|
||||
#define ____NORTO_R3_K3__ RSFT_T(KC_Z)
|
||||
#define ____NORTO_R3_K4__ RALT_T(KC_Q)
|
||||
#define ____NORTO_R3_K5__ RGUI_T(KC_DOT)
|
||||
|
||||
#define __________________NORTO_L1____________________ ____NORTO_L1_K1__, ____NORTO_L1_K2__, ____NORTO_L1_K3__, ____NORTO_L1_K4__, ____NORTO_L1_K5__
|
||||
#define __________________NORTO_L2____________________ ____NORTO_L2_K1__, ____NORTO_L2_K2__, ____NORTO_L2_K3__, ____NORTO_L2_K4__, ____NORTO_L2_K5__
|
||||
#define __________________NORTO_L3____________________ ____NORTO_L3_K1__, ____NORTO_L3_K2__, ____NORTO_L3_K3__, ____NORTO_L3_K4__, ____NORTO_L3_K5__
|
||||
|
||||
#define __________________NORTO_R1____________________ ____NORTO_R1_K1__, ____NORTO_R1_K2__, ____NORTO_R1_K3__, ____NORTO_R1_K4__, ____NORTO_R1_K5__
|
||||
#define __________________NORTO_R2____________________ ____NORTO_R2_K1__, ____NORTO_R2_K2__, ____NORTO_R2_K3__, ____NORTO_R2_K4__, ____NORTO_R2_K5__
|
||||
#define __________________NORTO_R3____________________ ____NORTO_R3_K1__, ____NORTO_R3_K2__, ____NORTO_R3_K3__, ____NORTO_R3_K4__, ____NORTO_R3_K5__
|
||||
|
||||
// BLANK FULL LINE
|
||||
#define ___________________BLANK___________________ _______, _______, _______, _______, _______
|
||||
|
||||
// NAVNORT
|
||||
|
||||
#define __NORTNAV_L1_K1__ KC_ESC
|
||||
#define __NORTNAV_L1_K2__ KC_PGUP
|
||||
#define __NORTNAV_L1_K3__ KC_UP
|
||||
#define __NORTNAV_L1_K4__ KC_PGDN
|
||||
#define __NORTNAV_L1_K5__ FP_SUPER_TAB
|
||||
|
||||
#define __NORTNAV_L2_K1__ KC_HOME
|
||||
#define __NORTNAV_L2_K2__ KC_LEFT
|
||||
#define __NORTNAV_L2_K3__ KC_DOWN
|
||||
#define __NORTNAV_L2_K4__ KC_RGHT
|
||||
#define __NORTNAV_L2_K5__ KC_END
|
||||
|
||||
#define __NORTNAV_L3_K1__ LGUI_T(_______)
|
||||
#define __NORTNAV_L3_K2__ LALT_T(_______)
|
||||
#define __NORTNAV_L3_K3__ LSFT_T(_______)
|
||||
#define __NORTNAV_L3_K4__ LCTL_T(_______)
|
||||
#define __NORTNAV_L3_K5__ _______
|
||||
|
||||
#define ____________NORTNAVIGATION_1_______________ __NORTNAV_L1_K1__, __NORTNAV_L1_K2__, __NORTNAV_L1_K3__, __NORTNAV_L1_K4__, __NORTNAV_L1_K5__
|
||||
#define ____________NORTNAVIGATION_2_______________ __NORTNAV_L2_K1__, __NORTNAV_L2_K2__, __NORTNAV_L2_K3__, __NORTNAV_L2_K4__, __NORTNAV_L2_K5__
|
||||
#define ____________NORTNAVIGATION_3_______________ __NORTNAV_L3_K1__, __NORTNAV_L3_K2__, __NORTNAV_L3_K3__, __NORTNAV_L3_K4__, __NORTNAV_L3_K5__
|
||||
|
||||
#define __NUMPAD_R1_K1__ DK_ASTR
|
||||
#define __NUMPAD_R1_K2__ KC_7
|
||||
#define __NUMPAD_R1_K3__ KC_8
|
||||
#define __NUMPAD_R1_K4__ KC_9
|
||||
#define __NUMPAD_R1_K5__ DK_PLUS
|
||||
|
||||
#define __NUMPAD_R2_K1__ DK_SLSH
|
||||
#define __NUMPAD_R2_K2__ KC_4
|
||||
#define __NUMPAD_R2_K3__ KC_5
|
||||
#define __NUMPAD_R2_K4__ KC_6
|
||||
#define __NUMPAD_R2_K5__ DK_MINS
|
||||
|
||||
#define __NUMPAD_R3_K1__ DK_LPRN
|
||||
#define __NUMPAD_R3_K2__ RCTL_T(KC_1)
|
||||
#define __NUMPAD_R3_K3__ RSFT_T(KC_2)
|
||||
#define __NUMPAD_R3_K4__ RALT_T(KC_3)
|
||||
#define __NUMPAD_R3_K5__ RGUI_T(KC_0)
|
||||
|
||||
#define _________________NUMPAD_1__________________ __NUMPAD_R1_K1__, __NUMPAD_R1_K2__, __NUMPAD_R1_K3__, __NUMPAD_R1_K4__, __NUMPAD_R1_K5__
|
||||
#define _________________NUMPAD_2__________________ __NUMPAD_R2_K1__, __NUMPAD_R2_K2__, __NUMPAD_R2_K3__, __NUMPAD_R2_K4__, __NUMPAD_R2_K5__
|
||||
#define _________________NUMPAD_3__________________ __NUMPAD_R3_K1__, __NUMPAD_R3_K2__, __NUMPAD_R3_K3__, __NUMPAD_R3_K4__, __NUMPAD_R3_K5__
|
||||
|
||||
// FKeys + SYM
|
||||
#define ______FKEY____L1_K1__ KC_F1
|
||||
#define ______FKEY____L1_K2__ KC_F2
|
||||
#define ______FKEY____L1_K3__ KC_F3
|
||||
#define ______FKEY____L1_K4__ KC_F4
|
||||
#define ______FKEY____L1_K5__ KC_F5
|
||||
|
||||
#define ______FKEY____L2_K1__ KC_F6
|
||||
#define ______FKEY____L2_K2__ KC_F7
|
||||
#define ______FKEY____L2_K3__ KC_F8
|
||||
#define ______FKEY____L2_K4__ KC_F9
|
||||
#define ______FKEY____L2_K5__ KC_F10
|
||||
|
||||
#define ______FKEY____L3_K1__ LGUI_T(KC_F11)
|
||||
#define ______FKEY____L3_K2__ LALT_T(KC_F12)
|
||||
#define ______FKEY____L3_K3__ LSFT_T(KC_C)
|
||||
#define ______FKEY____L3_K4__ LCTL_T(KC_V)
|
||||
#define ______FKEY____L3_K5__ KC_B
|
||||
|
||||
#define __NORTSYMBOLS_R1_K1__ DK_AT // @
|
||||
#define __NORTSYMBOLS_R1_K2__ DK_LBRC // [ - Shifted ]
|
||||
#define __NORTSYMBOLS_R1_K3__ DK_LCBR // { - Shifted {}
|
||||
#define __NORTSYMBOLS_R1_K4__ DK_CIRC
|
||||
#define __NORTSYMBOLS_R1_K5__ _______
|
||||
|
||||
#define __NORTSYMBOLS_R2_K1__ DK_QUOT // ' SHFITED "
|
||||
#define __NORTSYMBOLS_R2_K2__ DK_LABK // < - Shifted >
|
||||
#define __NORTSYMBOLS_R2_K3__ DK_DLR // $ - Shifted €
|
||||
#define __NORTSYMBOLS_R2_K4__ DK_PIPE // |
|
||||
#define __NORTSYMBOLS_R2_K5__ DK_GRV // ` - Shifted ¨
|
||||
|
||||
#define __NORTSYMBOLS_R3_K1__ _______
|
||||
#define __NORTSYMBOLS_R3_K2__ RCTL_T(C_CAPSWORD)
|
||||
#define __NORTSYMBOLS_R3_K3__ RSFT_T(C_UNDERSCORECASE)
|
||||
#define __NORTSYMBOLS_R3_K4__ RALT_T(C_HYPHENCASE)
|
||||
#define __NORTSYMBOLS_R3_K5__ RGUI_T(_______)
|
||||
|
||||
|
||||
|
||||
#define ___________________FKEY______L1________________ ______FKEY____L1_K1__, ______FKEY____L1_K2__, ______FKEY____L1_K3__, ______FKEY____L1_K4__, ______FKEY____L1_K5__
|
||||
#define ___________________FKEY______L2________________ ______FKEY____L2_K1__, ______FKEY____L2_K2__, ______FKEY____L2_K3__, ______FKEY____L2_K4__, ______FKEY____L2_K5__
|
||||
#define ___________________FKEY______L3________________ ______FKEY____L3_K1__, ______FKEY____L3_K2__, ______FKEY____L3_K3__, ______FKEY____L3_K4__, ______FKEY____L3_K5__
|
||||
|
||||
#define ________________NORTSYMBOLS_R1_________________ __NORTSYMBOLS_R1_K1__, __NORTSYMBOLS_R1_K2__, __NORTSYMBOLS_R1_K3__, __NORTSYMBOLS_R1_K4__, __NORTSYMBOLS_R1_K5__
|
||||
#define ________________NORTSYMBOLS_R2_________________ __NORTSYMBOLS_R2_K1__, __NORTSYMBOLS_R2_K2__, __NORTSYMBOLS_R2_K3__, __NORTSYMBOLS_R2_K4__, __NORTSYMBOLS_R2_K5__
|
||||
#define ________________NORTSYMBOLS_R3_________________ __NORTSYMBOLS_R3_K1__, __NORTSYMBOLS_R3_K2__, __NORTSYMBOLS_R3_K3__, __NORTSYMBOLS_R3_K4__, __NORTSYMBOLS_R3_K5__
|
||||
|
||||
// GAMES_LAYER?
|
||||
|
||||
#define ___________________GAMES_0_________________ KC_F1, KC_F2, KC_C, KC_V, KC_G
|
||||
#define ___________________GAMES_1_________________ KC_Q, KC_W, KC_E, KC_R, KC_D
|
||||
#define ___________________GAMES_2_________________ KC_A, KC_F, KC_TAB, KC_L, KC_H
|
||||
#define ___________________GAMES_3_________________ KC_T, KC_COMM, KC_K, KC_SCLN, KC_DOT
|
||||
#define __GAMES_R0_L__ KC_F4
|
||||
#define __GAMES_R1_L__ KC_Z
|
||||
#define __GAMES_R2_L__ KC_P
|
||||
#define __GAMES_R3_L__ KC_LSFT
|
||||
#define __GAMES_R0_R__ KC_N
|
||||
#define __GAMES_R1_R__ KC_Y
|
||||
#define __GAMES_R2_R__ KC_F7
|
||||
#define __GAMES_R3_R__ KC_ESC
|
||||
#define __GAMES_TH_L__ KC_LALT
|
||||
#define __GAMES_TH_C__ KC_X
|
||||
#define __GAMES_TH_R__ KC_B
|
||||
#define __GAMES_R4_1__ KC_J
|
||||
#define __GAMES_R4_2__ __GAMES_R3_R__
|
||||
#define __GAMES_R4_3__ KC_LCTL
|
||||
|
||||
|
||||
// clang-format on
|
||||
Loading…
Add table
Add a link
Reference in a new issue