aboutsummaryrefslogtreecommitdiff
path: root/users/ibnuda/abstraction.h
diff options
context:
space:
mode:
Diffstat (limited to 'users/ibnuda/abstraction.h')
-rw-r--r--users/ibnuda/abstraction.h117
1 files changed, 117 insertions, 0 deletions
diff --git a/users/ibnuda/abstraction.h b/users/ibnuda/abstraction.h
new file mode 100644
index 000000000..0870116c9
--- /dev/null
+++ b/users/ibnuda/abstraction.h
@@ -0,0 +1,117 @@
1/* Copyright 2021 Ibnu D. Aji
2 *
3 * This program is free software: you can redistribute it and/or modify
4 * it under the terms of the GNU General Public License as published by
5 * the Free Software Foundation, either version 2 of the License, or
6 * (at your option) any later version.
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program. If not, see <http://www.gnu.org/licenses/>.
15 */
16
17#pragma once
18#include "quantum.h"
19
20enum {
21 _BASE,
22 _LOWER,
23 _RAISE,
24 _ADJUST,
25};
26
27// keycode abstraction
28// ABC:
29// A: L = left
30// R = right
31// B: U = upper row
32// M = middle row
33// L = lower row
34// C: P = pinky finger
35// R = ring finger
36// M = middle finger
37// I = index finger
38// II = inner index finger
39#define LUP KC_Q
40#define LUR KC_V
41#define LUM KC_C
42#define LUI KC_P
43#define LUII KC_B
44#define LMP KC_R
45#define LMR KC_S
46#define LMM KC_T
47#define LMI KC_H
48#define LMII KC_D
49#define LLP KC_QUOT
50#define LLR KC_J
51#define LLM KC_G
52#define LLI KC_K
53#define LLII KC_X
54
55#define RUP KC_Z
56#define RUR KC_Y
57#define RUM KC_U
58#define RUI KC_L
59#define RUII KC_DOT
60#define RMP KC_O
61#define RMR KC_I
62#define RMM KC_A
63#define RMI KC_N
64#define RMII KC_F
65#define RLP KC_SLSH
66#define RLR KC_SCLN
67#define RLM KC_W
68#define RLI KC_M
69#define RLII KC_COMM
70
71
72// thumb keys.
73#define TRAISE TG(_RAISE)
74#define AL_ENT ALT_T(KC_ENT)
75#define SF_BSPC SFT_T(KC_BSPC)
76#define CT_ESC CTL_T(KC_ESC)
77
78// home row mods.
79#define CTLR LCTL_T(LMR)
80#define CTRR RCTL_T(RMR)
81#define CT_LEFT LCTL_T(KC_LEFT)
82#define CT_SIX RCTL_T(KC_6)
83
84#define SHLP LSFT_T(LMP)
85#define SHRP RSFT_T(RMP)
86#define SH_HASH LSFT_T(KC_HASH)
87#define SH_ZERO RSFT_T(KC_0)
88
89#define ALLM LALT_T(LMM)
90#define ALRM RALT_T(RMM)
91#define AL_DOWN LALT_T(KC_DOWN)
92#define AL_FIVE RALT_T(KC_5)
93
94#define GULII RGUI_T(LMII)
95#define GURII LGUI_T(RMII)
96#define GU_DLR RGUI_T(KC_DLR)
97#define GU_EQL LGUI_T(KC_EQL)
98
99// layer toggle.
100#define LW_E LT(_LOWER, KC_E)
101#define RS_SPC LT(_RAISE, KC_SPC)
102
103#define ADDDD MO(_ADJUST)
104
105// common shortcuts for windows and linux that i use.
106#define NXTTAB LCTL(KC_PGDN)
107#define PRVTAB LCTL(KC_PGUP)
108#define UPTAB LCTL(LSFT(KC_PGUP))
109#define DNTAB LCTL(LSFT(KC_PGDN))
110#define NXTWIN LALT(KC_TAB)
111#define PRVWIN LALT(LSFT(KC_TAB))
112#define CALDL LCTL(LALT(KC_DELT))
113#define TSKMGR LCTL(LSFT(KC_ESC))
114#define EXPLR LGUI(KC_E)
115#define LCKGUI LGUI(KC_L)
116#define CONPST LSFT(KC_INS)
117#define CLSGUI LALT(KC_F4)