aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChuck Lauer Vose <vosechu@gmail.com>2020-05-09 20:53:32 -0700
committerGitHub <noreply@github.com>2020-05-10 04:53:32 +0100
commit73992c68d55430192ea3b11adfabae817393354e (patch)
tree0ef838bda419aa85f2eb326c2769ae859f35f931
parent8ca4ed9a987f9e7815a813592a0210c4853386e6 (diff)
downloadqmk_firmware-73992c68d55430192ea3b11adfabae817393354e.tar.gz
qmk_firmware-73992c68d55430192ea3b11adfabae817393354e.zip
Add one-handed Viterbi layout for gaming (#8963)
* Add one-handed Viterbi layout for gaming * fixes for pr feedback * Update keyboards/keebio/viterbi/keymaps/vosechu/config.h Co-authored-by: Joel Challis <git@zvecr.com> Co-authored-by: Joel Challis <git@zvecr.com>
-rw-r--r--keyboards/keebio/viterbi/keymaps/vosechu/config.h41
-rw-r--r--keyboards/keebio/viterbi/keymaps/vosechu/keymap.c91
-rw-r--r--keyboards/keebio/viterbi/keymaps/vosechu/rules.mk1
-rw-r--r--users/vosechu/vosechu.h20
4 files changed, 152 insertions, 1 deletions
diff --git a/keyboards/keebio/viterbi/keymaps/vosechu/config.h b/keyboards/keebio/viterbi/keymaps/vosechu/config.h
new file mode 100644
index 000000000..0faddd17c
--- /dev/null
+++ b/keyboards/keebio/viterbi/keymaps/vosechu/config.h
@@ -0,0 +1,41 @@
1/*
2Copyright 2017 Chuck Lauer Vose <vosechu@gmail.com>
3
4This program is free software: you can redistribute it and/or modify
5it under the terms of the GNU General Public License as published by
6the Free Software Foundation, either version 2 of the License, or
7(at your option) any later version.
8
9This program is distributed in the hope that it will be useful,
10but WITHOUT ANY WARRANTY; without even the implied warranty of
11MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12GNU General Public License for more details.
13
14You should have received a copy of the GNU General Public License
15along with this program. If not, see <http://www.gnu.org/licenses/>.
16*/
17
18#pragma once
19
20#undef RGBLED_NUM
21#define RGBLIGHT_ANIMATIONS
22#define RGBLED_NUM 3
23#define RGBLIGHT_HUE_STEP 8
24#define RGBLIGHT_SAT_STEP 8
25
26#define RGBLIGHT_SLEEP // Put the keyboard to sleep when USB goes dark
27
28#define LAYOUT_ortho_half_5x7( \
29 L00, L01, L02, L03, L04, L05, L06, \
30 L10, L11, L12, L13, L14, L15, L16, \
31 L20, L21, L22, L23, L24, L25, L26, \
32 L30, L31, L32, L33, L34, L35, L36, \
33 L40, L41, L42, L43, L44, L45, L46 \
34 ) \
35 LAYOUT_ortho_5x14( \
36 L00, L01, L02, L03, L04, L05, L06, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
37 L10, L11, L12, L13, L14, L15, L16, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
38 L20, L21, L22, L23, L24, L25, L26, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
39 L30, L31, L32, L33, L34, L35, L36, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO, \
40 L40, L41, L42, L43, L44, L45, L46, KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO , KC_NO \
41 )
diff --git a/keyboards/keebio/viterbi/keymaps/vosechu/keymap.c b/keyboards/keebio/viterbi/keymaps/vosechu/keymap.c
new file mode 100644
index 000000000..bbaa44857
--- /dev/null
+++ b/keyboards/keebio/viterbi/keymaps/vosechu/keymap.c
@@ -0,0 +1,91 @@
1#include QMK_KEYBOARD_H
2#include "vosechu.h"
3
4const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
5
6[BASE] = LAYOUT_ortho_half_5x7( // Base layer
7 KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_9 ,
8 ALT_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , TT(TT1) ,
9 CTL_ESC , KC_A , KC_S , KC_D , KC_F , KC_G , TT(TT2) ,
10 KC_F13 , KC_Z , KC_X , KC_C , KC_V , KC_B , TT(TT3) ,
11 KC_MEH , CTL_GRV , ALT_TAB , KC_LALT , MO(LWR) , LFT_BK , SFT_SPC
12),
13[LWR] = LAYOUT_ortho_half_5x7( // EVE layer
14 _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
15 A(KC_LEFT), KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_F5 , KC_F9 ,
16 SFT_SPC , A(KC_F1), A(KC_F2), A(KC_F3), A(KC_F4), _______ , _______ ,
17 A(KC_RGHT), C(KC_F1), C(KC_F2), C(KC_F3), C(KC_F4), _______ , _______ ,
18 _______ , RESET , _______ , _______ , _LAYER_ , KC_DEL , KC_ENT
19),
20[LFT] = LAYOUT_ortho_half_5x7( // Media
21 _______ , KC_F10 , KC_F11 , KC_F12 , KC_PSCR , KC_SLCK , KC_PAUS ,
22 _______ , KC_F7 , KC_F8 , KC_F9 , KC_INS , KC_HOME , KC_PGUP ,
23 RGB_TOG , KC_F4 , KC_F5 , KC_F6 , KC_DEL , KC_END , KC_PGDN ,
24 _______ , KC_F1 , KC_F2 , KC_F3 , KC_VOLU , KC_VOLD , KC_MUTE ,
25 _______ , _______ , _______ , _______ , PSWD , _LAYER_ , PSWD_ALT
26),
27[TT1] = LAYOUT_ortho_half_5x7( // Override WASD with arrows
28 _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
29 _______ , _______ , KC_UP , _______ , _______ , _______ , _______ ,
30 _______ , KC_LEFT , KC_DOWN , KC_RGHT , _______ , _______ , _______ ,
31 _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
32 _______ , _______ , _______ , _______ , _______ , _______ , _______
33),
34[TT2] = LAYOUT_ortho_half_5x7( // Browser layer
35 C(KC_W) , C(KC_1) , C(KC_T) , C(KC_9) , _______ , _______ , _______ ,
36 WBWSRBK , WTABLFT , KC_UP , WTABRGT , WBWSRFW , _______ , _______ ,
37 KC_ESC , KC_LEFT , KC_DOWN , KC_RGHT , C(KC_R) , _______ , _______ ,
38 _______ , _______ , _______ , _______ , _______ , _______ , TT(T23X),
39 _______ , _______ , _______ , _______ , _______ , _______ , _______
40),
41[TT3] = LAYOUT_ortho_half_5x7( // OS X override layer
42 _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
43 _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
44 _______ , _______ , _______ , _______ , _______ , _______ , TT(T23X),
45 _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
46 _______ , _______ , _______ , KC_LGUI , _______ , _______ , _______
47),
48[T23X] = LAYOUT_ortho_half_5x7( // Browser layer
49 G(KC_W) , G(KC_1) , G(KC_T) , G(KC_9) , _______ , SLACKTB , _______ ,
50 BWSR_BK , TAB_LFT , KC_UP , TAB_RGT , BWSR_FW , SLACKUP , _______ ,
51 KC_ESC , KC_LEFT , KC_DOWN , KC_RGHT , G(KC_R) , SLACKDN , _______ ,
52 _______ , _______ , KC_Q , KC_J , KC_K , _______ , _______ ,
53 _______ , _______ , _______ , KC_LGUI , _______ , _______ , _______
54),
55// [_EMPTY] = LAYOUT(
56// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
57// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
58// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
59// _______ , _______ , _______ , _______ , _______ , _______ , _______ ,
60// _______ , _______ , _______ , _______ , _______ , _______ , _______
61// ),
62};
63
64void keyboard_post_init_user(void) {
65 // Call the post init code.
66 rgblight_enable_noeeprom(); // enables Rgb, without saving settings
67 rgblight_mode_noeeprom(0);
68 rgblight_sethsv_noeeprom(0, 0, 0);
69}
70
71layer_state_t layer_state_set_user(layer_state_t state) {
72 switch (get_highest_layer(state)) {
73 case TT1:
74 rgblight_sethsv_noeeprom(HSV_BLUE);
75 break;
76 case TT2:
77 rgblight_sethsv_noeeprom(HSV_PURPLE);
78 break;
79 case T23X:
80 rgblight_sethsv_noeeprom(HSV_GOLD);
81 break;
82 case TT3:
83 rgblight_sethsv_noeeprom(HSV_GREEN);
84 break;
85 default: // for any other layers, or the default layer
86 rgblight_sethsv_noeeprom(0, 0, 0);
87 break;
88 }
89
90 return state;
91}
diff --git a/keyboards/keebio/viterbi/keymaps/vosechu/rules.mk b/keyboards/keebio/viterbi/keymaps/vosechu/rules.mk
new file mode 100644
index 000000000..1e3cebb14
--- /dev/null
+++ b/keyboards/keebio/viterbi/keymaps/vosechu/rules.mk
@@ -0,0 +1 @@
RGBLIGHT_ENABLE = yes
diff --git a/users/vosechu/vosechu.h b/users/vosechu/vosechu.h
index 5cd2217ea..3e65f8c95 100644
--- a/users/vosechu/vosechu.h
+++ b/users/vosechu/vosechu.h
@@ -10,8 +10,13 @@ enum userspace_custom_layers {
10 RSE, 10 RSE,
11 LWR, 11 LWR,
12 LFT, 12 LFT,
13 MOUSE 13 MOUSE,
14 TT1,
15 TT2,
16 TT3,
17 T23X
14}; 18};
19#define BASE DV
15 20
16enum userspace_custom_keycodes { 21enum userspace_custom_keycodes {
17 PAWFIVE = SAFE_RANGE, 22 PAWFIVE = SAFE_RANGE,
@@ -34,9 +39,14 @@ enum userspace_custom_keycodes {
34// == Macro keys for commonly used apps 39// == Macro keys for commonly used apps
35// -- Slack 40// -- Slack
36// Move one conversation up/down 41// Move one conversation up/down
42#define SLACKTB LGUI(LSFT(KC_T))
37#define SLACKUP LALT(LSFT(KC_UP)) 43#define SLACKUP LALT(LSFT(KC_UP))
38#define SLACKDN LALT(LSFT(KC_DOWN)) 44#define SLACKDN LALT(LSFT(KC_DOWN))
39 45
46// -- 1password
47#define PSWD LCTL(KC_BSLS)
48#define PSWD_ALT LCTL(LALT(KC_BSLS))
49
40// -- Browser and OS X 50// -- Browser and OS X
41// Activate one tab left/right 51// Activate one tab left/right
42#define TAB_LFT LGUI(LSFT(KC_LBRC)) 52#define TAB_LFT LGUI(LSFT(KC_LBRC))
@@ -52,6 +62,14 @@ enum userspace_custom_keycodes {
52// Make window fill the whole monitor 62// Make window fill the whole monitor
53#define SCR_FUL HYPR(KC_F) 63#define SCR_FUL HYPR(KC_F)
54 64
65// -- Windows variants of browser commanads
66// Activate one tab left/right
67#define WTABLFT LCTL(LSFT(KC_TAB))
68#define WTABRGT LCTL(KC_TAB)
69// Go back/forward in history
70#define WBWSRBK LALT(KC_LEFT)
71#define WBWSRFW LALT(KC_RGHT)
72
55// == Extended alpha layer toggles 73// == Extended alpha layer toggles
56// -- Dvorak 74// -- Dvorak
57// Pressing U opens up the LWR layer (numpad) 75// Pressing U opens up the LWR layer (numpad)