Remove obvious user keymaps, keyboards/{d,e,f}*
edition. (#22695)
This commit is contained in:
parent
d235352504
commit
a1c8b1ebf7
480 changed files with 0 additions and 33279 deletions
|
@ -1,35 +0,0 @@
|
|||
/* Copyright 2021 B. Fletcher
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[0] = LAYOUT_all(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_GRV, KC_HOME,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGDN,
|
||||
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_UP, MO(1),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RGUI, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
[1] = LAYOUT_all(
|
||||
QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
|
||||
};
|
|
@ -1,75 +0,0 @@
|
|||
/*
|
||||
|
||||
M4cs Keymap for dekuNukem/duckyPad QMK firmware
|
||||
|
||||
Copyright (C) 2020 Max Bridgland
|
||||
|
||||
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 3 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
|
||||
|
||||
#define NO_ACTION_FUNCTION
|
||||
#define NO_ACTION_ONESHOT
|
||||
|
||||
#define OLED_TIMEOUT 90000
|
||||
#define RGB_MATRIX_TIMEOUT 90000
|
||||
|
||||
#define MT_0_0 " prev "
|
||||
#define MT_0_1 " pl/pa"
|
||||
#define MT_0_2 " next "
|
||||
#define MT_0_3 " volx "
|
||||
#define MT_0_4 " vol- "
|
||||
#define MT_0_5 " vol+ "
|
||||
#define MT_0_6 " spot "
|
||||
#define MT_0_7 " ffox "
|
||||
#define MT_0_8 " code "
|
||||
#define MT_0_9 " term "
|
||||
#define MT_0_10 " steam"
|
||||
#define MT_0_11 " dscd "
|
||||
#define MT_0_12 " "
|
||||
#define MT_0_13 " micx "
|
||||
#define MT_0_14 " "
|
||||
|
||||
#define MT_1_0 " stat "
|
||||
#define MT_1_1 " brth "
|
||||
#define MT_1_2 " rbow "
|
||||
#define MT_1_3 " swrl "
|
||||
#define MT_1_4 " spd- "
|
||||
#define MT_1_5 " spd+ "
|
||||
#define MT_1_6 " eff- "
|
||||
#define MT_1_7 " sat- "
|
||||
#define MT_1_8 " sat+ "
|
||||
#define MT_1_9 " eff+ "
|
||||
#define MT_1_10 " hue- "
|
||||
#define MT_1_11 " hue+ "
|
||||
#define MT_1_12 " powr "
|
||||
#define MT_1_13 " bri- "
|
||||
#define MT_1_14 " bri+ "
|
||||
|
||||
#define MT_2_0 " "
|
||||
#define MT_2_1 " "
|
||||
#define MT_2_2 " "
|
||||
#define MT_2_3 " undo "
|
||||
#define MT_2_4 " cut "
|
||||
#define MT_2_5 " copy "
|
||||
#define MT_2_6 " paste"
|
||||
#define MT_2_7 " find "
|
||||
#define MT_2_8 " pscr "
|
||||
#define MT_2_9 " "
|
||||
#define MT_2_10 " "
|
||||
#define MT_2_11 " "
|
||||
#define MT_2_12 " "
|
||||
#define MT_2_13 " "
|
||||
#define MT_2_14 " "
|
|
@ -1,335 +0,0 @@
|
|||
/*
|
||||
|
||||
M4cs Keymap for dekuNukem/duckyPad QMK firmware
|
||||
|
||||
Copyright (C) 2020 Max Bridgland
|
||||
|
||||
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 3 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
|
||||
|
||||
#include "stdio.h"
|
||||
#include "raw_hid.h"
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <math.h>
|
||||
|
||||
#define LOGO_SIZE 384
|
||||
|
||||
bool rgbToggled = false;
|
||||
bool altToggled = false;
|
||||
bool sysToggled = false;
|
||||
|
||||
enum layer_codes {
|
||||
RGB_LAYER = SAFE_RANGE,
|
||||
ALT_LAYER,
|
||||
SYS_LAYER,
|
||||
CLOCK_TOGGLE
|
||||
};
|
||||
|
||||
#define MAC_1 LCTL(LALT(KC_MINS))
|
||||
#define MAC_2 LCTL(LALT(KC_EQL))
|
||||
#define MAC_3 LCTL(LALT(KC_LBRC))
|
||||
#define MAC_4 LCTL(LALT(KC_RBRC))
|
||||
#define MAC_5 LCTL(LALT(KC_BSLS))
|
||||
#define MAC_6 LCTL(LALT(KC_SCLN))
|
||||
#define MAC_7 LCTL(LALT(KC_QUOT))
|
||||
#define MAC_8 LCTL(LALT(KC_COMM))
|
||||
#define MAC_9 LCTL(LALT(KC_SLSH))
|
||||
|
||||
#define MAC_10 LCTL(LSFT(KC_MINS))
|
||||
#define MAC_11 LCTL(LSFT(KC_EQL))
|
||||
#define MAC_12 LCTL(LSFT(KC_SLSH))
|
||||
#define MAC_13 LCTL(LSFT(KC_LBRC))
|
||||
#define MAC_14 LCTL(LSFT(KC_RBRC))
|
||||
#define MAC_15 LCTL(LSFT(KC_BSLS))
|
||||
#define MAC_16 LCTL(LSFT(KC_SCLN))
|
||||
#define MAC_17 LCTL(LSFT(KC_QUOT))
|
||||
#define MAC_18 LCTL(LSFT(KC_COMM))
|
||||
|
||||
#define _DEFAULT 0
|
||||
#define _RGB 1
|
||||
#define _ALT 2
|
||||
#define _SYS 3
|
||||
|
||||
float cpuFreq = 0;
|
||||
int memPerc = 0;
|
||||
int gpuLoad = 0;
|
||||
int temp = 0;
|
||||
int hour = 0;
|
||||
int minute = 0;
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
,=========================================.
|
||||
| Media Prev. | Media Play | Media Next |
|
||||
|=========================================|
|
||||
| Mute Sound | Volume Do. | Volume Up |
|
||||
|=========================================|
|
||||
| Macro 1 | Macro 2 | Macro 3 |
|
||||
|=========================================|
|
||||
| Macro 4 | Macro 5 | Macro 6 |
|
||||
|=========================================| ,---------------------.
|
||||
| Macro 7 | Macro 8 | Sys. Info | | RGB Menu | Alt Menu |
|
||||
`=========================================' `--------------------'
|
||||
*/
|
||||
[_DEFAULT] = LAYOUT(
|
||||
KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK,
|
||||
KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP,
|
||||
MAC_1, MAC_2, MAC_3,
|
||||
MAC_4, MAC_5, MAC_6,
|
||||
CLOCK_TOGGLE, MAC_8, SYS_LAYER,
|
||||
RGB_LAYER, ALT_LAYER
|
||||
),
|
||||
/*
|
||||
,=========================================.
|
||||
| Plain RGB | Breathe RGB | Rainbow RGB |
|
||||
|=========================================|
|
||||
| Swirl RGB | Speed Down | Speed Up |
|
||||
|=========================================|
|
||||
| Effect Up | Sat. Down | Sat. Up |
|
||||
|=========================================|
|
||||
| Effect Down | Hue Down | Hue Up |
|
||||
|=========================================| ,----------------------.
|
||||
| Toggle RGB | Brt. Down | Brt. Up | | Norm Menu | Alt Menu |
|
||||
`=========================================' `---------------------'
|
||||
*/
|
||||
[_RGB] = LAYOUT(
|
||||
RGB_MODE_PLAIN, RGB_MODE_BREATHE, RGB_MODE_RAINBOW,
|
||||
RGB_MODE_SWIRL, RGB_SPD, RGB_SPI,
|
||||
RGB_MOD, RGB_SAD, RGB_SAI,
|
||||
RGB_RMOD, RGB_HUD, RGB_HUI,
|
||||
RGB_TOG, RGB_VAD, RGB_VAI,
|
||||
RGB_LAYER, ALT_LAYER
|
||||
),
|
||||
/*
|
||||
,=========================================.
|
||||
| Macro 10 | Macro 11 | Macro 12 |
|
||||
|=========================================|
|
||||
| Undo | Cut | Copy |
|
||||
|=========================================|
|
||||
| Paste | Find | Prnt Scrn. |
|
||||
|=========================================|
|
||||
| Macro 13 | Macro 14 | Macro 15 |
|
||||
|=========================================| ,----------------------.
|
||||
| Macro 16 | Macro 17 | Sys. Info | | Norm Menu | Alt Menu |
|
||||
`=========================================' `---------------------'
|
||||
*/
|
||||
[_ALT] = LAYOUT(
|
||||
MAC_10, MAC_11, MAC_12,
|
||||
KC_UNDO, KC_CUT, KC_COPY,
|
||||
KC_PASTE, KC_FIND, KC_PSCR,
|
||||
MAC_13, MAC_14, MAC_15,
|
||||
CLOCK_TOGGLE, MAC_17, SYS_LAYER,
|
||||
RGB_LAYER, ALT_LAYER
|
||||
),
|
||||
[_SYS] = LAYOUT(
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO,
|
||||
CLOCK_TOGGLE, KC_NO, SYS_LAYER,
|
||||
RGB_LAYER, ALT_LAYER
|
||||
)
|
||||
};
|
||||
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM raw_logo[] = {
|
||||
0, 0, 0, 0,128,128,128,128,128, 0, 0,252,252,252, 0, 0, 0,128,128,128, 0, 0, 0, 0, 0,128,128,128, 0, 0, 0, 0, 0,128,128,128,128,128, 0, 0, 0, 0, 0,252,252,252, 0, 0, 0, 0, 0,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0,128,128,128,128, 0,248,248,248, 56, 56, 56, 56, 56, 56,120,240,224,192, 0, 0,128,128,128,128,128,128, 0, 0, 0, 0, 0, 0, 0, 0,128,128,128,128,128, 0, 0,252,252,252, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||
0,248,254,255,143, 7, 3, 3, 3, 7,142,255,255,255, 0, 0, 0,255,255,255, 0, 0, 0, 0, 0,255,255,255, 0,248,254,255,143, 7, 3, 3, 3, 3,143, 7, 2, 0, 0,255,255,255,240,120,252,254,231,131, 1, 0, 1, 7, 63,254,240,192, 0,224,252,127, 31, 3, 0, 0,255,255,255,112,112,112,112,112,112, 56, 63, 31, 15,193,231,243,115, 51, 51, 51, 55,255,255,252, 0, 0,248,254,255,143, 7, 3, 3, 3, 7,142,255,255,255, 0, 0, 0, 0,192,240,240, 96, 48, 48, 0, 12, 12,134,198,230,126, 60, 0, 0, 0,
|
||||
0, 0, 3, 7, 15, 15, 14, 14, 14, 7, 3, 15, 15, 15, 0, 0, 0, 3, 7, 15, 15, 14, 14, 6, 3, 15, 15, 15, 0, 0, 3, 7, 7, 15, 14, 14, 14, 14, 7, 7, 2, 0, 0, 15, 15, 15, 0, 0, 0, 1, 3, 15, 15, 12,136,224,224,224,247,127,127, 31, 3, 0, 0, 0, 0, 0, 15, 15, 15, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 7, 15, 14, 14, 14, 6, 3, 15, 15, 15, 0, 0, 0, 3, 7, 15, 15, 14, 14, 14, 7, 3, 15, 15, 15, 0, 0, 0, 12, 15, 7, 0, 0, 0, 12, 14, 15, 15, 13, 13, 12, 12, 0, 0, 0, 0,
|
||||
};
|
||||
oled_write_raw_P(raw_logo, sizeof(raw_logo));
|
||||
}
|
||||
|
||||
char* make_menu_text(void){
|
||||
char *s = malloc((30 * 4) * sizeof(*s));
|
||||
int width = 3;
|
||||
snprintf(s, 120, "%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s",
|
||||
width, MT_0_0, width, MT_0_1, width, MT_0_2,
|
||||
width, MT_0_3, width, MT_0_4, width, MT_0_5,
|
||||
width, MT_0_6, width, MT_0_7, width, MT_0_8,
|
||||
width, MT_0_9, width, MT_0_10, width,MT_0_11,
|
||||
width, MT_0_12, width, MT_0_13, width, MT_0_14
|
||||
);
|
||||
return s;
|
||||
};
|
||||
|
||||
char* make_rgb_text(void){
|
||||
char *s = malloc((30 * 4) * sizeof(*s));
|
||||
int width = 3;
|
||||
snprintf(
|
||||
s, 120, "%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s",
|
||||
width, MT_1_0, width, MT_1_1, width, MT_1_2,
|
||||
width, MT_1_3, width, MT_1_4, width, MT_1_5,
|
||||
width, MT_1_6, width, MT_1_7, width, MT_1_8,
|
||||
width, MT_1_9, width, MT_1_10, width,MT_1_11,
|
||||
width, MT_1_12, width, MT_1_13, width, MT_1_14
|
||||
);
|
||||
return s;
|
||||
};
|
||||
|
||||
char* make_alt_text(void){
|
||||
char *s = malloc((30 * 4) * sizeof(*s));
|
||||
int width = 3;
|
||||
snprintf(
|
||||
s, 120, "%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s\n%-*s %-*s %-*s",
|
||||
width, MT_2_0, width, MT_2_1, width, MT_2_2,
|
||||
width, MT_2_3, width, MT_2_4, width, MT_2_5,
|
||||
width, MT_2_6, width, MT_2_7, width, MT_2_8,
|
||||
width, MT_2_9, width, MT_2_10, width,MT_2_11,
|
||||
width, MT_2_12, width, MT_2_13, width, MT_2_14
|
||||
);
|
||||
return s;
|
||||
};
|
||||
|
||||
char* make_sys_info_text(void) {
|
||||
char *s = malloc((30 * 5) * sizeof(*s));
|
||||
snprintf(s, 150, " cpu: %.1fGHz\n mem: %d%%\n gpu: %d%%\n temp: %dC\n time: %d:%d", cpuFreq, memPerc, gpuLoad, temp, hour, minute);
|
||||
return s;
|
||||
};
|
||||
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (!sysToggled) {
|
||||
render_logo();
|
||||
oled_set_cursor(0,3);
|
||||
if (rgbToggled) {
|
||||
char *s = make_rgb_text();
|
||||
oled_write_ln(s, false);
|
||||
free(s);
|
||||
} else if (altToggled) {
|
||||
char *s = make_alt_text();
|
||||
oled_write_ln(s, false);
|
||||
free(s);
|
||||
} else {
|
||||
char *s = make_menu_text();
|
||||
oled_write_ln(s, false);
|
||||
free(s);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
int concat(int a, int b) {
|
||||
char s1[20];
|
||||
char s2[20];
|
||||
sprintf(s1, "%d", a);
|
||||
sprintf(s2, "%d", b);
|
||||
strcat(s1, s2);
|
||||
int c = atoi(s1);
|
||||
|
||||
return c;
|
||||
};
|
||||
|
||||
void raw_hid_receive(uint8_t *data, uint8_t length) {
|
||||
if (sysToggled) {
|
||||
oled_clear();
|
||||
render_logo();
|
||||
int i;
|
||||
int stepper = 0;
|
||||
int toWrite;
|
||||
for (i=0; i < length; i++) {
|
||||
if (data[i] != 13) {
|
||||
toWrite = concat(toWrite, data[i]);
|
||||
} else {
|
||||
switch (stepper) {
|
||||
case 0:
|
||||
cpuFreq = floor(100*toWrite)/10000;
|
||||
break;
|
||||
case 1:
|
||||
memPerc = toWrite / 10;
|
||||
break;
|
||||
case 2:
|
||||
gpuLoad = toWrite;
|
||||
break;
|
||||
case 3:
|
||||
temp = toWrite;
|
||||
break;
|
||||
case 4:
|
||||
hour = toWrite;
|
||||
break;
|
||||
case 5:
|
||||
minute = toWrite;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
toWrite = 0;
|
||||
stepper++;
|
||||
}
|
||||
}
|
||||
oled_set_cursor(0,3);
|
||||
char *s = make_sys_info_text();
|
||||
oled_write_ln(s, false);
|
||||
free(s);
|
||||
}
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case RGB_LAYER:
|
||||
if (record->event.pressed) {
|
||||
if (rgbToggled) {
|
||||
rgbToggled = false;
|
||||
altToggled = false;
|
||||
sysToggled = false;
|
||||
oled_clear();
|
||||
layer_clear();
|
||||
} else {
|
||||
rgbToggled = true;
|
||||
altToggled = false;
|
||||
sysToggled = false;
|
||||
layer_on(_RGB);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case ALT_LAYER:
|
||||
if (record->event.pressed) {
|
||||
if (altToggled) {
|
||||
rgbToggled = false;
|
||||
altToggled = false;
|
||||
sysToggled = false;
|
||||
oled_clear();
|
||||
layer_clear();
|
||||
} else {
|
||||
rgbToggled = false;
|
||||
sysToggled = false;
|
||||
altToggled = true;
|
||||
layer_on(_ALT);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
case SYS_LAYER:
|
||||
if (record->event.pressed) {
|
||||
if (sysToggled) {
|
||||
rgbToggled = false;
|
||||
altToggled = false;
|
||||
sysToggled = false;
|
||||
oled_clear();
|
||||
layer_clear();
|
||||
} else {
|
||||
rgbToggled = false;
|
||||
sysToggled = true;
|
||||
altToggled = false;
|
||||
layer_on(_SYS);
|
||||
}
|
||||
}
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
};
|
|
@ -1,27 +0,0 @@
|
|||
[M4cs'](https://github.com/M4cs) duckyPad Layout
|
||||
|
||||
### Layers:
|
||||
|
||||
0: Default Layer w/ Media Functionality and Macros
|
||||
|
||||
1: RGB Menu that allows RGB customization
|
||||
|
||||
2: Alternate Macro Menu
|
||||
|
||||
### Configuration:
|
||||
|
||||
To change the menu, edit the `MT_X_XX` values in `config.h`. The sytax is as follows: `MT_A_B`, where A equals the layer, and B equals the key from 0-14.
|
||||
|
||||
### Misc. Info:
|
||||
|
||||
The macros currently just map to Ctrl + Alt + (Different Keys) right now. I have them launching certain shortcuts. I recommend you change these and add your shortcuts to match your shortcut manager.
|
||||
|
||||
To get sysinfo working, run `pip3 install psutil GPUtil` and then `python sysinfo.py`. Now when pressing the bottom right key, you will get an info screen with your updated system info.
|
||||
|
||||
### Need Help?
|
||||
|
||||
Contact me on discord: macs#0420
|
||||
|
||||
or join the duckyPad Discord and find me in there :)
|
||||
|
||||
https://discord.gg/ADtrCjf
|
|
@ -1,2 +0,0 @@
|
|||
LTO_ENABLE = yes # Enable Link Time Optimization
|
||||
NO_USB_STARTUP_CHECK = yes # Disables usb suspend check after keyboard startup
|
|
@ -1,77 +0,0 @@
|
|||
|
||||
###
|
||||
# M4cs Keymap for dekuNukem/duckyPad QMK firmware
|
||||
|
||||
# Copyright (C) 2020 Max Bridgland
|
||||
|
||||
# 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 3 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/>.
|
||||
###
|
||||
|
||||
|
||||
import hid
|
||||
import time
|
||||
import psutil
|
||||
import GPUtil
|
||||
import datetime
|
||||
|
||||
vendor_id = 0x444E
|
||||
product_id = 0x4450
|
||||
|
||||
usage_page = 0xFF60
|
||||
usage = 0x61
|
||||
|
||||
device_interfaces = hid.enumerate(vendor_id, product_id)
|
||||
raw_hid_interfaces = [i for i in device_interfaces if i['usage_page'] == usage_page and i['usage'] == usage]
|
||||
|
||||
if len(raw_hid_interfaces) == 0:
|
||||
print('Couldnt find any interfaces')
|
||||
exit()
|
||||
|
||||
interface = hid.device()
|
||||
interface.open_path(raw_hid_interfaces[0]['path'])
|
||||
print("Manufacturer: %s" % interface.get_manufacturer_string())
|
||||
print("Product: %s" % interface.get_product_string())
|
||||
time.sleep(0.05)
|
||||
while True:
|
||||
time.sleep(0.75)
|
||||
cpufreq = psutil.cpu_freq()
|
||||
currFreq = int(cpufreq.current)
|
||||
svmem = psutil.virtual_memory()
|
||||
memPerc = int(svmem.percent * 10)
|
||||
gpus = GPUtil.getGPUs()
|
||||
gpu = gpus[0]
|
||||
load = int(gpu.load*100)
|
||||
temp = int(gpu.temperature)
|
||||
data = [0]
|
||||
for x in str(currFreq):
|
||||
data.append(int(x))
|
||||
data.append(13)
|
||||
for x in str(memPerc):
|
||||
data.append(int(x))
|
||||
data.append(13)
|
||||
for x in str(load):
|
||||
data.append(int(x))
|
||||
data.append(13)
|
||||
for x in str(temp):
|
||||
data.append(int(x))
|
||||
data.append(13)
|
||||
now_hour = datetime.datetime.now().strftime("%I")
|
||||
now_min = datetime.datetime.now().strftime("%M")
|
||||
data.append(int(now_hour[0]))
|
||||
data.append(int(now_hour[1]))
|
||||
data.append(13)
|
||||
data.append(int(now_min[0]))
|
||||
data.append(int(now_min[1]))
|
||||
data.append(13)
|
||||
interface.write(data)
|
|
@ -1,155 +0,0 @@
|
|||
/* Copyright 2020 noclew
|
||||
*
|
||||
* 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
|
||||
|
||||
// Defines names for use in layer keycodes and the keymap
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST,
|
||||
_MAC,
|
||||
_GAME
|
||||
};
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
BASE = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
MAC,
|
||||
GAME
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* BASE
|
||||
* ---------------------------------------------------------------------------------------------------------
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | Bspc | Mute |
|
||||
* ---------------------------------------------------------------------------------------------------------
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | \ | [ | ] |
|
||||
*----------------------------------------------------------------------------------------------------------
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | Enter | N/A | ' |
|
||||
*----------------------------------------------------------------------------------------------------------
|
||||
* | N/A | Shift | Z | X | C | V | B | N | M | , | . | / | Shift | DEL |
|
||||
*----------------------------------------------------------------------------------------------------------
|
||||
* | Ctrl | GUI | Alt | Lower | Space | Space | Space | Raise | Alt | Left | Down | Up | Right |
|
||||
*----------------------------------------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
[_BASE] = LAYOUT_all(
|
||||
KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL, KC_BSPC, KC_AUDIO_MUTE,
|
||||
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_LBRC, KC_RBRC,
|
||||
KC_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN, KC_ENT , KC_NO, KC_QUOT,
|
||||
KC_NO , KC_LSFT, KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_SLSH, RSFT_T(KC_QUOT), KC_DEL,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, LOWER , KC_SPC , KC_SPC , KC_SPC , RAISE, KC_RALT, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
[_MAC] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_LALT, KC_LGUI, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_GAME] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, MO(_LOWER), KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_all(
|
||||
_______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_F12 , _______,
|
||||
KC_BSPC, KC_SLSH, KC_7 , KC_8 , KC_9 , KC_PPLS, KC_CIRC, KC_LBRC, KC_RBRC, KC_AT , KC_EXLM, KC_BSLS, _______, _______,
|
||||
KC_EQL , KC_0 , KC_4 , KC_5 , KC_6 , KC_MINS, KC_PIPE, KC_LPRN, KC_RPRN, KC_HASH, KC_DQUO, _______, _______, _______,
|
||||
KC_ENT , _______, KC_PAST, KC_1 , KC_2 , KC_3 , KC_UNDS, KC_DLR , KC_LCBR, KC_RCBR, KC_AMPR, KC_PERC, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT_all(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_BSPC, KC_DEL, KC_END , _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, KC_PGDN, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT_all(
|
||||
QK_BOOT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, DB_TOGG,
|
||||
_______, RGB_TOG, RGB_RMOD, RGB_MOD, RGB_VAD, RGB_VAI, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, RGB_HUD, RGB_HUI, RGB_SAD, RGB_SAI, _______, _______, TG(_GAME), _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, TG(_MAC), _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
};
|
||||
|
||||
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;
|
||||
|
||||
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;
|
||||
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
/* With an if statement we can check which encoder was turned. */
|
||||
if (index == 0) { /* First encoder */
|
||||
/* And with another if statement we can check the direction. */
|
||||
if (clockwise) {
|
||||
if (IS_LAYER_ON(_LOWER)){
|
||||
tap_code(KC_RIGHT);
|
||||
} else {
|
||||
tap_code(KC_VOLU);
|
||||
}
|
||||
} else {
|
||||
if (IS_LAYER_ON(_LOWER)){
|
||||
tap_code(KC_LEFT);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
|
||||
} else if (index == 1) { /* Second encoder. Only supported by Elite-C */
|
||||
if (clockwise) {
|
||||
tap_code(KC_RIGHT);
|
||||
} else {
|
||||
tap_code(KC_LEFT);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
# The noclew's keymap for Vaguette LITE
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.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/>.
|
||||
*/
|
||||
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
|
@ -1,57 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Layer 0: Default Layer
|
||||
* ,---------------------------- ----------------------------------------.
|
||||
* |Esc| F1| F2| F3| F4| F5| F6| |F7| F8| F9| F10| F11| F12|Prnt|Ins|Home|
|
||||
* |---------------------------- ----------------------------------------|
|
||||
* | `| 1| 2| 3| 4| 5| 6| | 7| 8| 9| 0| -| =| \| Del| End|
|
||||
* |-------------------------- ------------------------------------------|
|
||||
* |Tab | Q| W| E| R| T| | Y| U| I| O| P| [| ]| BkSp | PgUp|
|
||||
* |-------------------------- ------------------------------------------|
|
||||
* |Ctrl| A| S| D| F| G| | H| J| K| L| ;| '| Enter | PgDn|
|
||||
* |---------------------------- -----------------------------------------|
|
||||
* |Shift | Z| X| C| V| B| | N| M| ,| .| /| Shift | Up| FN1|
|
||||
* |----------------------------- ----------------------------------------|
|
||||
* |Ctrl |Gui |Alt |Space |FN1 | | Space | Alt| Gui| Ctrl| Lef | Dow |Rig|
|
||||
* `---------------------------- ----------------------------------------'
|
||||
*/
|
||||
LAYOUT_v2(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_PAUSE, KC_HOME,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_DEL, KC_END,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_PGUP,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, _______, KC_ENT, KC_PGDN, //modify _______ to enable ISO Support
|
||||
KC_LSFT, _______, KC_Z, KC_X, KC_C, KC_V, KC_B, _______, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, MO(1), //modify _______ to enable ISO Support
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT),
|
||||
|
||||
/* Layer 1: FN1 Layer
|
||||
* ,---------------------------- -------------------------------------.
|
||||
* | | | | | | | | | | | | | | | |Reset|
|
||||
* |---------------------------- -------------------------------------|
|
||||
* | \ | | | | | | | | | | | | | | | |
|
||||
* |---------------------------- ---------------------------------------|
|
||||
* |Caps|VolUp| Up | | | | | | | | | Up| | | |
|
||||
* |--------------------------- ---------------------------------------|
|
||||
* | |Lft|Dwn|Rig| | | | | | |Lft|Rig| | |
|
||||
* |---------------------------- -------------------------------------|
|
||||
* | |VolDn|Mute| | | | | | | |Dwn| | | |
|
||||
* |---------------------------- ----------------------------------------|
|
||||
* | | | | | | | | | | | | |
|
||||
* `--------------------------- ----------------------------------------'
|
||||
*/
|
||||
LAYOUT_v2(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT,
|
||||
KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, KC_VOLU, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, KC_UP, _______, _______, _______,
|
||||
M(1), KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, KC_LEFT, KC_RIGHT, _______, _______, _______,
|
||||
_______, _______, KC_VOLD, KC_MUTE, _______, _______, _______, _______, _______, _______, _______, _______, KC_DOWN, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
![Mbsurfer Layout Image](https://i.imgur.com/Hz82zyh.png)
|
||||
|
||||
# Mbsurfer's DeltaSplit75 Layout
|
||||
|
||||
This layout features an ANSI layout with split backspace and a full bottom row with no gaps. The reset key on the FN layer is for quickly flashing a new firmware.
|
|
@ -1,21 +0,0 @@
|
|||
/*
|
||||
Copyright 2012 Jun Wako <wakojun@gmail.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/>.
|
||||
*/
|
||||
|
||||
|
||||
#define MASTER_LEFT
|
||||
// #define MASTER_RIGHT
|
||||
// #define EE_HANDS
|
|
@ -1,29 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
LAYOUT_protosplit(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_HOME, KC_PGUP,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_DEL, KC_END, KC_PGDN,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_SCRL,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PAUS,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_UP, KC_PSCR,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
LAYOUT_protosplit(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, QK_BOOT,
|
||||
KC_BSLS, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_VOLU, KC_UP, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
M(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_PAUS, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_VOLD, M(0), KC_PSCR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
};
|
|
@ -1,196 +0,0 @@
|
|||
// this is the style you want to emulate.
|
||||
// This is the canonical layout file for the Quantum project. If you want to add another keyboard,
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 1
|
||||
#define _RAISE 2
|
||||
#define _MOUSE 8
|
||||
#define _ADJUST 16
|
||||
|
||||
|
||||
enum dichotomy_keycodes
|
||||
{
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
ADJUST,
|
||||
MOUKEY,
|
||||
MS_BTN1,
|
||||
MS_BTN2,
|
||||
MS_BTN3
|
||||
};
|
||||
|
||||
#define RED_BRIGHTNESS 3
|
||||
#define GREEN_BRIGHTNESS 2
|
||||
#define BLUE_BRIGHTNESS 2
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
[_QWERTY] = LAYOUT( /* Base layout, nearly qwerty but with modifications because it's not a full keyboard. Obviously. */
|
||||
KC_ESCAPE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOUKEY,
|
||||
KC_LCTL, KC_LALT, MOUKEY, KC_RGUI, KC_RALT, KC_RCTL,
|
||||
MS_BTN3, SFT_T(KC_ESCAPE), KC_LGUI, KC_BSPC, KC_SPC, RAISE, LOWER, MS_BTN3
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
_______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MFFD, KC_MUTE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
|
||||
_______, _______, KC_GRV, _______, _______, KC_MRWD, _______, _______, _______, KC_BSLS, KC_QUOT, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_LABK, _______, _______, KC_RABK, _______, _______
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT( /* Number layout, basically the main function layer */
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MFFD, KC_MUTE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
|
||||
_______, _______, KC_TILD, _______, _______, KC_MRWD, _______, _______, _______, KC_PIPE, KC_DQT, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, RAISE, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT( /* Shifted number/function layout, for per-key control. Only active when shift is held, and number is toggled or held */
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, _______, KC_PGUP, KC_UP, KC_PGDN, _______, _______,
|
||||
KC_LGUI, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______,
|
||||
KC_LSFT, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MOUSE] = LAYOUT( /* Mouse layer, including buttons for clicking. */
|
||||
_______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_PGUP, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, MS_BTN1, MS_BTN2, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_VOLD, KC_END, KC_PGDN, _______, _______, _______,
|
||||
_______, _______, _______, _______, KC_UP, _______,
|
||||
_______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______
|
||||
)
|
||||
|
||||
}; // end keymaps block
|
||||
|
||||
static bool shift_held = false;
|
||||
static bool shift_suspended = false;
|
||||
report_mouse_t currentReport = {};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_LOWER);
|
||||
grn_led_on();
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_LOWER);
|
||||
grn_led_off();
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
//SHIFT is handled as LSHIFT in the general case - 'toggle' shoudl activate caps, while the layer is only active when shift is held.
|
||||
case RAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_RAISE);
|
||||
red_led_on();
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_RAISE);
|
||||
red_led_off();
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case ADJUST:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_ADJUST);
|
||||
} else {
|
||||
layer_off(_ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
//MOUSE layer needs to be handled the same way as NUMKEY, but differently from shift
|
||||
case MOUKEY:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MOUSE);
|
||||
blu_led_on();
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_MOUSE);
|
||||
blu_led_off();
|
||||
update_tri_layer(_LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
||||
//mouse buttons, for 1-3, to update the mouse report:
|
||||
case MS_BTN1:
|
||||
currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
if (shift_held && shift_suspended){
|
||||
register_code(KC_LSFT);
|
||||
shift_suspended = false;
|
||||
}
|
||||
//update mouse report here
|
||||
currentReport.buttons |= MOUSE_BTN1; //MOUSE_BTN1 is a const defined in report.h
|
||||
} else {
|
||||
//update mouse report here
|
||||
currentReport.buttons &= ~MOUSE_BTN1;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
break;
|
||||
case MS_BTN2:
|
||||
currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
if (shift_held && shift_suspended){
|
||||
register_code(KC_LSFT);
|
||||
shift_suspended = false;
|
||||
}
|
||||
//update mouse report here
|
||||
currentReport.buttons |= MOUSE_BTN2; //MOUSE_BTN2 is a const defined in report.h
|
||||
} else {
|
||||
//update mouse report here
|
||||
currentReport.buttons &= ~MOUSE_BTN2;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
break;
|
||||
case MS_BTN3:
|
||||
currentReport = pointing_device_get_report();
|
||||
if (record->event.pressed) {
|
||||
if (shift_held && shift_suspended){
|
||||
register_code(KC_LSFT);
|
||||
shift_suspended = false;
|
||||
}
|
||||
//update mouse report here
|
||||
currentReport.buttons |= MOUSE_BTN3; //MOUSE_BTN3 is a const defined in report.h
|
||||
} else {
|
||||
//update mouse report here
|
||||
currentReport.buttons &= ~MOUSE_BTN3;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
break;
|
||||
//Additionally, if NS_ keys are in use, then shift may be held (but is
|
||||
//disabled for the unshifted keycodes to be send. Check the bool and
|
||||
//register shift as necessary.
|
||||
// default:
|
||||
// if (shift_held){
|
||||
// register_code(KC_LSFT);
|
||||
// }
|
||||
// break;
|
||||
}
|
||||
return true;
|
||||
};
|
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* 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
|
||||
|
||||
#define TAPPING_TERM 200
|
||||
#define TAPPING_TOGGLE 2
|
|
@ -1,126 +0,0 @@
|
|||
/*
|
||||
* 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
|
||||
|
||||
enum layer_names {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_MOUSE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum dichotomy_keycodes {
|
||||
MS_BTN1 = SAFE_RANGE,
|
||||
MS_BTN2,
|
||||
MS_BTN3
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
[_QWERTY] = LAYOUT( /* Base layout, nearly qwerty but with modifications because it's not a full keyboard. Obviously. */
|
||||
KC_ESCAPE, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, TT(_MOUSE),
|
||||
KC_LGUI, KC_LALT, KC_DEL, KC_RCTL, KC_RALT, KC_RGUI,
|
||||
MS_BTN3, SFT_T(KC_ESCAPE), KC_LCTL, KC_SPC, KC_SPC, TT(_RAISE), TT(_LOWER), MS_BTN3
|
||||
),
|
||||
|
||||
[_RAISE] = LAYOUT( /* Shifted layout, small changes (because angle brackets have been moved to thumb cluster buttons) */
|
||||
_______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
|
||||
_______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT, KC_MUTE, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, _______,
|
||||
_______, _______, KC_GRV, _______, _______, KC_MPRV, _______, KC_LABK, KC_RABK, KC_BSLS, KC_QUOT, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT( /* Number layout, basically the main function layer */
|
||||
_______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
|
||||
_______, _______, KC_VOLD, KC_VOLU, KC_MPLY, KC_MNXT, KC_MUTE, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, _______,
|
||||
_______, _______, KC_TILD, _______, _______, KC_MPRV, _______, _______, _______, KC_PIPE, KC_DQT, _______,
|
||||
_______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_ADJUST] = LAYOUT( /* Shifted number/function layout, for per-key control. Only active when shift is held, and number is toggled or held */
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_PSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, _______,
|
||||
KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAST, KC_P4, KC_P5, KC_P6, KC_PPLS, _______,
|
||||
_______, _______, _______, LGUI(KC_L), KC_PSCR, KC_APP, KC_PCMM, KC_P1, KC_P2, KC_P3, KC_PEQL, _______,
|
||||
_______, _______, _______, _______, KC_P0, KC_PDOT,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
[_MOUSE] = LAYOUT( /* Mouse layer, including buttons for clicking. */
|
||||
_______, _______, _______, _______, _______, _______, KC_VOLU, KC_HOME, KC_WH_U, KC_PGUP, _______, _______,
|
||||
_______, _______, MS_BTN2, MS_BTN3, MS_BTN1, _______, KC_VOLD, MS_BTN1, MS_BTN3, MS_BTN2, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, KC_HOME, KC_END, KC_WH_D, KC_PGDN, _______, _______,
|
||||
_______, KC_UP, _______, _______, KC_UP, _______,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RGHT, KC_LEFT, KC_DOWN, KC_RGHT, _______
|
||||
)
|
||||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
red_led(layer_state_cmp(state, _LOWER));
|
||||
grn_led(layer_state_cmp(state, _RAISE));
|
||||
blu_led(layer_state_cmp(state, _MOUSE));
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
#define SetBitMask(variable, mask, on) if (on) variable |= mask; else variable &= ~mask
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
report_mouse_t currentReport;
|
||||
switch (keycode) {
|
||||
//mouse buttons, for 1-3, to update the mouse report:
|
||||
//MOUSE_BTN1-3 are consts defined in report.h
|
||||
case MS_BTN1:
|
||||
currentReport = pointing_device_get_report();
|
||||
SetBitMask(currentReport.buttons, MOUSE_BTN1, record->event.pressed);
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
case MS_BTN2:
|
||||
currentReport = pointing_device_get_report();
|
||||
SetBitMask(currentReport.buttons, MOUSE_BTN2, record->event.pressed);
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
case MS_BTN3:
|
||||
currentReport = pointing_device_get_report();
|
||||
SetBitMask(currentReport.buttons, MOUSE_BTN3, record->event.pressed);
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
case KC_WH_U:
|
||||
currentReport = pointing_device_get_report();
|
||||
if(record->event.pressed) {
|
||||
currentReport.v += 1;
|
||||
}
|
||||
else {
|
||||
currentReport.v = 0;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
case KC_WH_D:
|
||||
currentReport = pointing_device_get_report();
|
||||
if(record->event.pressed) {
|
||||
currentReport.v -= 1;
|
||||
}
|
||||
else {
|
||||
currentReport.v = 0;
|
||||
}
|
||||
pointing_device_set_report(currentReport);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright 2019 Takuya Urakawa (dm9records.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
|
||||
|
||||
// place overrides here
|
|
@ -1,411 +0,0 @@
|
|||
/* Copyright 2019 Takuya Urakawa (dm9records.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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
enum plaid_layers {
|
||||
_QWERTY,
|
||||
_COLEMAK,
|
||||
_DVORAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_PLOVER,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum plaid_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
COLEMAK,
|
||||
DVORAK,
|
||||
PLOVER,
|
||||
EXT_PLV,
|
||||
LED_1,
|
||||
LED_2,
|
||||
LED_3,
|
||||
LED_4,
|
||||
LED_5,
|
||||
LED_6,
|
||||
LED_7,
|
||||
LED_8,
|
||||
LED_9,
|
||||
LED_0
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
// array of keys considered modifiers for led purposes
|
||||
const uint16_t modifiers[] = {
|
||||
KC_LCTL,
|
||||
KC_RCTL,
|
||||
KC_LALT,
|
||||
KC_RALT,
|
||||
KC_LSFT,
|
||||
KC_RSFT,
|
||||
KC_LGUI,
|
||||
KC_RGUI,
|
||||
LOWER,
|
||||
RAISE
|
||||
};
|
||||
|
||||
//Setup consts for LED modes
|
||||
#define LEDMODE_ON 1 //always on
|
||||
#define LEDMODE_OFF 0 //always off
|
||||
#define LEDMODE_MODS 2 //On with modifiers
|
||||
#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress
|
||||
#define LEDMODE_KEY 4 //On with any keypress, off with key release
|
||||
#define LEDMODE_ENTER 5 // On with enter key
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ltrl | Rctl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_plaid_grid(
|
||||
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, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, 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_ENT ,
|
||||
KC_LCTL, KC_RCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_plaid_grid(
|
||||
KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_DVORAK] = LAYOUT_plaid_grid(
|
||||
KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC,
|
||||
KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH,
|
||||
KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT ,
|
||||
KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | Home | End | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = LAYOUT_plaid_grid(
|
||||
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, S(KC_NUHS), S(KC_NUBS), KC_HOME, KC_END, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / |Pg Up |Pg Dn | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | Next | Vol- | Vol+ | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_plaid_grid(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC,
|
||||
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, KC_PGUP, KC_PGDN, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY
|
||||
),
|
||||
|
||||
/* Plover layer (http://opensteno.org)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | # | # | # | # | # | # | # | # | # | # | # | # |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | S | T | P | H | * | * | F | P | L | T | D |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | S | K | W | R | * | * | R | B | G | S | Z |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Exit | | | A | O | | E | U | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_PLOVER] = LAYOUT_plaid_grid(
|
||||
KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 ,
|
||||
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,
|
||||
XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Reset | | | | | | | | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_plaid_grid(
|
||||
QK_BOOT,LED_1, LED_2, LED_3, LED_4, LED_5,LED_6, LED_7, LED_8, LED_9, LED_0,KC_DEL ,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
//Setup config struct for LED
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
uint8_t red_mode :8;
|
||||
uint8_t green_mode :8;
|
||||
};
|
||||
} led_config_t;
|
||||
led_config_t led_config;
|
||||
|
||||
//Set leds to saved state during powerup
|
||||
void keyboard_post_init_user(void) {
|
||||
// Call the post init code.
|
||||
led_config.raw = eeconfig_read_user();
|
||||
|
||||
if(led_config.red_mode == LEDMODE_ON) {
|
||||
writePinHigh(LED_RED);
|
||||
}
|
||||
|
||||
if(led_config.green_mode == LEDMODE_ON) {
|
||||
writePinHigh(LED_GREEN);
|
||||
}
|
||||
}
|
||||
|
||||
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||
led_config.raw = 0;
|
||||
led_config.red_mode = LEDMODE_ON;
|
||||
led_config.green_mode = LEDMODE_MODS;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
eeconfig_update_user(led_config.raw);
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) {
|
||||
switch (led_mode) {
|
||||
case LEDMODE_MODS:
|
||||
for (int i=0;i<ARRAY_SIZE(modifiers);i++) {
|
||||
if(keycode==modifiers[i]) {
|
||||
if (record->event.pressed) {
|
||||
writePinHigh(led);
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LEDMODE_BLINKIN:
|
||||
if (record->event.pressed) {
|
||||
if(rand() % 2 == 1) {
|
||||
if(rand() % 2 == 0) {
|
||||
writePinLow(led);
|
||||
}
|
||||
else {
|
||||
writePinHigh(led);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LEDMODE_KEY:
|
||||
if (record->event.pressed) {
|
||||
writePinHigh(led);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case LEDMODE_ENTER:
|
||||
if (keycode==KC_ENT) {
|
||||
writePinHigh(led);
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
/* If the either led mode is keypressed based, call the led updater
|
||||
then let it fall through the keypress handlers. Just to keep
|
||||
the logic out of this procedure */
|
||||
if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) {
|
||||
led_keypress_update(LED_RED, led_config.red_mode, keycode, record);
|
||||
}
|
||||
if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) {
|
||||
led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record);
|
||||
}
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case PLOVER:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_RAISE);
|
||||
layer_off(_LOWER);
|
||||
layer_off(_ADJUST);
|
||||
layer_on(_PLOVER);
|
||||
if (!eeconfig_is_enabled()) {
|
||||
eeconfig_init();
|
||||
}
|
||||
keymap_config.raw = eeconfig_read_keymap();
|
||||
keymap_config.nkro = 1;
|
||||
eeconfig_update_keymap(keymap_config.raw);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case EXT_PLV:
|
||||
if (record->event.pressed) {
|
||||
layer_off(_PLOVER);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LED_1:
|
||||
if (record->event.pressed) {
|
||||
if (led_config.red_mode==LEDMODE_ON) {
|
||||
led_config.red_mode=LEDMODE_OFF;
|
||||
writePinLow(LED_RED);
|
||||
}
|
||||
else {
|
||||
led_config.red_mode=LEDMODE_ON;
|
||||
writePinHigh(LED_RED);
|
||||
}
|
||||
}
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_2:
|
||||
if (record->event.pressed) {
|
||||
if (led_config.green_mode==LEDMODE_ON) {
|
||||
led_config.green_mode=LEDMODE_OFF;
|
||||
writePinLow(LED_GREEN);
|
||||
}
|
||||
else {
|
||||
led_config.green_mode=LEDMODE_ON;
|
||||
writePinHigh(LED_GREEN);
|
||||
}
|
||||
}
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_3:
|
||||
led_config.red_mode=LEDMODE_MODS;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_4:
|
||||
led_config.green_mode=LEDMODE_MODS;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_5:
|
||||
led_config.red_mode=LEDMODE_BLINKIN;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_6:
|
||||
led_config.green_mode=LEDMODE_BLINKIN;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_7:
|
||||
led_config.red_mode=LEDMODE_KEY;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_8:
|
||||
led_config.green_mode=LEDMODE_KEY;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_9:
|
||||
led_config.red_mode=LEDMODE_ENTER;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
case LED_0:
|
||||
led_config.green_mode=LEDMODE_ENTER;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
# Brickbots keymap for plaid
|
||||
Original copyright 2019 Takuya Urakawa (dm9records.com)
|
||||
LED Support added by Richard Sutherland (rich@brickbots.com)
|
||||
|
||||
This layout is based on the Planck layout, with esc/tab swapped and an extra
|
||||
ctrl key in the bottom left corner. It includes an adjust layer (6)
|
||||
accessible by holding the lower and raise modifiers (MO3 and MO4) together.
|
||||
The adjustment layer is used to set the behavior of the two LEDs:
|
||||
|
||||
**Modifier Mode:**
|
||||
Activates when any modifier (shift, alt, os, MO) key is held
|
||||
down. LED turns off when key is release
|
||||
|
||||
**Blinkinlights Mode:**
|
||||
Random chance of state change on each keystroke.
|
||||
|
||||
**Keypress Mode:**
|
||||
On for any keypress as long as the key is pressed
|
||||
|
||||
**Carriage Mode:**
|
||||
Turns on when enter is pressed, turns off when any next key is pressed
|
||||
|
||||
To set the behavior of an LED, and save it to eeprom, hold the
|
||||
raise/lower keys together to access the adjust layer, then use
|
||||
the keys indicated below to set the behaviors
|
||||
|
||||
* q = Toggle Red LED state, deactivates any other modes
|
||||
* w = Toggle Green LED state, deactivates any other modes
|
||||
* e = Set RED LED to modifier mode
|
||||
* r = Set GREEN LED to modifier mode
|
||||
* t = Set RED LED to Blinkinlights mode
|
||||
* y = set GREEN LED to Blinkinlights mode
|
||||
* u = set RED LED to Keypress mode
|
||||
* i = set GREEN LED to Keypress mode
|
||||
* o = set RED LED to Carriage mode
|
||||
* p = set GREEN LED to Carriage mode
|
|
@ -1,213 +0,0 @@
|
|||
/* Copyright 2020 Benjamin Große <ste3ls@gmail.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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum plaid_layers {
|
||||
_QWERTY,
|
||||
_XMONAD,
|
||||
_RAISE,
|
||||
_LOWER,
|
||||
};
|
||||
|
||||
enum plaid_keycodes {
|
||||
AUTOCLICK = SAFE_RANGE
|
||||
};
|
||||
|
||||
static bool autoclick = false;
|
||||
static bool autoclick_state = false;
|
||||
static uint16_t autoclick_timer = 0;
|
||||
|
||||
#define XMONAD LM(_XMONAD, MOD_LGUI)
|
||||
#define SPC_LWR LT(_LOWER, KC_SPACE)
|
||||
#define ENT_RSE LT(_RAISE, KC_ENT)
|
||||
#define LOWER LT(_LOWER, KC_BSPC)
|
||||
|
||||
#define LS_ESC LSFT_T(KC_ESC)
|
||||
#define RS_QUOT RSFT_T(KC_QUOT)
|
||||
|
||||
#define LCT_MINS LCTL_T(KC_MINS)
|
||||
#define RCT_EQL RCTL_T(KC_EQL)
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P |Bckspc|
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Esc | A | S | D | F | G | H | J | K | L | ; | ' |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | - | Z | X | C | V | B | N | M | , | . | / | = |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | GUI |XMONAD|LShift| Space |Ent/RA|RShift|LOWER | RAlt |RCtrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_plaid_grid( // Base QWERTY
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
LS_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, RS_QUOT,
|
||||
LCT_MINS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, RCT_EQL,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, XMONAD, SC_LSPO, KC_SPACE,_______, ENT_RSE, SC_RSPC, LOWER, KC_RALT, KC_RCTL
|
||||
),
|
||||
|
||||
[_XMONAD] = LAYOUT_plaid_grid( // Xmonad with MOD4
|
||||
KC_Q, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_P, _______,
|
||||
KC_LSFT, _______, _______, _______, _______, _______, KC_H, KC_J, KC_K, KC_L, _______, _______,
|
||||
KC_LSFT, _______, _______, KC_C, _______, KC_B, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, KC_ENT, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/* Raised
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | \ |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | ~ | { | PgUp | PgDn | End | Home | Left | Down | Up | Right| } | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | [ | ! | @ | # | $ | % | ^ | & | * | ( | ) | ] |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | |VolDn |VolUp |Mute |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_plaid_grid( // Numbers, arrows, symbols
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS,
|
||||
KC_TILD, KC_LCBR, KC_PGUP, KC_PGDN, KC_END, KC_HOME, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_RCBR, KC_PIPE,
|
||||
KC_LBRC, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_RBRC,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, KC_MUTE
|
||||
),
|
||||
|
||||
[_LOWER] = LAYOUT_plaid_grid( // F, media keys, reset
|
||||
KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,
|
||||
_______, _______, MU_NEXT, AU_ON, AU_OFF, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, QK_BOOT,
|
||||
_______, AU_PREV, AU_NEXT, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, XXXXXXX, _______, AUTOCLICK
|
||||
)
|
||||
};
|
||||
|
||||
#define BLINKEN_RANDOM_STARTLE false
|
||||
static uint16_t blinken_timer = 0;
|
||||
static uint16_t next_timeout = 1000;
|
||||
enum blinken_modes {
|
||||
BLINK_HOLD,
|
||||
BLINK_STARTLED,
|
||||
BLINK_STARTLED_LAYER
|
||||
};
|
||||
static uint16_t blinken_mode = BLINK_HOLD;
|
||||
static uint16_t blinken_timer_startled = 0;
|
||||
static uint16_t blinken_startled_state = 0;
|
||||
|
||||
void matrix_init_user(void) {
|
||||
// https://github.com/hsgw/plaid/issues/15#issuecomment-534677102
|
||||
eeconfig_init();
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
writePinHigh(LED_RED);
|
||||
writePinHigh(LED_GREEN);
|
||||
blinken_timer = timer_read();
|
||||
}
|
||||
|
||||
void matrix_scan_user(void) {
|
||||
if (blinken_mode != BLINK_STARTLED_LAYER && timer_elapsed(blinken_timer) > next_timeout) {
|
||||
blinken_timer = timer_read();
|
||||
if (BLINKEN_RANDOM_STARTLE && rand() % 5 == 0) {
|
||||
blinken_mode = BLINK_STARTLED;
|
||||
blinken_timer_startled = timer_read();
|
||||
blinken_startled_state = 0;
|
||||
} else {
|
||||
blinken_mode = BLINK_HOLD;
|
||||
|
||||
if(rand() % 2 == 0) {
|
||||
next_timeout = 1000;
|
||||
} else if(rand() % 2 == 0) {
|
||||
next_timeout = 500;
|
||||
} else {
|
||||
next_timeout = 300;
|
||||
}
|
||||
|
||||
if(rand() % 2 == 0) {
|
||||
writePinLow(LED_RED);
|
||||
} else {
|
||||
writePinHigh(LED_RED);
|
||||
}
|
||||
if(rand() % 2 == 0) {
|
||||
writePinLow(LED_GREEN);
|
||||
} else {
|
||||
writePinHigh(LED_GREEN);
|
||||
}
|
||||
}
|
||||
} else if ((blinken_mode == BLINK_STARTLED || blinken_mode == BLINK_STARTLED_LAYER)
|
||||
&& timer_elapsed(blinken_timer_startled) > 50) {
|
||||
blinken_timer_startled = timer_read();
|
||||
switch (blinken_startled_state) {
|
||||
case 0:
|
||||
writePinLow(LED_GREEN);
|
||||
blinken_startled_state += 1;
|
||||
break;
|
||||
case 1:
|
||||
writePinHigh(LED_RED);
|
||||
blinken_startled_state += 1;
|
||||
break;
|
||||
case 2:
|
||||
writePinHigh(LED_GREEN);
|
||||
blinken_startled_state += 1;
|
||||
break;
|
||||
case 3:
|
||||
writePinLow(LED_RED);
|
||||
blinken_startled_state = 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (autoclick && timer_elapsed(autoclick_timer) > (autoclick_state ? 20 : 100)) {
|
||||
if (!autoclick_state) {
|
||||
mousekey_on(KC_MS_BTN1);
|
||||
} else {
|
||||
mousekey_off(KC_MS_BTN1);
|
||||
}
|
||||
mousekey_send();
|
||||
autoclick_state = !autoclick_state;
|
||||
autoclick_timer = timer_read();
|
||||
}
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
switch (get_highest_layer(state)) {
|
||||
case _RAISE:
|
||||
blinken_mode = BLINK_STARTLED_LAYER;
|
||||
break;
|
||||
case _XMONAD:
|
||||
blinken_mode = BLINK_STARTLED_LAYER;
|
||||
break;
|
||||
case _LOWER:
|
||||
blinken_mode = BLINK_STARTLED_LAYER;
|
||||
break;
|
||||
default:
|
||||
blinken_mode = BLINK_HOLD;
|
||||
break;
|
||||
}
|
||||
return state;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case AUTOCLICK:
|
||||
if (record->event.pressed) {
|
||||
autoclick = !autoclick;
|
||||
autoclick_timer = timer_read();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
|
@ -1,19 +0,0 @@
|
|||
# Gipsy keymap for plaid
|
||||
|
||||
This layout is based on my corne layout:
|
||||
* QWERTY with Tab, Backspace on top, dash and equals on the bottom.
|
||||
* RAISE has numbers on top, arrows on hjkl, end/home on F/G, symbols on the
|
||||
bottom and around.
|
||||
* XMONAD has xmonad wm key bindings, should be used with Layer modifier LGUI
|
||||
* LOWER has F keys and shouldn't be used much.
|
||||
* Thumbs are: XMONAD, Left SC shift, Space, Enter/Raise, Right SC shift
|
||||
|
||||
Does not have so many modtaps, basically just on enter.
|
||||
|
||||
The LEDs of the plaid keep blinking in a soothing dance, reminiscent of some
|
||||
old machine.
|
||||
|
||||
When any layer is active, the LEDs are "startled".
|
||||
|
||||
There is an autoclicker for minecraft.
|
||||
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright 2019 Takuya Urakawa (dm9records.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
|
||||
|
||||
// place overrides here
|
|
@ -1,356 +0,0 @@
|
|||
/* Copyright 2019 Takuya Urakawa (dm9records.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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
|
||||
enum plaid_layers {
|
||||
_QWERTY,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_ADJUST
|
||||
};
|
||||
|
||||
enum plaid_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LED_1,
|
||||
LED_2,
|
||||
LED_3,
|
||||
LED_4,
|
||||
LED_5,
|
||||
LED_6,
|
||||
LED_7,
|
||||
LED_8,
|
||||
LED_9,
|
||||
LED_0
|
||||
};
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
// array of keys considered modifiers for led purposes
|
||||
const uint16_t modifiers[] = {
|
||||
KC_LCTL,
|
||||
KC_RCTL,
|
||||
KC_LALT,
|
||||
KC_RALT,
|
||||
KC_LSFT,
|
||||
KC_RSFT,
|
||||
KC_LGUI,
|
||||
KC_RGUI,
|
||||
LOWER,
|
||||
RAISE
|
||||
};
|
||||
|
||||
//Setup consts for LED modes
|
||||
#define LEDMODE_ON 1 //always on
|
||||
#define LEDMODE_OFF 0 //always off
|
||||
#define LEDMODE_MODS 2 //On with modifiers
|
||||
#define LEDMODE_BLINKIN 3 //blinkinlights - % chance toggle on keypress
|
||||
#define LEDMODE_KEY 4 //On with any keypress, off with key release
|
||||
#define LEDMODE_ENTER 5 // On with enter key
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* |Esc/hy| A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | fn | Alt | GUI |Lower | Space |Raise | GUI | Alt |Shift | Ctrl |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
* (karabiner remaps Caps lock -> fn)
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_plaid_grid(
|
||||
KC_TAB , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
|
||||
HYPR_T(KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
|
||||
KC_RSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT ,
|
||||
KC_RCTL , KC_CAPS, KC_RALT, KC_RGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_RGUI, KC_RALT, KC_RSFT, KC_RCTL
|
||||
),
|
||||
|
||||
/* Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | F7 | F8 | F9 | F10 | F11 | F12 | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Prev | Vol- | Play |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
* volume up key repeats randomly on mac, have to use mac specific volume
|
||||
*/
|
||||
[_LOWER] = LAYOUT_plaid_grid(
|
||||
KC_GRV , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0 , KC_BSPC,
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC , KC_BSLS,
|
||||
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, _______, _______ , _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MPLY
|
||||
),
|
||||
|
||||
/* Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ~ | | | End | | | |Pg Up | | | | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | Home | |Pg Dn | | | Left | Down | Up |Right | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | Copy |Paste | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | Next | Vol+ | Mute |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = LAYOUT_plaid_grid(
|
||||
KC_TILD, _______, _______, KC_END, _______, _______, _______, KC_PGUP, _______, _______, _______ , KC_DEL ,
|
||||
_______, KC_HOME, _______, KC_PGDN, _______, _______, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, _______ , _______,
|
||||
_______, _______, _______, KC_COPY, KC_PSTE, KC_PGDN, _______, _______, _______, _______, _______ , _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLU, KC_MUTE
|
||||
),
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* |Reset | Red |Green | Rmod | Gmod |Rblink|Gblink| Rkey | Gkey | Rcar | Gcar | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | |Power |Sleep |Wake |Eject | | | | | | | |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = LAYOUT_plaid_grid(
|
||||
QK_BOOT, LED_1 , LED_2 , LED_3 , LED_4 , LED_5 ,LED_6 , LED_7 , LED_8 , LED_9 , LED_0 , _______ ,
|
||||
_______, KC_PWR , KC_SLEP, KC_WAKE, KC_EJCT, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
|
||||
};
|
||||
|
||||
//Setup config struct for LED
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
uint8_t red_mode :8;
|
||||
uint8_t green_mode :8;
|
||||
};
|
||||
} led_config_t;
|
||||
led_config_t led_config;
|
||||
|
||||
//Set leds to saved state during powerup
|
||||
void keyboard_post_init_user(void) {
|
||||
// set LED pin modes
|
||||
setPinOutput(LED_RED);
|
||||
setPinOutput(LED_GREEN);
|
||||
|
||||
// Call the post init code.
|
||||
led_config.raw = eeconfig_read_user();
|
||||
|
||||
if(led_config.red_mode == LEDMODE_ON) {
|
||||
writePinHigh(LED_RED);
|
||||
}
|
||||
|
||||
if(led_config.green_mode == LEDMODE_ON) {
|
||||
writePinHigh(LED_GREEN);
|
||||
}
|
||||
}
|
||||
|
||||
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||
led_config.raw = 0;
|
||||
led_config.red_mode = LEDMODE_ON;
|
||||
led_config.green_mode = LEDMODE_MODS;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _LOWER, _RAISE, _ADJUST);
|
||||
}
|
||||
|
||||
void led_keypress_update(uint8_t led, uint8_t led_mode, uint16_t keycode, keyrecord_t *record) {
|
||||
switch (led_mode) {
|
||||
case LEDMODE_MODS:
|
||||
for (int i=0;i<ARRAY_SIZE(modifiers);i++) {
|
||||
if(keycode==modifiers[i]) {
|
||||
if (record->event.pressed) {
|
||||
writePinHigh(led);
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LEDMODE_BLINKIN:
|
||||
if (record->event.pressed) {
|
||||
|
||||
/* Markov Chain
|
||||
*
|
||||
* 1 - x 1 - y
|
||||
* /---\ /---\
|
||||
* v | v |
|
||||
* /------\ x /------\
|
||||
* | |------>| |
|
||||
* | on | y | off |
|
||||
* | |<------| |
|
||||
* \------/ \------/
|
||||
*/
|
||||
|
||||
/* Non-homogeneous Markov Chain
|
||||
*
|
||||
* /-----\ 1 - x0 /-----\ 1 - x1 /-----\
|
||||
* |on 0|------->|on 1|------->|on 2|----> ...
|
||||
* \-----/\ /\-----/\ /\-----/\
|
||||
* \ / \ / .
|
||||
* x0\ / x1\ / .
|
||||
* \/ \/ .
|
||||
* /\ /\
|
||||
* y0/ \ y1/ \ .
|
||||
* / \ / \ .
|
||||
* / \ / \ .
|
||||
* /-----\ 1 - y0 /-----\ 1 - y1 /-----\/
|
||||
* |off 0|------->|off 1|------->|off 2|----> ...
|
||||
* \-----/ \-----/ \-----/
|
||||
*
|
||||
*
|
||||
* if x = 1/4 and y 1/4, behavior is equivalent to the original code
|
||||
* and converges to a steady state at the rate of 1/2^k
|
||||
* where k is the number of key presses
|
||||
* (the distance from a given vector to the steady state, [1/2, 1/2],
|
||||
* is cut in half every key press)
|
||||
*
|
||||
* if x = y, then it is guaranteed that the steady state is still
|
||||
* [1/2, 1/2], but the rate at which it converges is variable
|
||||
*
|
||||
* if x != y, then there is no well-defined steady state
|
||||
*/
|
||||
|
||||
double x = (1.0*rand())/RAND_MAX;
|
||||
double y = x;
|
||||
|
||||
double p = (readPin(led)) ? x : y;
|
||||
if (rand() < p*RAND_MAX) {
|
||||
togglePin(led);
|
||||
}
|
||||
|
||||
/* following code is restriced to x + y <= 1
|
||||
* if(rand() % 2 == 1) { */
|
||||
/* if(rand() % 2 == 0) { */
|
||||
/* writePinLow(led); */
|
||||
/* } */
|
||||
/* else { */
|
||||
/* writePinHigh(led); */
|
||||
/* } */
|
||||
/* } */
|
||||
}
|
||||
break;
|
||||
case LEDMODE_KEY:
|
||||
if (record->event.pressed) {
|
||||
writePinHigh(led);
|
||||
return;
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
return;
|
||||
}
|
||||
break;
|
||||
case LEDMODE_ENTER:
|
||||
if (keycode==KC_ENT) {
|
||||
writePinHigh(led);
|
||||
}
|
||||
else {
|
||||
writePinLow(led);
|
||||
}
|
||||
break;
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
/* If the either led mode is keypressed based, call the led updater
|
||||
then let it fall through the keypress handlers. Just to keep
|
||||
the logic out of this procedure */
|
||||
if (led_config.red_mode >= LEDMODE_MODS && led_config.red_mode <= LEDMODE_ENTER) {
|
||||
led_keypress_update(LED_RED, led_config.red_mode, keycode, record);
|
||||
}
|
||||
if (led_config.green_mode >= LEDMODE_MODS && led_config.green_mode <= LEDMODE_ENTER) {
|
||||
led_keypress_update(LED_GREEN, led_config.green_mode, keycode, record);
|
||||
}
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
print("mode just switched to qwerty and this is a huge string\n");
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LED_1:
|
||||
if (record->event.pressed) {
|
||||
if (led_config.red_mode==LEDMODE_ON) {
|
||||
led_config.red_mode=LEDMODE_OFF;
|
||||
writePinLow(LED_RED);
|
||||
}
|
||||
else {
|
||||
led_config.red_mode=LEDMODE_ON;
|
||||
writePinHigh(LED_RED);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LED_2:
|
||||
if (record->event.pressed) {
|
||||
if (led_config.green_mode==LEDMODE_ON) {
|
||||
led_config.green_mode=LEDMODE_OFF;
|
||||
writePinLow(LED_GREEN);
|
||||
}
|
||||
else {
|
||||
led_config.green_mode=LEDMODE_ON;
|
||||
writePinHigh(LED_GREEN);
|
||||
}
|
||||
}
|
||||
break;
|
||||
case LED_3:
|
||||
led_config.red_mode=LEDMODE_MODS;
|
||||
break;
|
||||
case LED_4:
|
||||
led_config.green_mode=LEDMODE_MODS;
|
||||
break;
|
||||
case LED_5:
|
||||
led_config.red_mode=LEDMODE_BLINKIN;
|
||||
break;
|
||||
case LED_6:
|
||||
led_config.green_mode=LEDMODE_BLINKIN;
|
||||
break;
|
||||
case LED_7:
|
||||
led_config.red_mode=LEDMODE_KEY;
|
||||
break;
|
||||
case LED_8:
|
||||
led_config.green_mode=LEDMODE_KEY;
|
||||
break;
|
||||
case LED_9:
|
||||
led_config.red_mode=LEDMODE_ENTER;
|
||||
break;
|
||||
case LED_0:
|
||||
led_config.green_mode=LEDMODE_ENTER;
|
||||
break;
|
||||
}
|
||||
|
||||
if (keycode >= LED_1 && keycode <= LED_0) {
|
||||
eeconfig_update_user(led_config.raw);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
# stephen-huan's keymap for Plaid
|
|
@ -1,19 +0,0 @@
|
|||
/* Copyright 2019 Ian Canino (ian@thecommittedbug.io)
|
||||
*
|
||||
* 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
|
||||
|
||||
// place overrides here
|
|
@ -1,182 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
enum plaid_layers {
|
||||
_QWERTY,
|
||||
_DVORAK,
|
||||
_COLEMAK,
|
||||
_LOWER,
|
||||
_RAISE,
|
||||
_FUNCTION,
|
||||
};
|
||||
|
||||
enum plaid_keycodes { QWERTY = SAFE_RANGE, COLEMAK, DVORAK, LED };
|
||||
|
||||
#define LOWER MO(_LOWER)
|
||||
#define RAISE MO(_RAISE)
|
||||
|
||||
#define LED_ON 1
|
||||
#define LED_OFF 0
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | A | S | D | F | G | H | J | K | L | ; | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | LS/( | Z | X | C | V | B | N | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_planck_mit(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, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_LGUI, KC_LALT, KC_LBRC, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, SC_RSPC),
|
||||
|
||||
/* Colemak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | Q | W | F | P | G | J | L | U | Y | ; | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | A | R | S | T | D | H | N | E | I | O | " |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | LS/( | Z | X | C | V | B | K | M | , | . | / |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_COLEMAK] = LAYOUT_planck_mit(KC_ESC, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, KC_TAB, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, SC_RSPC),
|
||||
|
||||
/* Dvorak
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | Esc | " | , | . | P | Y | F | G | C | R | L | Bksp |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | A | O | E | U | I | D | H | T | N | S | / |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | LGUI | Alt | [ |Lower | Space |Raise | ] | RGUI | \ | RS/) |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_DVORAK] = LAYOUT_planck_mit(KC_ESC, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, KC_TAB, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, SC_LSPO, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT, KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, RAISE, KC_RBRC, KC_RGUI, KC_BSLS, SC_RSPC),
|
||||
|
||||
/* LOWER
|
||||
* ,----------------------------------------------------------------------------.
|
||||
* | | | MPRV | MPLY | MNXT | | | | PGUP| UP | PGDN|PSCR |
|
||||
* |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+
|
||||
* | | | MUTE | VOLD | VOLU | | | | LEFT| DOWN|RIGHT| |
|
||||
* |------+------+------+------+------+-----+-----+-----+-----+-----+-----+-----+
|
||||
* | | | MAIL | WBAK | WFWD | | | | HOME| | END | |
|
||||
* |------+------+------+------+------+-----+-----+-----+-----+-----------+-----+
|
||||
* | | | | | | DEL | | | | | |
|
||||
* `----------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_LOWER] = LAYOUT_planck_mit(KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_UP, KC_PGDN, KC_PSCR, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_MAIL, KC_WBAK, KC_WFWD, KC_NO, KC_NO, KC_NO, KC_HOME, KC_NO, KC_END, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||
|
||||
/* RAISE
|
||||
* ,--------------------------------------------------------------------------------.
|
||||
* | NLCK | 1 | 2 | 3 | - | | | | ! | # | $ | + |
|
||||
* |------+------+------+------+------+-----+-----+-----+------+------+------+------+
|
||||
* | / | 4 | 5 | 6 | + | | | | % | ! | ! | = |
|
||||
* |------+------+------+------+------+-----+-----+-----+------+------+------+------+
|
||||
* | * | 7 | 8 | 9 | , | | | | _ | - | @ | ~ |
|
||||
* |------+------+------+------+------+-----+-----+-----+------+------+------+------+
|
||||
* | | 0 | . | Ent | = | | | | | | ` |
|
||||
* `--------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_RAISE] = LAYOUT_planck_mit(KC_NUM, KC_P1, KC_P2, KC_P3, KC_PMNS, KC_NO, KC_NO, KC_NO, KC_EXLM, KC_HASH, KC_DLR, KC_PLUS, KC_PSLS, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_NO, KC_NO, KC_NO, KC_PERC, KC_ASTR, KC_AMPR, KC_EQL, KC_PAST, KC_P7, KC_P8, KC_P9, KC_PCMM, KC_NO, KC_NO, KC_NO, KC_UNDS, KC_MINS, KC_AT, KC_TILDE, KC_NO, KC_P0, KC_PDOT, KC_PENT, KC_PEQL, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_GRV),
|
||||
|
||||
/* Function (Lower + Raise)
|
||||
* ,-----------------------------------------------------------------------------------------------------------------------.
|
||||
* | QK_BOOT| LCA_T(F1) | LCA_T(F2) | LCA_T(F3) | LCA_T(F4) | LCA_T(F5) | LCA_T(F6) | LCA_T(F7) | | | | |
|
||||
* |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+
|
||||
* | | | | | | QWERTY | DVORAK | COLEMAK | | | | |
|
||||
* |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+
|
||||
* | | | | | | | | | | | | |
|
||||
* |------+------------+-----------+-----------+-----------+-----------+-----------+-----------+------+------+------+------+
|
||||
* | | | | | | LED | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_FUNCTION] = LAYOUT_planck_mit(QK_BOOT, LCA_T(KC_F1), LCA_T(KC_F2), LCA_T(KC_F3), LCA_T(KC_F4), LCA_T(KC_F5), LCA_T(KC_F6), LCA_T(KC_F7), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, QWERTY, DVORAK, COLEMAK, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, LED, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO)};
|
||||
|
||||
// constants to toggle LED behavior
|
||||
|
||||
// Setup config struct for LED
|
||||
typedef union {
|
||||
uint32_t raw;
|
||||
struct {
|
||||
bool red_mode : 1;
|
||||
bool green_mode : 1;
|
||||
};
|
||||
} led_config_t;
|
||||
led_config_t led_config;
|
||||
|
||||
void keyboard_post_init_user(void) { led_config.raw = eeconfig_read_user(); }
|
||||
|
||||
void eeconfig_init_user(void) { // EEPROM is getting reset!
|
||||
led_config.raw = 0;
|
||||
led_config.red_mode = LED_ON;
|
||||
led_config.green_mode = LED_ON;
|
||||
eeconfig_update_user(led_config.raw);
|
||||
eeconfig_update_user(led_config.raw);
|
||||
}
|
||||
|
||||
// When LOWER and RAISE are held together, go to the FUNCTION layer
|
||||
layer_state_t layer_state_set_user(layer_state_t state) { return update_tri_layer_state(state, _LOWER, _RAISE, _FUNCTION); }
|
||||
|
||||
// Runs constantly in the background, in a loop.
|
||||
void matrix_scan_user(void) {
|
||||
uint8_t layer = get_highest_layer(layer_state);
|
||||
|
||||
switch (layer) {
|
||||
case _LOWER:
|
||||
writePinHigh(LED_RED);
|
||||
break;
|
||||
case _RAISE:
|
||||
writePinHigh(LED_GREEN);
|
||||
break;
|
||||
default:
|
||||
writePinLow(LED_GREEN);
|
||||
writePinLow(LED_RED);
|
||||
}
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_QWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case COLEMAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_COLEMAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case DVORAK:
|
||||
if (record->event.pressed) {
|
||||
set_single_persistent_default_layer(_DVORAK);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case LED:
|
||||
if (record->event.pressed) {
|
||||
if (led_config.red_mode == LED_ON && led_config.green_mode == LED_ON) {
|
||||
led_config.red_mode = LED_OFF;
|
||||
led_config.green_mode = LED_OFF;
|
||||
} else if (led_config.red_mode == LED_OFF && led_config.green_mode == LED_OFF) {
|
||||
led_config.red_mode = LED_ON;
|
||||
led_config.green_mode = LED_ON;
|
||||
}
|
||||
}
|
||||
eeconfig_update_user(led_config.raw);
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
![Plaid Layout Image](https://i.imgur.com/WnVnwEG.png)
|
||||
|
||||
# The Half Deaf Chef Plaid Layout
|
||||
|
||||
Opinionated keymaps optimized for programmers. The Left and Right Shift tap as parenthesis and the bracket keys are to either side of the layer keys (LOWER, RAISE). A 'right-side' up number pad in a layer with a complementary 'symbol' pad on the opposite side. An additional layer is provided to switch to virtual console on Linux based systems running xorg. These changes are propagated among all the layouts.
|
|
@ -1,22 +0,0 @@
|
|||
/* Copyright 2019-2020 DMQ Design
|
||||
*
|
||||
* 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
|
||||
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
#define MIDI_ADVANCED
|
||||
|
|
@ -1,152 +0,0 @@
|
|||
/* Copyright 2019-2020 DMQ Design
|
||||
*
|
||||
* 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
|
||||
#include "midi.h"
|
||||
#include "qmk_midi.h"
|
||||
|
||||
enum layers
|
||||
{
|
||||
_BL,
|
||||
_FL,
|
||||
_TL
|
||||
};
|
||||
|
||||
uint8_t currentLayer;
|
||||
|
||||
//The below layers are intentionally empty in order to give a good starting point for how to configure multiple layers.
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BL] = LAYOUT(/* Base */
|
||||
KC_KP_7, KC_KP_8, KC_KP_9, TO(_BL),
|
||||
KC_KP_4, KC_KP_5, KC_KP_6, TO(_FL),
|
||||
KC_KP_1, KC_KP_2, KC_KP_3, TO(_TL),
|
||||
KC_KP_0, RGB_TOG, RGB_MOD
|
||||
),
|
||||
|
||||
[_FL] = LAYOUT(/* Base */
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_MS_BTN1, KC_NO, KC_MS_BTN2
|
||||
),
|
||||
|
||||
[_TL] = LAYOUT(/* Base */
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO
|
||||
)
|
||||
};
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
switch (currentLayer) { //break each encoder update into a switch statement for the current layer
|
||||
case _BL:
|
||||
if (clockwise) {
|
||||
rgblight_increase_hue();
|
||||
} else {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
break;
|
||||
case _FL:
|
||||
if (clockwise) {
|
||||
midi_send_cc(&midi_device, 0, 0x14, 1);
|
||||
} else {
|
||||
midi_send_cc(&midi_device, 0, 0x15, 1);
|
||||
}
|
||||
break;
|
||||
case _TL:
|
||||
if (clockwise) {
|
||||
midi_send_cc(&midi_device, 0, 0x1A, 1);
|
||||
} else {
|
||||
midi_send_cc(&midi_device, 0, 0x1B, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (index == 1) { /* Second encoder */
|
||||
switch (currentLayer) {
|
||||
case _BL:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
case _FL:
|
||||
if (clockwise) {
|
||||
midi_send_cc(&midi_device, 0, 0x16, 1);
|
||||
} else {
|
||||
midi_send_cc(&midi_device, 0, 0x17, 1);
|
||||
}
|
||||
break;
|
||||
case _TL:
|
||||
if (clockwise) {
|
||||
midi_send_cc(&midi_device, 0, 0x1C, 1);
|
||||
} else {
|
||||
midi_send_cc(&midi_device, 0, 0x1D, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (index == 2) { /* Third encoder */
|
||||
switch (currentLayer) {
|
||||
case _BL:
|
||||
if (clockwise) {
|
||||
rgblight_increase_val();
|
||||
} else {
|
||||
rgblight_decrease_val();
|
||||
}
|
||||
break;
|
||||
case _FL:
|
||||
if (clockwise) {
|
||||
midi_send_cc(&midi_device, 0, 0x18, 1);
|
||||
} else {
|
||||
midi_send_cc(&midi_device, 0, 0x19, 1);
|
||||
}
|
||||
break;
|
||||
case _TL:
|
||||
if (clockwise) {
|
||||
midi_send_cc(&midi_device, 0, 0x1E, 1);
|
||||
} else {
|
||||
midi_send_cc(&midi_device, 0, 0x1F, 1);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated
|
||||
currentLayer = get_highest_layer(state);
|
||||
|
||||
switch (currentLayer) {
|
||||
case _BL:
|
||||
setrgb(RGB_WHITE, &led[0]); //Set the top LED to white for the bottom layer
|
||||
setrgb(0, 0, 0, &led[1]);
|
||||
setrgb(0, 0, 0, &led[2]);
|
||||
break;
|
||||
case _FL:
|
||||
setrgb(0, 0, 0, &led[0]); //Set the middle LED to white for the middle layer
|
||||
setrgb(RGB_WHITE, &led[1]);
|
||||
setrgb(0, 0, 0, &led[2]);
|
||||
break;
|
||||
case _TL:
|
||||
setrgb(0, 0, 0, &led[0]);
|
||||
setrgb(0, 0, 0, &led[1]);
|
||||
setrgb(RGB_WHITE, &led[2]); //Set the bottom LED to white for the top layer
|
||||
break;
|
||||
}
|
||||
rgblight_set();
|
||||
return state;
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
# This keymap is intended to demonstrate how to implement different encoder functions dependent on layer, and on how to implement MIDI control with encoders.
|
|
@ -1,34 +0,0 @@
|
|||
/* Copyright 2019-2020 DMQ Design
|
||||
*
|
||||
* 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
|
||||
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_RGB_TEST
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
|
||||
// Use one or the other, determines the orientation of
|
||||
// the OLED display
|
||||
// #define RIGHT_HAND
|
||||
#define LEFT_HAND
|
|
@ -1,249 +0,0 @@
|
|||
/* Copyright 2019-2020 DMQ Design
|
||||
*
|
||||
* 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
|
||||
|
||||
enum layers {
|
||||
_NUMPAD,
|
||||
_RGB,
|
||||
_MACRO
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
HELLO_WORLD = SAFE_RANGE,
|
||||
};
|
||||
|
||||
//The below layers are intentionally empty in order to give a good starting point for how to configure multiple layers.
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_NUMPAD] = LAYOUT(/* Base */
|
||||
KC_7, KC_8, KC_9, TO(_NUMPAD),
|
||||
KC_4, KC_5, KC_6, TO(_RGB),
|
||||
KC_1, KC_2, KC_3, TO(_MACRO),
|
||||
KC_0, KC_DOT, KC_ENTER
|
||||
),
|
||||
|
||||
[_RGB] = LAYOUT(/* Base */
|
||||
RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
RGB_RMOD, RGB_TOG, RGB_MOD
|
||||
),
|
||||
|
||||
[_MACRO] = LAYOUT(/* Base */
|
||||
HELLO_WORLD, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO
|
||||
)
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case HELLO_WORLD:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("Hello, world!");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) { /* First encoder */
|
||||
switch (get_highest_layer(layer_state)) { //break each encoder update into a switch statement for the current layer
|
||||
case _NUMPAD:
|
||||
if (clockwise) {
|
||||
tap_code(KC_DOWN);
|
||||
} else {
|
||||
tap_code(KC_UP);
|
||||
}
|
||||
break;
|
||||
case _RGB:
|
||||
if (clockwise) {
|
||||
rgblight_increase_hue();
|
||||
} else {
|
||||
rgblight_decrease_hue();
|
||||
}
|
||||
break;
|
||||
case _MACRO:
|
||||
if (clockwise) {
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (index == 1) { /* Second encoder */
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _NUMPAD:
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
break;
|
||||
case _RGB:
|
||||
if (clockwise) {
|
||||
rgblight_increase_sat();
|
||||
} else {
|
||||
rgblight_decrease_sat();
|
||||
}
|
||||
break;
|
||||
case _MACRO:
|
||||
if (clockwise) {
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (index == 2) { /* Third encoder */
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _NUMPAD:
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
case _RGB:
|
||||
if (clockwise) {
|
||||
rgblight_increase_val();
|
||||
} else {
|
||||
rgblight_decrease_val();
|
||||
}
|
||||
break;
|
||||
case _MACRO:
|
||||
if (clockwise) {
|
||||
break;
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) { //This will run every time the layer is updated
|
||||
switch (get_highest_layer(state)) {
|
||||
case _NUMPAD:
|
||||
setrgb(RGB_WHITE, &led[0]); //Set the top LED to white for the bottom layer
|
||||
setrgb(0, 0, 0, &led[1]);
|
||||
setrgb(0, 0, 0, &led[2]);
|
||||
break;
|
||||
case _RGB:
|
||||
setrgb(0, 0, 0, &led[0]); //Set the middle LED to white for the middle layer
|
||||
setrgb(RGB_WHITE, &led[1]);
|
||||
setrgb(0, 0, 0, &led[2]);
|
||||
break;
|
||||
case _MACRO:
|
||||
setrgb(0, 0, 0, &led[0]);
|
||||
setrgb(0, 0, 0, &led[1]);
|
||||
setrgb(RGB_WHITE, &led[2]); //Set the bottom LED to white for the top layer
|
||||
break;
|
||||
}
|
||||
rgblight_set();
|
||||
return state;
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
|
||||
static const char *ANIMATION_NAMES[] = {
|
||||
"unknown",
|
||||
"static",
|
||||
"breathing I",
|
||||
"breathing II",
|
||||
"breathing III",
|
||||
"breathing IV",
|
||||
"rainbow mood I",
|
||||
"rainbow mood II",
|
||||
"rainbow mood III",
|
||||
"rainbow swirl I",
|
||||
"rainbow swirl II",
|
||||
"rainbow swirl III",
|
||||
"rainbow swirl IV",
|
||||
"rainbow swirl V",
|
||||
"rainbow swirl VI",
|
||||
"snake I",
|
||||
"snake II",
|
||||
"snake III",
|
||||
"snake IV",
|
||||
"snake V",
|
||||
"snake VI",
|
||||
"knight I",
|
||||
"knight II",
|
||||
"knight III",
|
||||
"christmas",
|
||||
"static gradient I",
|
||||
"static gradient II",
|
||||
"static gradient III",
|
||||
"static gradient IV",
|
||||
"static gradient V",
|
||||
"static gradient VI",
|
||||
"static gradient VII",
|
||||
"static gradient VIII",
|
||||
"static gradient IX",
|
||||
"static gradient X",
|
||||
"rgb test",
|
||||
"alternating",
|
||||
"twinkle I",
|
||||
"twinkle II",
|
||||
"twinkle III",
|
||||
"twinkle IV",
|
||||
"twinkle V",
|
||||
"twinkle VI"
|
||||
};
|
||||
|
||||
void rgblight_get_mode_name(uint8_t mode, size_t bufsize, char *buf) {
|
||||
snprintf(buf, bufsize, "%-25s", ANIMATION_NAMES[mode]);
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
#ifdef LEFT_HAND
|
||||
return OLED_ROTATION_180;
|
||||
#else
|
||||
return OLED_ROTATION_0;
|
||||
#endif
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
// Host Keyboard Layer Status
|
||||
oled_write_P(PSTR("Layer: "), false);
|
||||
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _NUMPAD:
|
||||
oled_write_P(PSTR("Numpad\n"), false);
|
||||
break;
|
||||
case _RGB:
|
||||
oled_write_P(PSTR("RGB\n"), false);
|
||||
break;
|
||||
case _MACRO:
|
||||
oled_write_P(PSTR("Macro\n"), false);
|
||||
break;
|
||||
default:
|
||||
// Or use the write_ln shortcut over adding '\n' to the end of your string
|
||||
oled_write_ln_P(PSTR("Undefined"), false);
|
||||
}
|
||||
|
||||
static char rgb_mode_name[30];
|
||||
rgblight_get_mode_name(rgblight_get_mode(), sizeof(rgb_mode_name), rgb_mode_name);
|
||||
|
||||
oled_write_P(PSTR("Mode: "), false);
|
||||
oled_write_ln(rgb_mode_name, false);
|
||||
return false;
|
||||
}
|
||||
#endif
|
|
@ -1,7 +0,0 @@
|
|||
# Keymap for Spin
|
||||
|
||||
* Encoder button push changes layers
|
||||
* First layer is a number pad
|
||||
* Second layer is RGB control layer
|
||||
* Third layer is macro layer
|
||||
* OLED support
|
|
@ -1,3 +0,0 @@
|
|||
OLED_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = no
|
||||
MIDI_ENABLE = no
|
|
@ -1,41 +0,0 @@
|
|||
/* Copyright 2019-2020 DMQ Design
|
||||
*
|
||||
* 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
|
||||
|
||||
#define RGBLIGHT_HUE_STEP 8
|
||||
|
||||
// place overrides here
|
||||
|
||||
#define NO_ACTION_ONESHOT
|
||||
#undef LOCKING_SUPPORT_ENABLE
|
||||
|
||||
#define LAYER_STATE_8BIT
|
||||
#define MAX_LAYER 5
|
||||
|
||||
#define RGBLIGHT_EFFECT_BREATHING
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_MOOD
|
||||
#define RGBLIGHT_EFFECT_RAINBOW_SWIRL
|
||||
#define RGBLIGHT_EFFECT_SNAKE
|
||||
#define RGBLIGHT_EFFECT_KNIGHT
|
||||
#define RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#define RGBLIGHT_EFFECT_ALTERNATING
|
||||
#define RGBLIGHT_EFFECT_TWINKLE
|
||||
|
||||
#define RGBLIGHT_SLEEP
|
||||
#define RGBLIGHT_LAYERS
|
||||
#define RGBLIGHT_LAYER_BLINK
|
||||
#define RGBLIGHT_LAYERS_OVERRIDE_RGB_OFF
|
|
@ -1,221 +0,0 @@
|
|||
/* Copyright 2020 Joshua Moses Diamond
|
||||
*
|
||||
* 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
|
||||
|
||||
#include "version.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#define RGB_LAYER_ACK_DURATION 500
|
||||
|
||||
enum layers { _MACRO, _NUMPAD, _CURSOR, _RGB, _FN };
|
||||
|
||||
enum layer_base {
|
||||
LAYER_BASE = _MACRO,
|
||||
LAYER_BASE_END = _FN + 1,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
HELLO = SAFE_RANGE,
|
||||
CH_SUSP, // Suspend
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_MACRO] = LAYOUT(
|
||||
A(S(KC_N)), HELLO, CH_SUSP, TO(_MACRO),
|
||||
KC_MPRV, KC_MPLY, KC_MNXT, TO(_NUMPAD),
|
||||
C(A(KC_COMM)), KC_F5, C(A(KC_DOT)), TO(_RGB),
|
||||
MO(_FN), KC_ASST, KC_CPNL),
|
||||
|
||||
[_NUMPAD] = LAYOUT(
|
||||
KC_KP_7, KC_KP_8, KC_KP_9, KC_TRNS,
|
||||
KC_KP_4, KC_KP_5, KC_KP_6, TO(_CURSOR),
|
||||
KC_KP_1, KC_KP_2, KC_KP_3, KC_TRNS,
|
||||
KC_KP_0, KC_PDOT, KC_PENT),
|
||||
|
||||
[_CURSOR] = LAYOUT(
|
||||
KC_HOME, KC_UP, KC_PGUP, KC_TRNS,
|
||||
KC_LEFT, KC_NO, KC_RIGHT, TO(_NUMPAD),
|
||||
KC_END, KC_DOWN, KC_PGDN, KC_TRNS,
|
||||
KC_INS, KC_DEL, KC_PENT),
|
||||
|
||||
[_RGB] = LAYOUT(
|
||||
RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS,
|
||||
RGB_HUD, RGB_SAD, RGB_VAD, TO(_NUMPAD),
|
||||
RGB_SPD, RGB_SPI, KC_NO, KC_TRNS,
|
||||
RGB_RMOD, RGB_TOG, RGB_MOD),
|
||||
|
||||
[_FN] = LAYOUT(
|
||||
KC_NO, DB_TOGG, QK_BOOT, KC_TRNS,
|
||||
KC_NO, KC_NO, EE_CLR, KC_TRNS,
|
||||
KC_NO, KC_NO, KC_NO, KC_TRNS,
|
||||
KC_TRNS, KC_NO, KC_NO),
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[_MACRO] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(C(KC_MINS), C(KC_EQL)), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_NUMPAD] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(C(KC_MINS), C(KC_EQL)), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_CURSOR] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(C(KC_MINS), C(KC_EQL)), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
[_RGB] = { ENCODER_CCW_CW(RGB_HUD, RGB_HUI ), ENCODER_CCW_CW(RGB_SAD, RGB_SAI ), ENCODER_CCW_CW(RGB_VAD, RGB_VAI) },
|
||||
[_FN] = { ENCODER_CCW_CW(KC_BRID, KC_BRIU), ENCODER_CCW_CW(C(KC_MINS), C(KC_EQL)), ENCODER_CCW_CW(KC_VOLD, KC_VOLU) },
|
||||
};
|
||||
|
||||
// clang-format on
|
||||
|
||||
typedef enum layer_ack {
|
||||
ACK_NO = 0,
|
||||
ACK_YES,
|
||||
ACK_MEH,
|
||||
} layer_ack_t;
|
||||
|
||||
#define LAYER_OFFSET 0
|
||||
const rgblight_segment_t PROGMEM _macro_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 1, HSV_TEAL});
|
||||
const rgblight_segment_t PROGMEM _numpad_layer[] = RGBLIGHT_LAYER_SEGMENTS({1, 1, HSV_TEAL});
|
||||
const rgblight_segment_t PROGMEM _cursor_layer[] = RGBLIGHT_LAYER_SEGMENTS({1, 1, HSV_BLUE});
|
||||
const rgblight_segment_t PROGMEM _rgb_layer[] = RGBLIGHT_LAYER_SEGMENTS({2, 1, HSV_TEAL});
|
||||
const rgblight_segment_t PROGMEM _fn_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_PURPLE});
|
||||
|
||||
#define ACK_OFFSET 4
|
||||
const rgblight_segment_t PROGMEM _no_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_RED});
|
||||
const rgblight_segment_t PROGMEM _yes_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_GREEN});
|
||||
const rgblight_segment_t PROGMEM _meh_layer[] = RGBLIGHT_LAYER_SEGMENTS({0, 3, HSV_YELLOW});
|
||||
|
||||
// clang-format on
|
||||
const rgblight_segment_t *const PROGMEM _rgb_layers[] = {
|
||||
[LAYER_OFFSET + 0] = _macro_layer,
|
||||
[LAYER_OFFSET + 1] = _numpad_layer,
|
||||
[LAYER_OFFSET + 2] = _cursor_layer,
|
||||
[LAYER_OFFSET + 3] = _rgb_layer,
|
||||
[LAYER_OFFSET + 4] = _fn_layer,
|
||||
|
||||
[ACK_OFFSET + ACK_NO] = _no_layer,
|
||||
[ACK_OFFSET + ACK_YES] = _yes_layer,
|
||||
[ACK_OFFSET + ACK_MEH] = _meh_layer,
|
||||
|
||||
[ACK_OFFSET + ACK_MEH + 1] = NULL
|
||||
};
|
||||
// clang-format off
|
||||
|
||||
const uint8_t PROGMEM _n_rgb_layers = ARRAY_SIZE(_rgb_layers) - 1;
|
||||
|
||||
void clear_rgb_layers(void) {
|
||||
dprint("clear_rgb_layers()\n");
|
||||
for (uint8_t i = 0; i < _n_rgb_layers; i++) {
|
||||
rgblight_set_layer_state(i, false);
|
||||
}
|
||||
}
|
||||
|
||||
void do_rgb_layers(layer_state_t state, uint8_t start, uint8_t end) {
|
||||
dprintf("start=%u, end=%u, LAYER_OFFSET=%u\n", start, end, LAYER_OFFSET);
|
||||
for (uint8_t i = start; i < end; i++) {
|
||||
bool is_on = layer_state_cmp(state, i);
|
||||
uint8_t rl = LAYER_OFFSET + i;
|
||||
dprintf("layer[%u]=%u, rl=%u\n", i, is_on, rl);
|
||||
rgblight_set_layer_state(rl, is_on);
|
||||
}
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
do_rgb_layers(state, LAYER_BASE, LAYER_BASE_END);
|
||||
return state;
|
||||
}
|
||||
|
||||
void rgb_layer_ack(layer_ack_t n) {
|
||||
uint8_t layer = ACK_OFFSET + n;
|
||||
dprintf("rgb_layer_ack(%u) ==> %u\n", n, layer);
|
||||
rgblight_blink_layer(layer, RGB_LAYER_ACK_DURATION);
|
||||
}
|
||||
|
||||
void rgb_layer_ack_yn(bool yn) { rgb_layer_ack(yn ? ACK_YES : ACK_NO); }
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = _rgb_layers;
|
||||
do_rgb_layers(layer_state, LAYER_BASE, LAYER_BASE_END);
|
||||
}
|
||||
|
||||
bool shutdown_user(bool jump_to_bootloader) {
|
||||
clear_rgb_layers();
|
||||
rgblight_enable();
|
||||
rgblight_mode_noeeprom(RGBLIGHT_MODE_STATIC_LIGHT);
|
||||
rgblight_sethsv_noeeprom(HSV_RED);
|
||||
return false;
|
||||
}
|
||||
|
||||
void spidey_glow(void) {
|
||||
rgblight_enable();
|
||||
rgblight_mode(RGBLIGHT_MODE_RAINBOW_MOOD);
|
||||
rgblight_sethsv(255, 230, 128);
|
||||
}
|
||||
|
||||
void eeconfig_init_user(void) {
|
||||
spidey_glow();
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
dprintf("key event: kc: %02X, col: %02u, row: %02u, pressed: %u mods: %08b "
|
||||
#if !defined(NO_ACTION_ONESHOT)
|
||||
"os: %08b "
|
||||
#endif
|
||||
"weak: %08b\n",
|
||||
keycode, record->event.key.col, record->event.key.row, record->event.pressed, bitrev(get_mods()),
|
||||
#if !defined(NO_ACTION_ONESHOT)
|
||||
bitrev(get_oneshot_mods()),
|
||||
#endif
|
||||
bitrev(get_weak_mods()));
|
||||
|
||||
if (record->event.pressed) {
|
||||
switch (keycode) {
|
||||
// Re-implement this here, but fix the persistence!
|
||||
case QK_DEBUG_TOGGLE:
|
||||
if (!debug_enable) {
|
||||
debug_enable = 1;
|
||||
} else if (!debug_keyboard) {
|
||||
debug_keyboard = 1;
|
||||
} else if (!debug_matrix) {
|
||||
debug_matrix = 1;
|
||||
} else {
|
||||
debug_enable = 0;
|
||||
debug_keyboard = 0;
|
||||
debug_matrix = 0;
|
||||
}
|
||||
uprintf("DEBUG: enable=%u, keyboard=%u, matrix=%u\n", debug_enable, debug_keyboard, debug_matrix);
|
||||
uprintln(QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION ", Built on: " QMK_BUILDDATE);
|
||||
eeconfig_update_debug(debug_config.raw);
|
||||
return false;
|
||||
|
||||
// clang-format off
|
||||
case CH_SUSP: tap_code16(LGUI(LSFT(KC_L))); return true;
|
||||
case HELLO: SEND_STRING("Hello, world!"); return true;
|
||||
// clang-format on
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
};
|
||||
|
||||
|
||||
void post_process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
// Acks follow...
|
||||
case QK_DEBUG_TOGGLE:
|
||||
rgb_layer_ack_yn(debug_enable);
|
||||
break;
|
||||
case RGB_TOG:
|
||||
rgb_layer_ack_yn(rgblight_is_enabled());
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
spidey3 keymap for spin keypad
|
|
@ -1,7 +0,0 @@
|
|||
MOUSEKEY_ENABLE = no
|
||||
MIDI_ENABLE = no
|
||||
BOOTMAGIC_ENABLE = yes
|
||||
LTO_ENABLE = yes
|
||||
CONSOLE_ENABLE = yes
|
||||
GRAVE_ESC_ENABLE = no
|
||||
ENCODER_MAP_ENABLE = yes
|
|
@ -1,135 +0,0 @@
|
|||
/* Copyright 2022 DOIO
|
||||
* Copyright 2022 HorrorTroll <https://github.com/HorrorTroll>
|
||||
* Copyright 2022 Ryan Anderson <ryan@michonline.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/>.
|
||||
*/
|
||||
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
// OLED animation
|
||||
#include "lib/layer_status/layer_status.h"
|
||||
|
||||
// Each layer gets a name for readability, which is then used in the keymap matrix below.
|
||||
// The underscores don't mean anything - you can have a layer called STUFF or any other name.
|
||||
// Layer names don't all need to be of the same length, obviously, and you can also skip them
|
||||
// entirely and just use numbers.
|
||||
|
||||
enum layer_names {
|
||||
_BASE = 0,
|
||||
_FN,
|
||||
_FN1,
|
||||
_FN2,
|
||||
};
|
||||
|
||||
// enum layer_keycodes { };
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
|
||||
│C-D│C-E│M-D│M-E│ │Ply│ │TO1│
|
||||
├───┼───┼───┼───┤ └───┘ └───┘
|
||||
│ 5 │ 6 │ 7 │ 8 │
|
||||
├───┼───┼───┼───┤
|
||||
│ 9 │ 0 │ ↑ │Ent│ ┌───┐
|
||||
├───┼───┼───┼───┤ │Mut│
|
||||
│Fn2│ ← │ ↓ │ → │ └───┘
|
||||
└───┴───┴───┴───┘
|
||||
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
|
||||
│ ! │ @ │ # │ $ │ │ │ │ │
|
||||
├───┼───┼───┼───┤ └───┘ └───┘
|
||||
│ % │ ^ │ & │ * │
|
||||
├───┼───┼───┼───┤
|
||||
│ ( │ ) │ │ │ ┌───┐
|
||||
├───┼───┼───┼───┤ │ │
|
||||
│ │ │ │ │ └───┘
|
||||
└───┴───┴───┴───┘
|
||||
*/
|
||||
/* Row: 0 1 2 3 4 5 6 */
|
||||
[_BASE] = LAYOUT(C(KC_D), C(KC_E), LCMD(KC_D), LCMD(KC_E), KC_MPLY,
|
||||
KC_5, KC_6, LCTL(LCMD(KC_H)), KC_8, TO(_FN),
|
||||
KC_9, KC_0, KC_UP, KC_ENT, KC_MUTE,
|
||||
MO(_FN2), KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/*
|
||||
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
|
||||
│ │ │ │ │ │ │ │ │
|
||||
├───┼───┼───┼───┤ └───┘ └───┘
|
||||
│ │ │ │ │
|
||||
├───┼───┼───┼───┤
|
||||
│ │ │ │ │ ┌───┐
|
||||
├───┼───┼───┼───┤ │ │
|
||||
│ │ │ │ │ └───┘
|
||||
└───┴───┴───┴───┘
|
||||
*/
|
||||
/* Row: 0 1 2 3 4 5 6 */
|
||||
[_FN] = LAYOUT(_______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, TO(_FN1),
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______),
|
||||
|
||||
/*
|
||||
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
|
||||
│ │ │ │ │ │ │ │ │
|
||||
├───┼───┼───┼───┤ └───┘ └───┘
|
||||
│ │ │ │ │
|
||||
├───┼───┼───┼───┤
|
||||
│ │ │ │ │ ┌───┐
|
||||
├───┼───┼───┼───┤ │ │
|
||||
│ │ │ │ │ └───┘
|
||||
└───┴───┴───┴───┘
|
||||
*/
|
||||
/* Row: 0 1 2 3 4 5 6 */
|
||||
[_FN1] = LAYOUT(_______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, TO(_FN2),
|
||||
_______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______),
|
||||
|
||||
/*
|
||||
┌───┬───┬───┬───┐ ┌───┐ ┌───┐
|
||||
│Spi│Spd│ │ │ │ │ │TO0│
|
||||
├───┼───┼───┼───┤ └───┘ └───┘
|
||||
│Sai│Sad│ │ │
|
||||
├───┼───┼───┼───┤
|
||||
│Tog│Mod│Hui│ │ ┌───┐
|
||||
├───┼───┼───┼───┤ │ │
|
||||
│ │Vai│Hud│Vad│ └───┘
|
||||
└───┴───┴───┴───┘
|
||||
*/
|
||||
/* Row: 0 1 2 3 4 5 6 */
|
||||
[_FN2] = LAYOUT(RGB_SPI, RGB_SPD, _______, QK_BOOT, _______,
|
||||
RGB_SAI, RGB_SAD, _______, _______, TO(_BASE),
|
||||
RGB_TOG, RGB_MOD, RGB_HUI, _______, _______,
|
||||
_______, RGB_VAI, RGB_HUD, RGB_VAD),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
bool oled_task_user(void) {
|
||||
render_layer_status();
|
||||
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_MAP_ENABLE
|
||||
const uint16_t PROGMEM encoder_map[][NUM_ENCODERS][NUM_DIRECTIONS] = {
|
||||
[_BASE] = {ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[_FN] = {ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[_FN2] = {ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
[_BASE] = {ENCODER_CCW_CW(KC_MPRV, KC_MNXT), ENCODER_CCW_CW(KC_PGDN, KC_PGUP), ENCODER_CCW_CW(KC_VOLD, KC_VOLU)},
|
||||
};
|
||||
#endif
|
|
@ -1,10 +0,0 @@
|
|||
# pugmajere's Google Meet optimized version of the default keymap
|
||||
|
||||
A lightly modified version of the default keymap.
|
||||
|
||||
The top row is converted to keys used for muting audio and video in
|
||||
Google Meet, in both Linux and MacOS. (Yes, they annoyingly have
|
||||
different conventions.)
|
||||
|
||||
The ASCII-art depiction uses "C-E" to mean "ctrl-e", and "M-E" to mean
|
||||
CMD(GUI) and "e", roughly following Emacs naming conventions.
|
|
@ -1,2 +0,0 @@
|
|||
# Encoder enabled
|
||||
ENCODER_MAP_ENABLE = yes
|
|
@ -1,29 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 DonutCables
|
||||
|
||||
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
|
||||
|
||||
// place overrides here
|
||||
|
||||
#undef RGBLIGHT_EFFECT_KNIGHT
|
||||
#undef RGBLIGHT_EFFECT_CHRISTMAS
|
||||
#undef RGBLIGHT_EFFECT_STATIC_GRADIENT
|
||||
#undef RGBLIGHT_EFFECT_RGB_TEST
|
||||
#undef RGBLIGHT_EFFECT_ALTERNATING
|
||||
#undef RGBLIGHT_EFFECT_TWINKLE
|
||||
|
||||
#define UNICODE_KEY_WINC KC_RGUI
|
|
@ -1,171 +0,0 @@
|
|||
/*
|
||||
Copyright 2020 DonutCables
|
||||
|
||||
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
|
||||
|
||||
enum layer_names {
|
||||
_BASE,
|
||||
_B,
|
||||
_FN1,
|
||||
_FN2,
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
img = SAFE_RANGE,
|
||||
xkcd,
|
||||
CD,
|
||||
AES,
|
||||
/* Unicode strings maps */
|
||||
ALT0,
|
||||
ALT1,
|
||||
ALT2,
|
||||
ALT3,
|
||||
ALT4,
|
||||
ALT5,
|
||||
ALT6,
|
||||
ALT7,
|
||||
/* Discord emotes maps */
|
||||
B,
|
||||
X,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Base */
|
||||
[_BASE] = LAYOUT_96_ansi_2_right_mod(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_INS, KC_END, KC_MPRV, KC_MPLY, KC_MNXT,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DEL, KC_PSCR, KC_PSLS, KC_PAST,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS,
|
||||
MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS,
|
||||
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_UP, KC_P1, KC_P2, KC_P3,
|
||||
KC_LCTL, MO(2), KC_RALT, KC_SPC, KC_CALC, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT),
|
||||
|
||||
/* (1) Bmode layer */
|
||||
[_B] = LAYOUT_96_ansi_2_right_mod(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, B, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
/* (2) Fn 1 */
|
||||
[_FN1] = LAYOUT_96_ansi_2_right_mod(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_PGDN, TG(1), KC_PGUP, KC_VOLD, KC_MUTE, KC_VOLU,
|
||||
ALT0, _______, _______, ALT1, _______, _______, _______, _______, _______, _______, _______, _______, ALT2, _______, _______, KC_NUM, _______, _______,
|
||||
_______, CD, _______, _______, _______, ALT3, _______, _______, _______, ALT4, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, AES, xkcd, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
KC_CAPS, _______, X, _______, img, B, _______, ALT7, ALT5, ALT6, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, KC_LALT, _______, _______, _______, _______, _______, _______, _______, _______, _______),
|
||||
|
||||
/* (3) Fn 2 */
|
||||
[_FN2] = LAYOUT_96_ansi_2_right_mod(
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, UC_WINC, EE_CLR, QK_BOOT,
|
||||
VK_TOGG, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
RGB_TOG, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
_______, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO),
|
||||
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case xkcd:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("https://xkcd.com/927/");
|
||||
}
|
||||
return true;
|
||||
case CD:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("cd d:/keyboard_stuff/gits/qmk_firmware");
|
||||
}
|
||||
return true;
|
||||
case AES:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("***A E S T H E T I C S***");
|
||||
}
|
||||
return true;
|
||||
case img:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("[url=" SS_LCTL("v") "][img]" SS_LCTL("v") "[/img][/url]");
|
||||
}
|
||||
return true;
|
||||
case ALT0:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("≈");
|
||||
}
|
||||
return true;
|
||||
case ALT1:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("π");
|
||||
}
|
||||
return true;
|
||||
case ALT2:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("±");
|
||||
}
|
||||
return true;
|
||||
case ALT3:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("™");
|
||||
}
|
||||
return true;
|
||||
case ALT4:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("Ω");
|
||||
}
|
||||
return true;
|
||||
case ALT5:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("≤");
|
||||
}
|
||||
return true;
|
||||
case ALT6:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("≥");
|
||||
}
|
||||
return true;
|
||||
case ALT7:
|
||||
if (record->event.pressed) {
|
||||
send_unicode_string("ゴ");
|
||||
}
|
||||
return true;
|
||||
case B:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(":b:");
|
||||
}
|
||||
return true;
|
||||
case X:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING(":x:");
|
||||
}
|
||||
return true;
|
||||
case KC_A ... KC_Z:
|
||||
case KC_1 ... KC_0:
|
||||
if (layer_state_is(1)) {
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_F13);
|
||||
tap_code(keycode);
|
||||
unregister_code(KC_F13);
|
||||
}
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
# My personal keymap for Budget96
|
||||
|
||||
My daily map for the Budget96. Includes unicode and masked characters for AHK pickup.
|
|
@ -1,7 +0,0 @@
|
|||
VELOCIKEY_ENABLE = yes
|
||||
UNICODE_ENABLE = yes
|
||||
BACKLIGHT_ENABLE = no
|
||||
MOUSEKEY_ENABLE = no
|
||||
COMMAND_ENABLE = no
|
||||
SPACE_CADET_ENABLE = no
|
||||
GRAVE_ESC_ENABLE = no
|
|
@ -1,62 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
#include <stdlib.h>
|
||||
|
||||
static uint16_t keystroke;
|
||||
static bool shift_pressed;
|
||||
|
||||
static int lower = (int) KC_A;
|
||||
static int upper = (int) KC_Z;
|
||||
|
||||
uint16_t random_keycode(void) {
|
||||
return lower + (rand() % (upper - lower + 1));
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
RND_KEY = SAFE_RANGE
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch(keycode) {
|
||||
case RND_KEY:
|
||||
if (record->event.pressed) {
|
||||
keystroke = random_keycode();
|
||||
if (rand() % 2 > 0) {
|
||||
shift_pressed = 1;
|
||||
register_code(KC_LSFT);
|
||||
}
|
||||
register_code(keystroke);
|
||||
} else {
|
||||
if (shift_pressed > 0) {
|
||||
unregister_code(KC_LSFT);
|
||||
}
|
||||
unregister_code(keystroke);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT( /* Base */
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, QK_BOOT, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY,
|
||||
RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY, RND_KEY
|
||||
),
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
# Scrabblepad keymap with every key press random
|
||||
|
||||
Every key produces a random key press, except the middle key, which is reserved for resetting the board.
|
||||
|
||||
The random key press is selected between KC_A and KC_Z keycodes.
|
|
@ -1,32 +0,0 @@
|
|||
/**
|
||||
* keymap.c
|
||||
*
|
||||
Copyright 2020 astro <yuleiz@gmail.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/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_ansi_split_bs_rshift(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_DEL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT,KC_RGUI, TG(1), KC_RCTL),
|
||||
|
||||
[1] = LAYOUT_60_ansi_split_bs_rshift(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,KC_PSCR,
|
||||
QK_BOOT, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,
|
||||
_______, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______,
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
_______,_______,_______, _______, _______,_______,TG(0),_______),
|
||||
};
|
|
@ -1 +0,0 @@
|
|||
RGBLIGHT_ENABLE = yes
|
|
@ -1,24 +0,0 @@
|
|||
/**
|
||||
* config.h
|
||||
*
|
||||
Copyright 2020 astro <yuleiz@gmail.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
|
||||
|
||||
|
||||
#define RGB_INDICATOR_NUM 8
|
||||
#undef RGBLED_NUM
|
||||
#define RGBLED_NUM (18+RGB_INDICATOR_NUM)
|
||||
|
||||
#define RGB_INDICATOR_PIN B1
|
||||
#define RGBLIGHT_LAYERS
|
|
@ -1,96 +0,0 @@
|
|||
/**
|
||||
* indicator.c
|
||||
*
|
||||
Copyright 2020 astro <yuleiz@gmail.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/>.
|
||||
*/
|
||||
|
||||
#include "dp60.h"
|
||||
|
||||
#include "rgblight.h"
|
||||
|
||||
|
||||
// caps led
|
||||
const rgblight_segment_t PROGMEM dp60_capslock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{18, 1, HSV_RED}
|
||||
);
|
||||
|
||||
// scroll led
|
||||
const rgblight_segment_t PROGMEM dp60_scrolllock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{19, 1, HSV_GREEN}
|
||||
);
|
||||
|
||||
// num led
|
||||
const rgblight_segment_t PROGMEM dp60_numlock_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{20, 1, HSV_BLUE}
|
||||
);
|
||||
|
||||
// light 21 to 26 for layer 1-5
|
||||
const rgblight_segment_t PROGMEM dp60_layer1_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{21, 1, HSV_PURPLE}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM dp60_layer2_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{22, 1, HSV_CYAN}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM dp60_layer3_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{23, 1, HSV_YELLOW}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM dp60_layer4_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{24, 1, HSV_PINK}
|
||||
);
|
||||
const rgblight_segment_t PROGMEM dp60_layer5_layer[] = RGBLIGHT_LAYER_SEGMENTS(
|
||||
{25, 1, HSV_ORANGE}
|
||||
);
|
||||
|
||||
// rgb light layers
|
||||
const rgblight_segment_t* const PROGMEM dp60_rgb_layers[] = RGBLIGHT_LAYERS_LIST(
|
||||
dp60_capslock_layer,
|
||||
dp60_scrolllock_layer,
|
||||
dp60_numlock_layer,
|
||||
dp60_layer1_layer,
|
||||
dp60_layer2_layer,
|
||||
dp60_layer3_layer,
|
||||
dp60_layer4_layer,
|
||||
dp60_layer5_layer
|
||||
);
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
// Enable the LED layers
|
||||
rgblight_layers = dp60_rgb_layers;
|
||||
}
|
||||
|
||||
extern rgblight_config_t rgblight_config;
|
||||
extern void rgblight_layers_write(void);
|
||||
extern void indicator_write(rgb_led_t *start_led, uint8_t num_leds);
|
||||
|
||||
void rgblight_call_driver(rgb_led_t *start_led, uint8_t num_leds)
|
||||
{
|
||||
ws2812_setleds(start_led, RGBLED_NUM-RGB_INDICATOR_NUM);
|
||||
|
||||
indicator_write(start_led + (RGBLED_NUM - RGB_INDICATOR_NUM), RGB_INDICATOR_NUM);
|
||||
}
|
||||
|
||||
void led_update_ports(led_t led_state) {
|
||||
rgblight_set_layer_state(0, led_state.caps_lock);
|
||||
rgblight_set_layer_state(1, led_state.scroll_lock);
|
||||
rgblight_set_layer_state(2, led_state.num_lock);
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_kb(layer_state_t state) {
|
||||
state = layer_state_set_user(state);
|
||||
rgblight_set_layer_state(3, layer_state_cmp(state, 1));
|
||||
rgblight_set_layer_state(4, layer_state_cmp(state, 2));
|
||||
rgblight_set_layer_state(5, layer_state_cmp(state, 3));
|
||||
rgblight_set_layer_state(6, layer_state_cmp(state, 4));
|
||||
rgblight_set_layer_state(7, layer_state_cmp(state, 5));
|
||||
return state;
|
||||
}
|
|
@ -1,32 +0,0 @@
|
|||
/**
|
||||
* keymap.c
|
||||
*
|
||||
Copyright 2020 astro <yuleiz@gmail.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/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT_60_hhkb(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS, KC_GRV,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||
KC_LGUI, KC_LALT, LT(1,KC_SPC), KC_RALT,KC_RGUI ),
|
||||
|
||||
[1] = LAYOUT_60_hhkb(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,_______,KC_PSCR,
|
||||
QK_BOOT, RGB_TOG,RGB_MOD,_______,KC_F13,KC_F14,_______,_______,_______,_______,_______,KC_PGUP,KC_PGDN,_______,
|
||||
KC_CAPS, _______,_______,_______,_______,_______,KC_LEFT,KC_DOWN, KC_UP,KC_RIGHT,KC_HOME,KC_END,_______,
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
_______,_______, _______, _______,_______),
|
||||
};
|
|
@ -1,26 +0,0 @@
|
|||
/**
|
||||
* led_driver.c
|
||||
*
|
||||
Copyright 2020 astro <yuleiz@gmail.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/>.
|
||||
*/
|
||||
|
||||
#undef WS2812_DI_PIN
|
||||
#define WS2812_DI_PIN RGB_INDICATOR_PIN
|
||||
#define ws2812_setleds indicator_setleds
|
||||
#define ws2812_setleds_pin indicator_setleds_pin
|
||||
#include "ws2812_bitbang.c"
|
||||
|
||||
void indicator_write(rgb_led_t *start_led, uint8_t num_leds)
|
||||
{
|
||||
indicator_setleds(start_led, num_leds);
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
Indicator RGB leds support for the open source viper/eagle fr4 [plate](https://github.com/yulei/viper_plate.git)
|
||||
|
||||
Three wires need to be soldered:
|
||||
|
||||
B1 pin (SCLK at the board) to the plate's D pin
|
||||
|
||||
VCC to plate's V
|
||||
|
||||
GND to plate's G
|
|
@ -1,4 +0,0 @@
|
|||
|
||||
RGBLIGHT_ENABLE = yes # Use RGB underglow light
|
||||
|
||||
SRC += indicator.c led_driver.c
|
|
@ -1,27 +0,0 @@
|
|||
/*
|
||||
Copyright 2021 @mangoiv
|
||||
|
||||
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/>.
|
||||
*/
|
||||
|
||||
#define POINTING_DEVICE_ROTATION_90
|
||||
|
||||
//comment that out if your trackball is on the left side
|
||||
#define TRACKBALL_RIGHT
|
||||
|
||||
#ifdef TRACKBALL_RIGHT
|
||||
#define POINTING_DEVICE_INVERT_X
|
||||
#define POINTING_DEVICE_INVERT_Y
|
||||
#endif
|
||||
|
|
@ -1,335 +0,0 @@
|
|||
/*
|
||||
Copyright 2021 @mangoiv
|
||||
|
||||
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
|
||||
|
||||
|
||||
enum layer_number {
|
||||
_BASE,
|
||||
_NUM,
|
||||
_SYMB,
|
||||
_MUS,
|
||||
_ADJ
|
||||
};
|
||||
|
||||
enum custom_keycodes {
|
||||
BALL_HUI = SAFE_RANGE, //cycles hue
|
||||
BALL_WHT, //cycles white
|
||||
BALL_DEC, //decreased color
|
||||
BALL_SCR, //scrolls
|
||||
BALL_NCL, //left click
|
||||
BALL_RCL, //right click
|
||||
BALL_MCL, //middle click
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT(
|
||||
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,
|
||||
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH),
|
||||
KC_MUTE, TG(_ADJ),
|
||||
KC_LCTL, LALT_T(KC_BSPC), LT(_MUS,KC_SPC), KC_NO, LT(_NUM,KC_ENT), LT(_SYMB,KC_DEL)
|
||||
),
|
||||
[_NUM] = LAYOUT(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_TAB, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_QUOT,
|
||||
KC_LSFT, XXXXXXX, KC_MPRV, KC_MNXT, QK_BOOT, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_RSFT,
|
||||
XXXXXXX, KC_NO,
|
||||
KC_LCTL, KC_LALT, XXXXXXX, KC_NO, _______, KC_ENT
|
||||
),
|
||||
[_SYMB] = LAYOUT(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, XXXXXXX, KC_EQL, KC_MINS,
|
||||
XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, KC_LBRC, KC_RBRC, XXXXXXX, KC_GRV, KC_BSLS,
|
||||
KC_LSFT, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_RSFT,
|
||||
XXXXXXX, KC_NO,
|
||||
KC_LALT, XXXXXXX, XXXXXXX, XXXXXXX, KC_NO, _______
|
||||
),
|
||||
[_MUS] = LAYOUT(
|
||||
KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_LALT, KC_BTN3, KC_BTN2, KC_BTN1, BALL_SCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
KC_LSFT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
[_ADJ] = LAYOUT(
|
||||
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, BALL_HUI, BALL_WHT, BALL_DEC, XXXXXXX, XXXXXXX,
|
||||
EE_CLR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, RGB_TOG,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RGB_RMOD, RGB_HUD, RGB_SAD, RGB_VAD, _______,
|
||||
XXXXXXX, _______,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
};
|
||||
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
|
||||
if (is_keyboard_master()) {
|
||||
if(is_keyboard_left()){
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
else {
|
||||
return OLED_ROTATION_90;
|
||||
}
|
||||
} else {
|
||||
return OLED_ROTATION_0;
|
||||
}
|
||||
}
|
||||
static void render_logo(void) {
|
||||
static const char PROGMEM drac_logo[] = {
|
||||
// drac_logo, 128x64px
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x0c, 0x18, 0x78, 0xf0, 0xf0, 0xe0, 0xe0, 0xc0,
|
||||
0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x03, 0x07, 0x3e, 0xfc, 0xf0, 0x00, 0x00, 0x00,
|
||||
0xf0, 0xf0, 0x60, 0x30, 0x30, 0x30, 0x00, 0x00, 0xe0, 0xe0, 0x30, 0x30, 0x30, 0x30, 0x30, 0xe0,
|
||||
0xe0, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x30, 0x30, 0x30, 0x70, 0xe0, 0xc0, 0x00, 0x00,
|
||||
0xf0, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xe0, 0xe0, 0xe0, 0xc0,
|
||||
0x80, 0x00, 0x00, 0x00, 0x80, 0xe0, 0xf8, 0xf0, 0x80, 0xc0, 0xe0, 0xf0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x3f, 0xff, 0xff,
|
||||
0xff, 0xff, 0xfe, 0xfc, 0xf8, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xe0, 0x7c, 0x3f, 0x0f, 0x00, 0x00, 0x00,
|
||||
0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0xf8, 0xcc, 0x8c, 0x84, 0x86, 0x86, 0xc6, 0xff,
|
||||
0xff, 0x80, 0x80, 0x00, 0x3f, 0x7f, 0xe0, 0xc0, 0x80, 0x80, 0x80, 0xc0, 0xf0, 0x71, 0x00, 0x00,
|
||||
0x1f, 0xff, 0xff, 0x80, 0x80, 0x80, 0x80, 0xc0, 0xf8, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x03, 0x03, 0x03, 0x07, 0x0f, 0x0f, 0x0f, 0x1f,
|
||||
0x7f, 0x7f, 0x3e, 0x3e, 0x7f, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfe, 0xf8, 0xf8, 0xfc,
|
||||
0xfc, 0xfe, 0xfe, 0x7e, 0x7c, 0x78, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01,
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,
|
||||
0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xff, 0xff, 0xff,
|
||||
0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x1f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0x60, 0x60,
|
||||
0x60, 0x60, 0x60, 0xc0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xe0, 0x60, 0x60, 0x60, 0xc0,
|
||||
0xc0, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x07,
|
||||
0x0f, 0x3e, 0x7c, 0xfc, 0xf8, 0xf8, 0xf8, 0xf8, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf0, 0xf8,
|
||||
0xf8, 0xf8, 0xfc, 0xfc, 0xfc, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
|
||||
0xff, 0x7f, 0x3f, 0x1f, 0x0f, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff,
|
||||
0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xf1, 0x99, 0x18, 0x08,
|
||||
0x0c, 0x0c, 0x8c, 0xff, 0xff, 0x00, 0x00, 0x00, 0x7f, 0xff, 0xc1, 0x80, 0x00, 0x00, 0x00, 0x80,
|
||||
0xc3, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x03, 0x07, 0x07, 0x0f, 0x0f, 0x0f, 0x1f, 0x1f, 0x1f, 0x1f,
|
||||
0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x1f, 0x0f, 0x0f, 0x07, 0x07, 0x03, 0x03, 0x01,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03,
|
||||
0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x03, 0x03, 0x03,
|
||||
0x03, 0x03, 0x01, 0x01, 0x03, 0x03, 0x03, 0x00, 0x00, 0x01, 0x01, 0x03, 0x03, 0x03, 0x03, 0x01,
|
||||
0x01, 0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
};
|
||||
oled_write_raw_P(drac_logo, sizeof(drac_logo));
|
||||
}
|
||||
|
||||
static void render_status(void) {
|
||||
oled_write_P(PSTR("This is\n~~~~~~~~~\nDracu\nLad\n~~~~~~~~~\nv1.0\n~~~~~~~~~\n"), false);
|
||||
uint8_t n = get_current_wpm();
|
||||
char wpm_counter[4];
|
||||
wpm_counter[3] = '\0';
|
||||
wpm_counter[2] = '0' + n % 10;
|
||||
wpm_counter[1] = (n /= 10) % 10 ? '0' + (n) % 10 : (n / 10) % 10 ? '0' : ' ';
|
||||
wpm_counter[0] = n / 10 ? '0' + n / 10 : ' ';
|
||||
oled_write_P(PSTR("WPM:"), false);
|
||||
oled_write(wpm_counter, false);
|
||||
led_t led_state = host_keyboard_led_state();
|
||||
oled_write_P(PSTR("\nCaps: "), false);
|
||||
oled_write_P(led_state.caps_lock ? PSTR("on ") : PSTR("off"), false);
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _BASE:
|
||||
oled_write_P(PSTR("Base "), false);
|
||||
break;
|
||||
case _NUM:
|
||||
oled_write_P(PSTR("Numbers"), false);
|
||||
break;
|
||||
case _SYMB:
|
||||
oled_write_P(PSTR("Symbols"), false);
|
||||
break;
|
||||
case _ADJ:
|
||||
oled_write_P(PSTR("Adjust "), false);
|
||||
break;
|
||||
case _MUS:
|
||||
oled_write_P(PSTR("Mouse "), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Unkn "), false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
render_status(); // Renders the current keyboard state (layer, lock, caps, scroll, etc)
|
||||
} else {
|
||||
render_logo();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif //OLED_ENABLE
|
||||
|
||||
uint8_t white = 0;
|
||||
uint8_t red = 255;
|
||||
uint8_t green = 0;
|
||||
uint8_t blue = 0;
|
||||
|
||||
bool set_scrolling = false;
|
||||
report_mouse_t pointing_device_task_user(report_mouse_t mouse_report) {
|
||||
if (set_scrolling) {
|
||||
mouse_report.h = mouse_report.x;
|
||||
mouse_report.v = mouse_report.y;
|
||||
mouse_report.x = mouse_report.y = 0;
|
||||
}
|
||||
return mouse_report;
|
||||
}
|
||||
|
||||
void ball_increase_hue(void){
|
||||
if(red!=255&&green!=255&&blue!=255){
|
||||
red =255;
|
||||
}
|
||||
if (red==255&&green<255&&blue==0){
|
||||
green += 15;
|
||||
} else if(green==255&&blue==0&&red>0){
|
||||
red-=15;
|
||||
} else if(red==0&&blue<255&&green==255){
|
||||
blue+=15;
|
||||
} else if(blue==255&&green>0&&red==0){
|
||||
green -= 15;
|
||||
} else if(green == 0&&blue==255&&red<255){
|
||||
red +=15;
|
||||
} else if(green ==0&&blue>0&&red==255){
|
||||
blue -=15;
|
||||
}
|
||||
pimoroni_trackball_set_rgbw(red,green,blue,white);
|
||||
}
|
||||
|
||||
void decrease_color(void){
|
||||
if (green>0){
|
||||
green-=15;
|
||||
}
|
||||
if (red>0){
|
||||
red-=15;
|
||||
}
|
||||
if (blue>0){
|
||||
blue-=15;
|
||||
}
|
||||
pimoroni_trackball_set_rgbw(red,green,blue,white);
|
||||
}
|
||||
|
||||
void cycle_white(void){
|
||||
if (white<255){
|
||||
white +=15;
|
||||
} else{
|
||||
white=0;
|
||||
}
|
||||
pimoroni_trackball_set_rgbw(red,green,blue,white);
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record){
|
||||
switch (keycode){
|
||||
case BALL_HUI:
|
||||
if(record->event.pressed){
|
||||
ball_increase_hue();
|
||||
}
|
||||
break;
|
||||
|
||||
case BALL_WHT:
|
||||
if(record-> event.pressed){
|
||||
cycle_white();
|
||||
}
|
||||
break;
|
||||
|
||||
case BALL_DEC:
|
||||
if(record-> event.pressed){
|
||||
decrease_color();
|
||||
}
|
||||
break;
|
||||
|
||||
case BALL_SCR:
|
||||
if(record->event.pressed){
|
||||
set_scrolling = true;
|
||||
} else{
|
||||
set_scrolling = false;
|
||||
}
|
||||
break;
|
||||
|
||||
case BALL_NCL:
|
||||
record->event.pressed?register_code(KC_BTN1):unregister_code(KC_BTN1);
|
||||
break;
|
||||
case BALL_RCL:
|
||||
record->event.pressed?register_code(KC_BTN2):unregister_code(KC_BTN2);
|
||||
break;
|
||||
case BALL_MCL:
|
||||
record->event.pressed?register_code(KC_BTN3):unregister_code(KC_BTN3);
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
#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 == 2) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _ADJ:
|
||||
clockwise?ball_increase_hue():cycle_white();
|
||||
break;
|
||||
case _MUS:
|
||||
clockwise?tap_code(KC_WH_U):tap_code(KC_WH_D);
|
||||
break;
|
||||
default:
|
||||
clockwise?tap_code(KC_PGUP):tap_code(KC_PGDN);
|
||||
break;
|
||||
}
|
||||
}
|
||||
// I only have 2 encoders on the the pimoroni example board, just add else ifs for your other encoders...
|
||||
// the missing ones are encoder 1 on the right side and encoder 3 on the left side
|
||||
return true;
|
||||
}
|
||||
#endif // ENCODER_ENABLE
|
|
@ -1,5 +0,0 @@
|
|||
# only uncomment on the side you have your trackball on
|
||||
POINTING_DEVICE_ENABLE = yes
|
||||
POINTING_DEVICE_DRIVER = pimoroni_trackball
|
||||
OLED_ENABLE = yes
|
||||
MOUSEKEY_ENABLE = yes
|
|
@ -1,18 +0,0 @@
|
|||
/* Copyright 2021 drhigsby
|
||||
*
|
||||
* 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
|
||||
#define TAPPING_TERM 230
|
||||
#define TAPPING_TERM_PER_KEY
|
|
@ -1,97 +0,0 @@
|
|||
/* Copyright 2021 drhigsby
|
||||
*
|
||||
* 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
|
||||
|
||||
enum custom_layers {
|
||||
_BASE,
|
||||
_CLOSE,
|
||||
_FAR,
|
||||
_FUNKY,
|
||||
};
|
||||
#define CLS_SPC LT(_CLOSE, KC_SPC)
|
||||
#define FAR_F LT(_FAR, KC_F)
|
||||
#define FNK_D LT(_FUNKY, KC_D)
|
||||
#define SFT_Z LSFT_T(KC_Z)
|
||||
#define SFT_ENT RSFT_T(KC_ENT)
|
||||
#define CTL_X LCTL_T(KC_X)
|
||||
#define CTL_DOT RCTL_T(KC_DOT)
|
||||
#define WIN_C LWIN_T(KC_C)
|
||||
#define WIN_COMM RWIN_T(KC_COMM)
|
||||
#define ALT_V LALT_T(KC_V)
|
||||
#define ALT_M LALT_T(KC_M)
|
||||
#define COPY LCTL(KC_C)
|
||||
#define PASTE LCTL(KC_V)
|
||||
#define CUT LCTL(KC_X)
|
||||
#define UNDO LCTL(KC_Z)
|
||||
#define RUS_TGL RALT(KC_LSFT)
|
||||
#define LOCK LWIN(KC_L)
|
||||
#define vvv KC_TRNS
|
||||
|
||||
enum custom_keycodes {
|
||||
TYPEDON = SAFE_RANGE
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t* record) {
|
||||
if (record->event.pressed) {
|
||||
switch (keycode) {
|
||||
case TYPEDON:
|
||||
SEND_STRING("[typed on an ogurec]");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_ortho_3x12(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, KC_LBRC, KC_RBRC, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, FNK_D, FAR_F, KC_G, KC_GRAVE, KC_SCLN, KC_H, KC_J, KC_K, KC_L, KC_QUOT,
|
||||
SFT_Z, CTL_X, WIN_C, ALT_V, KC_B, KC_BSPC, CLS_SPC, KC_N, ALT_M, WIN_COMM, CTL_DOT, SFT_ENT
|
||||
),
|
||||
|
||||
[_CLOSE] = LAYOUT_ortho_3x12(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, _______, _______, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, _______, _______, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN,
|
||||
KC_MINUS, KC_UNDS, KC_EQL, KC_PLUS, _______, _______, vvv, _______, KC_SCLN, KC_COLON, KC_SLSH, KC_QUES
|
||||
),
|
||||
|
||||
[_FAR] = LAYOUT_ortho_3x12(
|
||||
KC_ESC, TYPEDON, KC_BSLS, RUS_TGL,_______, _______, _______, KC_PGUP, KC_HOME, KC_UP, KC_END, KC_INS,
|
||||
KC_CAPS, KC_TAB, KC_PIPE, vvv, LOCK, _______, _______, KC_PGDN, KC_LEFT, KC_DOWN, KC_RIGHT, KC_DEL,
|
||||
UNDO, CUT, COPY, PASTE, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______, _______, _______, _______
|
||||
),
|
||||
[_FUNKY] = LAYOUT_ortho_3x12(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,
|
||||
_______, _______, vvv, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______
|
||||
)
|
||||
|
||||
};
|
||||
|
||||
uint16_t get_tapping_term(uint16_t keycode, keyrecord_t* record) {
|
||||
switch (keycode) {
|
||||
case FAR_F:
|
||||
return TAPPING_TERM - 50;
|
||||
case CLS_SPC:
|
||||
return TAPPING_TERM - 50;
|
||||
case SFT_Z:
|
||||
return TAPPING_TERM - 80;
|
||||
case SFT_ENT:
|
||||
return TAPPING_TERM - 75;
|
||||
default:
|
||||
return TAPPING_TERM;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
# Dack's Ogurec Keymap
|
||||
|
||||
This is Dack's personal ogurec keymap and it is for left-sided PM placement
|
|
@ -1,18 +0,0 @@
|
|||
/* Copyright 2021 drhigsby
|
||||
*
|
||||
* 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
|
||||
|
||||
#define COMBO_TERM 40
|
|
@ -1,91 +0,0 @@
|
|||
/* Copyright 2021 drhigsby
|
||||
*
|
||||
* 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
|
||||
|
||||
enum layers{
|
||||
_BASE,
|
||||
_CODE,
|
||||
_MATH,
|
||||
_FUNC
|
||||
};
|
||||
|
||||
enum combo_events {
|
||||
combo_ESC,
|
||||
combo_BACK,
|
||||
combo_TAB,
|
||||
combo_DELETE,
|
||||
combo_ENTER,
|
||||
combo_LPRN,
|
||||
combo_RPRN,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM esc_combo[] = {KC_Q, KC_W, COMBO_END};
|
||||
const uint16_t PROGMEM bspc_combo[] = {KC_O, KC_P, COMBO_END};
|
||||
const uint16_t PROGMEM tab_combo[] = {KC_A, KC_S, COMBO_END};
|
||||
const uint16_t PROGMEM del_combo[] = {KC_I, KC_O, COMBO_END};
|
||||
const uint16_t PROGMEM enter_combo[] = {KC_L, KC_SCLN, COMBO_END};
|
||||
const uint16_t PROGMEM lprn_combo[] = {KC_X, KC_C, COMBO_END};
|
||||
const uint16_t PROGMEM rprn_combo[] = {KC_COMM, KC_DOT, COMBO_END};
|
||||
|
||||
|
||||
combo_t key_combos[] = {
|
||||
[combo_ESC] = COMBO(esc_combo, KC_ESC),
|
||||
[combo_BACK] = COMBO(bspc_combo, KC_BSPC),
|
||||
[combo_TAB] = COMBO(tab_combo, KC_TAB),
|
||||
[combo_DELETE] = COMBO(del_combo, KC_DEL),
|
||||
[combo_ENTER] = COMBO(enter_combo, KC_ENT),
|
||||
[combo_LPRN] = COMBO(lprn_combo, KC_LPRN),
|
||||
[combo_RPRN] = COMBO(rprn_combo, KC_RPRN),
|
||||
};
|
||||
|
||||
#define BASE TO(_BASE)
|
||||
#define CODE MO(_CODE)
|
||||
#define MATH TG(_MATH)
|
||||
#define FUNC MO(_FUNC)
|
||||
#define xxx KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BASE] = LAYOUT_3uc(
|
||||
KC_Q, KC_W, KC_E, KC_R, KC_T, MATH, KC_Y, KC_U, KC_I, KC_O, KC_P,
|
||||
KC_A, KC_S, KC_D, KC_F, KC_G, KC_HOME, KC_H, KC_J, KC_K, KC_L, KC_SCLN,
|
||||
LSFT_T(KC_Z), KC_X, KC_C, KC_V, KC_B, KC_END, KC_N, KC_M, KC_COMM, KC_DOT, RSFT_T(KC_SLSH),
|
||||
KC_LALT, KC_LCTL, CODE, KC_SPC, CODE, KC_RGUI, FUNC
|
||||
),
|
||||
|
||||
[_CODE] = LAYOUT_3uc(
|
||||
KC_1, KC_2, KC_3, KC_4, KC_5, xxx, KC_6, KC_7, KC_8, KC_9, KC_0,
|
||||
KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_PGUP, KC_CIRC, KC_AMPR, KC_ASTR, KC_MINS, KC_EQL,
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, xxx, KC_PGDN, xxx, KC_PIPE, KC_BSLS, KC_DQUO, KC_QUOT,
|
||||
xxx, xxx, xxx, xxx, xxx, KC_PGUP, KC_PGDN
|
||||
),
|
||||
|
||||
[_MATH] = LAYOUT_3uc(
|
||||
xxx, xxx, xxx, xxx, xxx, BASE, xxx, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_P4, KC_P5, KC_P6, KC_PCMM,
|
||||
xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_P1, KC_P2, KC_P3, KC_PEQL,
|
||||
xxx, xxx, xxx, xxx, KC_P0, KC_PDOT, KC_PENT
|
||||
|
||||
),
|
||||
|
||||
[_FUNC] = LAYOUT_3uc(
|
||||
KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, xxx, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10,
|
||||
xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, KC_F11, KC_F12,
|
||||
xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx, xxx,
|
||||
xxx, xxx, xxx, xxx, xxx, xxx, xxx
|
||||
)
|
||||
|
||||
};
|
|
@ -1 +0,0 @@
|
|||
# Centered 3uC Packrat Keymap
|
|
@ -1 +0,0 @@
|
|||
COMBO_ENABLE = yes
|
|
@ -1,41 +0,0 @@
|
|||
/* Copyright 2022 Benjamin Collet <benjamin.collet@protonmail.ch>
|
||||
*
|
||||
* 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
|
||||
#include "sendstring_bepo.h"
|
||||
|
||||
enum custom_keycodes {
|
||||
TK_URL = SAFE_RANGE,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(TK_URL, C(BP_C), C(BP_V)),
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case TK_URL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode TK_URL is pressed
|
||||
SEND_STRING("https://stackoverflow.com/");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,39 +0,0 @@
|
|||
/* Copyright 2021 Joe Maples <joe@maples.dev>
|
||||
*
|
||||
* 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
|
||||
|
||||
enum custom_keycodes {
|
||||
TK_URL = SAFE_RANGE,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(TK_URL, G(KC_C), G(KC_V)),
|
||||
};
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case TK_URL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode TK_URL is pressed
|
||||
SEND_STRING("https://stackoverflow.com/\n");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,40 +0,0 @@
|
|||
/* Copyright 2021 Joe Maples <joe@maples.dev>
|
||||
*
|
||||
* 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
|
||||
|
||||
enum custom_keycodes {
|
||||
TK_URL = SAFE_RANGE,
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[0] = LAYOUT(TK_URL, C(KC_C), C(KC_V)),
|
||||
};
|
||||
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case TK_URL:
|
||||
if (record->event.pressed) {
|
||||
// when keycode TK_URL is pressed
|
||||
SEND_STRING("https://stackoverflow.com/");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
|
@ -1,35 +0,0 @@
|
|||
/* Copyright 2017 MechMerlin <mechmerlin@gmail.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/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* layer 0: qwerty */
|
||||
[0] = LAYOUT_viper(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1),
|
||||
KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RGUI
|
||||
),
|
||||
|
||||
[1] = LAYOUT_viper(
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, KC_DEL,
|
||||
KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, QK_BOOT, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, _______, KC_BSPC,
|
||||
_______, KC_VOLU, KC_VOLD, KC_MUTE, _______, _______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_ENT,
|
||||
_______, _______, _______, _______, _______, _______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, _______, _______,
|
||||
_______, _______, _______, _______, _______
|
||||
),
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
# Profanum429 Duck Viper V2 Layout
|
||||
TODO
|
||||
|
||||
## Features
|
||||
TODO
|
|
@ -1,24 +0,0 @@
|
|||
/* Copyright 2020 Adam Naldal <adamnaldal@gmail.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
|
||||
|
||||
// Tapping term is ever so slightly lowered from the 200ms default to make layer and mod usage more snappy.
|
||||
#define TAPPING_TERM 200
|
||||
|
||||
// If you are using an Elite C rev3 on the slave side, uncomment the lines below:
|
||||
// #define SPLIT_USB_DETECT
|
||||
// #define NO_USB_STARTUP_CHECK
|
|
@ -1,430 +0,0 @@
|
|||
/* Copyright 2020 Adam Naldal <adamnaldal@gmail.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/>.
|
||||
*/
|
||||
#include QMK_KEYBOARD_H
|
||||
#include "keymap_danish.h"
|
||||
#include <stdio.h>
|
||||
|
||||
enum layers {
|
||||
_QWERTY = 0,
|
||||
_COLEMAK,
|
||||
_NN,
|
||||
_MS,
|
||||
_SP
|
||||
};
|
||||
|
||||
// Default layer switching
|
||||
#define QWERT DF(_QWERTY)
|
||||
#define COLEM DF(_COLEMAK)
|
||||
|
||||
// Layer tap codes
|
||||
#define LT_SPC LT(_NN, KC_SPC)
|
||||
#define LT_TAB LT(_MS, KC_TAB)
|
||||
#define LT_ENT LT(_MS, KC_ENT)
|
||||
#define LT_BSPC LT(_NN, KC_BSPC)
|
||||
|
||||
// Qwerty homerow mods
|
||||
#define A_CTL LCTL_T(KC_A)
|
||||
#define S_ALT LALT_T(KC_S)
|
||||
#define D_GUI LGUI_T(KC_D)
|
||||
#define F_SFT LSFT_T(KC_F)
|
||||
#define J_SFT RSFT_T(KC_J)
|
||||
#define K_GUI RGUI_T(KC_K)
|
||||
#define L_ALT RALT_T(KC_L)
|
||||
#define AE_CTL RCTL_T(DK_AE)
|
||||
|
||||
// Colemak homerow mods
|
||||
#define R_ALT LALT_T(KC_R)
|
||||
#define S_GUI LGUI_T(KC_S)
|
||||
#define T_SFT LSFT_T(KC_T)
|
||||
#define N_SFT RSFT_T(KC_N)
|
||||
#define E_GUI RGUI_T(KC_E)
|
||||
#define I_ALT RALT_T(KC_I)
|
||||
#define O_CTL RCTL_T(KC_O)
|
||||
|
||||
// Navigation and numbers homerow mods
|
||||
#define RGHT_SFT LSFT_T(KC_RGHT)
|
||||
#define DOWN_GUI LGUI_T(KC_DOWN)
|
||||
#define LEFT_ALT LALT_T(KC_LEFT)
|
||||
#define N4_SFT RSFT_T(KC_4)
|
||||
#define N5_GUI RGUI_T(KC_5)
|
||||
#define N6_ALT RALT_T(KC_6)
|
||||
#define OE_CTL RCTL_T(DK_OSTR)
|
||||
|
||||
// Undefined or wrong symbols (homebrew)
|
||||
#define HB_LCBR S(A(KC_8)) // {
|
||||
#define HB_RCBR S(A(KC_9)) // }
|
||||
#define HB_LABR KC_GRV // <
|
||||
#define HB_RABR S(KC_GRV) // >
|
||||
#define HB_USD KC_NUBS // $
|
||||
#define HB_PRGF S(KC_NUBS) // §
|
||||
#define HB_AT A(KC_NUHS) // @
|
||||
#define HB_EUR S(KC_4) // €
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
* Base Layer: QWERTY
|
||||
*
|
||||
* ,-------------------------------------------. ,-------------------------------------------.
|
||||
* | | Q | W | E | R | T | | Y | U | I | O | P | Å |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | A | S | D | F | G | | H | J | K | L | Æ | Ø |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | Z | X | C | V | B | | N | M | , ; | . : | - _ | |
|
||||
* `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
|
||||
* | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps| PLAY|
|
||||
* |(enc) | | _NN | _MS | | _MS | _NN | |(enc)|
|
||||
* `---------------------------' `---------------------------'
|
||||
*/
|
||||
[_QWERTY] = LAYOUT_split_3x6_4(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, DK_ARNG,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, A_CTL, S_ALT, D_GUI, F_SFT, KC_G, KC_H, J_SFT, K_GUI, L_ALT, AE_CTL, DK_OSTR,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, DK_MINS, XXXXXXX,
|
||||
//|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
|
||||
KC_MUTE, KC_ESC, LT_SPC, LT_TAB, LT_ENT, LT_BSPC, KC_CAPS, KC_MPLY
|
||||
//`------------------------------------' '------------------------------------'
|
||||
),
|
||||
/*
|
||||
* Base Layer: COLEMAK
|
||||
*
|
||||
* ,-------------------------------------------. ,-------------------------------------------.
|
||||
* | | Q | W | F | P | B | | J | L | U | Y | Å | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | A | R | S | T | G | | M | N | E | I | O | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | Z | X | C | D | V | | K | H | , ; | . : | Æ | |
|
||||
* `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
|
||||
* | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps | PLAY|
|
||||
* |(enc) | | _NN | _MS | | _MS | _NN | | (enc)|
|
||||
* `---------------------------' `---------------------------'
|
||||
*/
|
||||
[_COLEMAK] = LAYOUT_split_3x6_4(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
XXXXXXX, KC_Q, KC_W, KC_F, KC_P, KC_B, KC_J, KC_L, KC_U, KC_Y, DK_ARNG, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, A_CTL, R_ALT, S_GUI, T_SFT, KC_G, KC_M, N_SFT, E_GUI, I_ALT, O_CTL, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, KC_Z, KC_X, KC_C, KC_D, KC_V, KC_K, KC_H, KC_COMM, KC_DOT, DK_AE, XXXXXXX,
|
||||
//|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
|
||||
KC_MUTE, KC_ESC, LT_SPC, LT_TAB, LT_ENT, LT_BSPC, KC_CAPS, KC_MPLY
|
||||
//`------------------------------------' '------------------------------------'
|
||||
),
|
||||
/*
|
||||
* Navigation and Numbers: _NN
|
||||
*
|
||||
* ,-------------------------------------------. ,-------------------------------------------.
|
||||
* | | | Home | Up | End | pgUp | | * | 7 | 8 | 9 | + | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | | Left | Down | Right| pgDwn| | / | 4 | 5 | 6 | Ø | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | | Cut | Copy | | Paste| | = | 1 | 2 | 3 | - | |
|
||||
* `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
|
||||
* | MUTE | Del | Space| Tab | | Enter| Bksp | 0 | PLAY |
|
||||
* |(enc) | | _NN | _MS | | _MS | _NN | |(enc) |
|
||||
* `---------------------------' `---------------------------'
|
||||
*/
|
||||
[_NN] = LAYOUT_split_3x6_4(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, KC_PGUP, DK_ASTR, KC_7, KC_8, KC_9, DK_PLUS, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, KC_LCTL,LEFT_ALT,DOWN_GUI,RGHT_SFT, KC_PGDN, DK_SLSH, N4_SFT, N5_GUI, N6_ALT, OE_CTL, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, G(KC_X), G(KC_C), XXXXXXX, G(KC_V), DK_EQL, KC_1, KC_2, KC_3, DK_MINS, XXXXXXX,
|
||||
//|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
|
||||
KC_MUTE, KC_DEL, _______, _______, _______, _______, KC_0, KC_MPLY
|
||||
//`------------------------------------' '------------------------------------'
|
||||
),
|
||||
/*
|
||||
* Media and Symbols: _MS
|
||||
*
|
||||
* ,-------------------------------------------. ,-------------------------------------------.
|
||||
* | | | | [ | ] | F1 | | $ | / | ( | ) | ? | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | |brght-|brght+| { | } | F2 | | @ | € | % | & | ' | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | | | < | > | F3 | | § | ! | " | # | _ | |
|
||||
* `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
|
||||
* | MUTE | Esc | Space| Tab | | Enter| Bksp | Caps | PLAY|
|
||||
* |(enc) | | _NN | _MS | | _MS | _NN | | (enc)|
|
||||
* `---------------------------' `---------------------------'
|
||||
*/
|
||||
[_MS] = LAYOUT_split_3x6_4(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, DK_LBRC, DK_RBRC, KC_F1, HB_USD, DK_SLSH, DK_LPRN, DK_RPRN, DK_QUES, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, KC_BRID, KC_BRIU, HB_LCBR, HB_RCBR, KC_F2, HB_AT, HB_EUR, DK_PERC, DK_AMPR, DK_QUOT, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, HB_LABR, HB_RABR, KC_F3, HB_PRGF, DK_EXLM, DK_DQUO, DK_HASH, DK_UNDS, XXXXXXX,
|
||||
//|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
|
||||
KC_MUTE, KC_ESC, _______, _______, _______, _______, KC_CAPS, KC_MPLY
|
||||
//`------------------------------------' '------------------------------------'
|
||||
),
|
||||
/*
|
||||
* Special functions: _SP
|
||||
*
|
||||
* ,-------------------------------------------. ,-------------------------------------------.
|
||||
* | |QWERTY| | | QK_BOOT| | | | | | | | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | | | Debug| | | | | | | | | |
|
||||
* |--------+------+------+------+------+------| |------+------+------+------+------+--------|
|
||||
* | | | |COLEMK| | | | | | | | | |
|
||||
* `------------------------⫟------⫟------⫟------⫟------. ,-----⫟------⫟------⫟------⫟-------------------------'
|
||||
* | GUI | Del | Space| Nav +| |Media+| Bksp | Enter| AltGr|
|
||||
* | | | |Number| |symbol| | | |
|
||||
* `---------------------------' `---------------------------'
|
||||
*/
|
||||
[_SP] = LAYOUT_split_3x6_4(
|
||||
//,-----------------------------------------------------. ,-----------------------------------------------------.
|
||||
XXXXXXX, QWERT, XXXXXXX, XXXXXXX, QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, DB_TOGG, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, COLEM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
//|--------+--------+-----------⫟--------⫟--------⫟--------⫟--------. .--------⫟--------⫟--------⫟--------⫟-----------+--------+--------|
|
||||
KC_MUTE, KC_ESC, _______, _______, _______, _______, KC_CAPS, KC_MPLY
|
||||
//`------------------------------------' '------------------------------------'
|
||||
),
|
||||
|
||||
};
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
return update_tri_layer_state(state, _NN, _MS, _SP);
|
||||
}
|
||||
|
||||
#ifdef OLED_ENABLE
|
||||
char wpm_str[10];
|
||||
|
||||
// static void render_logo(void) {
|
||||
// static const char PROGMEM qmk_logo[] = {
|
||||
// 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8A, 0x8B, 0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94,
|
||||
// 0xA0, 0xA1, 0xA2, 0xA3, 0xA4, 0xA5, 0xA6, 0xA7, 0xA8, 0xA9, 0xAA, 0xAB, 0xAC, 0xAD, 0xAE, 0xAF, 0xB0, 0xB1, 0xB2, 0xB3, 0xB4,
|
||||
// 0xC0, 0xC1, 0xC2, 0xC3, 0xC4, 0xC5, 0xC6, 0xC7, 0xC8, 0xC9, 0xCA, 0xCB, 0xCC, 0xCD, 0xCE, 0xCF, 0xD0, 0xD1, 0xD2, 0xD3, 0xD4, 0x00
|
||||
// };
|
||||
//
|
||||
// oled_write_P(qmk_logo, false);
|
||||
// }
|
||||
|
||||
static void print_status_narrow(void) {
|
||||
// Print current mode
|
||||
oled_write_P(PSTR("\n"), false);
|
||||
oled_write_ln_P(PSTR("MODE"), false);
|
||||
oled_write_ln_P(PSTR(""), false);
|
||||
|
||||
switch (get_highest_layer(default_layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_ln_P(PSTR("Qwrt"), false);
|
||||
break;
|
||||
case _COLEMAK:
|
||||
oled_write_ln_P(PSTR("Clmk"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_P(PSTR("Undef"), false);
|
||||
}
|
||||
oled_write_P(PSTR("\n\n"), false);
|
||||
// Print current layer
|
||||
oled_write_ln_P(PSTR("LAYER"), false);
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case _QWERTY:
|
||||
oled_write_P(PSTR("Base\n"), false);
|
||||
break;
|
||||
case _NN:
|
||||
oled_write_P(PSTR("Nums\n"), false);
|
||||
break;
|
||||
case _MS:
|
||||
oled_write_P(PSTR("Sym\n"), false);
|
||||
break;
|
||||
case _SP:
|
||||
oled_write_P(PSTR("Spec\n"), false);
|
||||
break;
|
||||
default:
|
||||
oled_write_ln_P(PSTR("Undef\n"), false);
|
||||
}
|
||||
oled_write_P(PSTR("\n\n"), false);
|
||||
led_t led_usb_state = host_keyboard_led_state();
|
||||
oled_write_ln_P(PSTR("CPSLK"), led_usb_state.caps_lock);
|
||||
}
|
||||
|
||||
#define ANIM_NUM_FRAMES 2 // number of frames in the animation
|
||||
#define MAX_DURATION 10000
|
||||
#define ANIM_BEGIN 30
|
||||
uint16_t anim_frame_duration = 100; // how long each frame lasts
|
||||
// #define ANIM_REVERSE // define this if you want the animation to run backwards at the end
|
||||
|
||||
#ifdef ANIM_REVERSE
|
||||
#define ANIM_TOTAL_FRAMES (2*((ANIM_NUM_FRAMES)-1))
|
||||
#else
|
||||
#define ANIM_TOTAL_FRAMES ANIM_NUM_FRAMES
|
||||
#endif
|
||||
|
||||
uint16_t anim_timer = 0;
|
||||
uint8_t current_anim_frame = 0;
|
||||
|
||||
static void render_anim(void) {
|
||||
static const char PROGMEM frame[ANIM_NUM_FRAMES][512] = {
|
||||
{
|
||||
// 'pokemon experiment frame 1', 32x128px
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x60, 0x10, 0x08, 0x04, 0x04, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x02, 0x04, 0x04, 0x04, 0x08, 0x30, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x1f, 0x3c, 0xf2, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x04, 0xf2, 0x3a, 0x1c, 0x3c, 0xf8, 0xe0, 0x00, 0x00, 0x01, 0x1e, 0xe0, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x70, 0x8c, 0x03, 0x41, 0x82, 0x02, 0x03, 0x80, 0x40, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x07, 0x04, 0x84, 0x84, 0xc7, 0x63, 0x00, 0x00, 0x00, 0xe0, 0x1f, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x02, 0x04, 0x1c, 0x28, 0x58, 0xa4, 0xa4, 0x44, 0x42, 0x42,
|
||||
0x23, 0x97, 0x91, 0x48, 0x24, 0x23, 0x10, 0x08, 0x04, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x01,
|
||||
0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x80, 0x70, 0x08, 0x04, 0x04, 0x08, 0x08, 0x50, 0x20, 0x10, 0x10, 0x10, 0x90, 0x90,
|
||||
0x90, 0x10, 0x10, 0x10, 0x10, 0x10, 0x20, 0x10, 0x08, 0x08, 0x04, 0x04, 0x08, 0xf0, 0x00, 0x00,
|
||||
0x80, 0x78, 0x1f, 0x3a, 0xf2, 0xc4, 0x00, 0x00, 0x30, 0x60, 0x00, 0x06, 0x8f, 0xcf, 0xe7, 0x03,
|
||||
0x01, 0x00, 0x04, 0xf2, 0x3a, 0x1c, 0x1c, 0x78, 0xf0, 0xc0, 0x00, 0x00, 0x00, 0x00, 0x0f, 0xf0,
|
||||
0x1f, 0x64, 0xb4, 0x64, 0xa7, 0x23, 0x40, 0x48, 0x50, 0x40, 0x80, 0x80, 0x91, 0x89, 0x80, 0x80,
|
||||
0x80, 0x40, 0x40, 0x47, 0x44, 0x44, 0xa4, 0x64, 0x27, 0x13, 0x08, 0x00, 0x00, 0x80, 0x60, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x03, 0x02, 0x06, 0x04, 0x0c, 0x0c, 0x0c, 0x08, 0x08, 0x08, 0x0c,
|
||||
0x0c, 0x0c, 0x0a, 0x0a, 0x09, 0x05, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04,
|
||||
0x04, 0x04, 0x04, 0x04, 0x04, 0x08, 0x08, 0x08, 0x10, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xfc, 0x1b, 0x3c, 0xfc, 0xf9, 0x01, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x02, 0xf1, 0x39, 0x1c, 0x3c, 0xfc, 0xf8, 0xf0, 0x00, 0x00, 0x03, 0x0c, 0xf0,
|
||||
0x00, 0xf8, 0x06, 0x01, 0x32, 0x02, 0x03, 0x31, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x07, 0x04, 0x84, 0x84, 0x47, 0xe3, 0x01, 0x00, 0x00, 0x00, 0xc0, 0x3f,
|
||||
0x00, 0x00, 0x01, 0x02, 0x06, 0x0a, 0x14, 0x28, 0x48, 0x44, 0x44, 0xc2, 0xc2, 0xc2, 0xa2, 0xa2,
|
||||
0xa1, 0x91, 0x91, 0x89, 0x49, 0x45, 0x44, 0x22, 0x21, 0x10, 0x10, 0x08, 0x04, 0x02, 0x01, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
},
|
||||
{
|
||||
// 'pokemon experiment frame 2', 32x128px
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x80, 0x80,
|
||||
0x80, 0x80, 0x80, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x18, 0x84, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00,
|
||||
0x00, 0x80, 0x80, 0x00, 0x01, 0x01, 0x01, 0x02, 0x0c, 0x70, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0x7f, 0x87, 0x8f, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x01, 0xfc, 0x0e, 0x07, 0x0f, 0xfe, 0xf8, 0x00, 0x00, 0x00, 0x07, 0xf8, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x1c, 0x63, 0x80, 0x10, 0x20, 0x00, 0x00, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x81, 0x81, 0x41, 0x41, 0x21, 0x10, 0x00, 0x80, 0x60, 0x18, 0x07, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x02, 0x06, 0x04, 0x04, 0x0a, 0x0a, 0x0a, 0x0a, 0x09,
|
||||
0x05, 0x07, 0x04, 0x02, 0x02, 0x02, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xe0, 0x10, 0x08, 0x08, 0x10, 0x10, 0xa0, 0x40, 0x20, 0x20, 0x20, 0x20, 0x20,
|
||||
0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x40, 0x20, 0x10, 0x10, 0x08, 0x08, 0x10, 0xe0, 0x00, 0x00,
|
||||
0x00, 0xf0, 0x3f, 0x72, 0xe2, 0x80, 0x00, 0x00, 0x60, 0xc0, 0x00, 0x0c, 0x1e, 0x9e, 0xcf, 0x07,
|
||||
0x03, 0x00, 0x00, 0xe2, 0x72, 0x38, 0x38, 0xf0, 0xe0, 0x80, 0x00, 0x00, 0x00, 0x01, 0x1e, 0xe0,
|
||||
0x3f, 0xc8, 0x68, 0x48, 0x8f, 0x87, 0x00, 0x20, 0x40, 0x00, 0x00, 0x00, 0x43, 0x23, 0x01, 0x00,
|
||||
0x00, 0x00, 0x00, 0x0f, 0x08, 0x88, 0x88, 0x48, 0x4f, 0x27, 0x10, 0x00, 0x00, 0x00, 0xc0, 0x3f,
|
||||
0x00, 0x00, 0x01, 0x02, 0x02, 0x06, 0x05, 0x09, 0x09, 0x09, 0x12, 0x12, 0x12, 0x12, 0x11, 0x11,
|
||||
0x11, 0x11, 0x11, 0x09, 0x09, 0x09, 0x08, 0x08, 0x08, 0x04, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x80, 0x40, 0x20, 0x90, 0x88, 0x88, 0x04, 0x04, 0x04, 0x02, 0x02, 0x02,
|
||||
0x02, 0x02, 0x02, 0x82, 0x82, 0x84, 0x04, 0x04, 0x08, 0x08, 0x10, 0x20, 0x40, 0x80, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0xfe, 0x0d, 0x1e, 0xfe, 0xfc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0xf8, 0x1c, 0x0e, 0x1e, 0xfe, 0xfc, 0xf8, 0x00, 0x00, 0x01, 0x06, 0xf8,
|
||||
0x00, 0x78, 0x87, 0x00, 0x31, 0x01, 0x01, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x02, 0x82, 0x82, 0x43, 0x61, 0x00, 0x00, 0x00, 0x00, 0xe0, 0x1f,
|
||||
0x00, 0x00, 0x00, 0x01, 0x01, 0x02, 0x04, 0x0c, 0x08, 0x14, 0x12, 0x12, 0x12, 0x22, 0x22, 0x22,
|
||||
0x21, 0x21, 0x21, 0x21, 0x11, 0x11, 0x10, 0x08, 0x08, 0x08, 0x04, 0x04, 0x02, 0x01, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
|
||||
}
|
||||
};
|
||||
|
||||
if (get_current_wpm() > ANIM_BEGIN){
|
||||
if(timer_elapsed(anim_timer) > anim_frame_duration) {
|
||||
anim_timer = timer_read();
|
||||
current_anim_frame = (current_anim_frame + 1) % ANIM_TOTAL_FRAMES;
|
||||
oled_clear();
|
||||
oled_write_raw_P(frame[abs((ANIM_NUM_FRAMES-1)-current_anim_frame)], 512);
|
||||
if (get_current_wpm() > ANIM_BEGIN){
|
||||
anim_frame_duration = MAX_DURATION/get_current_wpm();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
oled_write_raw_P(frame[0],512);
|
||||
}
|
||||
}
|
||||
|
||||
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
|
||||
if (is_keyboard_master()) {
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
if (is_keyboard_master() != true){
|
||||
return OLED_ROTATION_270;
|
||||
}
|
||||
return rotation;
|
||||
}
|
||||
|
||||
bool oled_task_user(void) {
|
||||
if (is_keyboard_master()) {
|
||||
print_status_narrow();
|
||||
sprintf(wpm_str, "%03d", get_current_wpm());
|
||||
oled_write(wpm_str, false);
|
||||
} else {
|
||||
render_anim();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef ENCODER_ENABLE
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
if (index == 0) {
|
||||
// master side thumb encoder
|
||||
// Volume control
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
}
|
||||
else if (index == 1) {
|
||||
// master side pinky encoder
|
||||
// Page down / Page up
|
||||
if (clockwise) {
|
||||
tap_code(KC_PGDN);
|
||||
} else {
|
||||
tap_code(KC_PGUP);
|
||||
}
|
||||
}
|
||||
else if (index == 2) {
|
||||
// minion side thumb encoder
|
||||
// Next track / Previous track
|
||||
if (clockwise) {
|
||||
tap_code(KC_MFFD);
|
||||
} else {
|
||||
tap_code(KC_MRWD);
|
||||
}
|
||||
}
|
||||
else if (index == 3) {
|
||||
// minion side pinky encoder
|
||||
// Page end / Page home
|
||||
if (clockwise) {
|
||||
tap_code(KC_END);
|
||||
} else {
|
||||
tap_code(KC_HOME);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
|
@ -1,3 +0,0 @@
|
|||
OLED_ENABLE = yes
|
||||
ENCODER_ENABLE = yes # Enables the use of one or more encoders
|
||||
WPM_ENABLE = yes
|
|
@ -1,88 +0,0 @@
|
|||
/* Copyright 2020 imchipwood
|
||||
*
|
||||
* 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
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
BASE LAYER
|
||||
/-----------------------------------------------------`
|
||||
| | 7 | 8 | 9 | Bkspc |
|
||||
| |---------|---------|---------|---------|
|
||||
| | 4 | 5 | 6 | + |
|
||||
| |---------|---------|---------|---------|
|
||||
| | 1 | 2 | 3 | * |
|
||||
|-------------|---------|---------|---------|---------|
|
||||
| Play/pause | TT(1) | 0 | . | Enter |
|
||||
\-----------------------------------------------------'
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_P7, KC_P8, KC_P9, KC_BSPC,
|
||||
KC_P4, KC_P5, KC_P6, KC_KP_PLUS,
|
||||
KC_P1, KC_P2, KC_P3, KC_KP_ASTERISK,
|
||||
KC_MPLY, TT(1), KC_P0, KC_PDOT, KC_KP_ENTER
|
||||
),
|
||||
/*
|
||||
SUB LAYER
|
||||
/-----------------------------------------------------`
|
||||
| | | | | Numlock |
|
||||
| |---------|---------|---------|---------|
|
||||
| | | | | - |
|
||||
| |---------|---------|---------|---------|
|
||||
| | | | | / |
|
||||
|-------------|---------|---------|---------|---------|
|
||||
| MUTE | | | | = |
|
||||
\-----------------------------------------------------'
|
||||
*/
|
||||
[1] = LAYOUT(
|
||||
_______, _______, _______, KC_NUM,
|
||||
_______, _______, _______, KC_KP_MINUS,
|
||||
_______, _______, _______, KC_KP_SLASH,
|
||||
KC_MUTE, _______, _______, _______, KC_KP_EQUAL
|
||||
),
|
||||
};
|
||||
|
||||
void encoder_update_user(uint8_t index, bool clockwise) {
|
||||
/* Custom encoder control - handles CW/CCW turning of encoder
|
||||
* Default behavior:
|
||||
* main layer:
|
||||
* CW: volume up
|
||||
* CCW: volume down
|
||||
* other layers:
|
||||
* CW: next track
|
||||
* CCW: previous track
|
||||
*/
|
||||
if (index == 0) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
// main layer - volume up (CW) and volume down (CCW)
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
// other layers - media next (CW) and media previous (CCW)
|
||||
if (clockwise) {
|
||||
tap_code(KC_MNXT);
|
||||
} else {
|
||||
tap_code(KC_MPRV);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,104 +0,0 @@
|
|||
/*
|
||||
Copyright 2022 imchipwood && deveth0
|
||||
|
||||
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 MUTE_HOLD_DELAY 400
|
||||
static uint16_t mute_hold_timer = 0;
|
||||
|
||||
enum custom_keycodes {
|
||||
MUTE_TEAMS = SAFE_RANGE,
|
||||
};
|
||||
|
||||
// clang-format off
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/*
|
||||
BASE LAYER - Media Controls
|
||||
/------------------------------------------------------------------------------------`
|
||||
| | Media Prev | Media Pause | Media Next | |
|
||||
| |--------------------|-------------------|------------------|---------|
|
||||
| | Teams - Mute | | | |
|
||||
| |--------------------|-------------------|------------------|---------|
|
||||
| | | | | |
|
||||
|-------------|--------------------|-------------------|------------------|---------|
|
||||
| Mute | TT(1) | | | Enter |
|
||||
\------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[0] = LAYOUT(
|
||||
KC_MPRV, KC_MPLY, KC_MNXT, KC_NO,
|
||||
KC_NO, KC_NO, KC_NO, KC_NO,
|
||||
MUTE_TEAMS, KC_NO, KC_NO, KC_NO,
|
||||
KC_MUTE, TT(1), KC_NO, KC_NO, KC_NO
|
||||
),
|
||||
/*
|
||||
SUB LAYER - RGB controls, Modes on encoder
|
||||
/-----------------------------------------------------`
|
||||
| | On/Off | Bright- | Bright+ | Reset |
|
||||
| |---------|---------|---------|---------|
|
||||
| | | Hue- | Hue+ | |
|
||||
| |---------|---------|---------|---------|
|
||||
| | | Sat- | Sat+ | |
|
||||
|-------------|---------|---------|---------|---------|
|
||||
| | TT(1) | Effect- | Effect+ | |
|
||||
\-----------------------------------------------------'
|
||||
*/
|
||||
[1] = LAYOUT(
|
||||
RGB_TOG, RGB_VAD, RGB_VAI, QK_BOOT,
|
||||
KC_NO, RGB_HUD, RGB_HUI, KC_NO,
|
||||
KC_NO, RGB_SAD, RGB_SAI, KC_NO,
|
||||
KC_NO, _______, RGB_SPD, RGB_SPI, KC_NO
|
||||
),
|
||||
};
|
||||
// clang-format on
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
// props to https://www.reddit.com/r/olkb/comments/oewbr2/comment/h49z38r
|
||||
switch (keycode) {
|
||||
case MUTE_TEAMS:
|
||||
if (record->event.pressed) { // when keycode MUTE_TEAMS is pressed
|
||||
mute_hold_timer = timer_read(); // mark the time the key was pressed
|
||||
tap_code16(LCTL(LSFT(KC_M))); // tap Ctrl + Shift + M (mute shortcut)
|
||||
} else { // when keycode MUTE_TEAMS is released
|
||||
if (timer_elapsed(mute_hold_timer) > MUTE_HOLD_DELAY) // if held longer than MUTE_HOLD_DELAY
|
||||
tap_code16(LCTL(LSFT(KC_M))); // tap the mute shortcut again
|
||||
} // otherwise do nothing
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
bool encoder_update_user(uint8_t index, bool clockwise) {
|
||||
switch (get_highest_layer(layer_state)) {
|
||||
case 0:
|
||||
// main layer, volume
|
||||
if (clockwise) {
|
||||
tap_code(KC_VOLU);
|
||||
} else {
|
||||
tap_code(KC_VOLD);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
// rgb control layer, effects
|
||||
if (clockwise) {
|
||||
rgblight_step();
|
||||
} else {
|
||||
rgblight_step_reverse();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return false;
|
||||
}
|
|
@ -1,373 +0,0 @@
|
|||
/* Copyright 2021 Don Kjer and Tyler Tidman
|
||||
*
|
||||
* 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
|
||||
|
||||
// Layer shorthand
|
||||
enum _layer {
|
||||
_WBL,
|
||||
_WFL,
|
||||
_WSL,
|
||||
_MBL,
|
||||
_MFL,
|
||||
_MSL
|
||||
};
|
||||
|
||||
#ifndef DEFAULT_LAYOUT
|
||||
# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout.
|
||||
#endif
|
||||
#ifndef ALT_LAYOUT
|
||||
# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active.
|
||||
#endif
|
||||
|
||||
static bool win_key_locked = false;
|
||||
static bool mac_media_locked = false;
|
||||
static bool win_appkey_pressed = false;
|
||||
static bool mac_fnkey_pressed = false;
|
||||
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows)
|
||||
KC_TMED, // Toggle between Fx keys or Media keys (Mac)
|
||||
KC_WFN, // Windows function key
|
||||
KC_MFN, // Mac function key
|
||||
MO_WSL, // Windows system key
|
||||
MO_MSL, // Mac system key
|
||||
DF_W2MBL, // Change layout from Windows to Mac
|
||||
DF_M2WBL // Change layout from Mac to Windows
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _WBL: Windows Base Layer (Default Layer)
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │PSc│Slk│Pse│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
|
||||
* │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_WBL] = LAYOUT_all( /* Windows Base Layer */
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||
),
|
||||
/* Keymap _WFL: Windows Function Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │ │ │Ply│Stp│Prv│Nxt│ │Mut│Vo+│Vo-│ │ │ │ │ │ │ │ │ │Mut│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_WFL] = LAYOUT_all( /* Windows Function Layer */
|
||||
_______, KC_MPLY, KC_MSTP, KC_MPRV, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, _______, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
/* Keymap _WSL: Windows System Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Rst│ │Slp│ │ │Pwr│ │ │ │ │ │ │ │ │ │MAC│ │ │ │ │
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_WSL] = LAYOUT_all( /* Windows Second / System Layer */
|
||||
QK_BOOT, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, DB_TOGG, 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, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
/* Keymap _MBL: Mac Base Layer (Alternate Layout)
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Esc│ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │F13│F14│F15│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
|
||||
* │Ctrl│Alt │GUI │ │ GUI│ Alt│Func│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_MBL] = LAYOUT_all( /* Mac Base Layer */
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||
),
|
||||
/* Keymap _MFL: Mac Function Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │ │ │Br-│Br+│ │ │ │ │ │Prv│Ply│ │Nxt│Mut│Vo-│Vo+│ │TMd│ │Mut│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_MFL] = LAYOUT_all( /* Mac Function Layer */
|
||||
_______, KC_BRID, KC_BRIU, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, KC_MUTE, KC_VOLD, KC_VOLU, KC_TMED, _______, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
/* Keymap _MSL: Mac System Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Rst│ │ │ │ │Slp│ │ │ │ │ │ │ │ │ │WIN│ │ │ │ │
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_MSL] = LAYOUT_all( /* Mac Second / System Layer */
|
||||
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, DB_TOGG, 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, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
};
|
||||
|
||||
void unlock_win_key(void) {
|
||||
win_key_locked = false;
|
||||
mac_media_locked = false;
|
||||
writePinHigh(LED_WIN_LOCK_PIN);
|
||||
}
|
||||
|
||||
void toggle_lock_win_key(void) {
|
||||
win_key_locked = !win_key_locked;
|
||||
writePin(LED_WIN_LOCK_PIN, !win_key_locked);
|
||||
}
|
||||
|
||||
void toggle_lock_media_key(void) {
|
||||
mac_media_locked = !mac_media_locked;
|
||||
writePin(LED_WIN_LOCK_PIN, !mac_media_locked);
|
||||
}
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
void dprint_global_layers(void) {
|
||||
dprint("Global Layers:");
|
||||
if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); }
|
||||
if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); }
|
||||
if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); }
|
||||
if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); }
|
||||
dprintf("\n");
|
||||
}
|
||||
|
||||
void dprint_layers(layer_state_t state) {
|
||||
dprint("Layers:");
|
||||
if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); }
|
||||
if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); }
|
||||
if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); }
|
||||
if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); }
|
||||
dprintf("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
#ifdef CONSOLE_ENABLE
|
||||
dprintf("default_layer_state_set_user: 0x%x\n", state);
|
||||
dprint_global_layers();
|
||||
#endif
|
||||
// Disable windows key lock on default layer transition.
|
||||
unlock_win_key();
|
||||
win_appkey_pressed = false;
|
||||
mac_fnkey_pressed = false;
|
||||
writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT));
|
||||
return state;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
#ifdef CONSOLE_ENABLE
|
||||
dprintf("layer_state_set_user: 0x%x\n", state);
|
||||
dprint_layers(state);
|
||||
#endif
|
||||
return state;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_TGUI:
|
||||
if (!record->event.pressed) {
|
||||
// Toggle GUI lock on key release
|
||||
toggle_lock_win_key();
|
||||
}
|
||||
break;
|
||||
case KC_TMED:
|
||||
// Only trigger when Fn key is also held down, to avoid accidental unlock.
|
||||
if (!mac_fnkey_pressed) { return false; }
|
||||
if (!record->event.pressed) {
|
||||
// Toggle Media Lock on key release
|
||||
toggle_lock_media_key();
|
||||
}
|
||||
break;
|
||||
case KC_LGUI:
|
||||
if (win_key_locked) { return false; }
|
||||
break;
|
||||
case KC_WFN:
|
||||
// Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down.
|
||||
if (record->event.pressed) {
|
||||
layer_on(_WFL);
|
||||
if (win_appkey_pressed) {
|
||||
// Also enable Secondary layer if App key is being held down.
|
||||
win_appkey_pressed = false;
|
||||
layer_on(_WSL);
|
||||
}
|
||||
} else {
|
||||
if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
|
||||
if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
|
||||
}
|
||||
break;
|
||||
case KC_APP:
|
||||
if (record->event.pressed) {
|
||||
// Don't actually press down the app menu key
|
||||
win_appkey_pressed = true;
|
||||
} else {
|
||||
if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
|
||||
if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
|
||||
if (win_appkey_pressed) {
|
||||
win_appkey_pressed = false;
|
||||
// Tap the KC_APP key on key release.
|
||||
tap_code(KC_APP);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_MFN:
|
||||
// Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN.
|
||||
if (record->event.pressed) {
|
||||
mac_fnkey_pressed = true;
|
||||
layer_on(_MFL);
|
||||
// Also enable Secondary layer if Right-Alt key is being held down.
|
||||
if (get_mods() & MOD_BIT(KC_RALT)) {
|
||||
layer_on(_MSL);
|
||||
}
|
||||
} else {
|
||||
mac_fnkey_pressed = false;
|
||||
if (!mac_media_locked) {
|
||||
if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
|
||||
if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KC_RALT:
|
||||
// Disable MSL/WFL layer on key-up.
|
||||
if (!record->event.pressed) {
|
||||
if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
|
||||
if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
|
||||
}
|
||||
break;
|
||||
case MO_WSL:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_WSL);
|
||||
} else {
|
||||
if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
|
||||
if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
|
||||
}
|
||||
break;
|
||||
case MO_MSL:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MSL);
|
||||
} else {
|
||||
if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
|
||||
if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
|
||||
}
|
||||
break;
|
||||
case DF_W2MBL:
|
||||
if (!record->event.pressed) {
|
||||
// Switch base layer, but preserve first/secondary layers.
|
||||
default_layer_set(1UL<<_MBL);
|
||||
layer_state_set(1UL<<_MFL | 1UL<<_MSL);
|
||||
}
|
||||
break;
|
||||
case DF_M2WBL:
|
||||
if (!record->event.pressed) {
|
||||
// Switch base layer, but preserve first/secondary layers.
|
||||
default_layer_set(1UL<<_WBL);
|
||||
layer_state_set(1UL<<_WFL | 1UL<<_WSL);
|
||||
}
|
||||
break;
|
||||
case QK_BOOT:
|
||||
if (record->event.pressed) {
|
||||
// Flash LEDs to indicate bootloader mode is enabled.
|
||||
on_all_leds();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
default_layer_set(1UL<<DEFAULT_LAYOUT);
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
# A keymap for Durgod Taurus K310/K320 that supports toggling between Mac and Windows
|
||||
|
||||
Supports both ANSI and ISO layouts.
|
||||
|
||||
Layer 0 : Standard layout (Windows)
|
||||
|
||||
Layer 1 : Media control and Windows lock key (Windows)
|
||||
- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
|
||||
- Fn + Windows to toggle Windows lock key functionality
|
||||
|
||||
Layer 2 : System layer (Windows)
|
||||
- Fn + Menu + Esc : Bootloader mode
|
||||
- Fn + Menu + F1 : System Sleep
|
||||
- Fn + Menu + F4 : Turning Off System
|
||||
- Fn + Menu + F12 : Switch to Mac layout
|
||||
|
||||
Layer 3 : Mac layout
|
||||
|
||||
Layer 4 : Media control and Media lock key (Mac)
|
||||
- Standard Mac Media keys for Fn + F1 ~ Fn + F12.
|
||||
- Fn + F13 to toggle Media lock key functionality
|
||||
|
||||
Layer 5 : System layer (Mac)
|
||||
- Fn + R-ALT + Esc : Bootloader mode
|
||||
- Fn + R-ALT + F4 : Shutdown/Sleep (Hold down on Mac)
|
||||
- Fn + R-ALT + F12 : Switch to Windows layout
|
||||
|
||||
## Toggle between Mac and Windows layout
|
||||
|
||||
You can switch between Mac and Windows layout by doing the following:
|
||||
- Hold down Fn + Menu (Windows Layout) or Fn + Right-Alt (Mac layout) (These are the same physical keys)
|
||||
- Press F12
|
||||
|
||||
The 'M' led will be lit when you are using the alternate layout. By default Mac is the alternate layout.
|
||||
|
||||
You can change the default & alternate layout by setting the following flags to either '_WBL'(Windows) or '_MBL' (Mac)
|
||||
- DEFAULT_LAYOUT (initial layout to use on boot)
|
||||
- ALT_LAYOUT (layout that will light the 'M' LED when active)
|
||||
|
||||
For example, to configure Mac as the default layer, and Windows to be the alternate layout, compile with these flags:
|
||||
|
||||
make EXTRAFLAGS="-DDEFAULT_LAYOUT=_MBL -DALT_LAYOUT=_WBL" durgod/k3x0/k310:chimera
|
||||
|
||||
## Windows key lock
|
||||
|
||||
In windows layout, you can hold down Fn + Windows key to disable the Windows key while in locked mode. The 'Lock' LED
|
||||
indicates if the Windows key is locked.
|
||||
|
||||
This is similar to the stock K310/K320 Windows key lock functionality.
|
||||
|
||||
## Mac Media Lock
|
||||
|
||||
To switch between Function row and Media row in Mac layout, press Fn + PrtSc. The 'Lock' LED indicator will be lit when in Media row mode.
|
||||
|
||||
### Subsequent Flashing
|
||||
|
||||
For repeating Flashing you have two options with this keymap:
|
||||
1. Use BootMagic
|
||||
- BootMagic Lite has been enabled with Assigned "Esc" key
|
||||
- Unplug USB Cable
|
||||
- Holding Esc Button
|
||||
- Plug in USB Cable, Keyboard should be in ST-Bootloader state
|
||||
2. Use key combination if using default keymap
|
||||
- Hold down Fn + Menu (Windows Layout) or Fn + Right-Alt (Mac layout) (These are the same physical keys)
|
||||
- Press Esc. Keyboard should go into booloader state.
|
|
@ -1 +0,0 @@
|
|||
OPT_DEFS += -DWINLOCK_DISABLED
|
|
@ -1,373 +0,0 @@
|
|||
/* Copyright 2021 Don Kjer and Tyler Tidman
|
||||
*
|
||||
* 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
|
||||
|
||||
// Layer shorthand
|
||||
enum _layer {
|
||||
_WBL,
|
||||
_WFL,
|
||||
_WSL,
|
||||
_MBL,
|
||||
_MFL,
|
||||
_MSL
|
||||
};
|
||||
|
||||
#ifndef DEFAULT_LAYOUT
|
||||
# define DEFAULT_LAYOUT _WBL // Change to _MBL to boot into Mac layout.
|
||||
#endif
|
||||
#ifndef ALT_LAYOUT
|
||||
# define ALT_LAYOUT _MBL // Layout to display 'MR' led when active.
|
||||
#endif
|
||||
|
||||
static bool win_key_locked = false;
|
||||
static bool mac_media_locked = false;
|
||||
static bool win_appkey_pressed = false;
|
||||
static bool mac_fnkey_pressed = false;
|
||||
|
||||
|
||||
// Defines the keycodes used by our macros in process_record_user
|
||||
enum custom_keycodes {
|
||||
KC_TGUI = SAFE_RANGE, // Toggle between GUI Lock or Unlock (Windows)
|
||||
KC_TMED, // Toggle between Fx keys or Media keys (Mac)
|
||||
KC_WFN, // Windows function key
|
||||
KC_MFN, // Mac function key
|
||||
MO_WSL, // Windows system key
|
||||
MO_MSL, // Mac system key
|
||||
DF_W2MBL, // Change layout from Windows to Mac
|
||||
DF_M2WBL // Change layout from Mac to Windows
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
/* Keymap _WBL: Windows Base Layer (Default Layer)
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Esc│ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │PSc│Slk│Pse│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
|
||||
* │Ctrl│GUI │Alt │ │ Alt│Func│ App│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_WBL] = LAYOUT_all( /* Windows Base Layer */
|
||||
KC_ESC, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_PSCR, KC_SCRL, KC_PAUS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_WFN, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||
),
|
||||
/* Keymap _WFL: Windows Function Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │ │ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │ │ │Mut│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │Lock│ │ │ │Func│ Sys│ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_WFL] = LAYOUT_all( /* Windows Function Layer */
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_TGUI, _______, _______, _______, _______, MO_WSL, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
/* Keymap _WSL: Windows System Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Rst│ │Slp│ │ │Pwr│ │ │ │ │ │ │ │ │ │MAC│ │ │ │ │
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_WSL] = LAYOUT_all( /* Windows Second / System Layer */
|
||||
QK_BOOT, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_W2MBL, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, DB_TOGG, 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, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
/* Keymap _MBL: Mac Base Layer (Alternate Layout)
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Esc│ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │M1 │M3 │M2 │M4 │ │F13│F14│F15│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ ` │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ 9 │ 0 │ - │ = │ Backsp│ │Ins│Hom│PgU│ │Num│ / │ * │ - │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ Tab │ Q │ W │ E │ R │ T │ Y │ U │ I │ O │ P │ [ │ ] │ \ │ │Del│End│PgD│ │ 7 │ 8 │ 9 │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ + │
|
||||
* │ Caps │ A │ S │ D │ F │ G │ H │ J │ K │ L │ ; │ ' │ # │Entr│ │ 4 │ 5 │ 6 │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │Shft│ \ │ Z │ X │ C │ V │ B │ N │ M │ , │ . │ / │ Shift │ │ ↑ │ │ 1 │ 2 │ 3 │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤Ent│
|
||||
* │Ctrl│Alt │GUI │ │ GUI│ Alt│Func│Ctrl│ │ ← │ ↓ │ → │ │ 0 │ . │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_MBL] = LAYOUT_all( /* Mac Base Layer */
|
||||
KC_ESC, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_BTN1, KC_BTN3, KC_BTN2, KC_BTN4, KC_F13, KC_F14, KC_F15,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, KC_NUM, KC_PSLS, KC_PAST, KC_PMNS,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, KC_P7, KC_P8, KC_P9, KC_PPLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, KC_P4, KC_P5, KC_P6,
|
||||
KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT,
|
||||
KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_MFN, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT
|
||||
),
|
||||
/* Keymap _MFL: Mac Function Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │ │ │F1 │F2 │F3 │F4 │ │F5 │F6 │F7 │F8 │ │F9 │F10│F11│F12│ │TMd│ │Mut│
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo+│ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │Vo-│ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_MFL] = LAYOUT_all( /* Mac Function Layer */
|
||||
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TMED, _______, KC_MUTE,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, MO_MSL, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
/* Keymap _MSL: Mac System Layer
|
||||
* ┌───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┬───┐ ┌───┬───┬───┐
|
||||
* │Rst│ │ │ │ │Slp│ │ │ │ │ │ │ │ │ │WIN│ │ │ │ │
|
||||
* └───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┴───┘ └───┴───┴───┘
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐ ┌───┬───┬───┐ ┌───┬───┬───┬───┐
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤ ├───┼───┼───┤ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬┈┈┈┈┤ └───┴───┴───┘ ├───┼───┼───┤ │
|
||||
* │ │ │ │DBG│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴───┴────┤ ┌───┐ ├───┼───┼───┼───┤
|
||||
* │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
|
||||
* ├────┼───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬────┤ ┌───┼───┼───┐ ├───┴───┼───┤ │
|
||||
* │ │ │ │ │ │ Sys│Func│ │ │ │ │ │ │ │ │ │
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘ └───┴───┴───┘ └───────┴───┴───┘
|
||||
*/
|
||||
[_MSL] = LAYOUT_all( /* Mac Second / System Layer */
|
||||
QK_BOOT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, DF_M2WBL, 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, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, DB_TOGG, 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, XXXXXXX, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
)
|
||||
};
|
||||
|
||||
void unlock_win_key(void) {
|
||||
win_key_locked = false;
|
||||
mac_media_locked = false;
|
||||
writePinHigh(LED_WIN_LOCK_PIN);
|
||||
}
|
||||
|
||||
void toggle_lock_win_key(void) {
|
||||
win_key_locked = !win_key_locked;
|
||||
writePin(LED_WIN_LOCK_PIN, !win_key_locked);
|
||||
}
|
||||
|
||||
void toggle_lock_media_key(void) {
|
||||
mac_media_locked = !mac_media_locked;
|
||||
writePin(LED_WIN_LOCK_PIN, !mac_media_locked);
|
||||
}
|
||||
|
||||
#ifdef CONSOLE_ENABLE
|
||||
void dprint_global_layers(void) {
|
||||
dprint("Global Layers:");
|
||||
if (IS_LAYER_ON(_WFL)) { dprint(" _WFL"); }
|
||||
if (IS_LAYER_ON(_WSL)) { dprint(" _WSL"); }
|
||||
if (IS_LAYER_ON(_MFL)) { dprint(" _MFL"); }
|
||||
if (IS_LAYER_ON(_MSL)) { dprint(" _MSL"); }
|
||||
dprintf("\n");
|
||||
}
|
||||
|
||||
void dprint_layers(layer_state_t state) {
|
||||
dprint("Layers:");
|
||||
if (IS_LAYER_ON_STATE(state, _WFL)) { dprint(" _WFL"); }
|
||||
if (IS_LAYER_ON_STATE(state, _WSL)) { dprint(" _WSL"); }
|
||||
if (IS_LAYER_ON_STATE(state, _MFL)) { dprint(" _MFL"); }
|
||||
if (IS_LAYER_ON_STATE(state, _MSL)) { dprint(" _MSL"); }
|
||||
dprintf("\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
layer_state_t default_layer_state_set_user(layer_state_t state) {
|
||||
#ifdef CONSOLE_ENABLE
|
||||
dprintf("default_layer_state_set_user: 0x%x\n", state);
|
||||
dprint_global_layers();
|
||||
#endif
|
||||
// Disable windows key lock on default layer transition.
|
||||
unlock_win_key();
|
||||
win_appkey_pressed = false;
|
||||
mac_fnkey_pressed = false;
|
||||
writePin(LED_MR_LOCK_PIN, !IS_LAYER_ON_STATE(state, ALT_LAYOUT));
|
||||
return state;
|
||||
}
|
||||
|
||||
layer_state_t layer_state_set_user(layer_state_t state) {
|
||||
#ifdef CONSOLE_ENABLE
|
||||
dprintf("layer_state_set_user: 0x%x\n", state);
|
||||
dprint_layers(state);
|
||||
#endif
|
||||
return state;
|
||||
}
|
||||
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case KC_TGUI:
|
||||
if (!record->event.pressed) {
|
||||
// Toggle GUI lock on key release
|
||||
toggle_lock_win_key();
|
||||
}
|
||||
break;
|
||||
case KC_TMED:
|
||||
// Only trigger when Fn key is also held down, to avoid accidental unlock.
|
||||
if (!mac_fnkey_pressed) { return false; }
|
||||
if (!record->event.pressed) {
|
||||
// Toggle Media Lock on key release
|
||||
toggle_lock_media_key();
|
||||
}
|
||||
break;
|
||||
case KC_LGUI:
|
||||
if (win_key_locked) { return false; }
|
||||
break;
|
||||
case KC_WFN:
|
||||
// Like MO(_WFL), but also enables _WSL if KC_APP is already pressed down.
|
||||
if (record->event.pressed) {
|
||||
layer_on(_WFL);
|
||||
if (win_appkey_pressed) {
|
||||
// Also enable Secondary layer if App key is being held down.
|
||||
win_appkey_pressed = false;
|
||||
layer_on(_WSL);
|
||||
}
|
||||
} else {
|
||||
if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
|
||||
if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
|
||||
}
|
||||
break;
|
||||
case KC_APP:
|
||||
if (record->event.pressed) {
|
||||
// Don't actually press down the app menu key
|
||||
win_appkey_pressed = true;
|
||||
} else {
|
||||
if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
|
||||
if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
|
||||
if (win_appkey_pressed) {
|
||||
win_appkey_pressed = false;
|
||||
// Tap the KC_APP key on key release.
|
||||
tap_code(KC_APP);
|
||||
}
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case KC_MFN:
|
||||
// Mac Fn key. Emit Fn keycode, and also transition layers similar to KC_WFN.
|
||||
if (record->event.pressed) {
|
||||
mac_fnkey_pressed = true;
|
||||
layer_on(_MFL);
|
||||
// Also enable Secondary layer if Right-Alt key is being held down.
|
||||
if (get_mods() & MOD_BIT(KC_RALT)) {
|
||||
layer_on(_MSL);
|
||||
}
|
||||
} else {
|
||||
mac_fnkey_pressed = false;
|
||||
if (!mac_media_locked) {
|
||||
if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
|
||||
if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
|
||||
}
|
||||
}
|
||||
break;
|
||||
case KC_RALT:
|
||||
// Disable MSL/WFL layer on key-up.
|
||||
if (!record->event.pressed) {
|
||||
if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
|
||||
if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
|
||||
}
|
||||
break;
|
||||
case MO_WSL:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_WSL);
|
||||
} else {
|
||||
if (IS_LAYER_ON(_WSL)) { layer_off(_WSL); }
|
||||
if (IS_LAYER_ON(_MFL)) { layer_off(_MFL); }
|
||||
}
|
||||
break;
|
||||
case MO_MSL:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MSL);
|
||||
} else {
|
||||
if (IS_LAYER_ON(_MSL)) { layer_off(_MSL); }
|
||||
if (IS_LAYER_ON(_WFL)) { layer_off(_WFL); }
|
||||
}
|
||||
break;
|
||||
case DF_W2MBL:
|
||||
if (!record->event.pressed) {
|
||||
// Switch base layer, but preserve first/secondary layers.
|
||||
default_layer_set(1UL<<_MBL);
|
||||
layer_state_set(1UL<<_MFL | 1UL<<_MSL);
|
||||
}
|
||||
break;
|
||||
case DF_M2WBL:
|
||||
if (!record->event.pressed) {
|
||||
// Switch base layer, but preserve first/secondary layers.
|
||||
default_layer_set(1UL<<_WBL);
|
||||
layer_state_set(1UL<<_WFL | 1UL<<_WSL);
|
||||
}
|
||||
break;
|
||||
case QK_BOOT:
|
||||
if (record->event.pressed) {
|
||||
// Flash LEDs to indicate bootloader mode is enabled.
|
||||
on_all_leds();
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
void keyboard_post_init_user(void) {
|
||||
default_layer_set(1UL<<DEFAULT_LAYOUT);
|
||||
}
|
|
@ -1,65 +0,0 @@
|
|||
# A keymap for Durgod Taurus K310/K320 that supports toggling between Mac and Windows
|
||||
|
||||
Supports both ANSI and ISO layouts.
|
||||
|
||||
Layer 0 : Standard layout (Windows)
|
||||
|
||||
Layer 1 : Media control and Windows lock key (Windows)
|
||||
- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
|
||||
- Fn + Windows to toggle Windows lock key functionality
|
||||
|
||||
Layer 2 : System layer (Windows)
|
||||
- Fn + Menu + Esc : Bootloader mode
|
||||
- Fn + Menu + F1 : System Sleep
|
||||
- Fn + Menu + F4 : Turning Off System
|
||||
- Fn + Menu + F12 : Switch to Mac layout
|
||||
|
||||
Layer 3 : Mac layout
|
||||
|
||||
Layer 4 : Media control and Media lock key (Mac)
|
||||
- Standard Mac Media keys for Fn + F1 ~ Fn + F12.
|
||||
- Fn + F13 to toggle Media lock key functionality
|
||||
|
||||
Layer 5 : System layer (Mac)
|
||||
- Fn + R-ALT + Esc : Bootloader mode
|
||||
- Fn + R-ALT + F4 : Shutdown/Sleep (Hold down on Mac)
|
||||
- Fn + R-ALT + F12 : Switch to Windows layout
|
||||
|
||||
## Toggle between Mac and Windows layout
|
||||
|
||||
You can switch between Mac and Windows layout by doing the following:
|
||||
- Hold down Fn + Menu (Windows Layout) or Fn + Right-Alt (Mac layout) (These are the same physical keys)
|
||||
- Press F12
|
||||
|
||||
The 'M' led will be lit when you are using the alternate layout. By default Mac is the alternate layout.
|
||||
|
||||
You can change the default & alternate layout by setting the following flags to either '_WBL'(Windows) or '_MBL' (Mac)
|
||||
- DEFAULT_LAYOUT (initial layout to use on boot)
|
||||
- ALT_LAYOUT (layout that will light the 'M' LED when active)
|
||||
|
||||
For example, to configure Mac as the default layer, and Windows to be the alternate layout, compile with these flags:
|
||||
|
||||
make EXTRAFLAGS="-DDEFAULT_LAYOUT=_MBL -DALT_LAYOUT=_WBL" durgod/k3x0/k310:typhon
|
||||
|
||||
## Windows key lock
|
||||
|
||||
In windows layout, you can hold down Fn + Windows key to disable the Windows key while in locked mode. The 'Lock' LED
|
||||
indicates if the Windows key is locked.
|
||||
|
||||
This is similar to the stock K310/K320 Windows key lock functionality.
|
||||
|
||||
## Mac Media Lock
|
||||
|
||||
To switch between Function row and Media row in Mac layout, press Fn + PrtSc. The 'Lock' LED indicator will be lit when in Media row mode.
|
||||
|
||||
### Subsequent Flashing
|
||||
|
||||
For repeating Flashing you have two options with this keymap:
|
||||
1. Use BootMagic
|
||||
- BootMagic Lite has been enabled with Assigned "Esc" key
|
||||
- Unplug USB Cable
|
||||
- Holding Esc Button
|
||||
- Plug in USB Cable, Keyboard should be in ST-Bootloader state
|
||||
2. Use key combination if using default keymap
|
||||
- Hold down Fn + Menu (Windows Layout) or Fn + Right-Alt (Mac layout) (These are the same physical keys)
|
||||
- Press Esc. Keyboard should go into booloader state.
|
|
@ -1,2 +0,0 @@
|
|||
OPT_DEFS += -DWINLOCK_DISABLED
|
||||
MOUSEKEY_ENABLE = yes
|
|
@ -1,145 +0,0 @@
|
|||
/* Copyright 2021 kuenhlee
|
||||
*
|
||||
* 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
|
||||
|
||||
// Layer shorthand
|
||||
#define _BL 0u
|
||||
#define _FL 1u // Multimedia Related, Virtual Desktop control
|
||||
#define _SL 2u // Just for System Related
|
||||
#define _UL 3u // Unicode Map
|
||||
|
||||
#define KC_ADTP LGUI(LCTL(KC_D)) // Adding New Virtual Desktop
|
||||
#define KC_DDTP LGUI(LCTL(KC_F4)) // Deleting / Removing Current Virtual Desktop
|
||||
#define KC_NDTP LGUI(LCTL(KC_RGHT)) // Navigate to the Next Virtual Desktop
|
||||
#define KC_PDTP LGUI(LCTL(KC_LEFT)) // Navigate to the Previous Virtual Desktop
|
||||
#define KC_WINL LGUI(KC_LEFT) // Snap Windows to Left
|
||||
#define KC_WINR LGUI(KC_RGHT) // Snap Windows to Right
|
||||
#define KC_WINU LGUI(KC_UP) // Maximize the Window
|
||||
#define KC_WIND LGUI(KC_DOWN) // Minimize the desktop window
|
||||
#define KC_TASK LCTL(LSFT(KC_ESC)) // Launch Task Manager
|
||||
|
||||
#define KC_FIND LCTL(LSFT(KC_F)) // Find In Files
|
||||
#define KC_STOP LCTL(LSFT(KC_HOME)) // Select from Cursor to Home
|
||||
#define KC_SEND LCTL(LSFT(KC_END)) // Select from Cursor to End
|
||||
|
||||
// °±²³µ©ΩθΩ√∞∆≈≠→↓←↑≡■□●○∴«»÷≤≥Σ
|
||||
// Defines the Enumeration for Unicode Map
|
||||
enum unicode_names {
|
||||
DEGR,
|
||||
PONE,
|
||||
POW2,
|
||||
POW3,
|
||||
MYU,
|
||||
COPY,
|
||||
THET,
|
||||
OHM,
|
||||
SQRT,
|
||||
INFI,
|
||||
DELT,
|
||||
APPR,
|
||||
NEQU,
|
||||
RARR,
|
||||
DARR,
|
||||
LARR,
|
||||
UARR,
|
||||
SAME,
|
||||
BSQR,
|
||||
WSQR,
|
||||
BDOT,
|
||||
WDOT,
|
||||
THFR,
|
||||
DIV,
|
||||
LTOE,
|
||||
MTOE,
|
||||
DLAR,
|
||||
DRAR,
|
||||
SUM,
|
||||
};
|
||||
|
||||
const uint32_t unicode_map[] PROGMEM = {
|
||||
[DEGR] = 0x00B0, // °
|
||||
[PONE] = 0x00B1, // ±
|
||||
[POW2] = 0x00B2, // ²
|
||||
[POW3] = 0x00B3, // ³
|
||||
[MYU] = 0x00B5, // µ
|
||||
[COPY] = 0x00A9, // ©
|
||||
[THET] = 0x03B8, // θ
|
||||
[OHM] = 0x2126, // Ω
|
||||
[SQRT] = 0x221A, // √
|
||||
[INFI] = 0x221E, // ∞
|
||||
[DELT] = 0x0394, // ∆
|
||||
[APPR] = 0x2248, // ≈
|
||||
[NEQU] = 0x2260, // ≠
|
||||
[RARR] = 0x2192, // →
|
||||
[DARR] = 0x2193, // ↓
|
||||
[LARR] = 0x2190, // ←
|
||||
[UARR] = 0x2191, // ↑
|
||||
[SAME] = 0x2261, // ≡
|
||||
[BSQR] = 0x25A0, // ■
|
||||
[WSQR] = 0x25A1, // □
|
||||
[BDOT] = 0x25CF, // ●
|
||||
[WDOT] = 0x25CB, // ○
|
||||
[THFR] = 0x2234, // ∴
|
||||
[DIV] = 0x00F7, // ÷
|
||||
[LTOE] = 0x2264, // ≤
|
||||
[MTOE] = 0x2265, // ≥
|
||||
[DLAR] = 0x00AB, // «
|
||||
[DRAR] = 0x00BB, // »
|
||||
[SUM] = 0x03A3 // Σ
|
||||
};
|
||||
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
[_BL] = LAYOUT_tkl_ansi( /* Base Layer */
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SCRL, KC_PAUS,
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
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_UP,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(_FL), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT
|
||||
),
|
||||
|
||||
[_FL] = LAYOUT_tkl_ansi( /* First Layer */
|
||||
KC_TRNS, KC_MPLY, KC_MSTP, KC_MRWD, KC_MFFD, KC_MUTE, KC_VOLD, KC_VOLU, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_CALC, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ADTP, KC_STOP, KC_PDTP,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TASK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MSEL, XXXXXXX, XXXXXXX, XXXXXXX, KC_DDTP, KC_SEND, KC_NDTP,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_FIND, KC_WHOM, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, KC_MYCM, XXXXXXX, XXXXXXX, XXXXXXX, KC_MAIL, XXXXXXX, XXXXXXX, XXXXXXX, KC_MENU, KC_WINU,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_SL), KC_TRNS, MO(_UL), XXXXXXX, KC_WINL, KC_WIND, KC_WINR
|
||||
),
|
||||
|
||||
[_SL] = LAYOUT_tkl_ansi( /* Second Layer */
|
||||
XXXXXXX, KC_SLEP, XXXXXXX, XXXXXXX, KC_PWR, 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, 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, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
|
||||
),
|
||||
|
||||
[_UL] = LAYOUT_tkl_ansi( /* Unicode Layer */
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
UM(APPR), UM(NEQU), UM(POW2), UM(POW3), XXXXXXX, XXXXXXX, UM(BSQR), UM(WSQR), UM(INFI), UM(BDOT), UM(WDOT), XXXXXXX, UM(PONE), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, UM(SUM), XXXXXXX, UM(MYU), UM(SAME), XXXXXXX, UM(OHM), UM(DLAR), UM(DRAR), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, UM(SQRT), UM(DELT), XXXXXXX, XXXXXXX, UM(THFR), XXXXXXX, XXXXXXX, XXXXXXX, UM(THET), UM(DEGR), XXXXXXX,
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, UM(COPY), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, UM(LTOE), UM(MTOE), UM(DIV), XXXXXXX, UM(UARR),
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_TRNS, KC_TRNS, XXXXXXX, UM(LARR), UM(DARR), UM(RARR)
|
||||
)
|
||||
};
|
||||
|
||||
void matrix_init_user(void) {
|
||||
set_unicode_input_mode(UNICODE_MODE_WINCOMPOSE);
|
||||
}
|
|
@ -1,38 +0,0 @@
|
|||
# The kuenhlee keymap for Durgod Taurus K320.
|
||||
|
||||
Layer 0 : Standard ANSI 87 Keys TKL layout
|
||||
------------------------------------------
|
||||
|
||||
Layer 1 : Media control and Key Modifier for Virtual Desktop navagation
|
||||
-----------------------------------------------------------------------
|
||||
- Reusing Durgod's Original Media Control for Fn + F1 ~ Fn + F7
|
||||
- Fn + F12 Remapped to Launch Calculator
|
||||
- Fn + M To Launch Media Player
|
||||
- Fn + P To Mail Client
|
||||
- Fn + G To Launch Web Browswer / Nagivate to Homepage
|
||||
- Fn + C To Launch My Computer
|
||||
- Fn + T Launch Task Manager
|
||||
- Fn + F Find in Files ( Notepad ++ )
|
||||
|
||||
- Windows's Virtual Desktop Navigation
|
||||
- Fn + Ins To add New Virtual Desktop
|
||||
- Fn + Del To Delete / Remove Current Virtual Desktop
|
||||
- Fn + PgUp Navigate to the Next Virtual Desktop
|
||||
- Fn + PgDn Navigate to the Previous Virtual Desktop
|
||||
|
||||
- Windows ShortKeys
|
||||
- Fn + Left Snap Windows to Left
|
||||
- Fn + Right Snap Windows to Right
|
||||
- Fn + Up Maximize the Window
|
||||
- Fn + Down Minimize the desktop window
|
||||
- Fn + Home Select from Cursor to Home
|
||||
- Fn + End Select from Cursor to End
|
||||
|
||||
Layer 2 : Mainly for Windows Sleep and Shutdown
|
||||
-----------------------------------------------
|
||||
- Fn + R-ALT + F1 : System Sleep
|
||||
- Fn + R-ALT + F4 : Turning Off System
|
||||
|
||||
Layer Unicode : Mainly for Predefined Unicode code to work with WinCompose
|
||||
--------------------------------------------------------------------------
|
||||
- °±²³µ©ΩθΩ√∞∆≈≠→↓←↑≡■□●○∴«»÷≤≥Σ
|
|
@ -1,4 +0,0 @@
|
|||
# Build Options
|
||||
# change yes to no to disable
|
||||
#
|
||||
UNICODEMAP_ENABLE = yes # Enable Unicode Map
|
|
@ -1,128 +0,0 @@
|
|||
256k HHKB Layout:
|
||||
===
|
||||
|
||||
this is my personal layer that i use on my Tina-C HHKB layout board with a DZ60 PCB.
|
||||
---
|
||||
UPDATE (4-20-2018):
|
||||
===
|
||||
after a week of using this layout i reazlied that having the ALT button on the right side and the ALTFN layer trigger on the left isn't ideal...i still wanted to change the default HHKB style CROSS arrow cluster into a reversed T cluster since im more used to that so i swapped the ALTFN layer to the right side and the normal ALT layer is back on the left side. so now i can use the arrow cluster (which i shifted one key over to the right) with 1 hand.
|
||||
|
||||
it feels more nataural to me this way.
|
||||
|
||||
also i decided to change the mouse scroll keys on the mouse layer to mouse movement keys... the scrolling wasn't working out as well as i'd hoped. again, this is merely an experimental layer just to play around with mouse control.
|
||||
|
||||
|
||||
|
||||
|
||||
---
|
||||
|
||||
Walkthrough:
|
||||
---
|
||||
|
||||
there is 1 base layer and 4 modifyer layers:
|
||||
|
||||
BASE:
|
||||
---
|
||||
|
||||
```
|
||||
/* BASE LAYER
|
||||
*
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \| | ~ ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Win | Alt | Space | ALTFN | LIGHTS |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
```
|
||||
|
||||
LAYER 1 (ALTFN):
|
||||
---
|
||||
|
||||
this layer is my main function layer, i changed the default HHKB function layer to suit my need and also changed the placement of the modifyer key to the left alt since i want to control the layer activation with one hand and have the other hand control the keys on that layer freely. perhaps this is due to me being left handed but it feels more natural to me this way.
|
||||
|
||||
```
|
||||
/* ALTFN LAYER
|
||||
*
|
||||
* ,---------------------------------------------------------------------------------------------------------------------
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INSERT | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | UP | V_DEC | V_INC | DEL |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CTRL | _ | _ | _ | _ | _ | _ | HOME | END | LEFT | DOWN | RIGHT | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | Shift | _ | _ | _ | _ | _ | _ | _ | PREV | NEXT | PLAY | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | _ | _ | _ | _ | _ |
|
||||
* `---------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
```
|
||||
|
||||
|
||||
MOUSE LAYER (MOUSEFN):
|
||||
---
|
||||
|
||||
*To access this layer you need to enter the ALTFN layer first then hit ESC button which will switch to the MOUSEFN layer*
|
||||
|
||||
this is the second *hidden* layer that controls the mouse scroll wheel directions. i find it's useful to have these controls on the keyboard for certain applications that require scrolling in all 4 directions (Simple example: expanding an image preview to full size that overflows outside of the default monitor size and using the scroll wheel to mouve the image around.)
|
||||
|
||||
also another benefit is that a lot of mice do not have horizontal control buttons for the scrolling
|
||||
|
||||
(This layer is still experimental so i might change it later or modify it but so far i enjoy it)
|
||||
|
||||
```
|
||||
/* MOUSEFN LAYER
|
||||
*
|
||||
* ,---------------------------------------------------------------------------------------------------------------------
|
||||
* | | ACC_1 | ACC_2 | ACC_3 | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | WHEEL_UP | _ | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CTRL | _ | _ | _ | _ | _ | _ | _ | _ | WH_LEFT | WH_DOWN | WH_RIGHT | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | Shift | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | _ | _ | _ | _ | _ |
|
||||
* `---------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
```
|
||||
|
||||
|
||||
STANDARD HHKB FN LAYER (FN):
|
||||
---
|
||||
|
||||
this is the default HHKB function layer (mostly)... I have left it there on the same button and everything for 2 reasons: 1. for backup incase i forget where something was or if it contains a button that i did not include in my ALTFN layer. 2. as a reference for anyone else.
|
||||
|
||||
*this layer will probably get removed once i get comfortable with my ALTFN layer.*
|
||||
|
||||
|
||||
|
||||
LIGHTS LAYER:
|
||||
---
|
||||
|
||||
this is the basic lights layer used to control the RBG backlight on the DZ60... i have removed the 3 backlight controls since i do not use any key LED Backlight.
|
||||
|
||||
|
||||
```
|
||||
/* LIGHTS LAYER
|
||||
*
|
||||
* ,---------------------------------------------------------------------------------------------------------------------+
|
||||
* | RGB_TOGGLE | STATIC | BREATHE | RAINBOW | SWIRL | SNAKE | KNIGHTRIDER | XMAS | STATIC_GRAD | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | RBG_MOD | HUE_INC | SATURATION_INC | BRIGHT_INC | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | CTRL | HUE_DEC | SATURATION_DEC | BRIGHT_DEC | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | Shift | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | _ | _ | _ | _ | _ |
|
||||
* `----------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
```
|
||||
|
||||
|
|
@ -1,240 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
// My layout is practically the default HHKB layout.
|
||||
#define _DEFAULT 0
|
||||
#define _ALTFN 1
|
||||
#define _MOUSEFN 2
|
||||
#define _FN 3
|
||||
#define _LIGHTS 4
|
||||
|
||||
|
||||
#define ______ KC_TRNS
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
|
||||
/* BASE LAYER
|
||||
*
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \| | ~ ` |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | CTRL | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RShift | FN |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Win | Alt | Space | Alt | LIGHTS |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
[_DEFAULT] = LAYOUT_60_hhkb(
|
||||
KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC,
|
||||
KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(_FN),
|
||||
KC_LGUI, KC_LALT, KC_SPC, MO(_ALTFN), MO(_LIGHTS)),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* ALTFN LAYER
|
||||
*
|
||||
* ,---------------------------------------------------------------------------------------------------------------------
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | INSERT | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | UP | V_DEC | V_INC | DEL |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CTRL | _ | _ | _ | _ | _ | _ | HOME | END | LEFT | DOWN | RIGHT | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | Shift | _ | _ | _ | _ | _ | _ | _ | PREV | NEXT | PLAY | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | _ | _ | _ | _ | _ |
|
||||
* `---------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
[_ALTFN] = LAYOUT_60_hhkb(
|
||||
|
||||
MO(_MOUSEFN), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, ______, KC_PSCR,
|
||||
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_UP, KC_VOLD, KC_VOLU, KC_DEL,
|
||||
______, ______, ______, ______, ______, ______, ______, KC_HOME, KC_END, KC_LEFT, KC_DOWN, KC_RIGHT, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, KC_MPRV, KC_MNXT, KC_MPLY, ______, ______,
|
||||
______, ______, ______, ______, ______),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* MOUSEFN LAYER
|
||||
*
|
||||
* ,---------------------------------------------------------------------------------------------------------------------
|
||||
* | | ACC_1 | ACC_2 | ACC_3 | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CAPS | _ | _ | _ | _ | _ | _ | _ | _ | _ | WHEEL_UP | _ | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | CTRL | _ | _ | _ | _ | _ | _ | _ | _ | WH_LEFT | WH_DOWN | WH_RIGHT | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | Shift | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |---------------------------------------------------------------------------------------------------------------------+
|
||||
* | _ | _ | _ | _ | _ |
|
||||
* `---------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
[_MOUSEFN] = LAYOUT_60_hhkb(
|
||||
|
||||
______, KC_ACL0, KC_ACL1, KC_ACL2, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_UP, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, KC_MS_LEFT, KC_MS_DOWN, KC_MS_RIGHT, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* FN LAYER
|
||||
*
|
||||
* ,------------------------------------------------------------------------------------------------------
|
||||
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |INSERT | _ |
|
||||
* |------------------------------------------------------------------------------------------------------+
|
||||
* | CAPS | _ | _ | _ | _ | _ | _ | _ | PRSC | SLOCK | PAUSE | UP | _ | DEL |
|
||||
* |------------------------------------------------------------------------------------------------------+
|
||||
* | CTRL | _ | VOLDOWN | VOLUP | VOLMUTE | _ | _ | _ | HOME | PGUP | LEFT | IGHT | _ |
|
||||
* |------------------------------------------------------------------------------------------------------+
|
||||
* | Shift | _ | _ | _ | _ | _ | _ | _ | END | PGDN | DOWN | _ | _ |
|
||||
* |------------------------------------------------------------------------------------------------------+
|
||||
* | _ | _ | _ | _ | _ |
|
||||
* `------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
|
||||
[_FN] = LAYOUT_60_hhkb(
|
||||
______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_INS, ______,
|
||||
KC_CAPS, ______, ______, ______, ______, ______, ______, ______, KC_PSCR, KC_SCRL, KC_PAUS, KC_UP, ______, KC_DEL,
|
||||
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______,
|
||||
______, KC_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______,
|
||||
______, ______, ______, ______, ______),
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* LIGHTS LAYER
|
||||
*
|
||||
* ,---------------------------------------------------------------------------------------------------------------------+
|
||||
* | RGB_TOGGLE | STATIC | BREATHE | RAINBOW | SWIRL | SNAKE | KNIGHTRIDER | XMAS | STATIC_GRAD | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | RBG_MOD | HUE_INC | SATURATION_INC | BRIGHT_INC | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | CTRL | HUE_DEC | SATURATION_DEC | BRIGHT_DEC | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | Shift | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ | _ |
|
||||
* |----------------------------------------------------------------------------------------------------------------------+
|
||||
* | _ | _ | _ | _ | _ |
|
||||
* `----------------------------------------------------------------------------------------------------------------------'
|
||||
*/
|
||||
|
||||
|
||||
|
||||
[_LIGHTS] = LAYOUT_60_hhkb(
|
||||
RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, ______, ______, ______, ______, ______, ______,
|
||||
RGB_MOD, RGB_HUI, RGB_SAI, RGB_VAI, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, RGB_HUD, RGB_SAD, RGB_VAD, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______,
|
||||
______, ______, ______, ______, ______),
|
||||
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
|
||||
RGB controls
|
||||
|
||||
Key -> Description
|
||||
=========================
|
||||
|
||||
RGB_TOG -> Toggle RGB lighting on or off
|
||||
|
||||
RGB_MOD -> Cycle through modes, reverse direction when Shift is held
|
||||
|
||||
RGB_RMOD -> Cycle through modes in reverse, forward direction when Shift is held
|
||||
|
||||
RGB_HUI -> Increase hue
|
||||
|
||||
RGB_HUD -> Decrease hue
|
||||
|
||||
RGB_SAI -> Increase saturation
|
||||
|
||||
RGB_SAD -> Decrease saturation
|
||||
|
||||
RGB_VAI -> Increase value (brightness)
|
||||
|
||||
RGB_VAD -> Decrease value (brightness)
|
||||
|
||||
RGB_M_P -> Static (no animation) mode
|
||||
|
||||
RGB_M_B -> Breathing animation mode
|
||||
|
||||
RGB_M_R -> Rainbow animation mode
|
||||
|
||||
RGB_M_SW -> Swirl animation mode
|
||||
|
||||
RGB_M_SN -> Snake animation mode
|
||||
|
||||
RGB_M_K -> "Knight Rider" animation mode
|
||||
|
||||
RGB_M_X -> Christmas animation mode
|
||||
|
||||
RGB_M_G -> Static gradient animation mode
|
||||
|
||||
*/
|
||||
|
||||
/*
|
||||
Mouse controls:
|
||||
|
||||
Key -> Aliases -> Description
|
||||
==================================================
|
||||
|
||||
KC_MS_UP -> KC_MS_U -> Mouse Cursor Up
|
||||
|
||||
KC_MS_DOWN -> KC_MS_D -> Mouse Cursor Down
|
||||
|
||||
KC_MS_LEFT -> KC_MS_L -> Mouse Cursor Left
|
||||
|
||||
KC_MS_RIGHT -> KC_MS_R -> Mouse Cursor Right
|
||||
|
||||
KC_MS_BTN1 -> KC_BTN1 -> Mouse Button 1
|
||||
|
||||
KC_MS_BTN2 -> KC_BTN2 -> Mouse Button 2
|
||||
|
||||
KC_MS_BTN3 -> KC_BTN3 -> Mouse Button 3
|
||||
|
||||
KC_MS_BTN4 -> KC_BTN4 -> Mouse Button 4
|
||||
|
||||
KC_MS_BTN5 -> KC_BTN5 -> Mouse Button 5
|
||||
|
||||
KC_MS_WH_UP -> KC_WH_U -> Mouse Wheel Up
|
||||
|
||||
KC_MS_WH_DOWN -> KC_WH_D -> Mouse Wheel Down
|
||||
|
||||
KC_MS_WH_LEFT -> KC_WH_L -> Mouse Wheel Left
|
||||
|
||||
KC_MS_WH_RIGHT -> KC_WH_R -> Mouse Wheel Right
|
||||
|
||||
KC_MS_ACCEL0 -> KC_ACL0 -> Set mouse acceleration to 0
|
||||
|
||||
KC_MS_ACCEL1 -> KC_ACL1 -> Set mouse acceleration to 1
|
||||
|
||||
KC_MS_ACCEL2 -> KC_ACL2 -> Set mouse acceleration to 2
|
||||
|
||||
*/
|
|
@ -1 +0,0 @@
|
|||
#define GRAVE_ESC_GUI_OVERRIDE # Always send Escape if GUI is pressed
|
|
@ -1,25 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
LAYOUT(
|
||||
QK_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_NO,
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, MO(1), KC_RALT, KC_RALT, KC_LGUI, KC_RCTL),
|
||||
|
||||
LAYOUT(
|
||||
KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_DEL,
|
||||
KC_TRNS, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, QK_BOOT,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_DOWN,BL_TOGG, BL_UP, BL_STEP, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LEFT, KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
LAYOUT(
|
||||
KC_TRNS, M(1), M(2), M(3), M(4), M(5), M(6), M(7), M(8), M(9), M(10), M(11), M(12), KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,
|
||||
KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS),
|
||||
};
|
|
@ -1,5 +0,0 @@
|
|||
#pragma once
|
||||
|
||||
/* sets 'Auto Shift' timeouts */
|
||||
#define AUTO_SHIFT_TIMEOUT 150
|
||||
#define NO_AUTO_SHIFT_SPECIAL
|
|
@ -1,112 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
#define _L0 0
|
||||
#define _L1 1
|
||||
#define _L2 2
|
||||
#define _L3 3
|
||||
#define _L4 4
|
||||
|
||||
enum {
|
||||
TD_SPC_ENT = 0,
|
||||
TD_KC_LSFT_CAPS,
|
||||
TD_KC_RSFT_CAPS
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/*
|
||||
* template
|
||||
* [_L1] = LAYOUT(
|
||||
* _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
* _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
|
||||
* _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,
|
||||
* _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
* _______,_______,_______, _______,_______,_______, _______,_______,_______,_______,_______,
|
||||
*
|
||||
*
|
||||
* Keymap _L0: (Layer 0 - Base Layer) This is the default layer
|
||||
* This layer has a key set to MO(_L1) which means when held down Layer 1 will become active, If Layer 1 does not have anything set for tat key is will revert to uing the key set at layer 0.
|
||||
* LT(_L1, KC_1) means that when the "1" key is long touched then it will activate the layer _L1 key(F1) but if the key is just tapped it will activate the "1" key.
|
||||
* QK_GESC = Escape when tapped, ` when pressed with Shift or GUI
|
||||
* SC_LSPO = Left Shift when held, ( when tapped
|
||||
* TD(LT(_L3,KC_SPACE)) = This is a test... hoping it will tap dance if double tapped it does enter if single tap it does space if long hold down it does _L3(Layer 3).
|
||||
* LT(_L3,KC_SPACE) = if tapped it does space, is long touch it does _L3(Layer 3)
|
||||
* BL_TOGG = Toggles the LEDs.
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = |Bkspc| Del |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | _L4 | A | S | D | F | G | H | J | K | L | ; | ' | Enter |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Shift | Z | X | C | V | B | N | M | , | . | / | RSh | U | _L1 |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | Ctrl | Win | Alt | _L3[Space] |LEdiodes| Space |Win | _L2| L | D | R |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_L0] = LAYOUT(
|
||||
QK_GESC, LT(_L1, KC_1),LT(_L1, KC_2),LT(_L1, KC_3),LT(_L1, KC_4),LT(_L1, KC_5),LT(_L1, KC_6),LT(_L1, KC_7),LT(_L1, KC_8),LT(_L1, KC_9),LT(_L1, KC_0),LT(_L1, KC_MINS),LT(_L1, KC_EQL),KC_BSPC, KC_DEL,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
SC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, TO(_L1),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, LT(_L3,KC_SPACE),BL_TOGG,TD(TD_SPC_ENT), KC_RGUI, TO(_L2), KC_LEFT, KC_DOWN, KC_RIGHT),
|
||||
|
||||
/* Keymap _L1: (Layer 1) This is function layer 1
|
||||
* This layer is activated while the Fn key is being held down.
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | Reset | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | F13| F14|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | WhUp| U | WhDn | | | | | | PrtScr | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | L | D | R | | | Home | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | End | VolDn|VolUp|Mute | | | PgUp| |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | Home| PgDn| End |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_L1] = LAYOUT(
|
||||
QK_BOOT, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_F13, KC_F14,
|
||||
_______, KC_WH_U, KC_UP, KC_WH_D, _______, _______,_______, _______, _______, _______, KC_PSCR, _______, _______, _______,
|
||||
_______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, KC_HOME, _______, _______, _______, KC_HOME, _______, _______,
|
||||
_______, _______, KC_APP, BL_STEP,_______, KC_END, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, KC_PGUP, _______,
|
||||
_______, _______, _______, _______,_______,_______, _______, _______, KC_HOME, KC_PGDN, KC_END),
|
||||
|
||||
/* Keymap _L2: (Layer 2) This is function layer 2
|
||||
* This layer is activated while the Fn2 key is being held down.
|
||||
* LCA(KC_TAB) = Hold Left Control and Alt and press kc_tab which cycles trough open apps.
|
||||
* MEH(KC_TAB) = Hold Left Control, Shift and Alt and press kc_TAB to cycle backwards through apps.
|
||||
* ,-----------------------------------------------------------------------------------------.
|
||||
* | | | | | | | | | | | | | | | LCA(KC_TAB)|
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | | |MEH(KC_TAB)
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | || | | | | |
|
||||
* |-----------------------------------------------------------------------------------------+
|
||||
* | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_L2] = LAYOUT(
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,LCA(KC_TAB),
|
||||
_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, MEH(KC_TAB),
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,
|
||||
_______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,KC_MS_BTN1,KC_MS_UP,KC_MS_BTN2,
|
||||
_______,_______,_______, _______,_______,_______, _______,_______,KC_MS_LEFT,KC_MS_DOWN,KC_MS_RIGHT)
|
||||
|
||||
};
|
||||
|
||||
//Tap Dance Definitions
|
||||
tap_dance_action_t tap_dance_actions[] = {
|
||||
|
||||
//Tap once for space, tap twice for enter
|
||||
[TD_SPC_ENT] = ACTION_TAP_DANCE_DOUBLE(KC_SPC, KC_ENT),
|
||||
//Tap once for Left Shift, twice for Caps Lock
|
||||
[TD_KC_LSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_LSFT, KC_CAPS),
|
||||
//Tap once for Right Shift, twice for Caps Lock
|
||||
[TD_KC_RSFT_CAPS] = ACTION_TAP_DANCE_DOUBLE(KC_RSFT, KC_CAPS)
|
||||
|
||||
// Other declarations would go here, separated by commas, if you have them
|
||||
|
||||
};
|
|
@ -1,9 +0,0 @@
|
|||
# LEdiodes Keymap for XD60 60% PCB
|
||||
|
||||
![LEdiodes Layer 0 Keymap for XD60](https://i.imgur.com/pDneawX.jpg)
|
||||
|
||||
## Additional Notes
|
||||
Layer 0(default) Keymap for LEdiodes XD60.
|
||||
|
||||
## Build
|
||||
To build the default keymap, simply run `make xd60:LEdiodes`.
|
|
@ -1,15 +0,0 @@
|
|||
# Build Options
|
||||
# comment out to disable the options.
|
||||
#
|
||||
BOOTMAGIC_ENABLE = yes # Enable Bootmagic Lite
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = no # Commands for debug and configuration
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
NKRO_ENABLE = yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
AUDIO_ENABLE = no
|
||||
RGBLIGHT_ENABLE = yes
|
||||
AUTO_SHIFT_ENABLE = yes # If the time depressed is greater than or equal to the AUTO_SHIFT_TIMEOUT, then a shifted version of the key is emitted. If the time is less than the AUTO_SHIFT_TIMEOUT time, then the normal state is emitted
|
||||
TAP_DANCE_ENABLE = yes
|
|
@ -1,16 +0,0 @@
|
|||
# Docs
|
||||
|
||||
1. https://docs.qmk.fm/#/
|
||||
2. To build, run: `make dz60:_bonfire`
|
||||
|
||||
## Map of Layers
|
||||
|
||||
http://www.keyboard-layout-editor.com/#/gists/b19ee1c251c908d9b5ef76965d588937
|
||||
|
||||
![Visual Keymap](https://i.imgur.com/DuiUo0W.jpg)
|
||||
|
||||
### Todo
|
||||
- lighting effects based on layer in use
|
||||
- https://github.com/DanDobrick/qmk_firmware/blob/danDobrick-v60r-layout/keyboards/v60_type_r/keymaps/danDobrick/keymap.c#L140
|
||||
|
||||
- rewrite the mod-tap functions to use the non-deprecated way of instancing them
|
File diff suppressed because it is too large
Load diff
|
@ -1,29 +0,0 @@
|
|||
/**
|
||||
* Variables
|
||||
*
|
||||
*/
|
||||
int held_esc_threshold = 230;
|
||||
bool is_esc_held = false;
|
||||
uint16_t held_esc_timer = 0;
|
||||
|
||||
/**
|
||||
* Define Layers
|
||||
*/
|
||||
enum layers {
|
||||
BASE = 0,
|
||||
NRMN,
|
||||
GAME,
|
||||
FCTN,
|
||||
KEYB
|
||||
};
|
||||
|
||||
/**
|
||||
* Define Custom Keycodes
|
||||
*/
|
||||
enum custom_keycodes {
|
||||
HLD_ESC = SAFE_RANGE,
|
||||
MOD_UP = MT(MOD_RSFT, KC_UP),
|
||||
MOD_RT = MT(MOD_HYPR, KC_RIGHT),
|
||||
MOD_DN = MT(MOD_RCTL, KC_DOWN),
|
||||
MOD_LT = MT(MOD_RGUI, KC_LEFT)
|
||||
};
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* Custom Keycodes
|
||||
* https://beta.docs.qmk.fm/detailed-guides/custom_quantum_functions#custom-keycodes
|
||||
*
|
||||
*/
|
||||
|
||||
// Called on every keyup and keydown
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record)
|
||||
{
|
||||
switch (keycode) {
|
||||
case HLD_ESC:
|
||||
if(record->event.pressed) {
|
||||
is_esc_held = true;
|
||||
held_esc_timer = timer_read();
|
||||
} else {
|
||||
is_esc_held = false;
|
||||
unregister_code(KC_ESC);
|
||||
}
|
||||
return true;
|
||||
break;
|
||||
|
||||
default:
|
||||
return true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// checking the held escape timer
|
||||
void matrix_scan_user(void)
|
||||
{
|
||||
if(is_esc_held && timer_elapsed(held_esc_timer) > held_esc_threshold) {
|
||||
register_code(KC_ESC);
|
||||
}
|
||||
}
|
|
@ -1,115 +0,0 @@
|
|||
#pragma once
|
||||
#include "quantum.h"
|
||||
|
||||
/*
|
||||
* LAYOUT_bonfire Row Keys
|
||||
* ┌───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───┬───────┐
|
||||
* │00 │01 │02 │03 │04 │05 │06 │07 │08 │09 │0a │0b │0c │ 0e │ 14
|
||||
* ├───┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─────┤
|
||||
* │10 │12 │13 │14 │15 │16 │17 │18 │19 │1a │1b │1c │1d │1e │ 14
|
||||
* ├─────┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴┬──┴─────┤
|
||||
* │20 │22 │23 │24 │25 │26 │27 │28 │29 │2a │2b │2c │2d │ 13
|
||||
* ├──────┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴─┬─┴────┬───┤
|
||||
* │30 │32 │33 │34 │35 │36 │37 │38 │39 │3a │3b │3d │3e │ 13
|
||||
* ├────┬───┴┬──┴─┬─┴───┴───┴───┴───┴───┴──┬┴───┼───┴┬────┬┴───┤
|
||||
* │40 │41 │43 │ 46 │4a │4b │4d │4e │ 8
|
||||
* └────┴────┴────┴────────────────────────┴────┴────┴────┴────┘
|
||||
*
|
||||
*/
|
||||
#define LAYOUT_bonfire( \
|
||||
k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, k0e, \
|
||||
k10, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e, \
|
||||
k20, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, \
|
||||
k30, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, k3d, k3e, \
|
||||
k40, k41, k43, k46, k4a, k4b, k4d, k4e \
|
||||
) { \
|
||||
{ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, k0c, KC_NO, k0e }, \
|
||||
{ k10, KC_NO, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, k1c, k1d, k1e }, \
|
||||
{ k20, KC_NO, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, k2c, k2d, KC_NO }, \
|
||||
{ k30, KC_NO, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b, KC_NO, k3d, k3e }, \
|
||||
{ k40, k41, KC_NO, k43, KC_NO, KC_NO, k46, KC_NO, KC_NO, KC_NO, k4a, k4b, KC_NO, k4d, k4e } \
|
||||
}
|
||||
|
||||
/**
|
||||
* XXXXXXX = Key does nothing.
|
||||
* _______ = Key that allows the uppermost exposed key in a layer below it.
|
||||
*
|
||||
*/
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/**
|
||||
* Layer 0
|
||||
*
|
||||
* QWERTY and basic modifiers.
|
||||
* Upper layers are toggled or accessed through the "HACK" key: last key on fourth row.
|
||||
*/
|
||||
[BASE] = LAYOUT_bonfire(
|
||||
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
|
||||
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
|
||||
KC_ESC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
|
||||
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MOD_UP, MO(FCTN),
|
||||
KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MOD_LT, MOD_DN, MOD_RT
|
||||
),
|
||||
|
||||
/**
|
||||
* Layer 1
|
||||
*
|
||||
* NORMAN Key layout.
|
||||
* All that's changed is the position of A-Z and a few punctuation keys.
|
||||
*/
|
||||
[NRMN] = LAYOUT_bonfire(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_J, KC_U, KC_R, KC_L, KC_SCLN, _______, _______, _______,
|
||||
_______, KC_A, KC_S, KC_E, KC_T, KC_G, KC_Y, KC_N, KC_I, KC_O, KC_H, _______, _______,
|
||||
_______, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_P, KC_M, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/**
|
||||
* Layer 2
|
||||
*
|
||||
* Moves the escape key from the left to the right side of the keyboard for gaming.
|
||||
*/
|
||||
[GAME] = LAYOUT_bonfire(
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
HLD_ESC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
|
||||
_______, _______, _______, _______, _______, _______, _______, _______
|
||||
),
|
||||
|
||||
/**
|
||||
* Layer 3
|
||||
*
|
||||
* Function layer.
|
||||
* This layer is accessed when "HACK" is held down.
|
||||
* Modifiers and such to basic keys, but with basic key functions.
|
||||
*/
|
||||
[FCTN] = LAYOUT_bonfire(
|
||||
KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,
|
||||
_______, KC_MUTE, KC_VOLD, KC_VOLU, _______, _______, _______, _______, _______, _______, KC_PSCR, KC_SCRL, KC_PAUS, _______,
|
||||
KC_CAPS, KC_MPRV, KC_MPLY, KC_MNXT, _______, _______, _______, _______, _______, KC_INS, KC_HOME, KC_PGUP, _______,
|
||||
_______, KC_SLEP, KC_WAKE, _______, _______, _______, _______, _______, KC_DEL, KC_END, KC_PGDN, _______, _______,
|
||||
_______, _______, _______, _______, _______, MO(KEYB), _______, _______
|
||||
),
|
||||
|
||||
/**
|
||||
* Layer 4
|
||||
*
|
||||
* This is the KEYB/System layer.
|
||||
* Other keymaps call this a NAV layer, but it's more than just NAV-ing the board's layers.
|
||||
* This Layer currently handles RGB and puts the board into QK_BOOT for flashing.
|
||||
*
|
||||
* ~ key resets board to [BASE].
|
||||
* 1 key toggles [NRMN].
|
||||
* 2 key toggles [GAME].
|
||||
* BACKSPACE puts board into reset.
|
||||
*/
|
||||
[KEYB] = LAYOUT_bonfire(
|
||||
TO(BASE), TG(NRMN), TO(GAME), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, QK_BOOT,
|
||||
XXXXXXX, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
||||
XXXXXXX, BL_DOWN, BL_TOGG, BL_UP, BL_STEP, 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
|
||||
)
|
||||
};
|
|
@ -1,12 +0,0 @@
|
|||
#include QMK_KEYBOARD_H
|
||||
|
||||
/**
|
||||
* Bonfire Layout
|
||||
* v6.1.0
|
||||
*
|
||||
* @author Ethan Beyer
|
||||
*
|
||||
*/
|
||||
#include "keymap-parts/defs.c"
|
||||
#include "keymap-parts/layers.c"
|
||||
#include "keymap-parts/functions.c"
|
|
@ -1,37 +0,0 @@
|
|||
/**
|
||||
* Cool Function where a single key does ALT+TAB
|
||||
* From: https://beta.docs.qmk.fm/features/feature_macros#super-alt-tab
|
||||
*/
|
||||
bool is_alt_tab_active = false; // ADD this near the begining of keymap.c
|
||||
uint16_t alt_tab_timer = 0; // we will be using them soon.
|
||||
|
||||
enum custom_keycodes { // Make sure have the awesome keycode ready
|
||||
ALT_TAB = SAFE_RANGE,
|
||||
};
|
||||
|
||||
// key processing
|
||||
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) { // This will do most of the grunt work with the keycodes.
|
||||
case ALT_TAB:
|
||||
if (record->event.pressed) {
|
||||
if (!is_alt_tab_active) {
|
||||
is_alt_tab_active = true;
|
||||
register_code(KC_LALT);
|
||||
}
|
||||
alt_tab_timer = timer_read();
|
||||
register_code(KC_TAB);
|
||||
} else {
|
||||
unregister_code(KC_TAB);
|
||||
}
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
// The very important timer.
|
||||
void matrix_scan_user(void) {
|
||||
if (is_alt_tab_active && timer_elapsed(alt_tab_timer) > 1000) {
|
||||
unregister_code(KC_LALT);
|
||||
is_alt_tab_active = false;
|
||||
}
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
MOUSEKEY_ENABLE = no
|
||||
|
||||
# CONSOLE_ENABLE = yes
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue