aboutsummaryrefslogtreecommitdiffstats
path: root/src/keymap.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/keymap.h')
-rw-r--r--src/keymap.h103
1 files changed, 103 insertions, 0 deletions
diff --git a/src/keymap.h b/src/keymap.h
new file mode 100644
index 0000000..2f4d5bd
--- /dev/null
+++ b/src/keymap.h
@@ -0,0 +1,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
+
+ , ___, ___, ___, ___
+ , ___
+ )
+)