aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.h
blob: 2f4d5bd92b33336f133dab38859418172de7806c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/***********************************************************************
 * A firmware Sketch for the Keyboardio Model 01 -- keymap
 * Copyright © 2016, 2017, 2018 Gergely Nagy
 * Copyright © 2019 Guilhem Moulin <guilhem@fripost.org>
 *
 * 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

/* Layers */
enum {
    DVORAK
  , NAV
  , NUM

  , LAYER_MAX = NUM
};

#define Key_AT    LSHIFT(Key_2)
#define Key_STAR  LSHIFT(Key_8)
#define Key_DOLLR LSHIFT(Key_4)
#define Key_CARET LSHIFT(Key_6)
#define Key_PRCNT LSHIFT(Key_5)
#define Key_EXCLM LSHIFT(Key_1)
#define Key_HASH  LSHIFT(Key_3)
#define Key_AND   LSHIFT(Key_7)
#define Key_LCB   LSHIFT(Key_LeftBracket)
#define Key_RCB   LSHIFT(Key_RightBracket)
#define Key_Plus  LSHIFT(Key_Equals)

#define Key_PlayPause  Consumer_PlaySlashPause
#define Key_Underscore LSHIFT(Key_Minus)

/* Keymaps */
KEYMAPS(
    [DVORAK] = KEYMAP_STACKED(
        ___,          Key_LCB,   Key_AT,    Key_STAR,   Key_DOLLR, Key_CARET, ___
      , Key_Backtick, Key_Quote, Key_Comma, Key_Period, Key_P,     Key_Y,     TD(LPB)
      , Key_Tab,      Key_A,     Key_O,     Key_E,      Key_U,     Key_I
      , Key_Menu,     Key_Slash, Key_Q,     Key_J,      Key_K,     Key_X,     TD(COLON)

      , OSM(LeftControl), Key_Backspace, OSM(LeftShift), Key_Escape
      , OSL(NAV)

      , ___,        Key_PRCNT, Key_EXCLM, Key_HASH, Key_AND, Key_RCB, ___
      , TD(RPB),    Key_F,     Key_G,     Key_C,    Key_R,   Key_L,   Key_Backslash
      ,             Key_D,     Key_H,     Key_T,    Key_N,   Key_S,   Key_Minus
      , Key_Equals, Key_B,     Key_M,     Key_W,    Key_V,   Key_Z,   ___

      , ___, Key_Enter, Key_Spacebar, OSM(RightAlt)
      , OSL(NUM)
    )


  , [NAV] = KEYMAP_STACKED(
        ___,  Key_F1,           Key_F2,          Key_F3,      Key_F4,          Key_F5,            Key_PrintScreen
      , XXX,  Key_mouseScrollL, Key_mouseWarpNW, Key_mouseUp, Key_mouseWarpNE, Key_mouseScrollUp, Key_mouseWarpEnd
      , XXX,  Key_mouseScrollR, Key_mouseL,      Key_mouseDn, Key_mouseR,      Key_mouseScrollDn
      , ___,  XXX,              Key_mouseWarpSW, XXX,         Key_mouseWarpSE, XXX,               Key_mouseBtnL

      , ___, Key_Delete, ___, ___
      , ___

      , ___,           Key_F6,       Key_F7,        Key_F8,        Key_F9,         Key_F10, Key_F11
      , Key_PlayPause, Key_PageUp,   Key_Home,      Key_UpArrow,   Key_End,        XXX,     Key_F12
      ,                Key_PageDown, Key_LeftArrow, Key_DownArrow, Key_RightArrow, XXX,     XXX
      , Key_mouseBtnR, XXX,          XXX,           XXX,           XXX,            XXX,     Key_Insert

      , ___, ___, Key_Enter, ___
      , ___
    )


  , [NUM] = KEYMAP_STACKED(
        ___, ___, ___, ___, ___, ___, ___
      , ___, ___, ___, ___, ___, ___, ___
      , ___, ___, ___, ___, ___, ___
      , ___, ___, ___, ___, ___, ___, ___

      , ___, ___, ___, ___
      , ___

      , XXX,            XXX,        XXX, XXX,     XXX,   XXX,       XXX
      , XXX,            XXX,        Key_1, Key_2, Key_3, XXX,       Key_Equals
      ,                 Key_0,      Key_4, Key_5, Key_6, Key_Minus, Key_Plus
      , Key_Underscore, Key_Period, Key_7, Key_8, Key_9, XXX,       XXX

      , ___, ___, ___, ___
      , ___
    )
)