summaryrefslogtreecommitdiffstats
path: root/keyboards/crkbd/keymaps/armand1m/keymap.c
diff options
context:
space:
mode:
authorArmando Magalhães <armando.mag95@gmail.com>2021-03-25 08:06:30 +0100
committerGitHub <noreply@github.com>2021-03-25 18:06:30 +1100
commitc59fb1b477c4877fc29aeec8fe5f98dbf8788369 (patch)
tree25d838841c55e1f06195feaaf3f5a43bc7c0672b /keyboards/crkbd/keymaps/armand1m/keymap.c
parente7cb7bc7373031625c604dfb93bdb8717b71f013 (diff)
feat(keymaps): Changes to crkbd/keymaps/armand1m layout and README.md update (#12252)
Co-authored-by: Ryan <fauxpark@gmail.com>
Diffstat (limited to 'keyboards/crkbd/keymaps/armand1m/keymap.c')
-rw-r--r--keyboards/crkbd/keymaps/armand1m/keymap.c68
1 files changed, 39 insertions, 29 deletions
diff --git a/keyboards/crkbd/keymaps/armand1m/keymap.c b/keyboards/crkbd/keymaps/armand1m/keymap.c
index da68cc2def..420661e594 100644
--- a/keyboards/crkbd/keymaps/armand1m/keymap.c
+++ b/keyboards/crkbd/keymaps/armand1m/keymap.c
@@ -19,48 +19,58 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include QMK_KEYBOARD_H
+enum custom_keycodes {
+ ARROW_FUNCTION = SAFE_RANGE
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case ARROW_FUNCTION:
+ if (record->event.pressed) {
+ SEND_STRING("() => {}");
+ } else {
+ SEND_STRING(SS_TAP(X_LEFT) SS_TAP(X_ENTER));
+ }
+ return false;
+ }
+
+ return true;
+};
+
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_split_3x6_3(
- //,-----------------------------------------------------. ,-----------------------------------------------------.
- KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- LT(1, KC_ESC), LT(2, KC_A), KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- KC_LSFT, MT(MOD_LCTL, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RCTL, KC_SLSH), KC_RSFT,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- KC_LALT, LGUI(KC_SPACE), LGUI_T(KC_SPC), MT(MOD_RSFT, KC_ENT), LT(2, KC_BSPC), KC_RALT
- //`--------------------------' '--------------------------´
+ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC,
+ LT(1, KC_ESC), LT(2, KC_A), LT(3, KC_S), KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT,
+ OSM(MOD_LSFT), MT(MOD_LCTL, KC_Z), KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, MT(MOD_RCTL, KC_SLSH), OSM(MOD_RSFT),
+ KC_LALT, LGUI(KC_SPACE), LGUI_T(KC_SPC), MT(MOD_RSFT, KC_ENT), MO(2), KC_RALT
),
[1] = LAYOUT_split_3x6_3(
- //,-----------------------------------------------------. ,-----------------------------------------------------.
- _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP,KC_RIGHT, XXXXXXX, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______
- //`--------------------------' '--------------------------´
+ _______, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, _______,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, XXXXXXX, _______,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, _______,
+ _______, _______, _______, _______, _______, _______
),
[2] = LAYOUT_split_3x6_3(
- //,-----------------------------------------------------. ,-----------------------------------------------------.
- _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
- //|--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------|
- _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
- //|--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------|
- _______, _______, _______, _______, _______, _______
- //`--------------------------' '--------------------------´
- )
+ _______, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, _______,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, ARROW_FUNCTION, KC_LT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, KC_GRV,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_GT, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, KC_TILD,
+ _______, _______, _______, _______, _______, _______
+ ),
+
+ [3] = LAYOUT_split_3x6_3(
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, LALT(LSFT(KC_0)), XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LGUI(LSFT(KC_4)), XXXXXXX,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LGUI(KC_MINS), LGUI(KC_PLUS), XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
+ _______, _______, _______, _______, _______, _______
+ ),
};
#ifdef OLED_DRIVER_ENABLE
oled_rotation_t oled_init_user(oled_rotation_t rotation) {
if (!is_master) {
- return OLED_ROTATION_180; // flips the display 180 degrees if offhand
+ return OLED_ROTATION_180; // flips the display 180 degrees if offhand
}
return rotation;
}