summaryrefslogtreecommitdiff
path: root/layouts/community
diff options
context:
space:
mode:
authorOlivier Poitrey <rs@rhapsodyk.net>2019-05-07 10:43:08 -0700
committerDrashna Jaelre <drashna@live.com>2019-05-07 10:43:08 -0700
commit2d5c16dfd4ef193c4f692722157aa2b526a4c877 (patch)
tree527c5e5f51cf75c4476616a3c6ed91e385f1e1b2 /layouts/community
parent3b132599427a648b1f14aaf30312f05f855625ea (diff)
[Keymap] crkbd/keymaps/rs: add rs keymap to corne keyboard and adapt others (#5181)
Update all my keymaps to work with 40 keys. Refactor code using Userspace.
Diffstat (limited to 'layouts/community')
-rw-r--r--layouts/community/ortho_4x12/rs/config.h1
-rw-r--r--layouts/community/ortho_4x12/rs/keymap.c52
-rw-r--r--layouts/community/ortho_4x12/rs/readme.md1
-rw-r--r--layouts/community/ortho_5x12/rs/config.h34
-rw-r--r--layouts/community/ortho_5x12/rs/karabiner.json154
-rw-r--r--layouts/community/ortho_5x12/rs/keymap.c48
-rw-r--r--layouts/community/ortho_5x12/rs/readme.md18
7 files changed, 78 insertions, 230 deletions
diff --git a/layouts/community/ortho_4x12/rs/config.h b/layouts/community/ortho_4x12/rs/config.h
new file mode 100644
index 0000000000..6f70f09bee
--- /dev/null
+++ b/layouts/community/ortho_4x12/rs/config.h
@@ -0,0 +1 @@
+#pragma once
diff --git a/layouts/community/ortho_4x12/rs/keymap.c b/layouts/community/ortho_4x12/rs/keymap.c
new file mode 100644
index 0000000000..c6d6f14cad
--- /dev/null
+++ b/layouts/community/ortho_4x12/rs/keymap.c
@@ -0,0 +1,52 @@
+#include QMK_KEYBOARD_H
+#include "rs.h"
+
+// Used to create a keymap using only KC_ prefixed keys
+#define LAYOUT_kc( \
+ k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \
+ k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \
+ k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \
+ k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \
+ ) \
+ LAYOUT_ortho_4x12( \
+ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \
+ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \
+ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \
+ KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \
+ )
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+ [_QWERTY] = LAYOUT_kc( \
+ // ,-----------------------------------------------------------------------------------.
+ TAB , Q , W , E , R , T , Y , U , I , O , P , EQL ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ ESCC , A , S , D , F , G , H , J , K , L , SCLN , QUOT ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , , LEFT , RGHT
+ // `-----------------------------------------------------------------------------------'
+ ),
+ [_CODE] = LAYOUT_kc(
+ // ,-----------------------------------------------------------------------------------.
+ GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , , , , , DOT , , , , , ,
+ // `-----------------------------------------------------------------------------------'
+ ),
+ [_FN] = LAYOUT_kc(
+ // ,-----------------------------------------------------------------------------------.
+ , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ BLTG , BLUP , , , , BRMU , VOLU , , PGUP , , , ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ BLTG , BLDN , , , RST , BRMD , VOLD , CTRA , PGDN , CTRE , , ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , , , , , , MUTE , , , , ,
+ // `-----------------------------------------------------------------------------------'
+ ),
+};
diff --git a/layouts/community/ortho_4x12/rs/readme.md b/layouts/community/ortho_4x12/rs/readme.md
new file mode 100644
index 0000000000..d23ab66877
--- /dev/null
+++ b/layouts/community/ortho_4x12/rs/readme.md
@@ -0,0 +1 @@
+See [rs readme](../../../../users/rs/readme.md). \ No newline at end of file
diff --git a/layouts/community/ortho_5x12/rs/config.h b/layouts/community/ortho_5x12/rs/config.h
index 02076e8728..6f70f09bee 100644
--- a/layouts/community/ortho_5x12/rs/config.h
+++ b/layouts/community/ortho_5x12/rs/config.h
@@ -1,35 +1 @@
#pragma once
-
-#ifdef AUDIO_ENABLE
-//#define STARTUP_SONG SONG(PREONIC_SOUND)
-#define STARTUP_SONG SONG(NO_SOUND)
-
-#define DEFAULT_LAYER_SONGS \
- { SONG(QWERTY_SOUND), SONG(COLEMAK_SOUND), SONG(DVORAK_SOUND) }
-#endif
-
-#define MUSIC_MASK (keycode != KC_NO)
-
-/*
- * MIDI options
- */
-
-/* Prevent use of disabled MIDI features in the keymap */
-//#define MIDI_ENABLE_STRICT 1
-
-/* enable basic MIDI features:
- - MIDI notes can be sent when in Music mode is on
-*/
-
-#define MIDI_BASIC
-
-/* enable advanced MIDI features:
- - MIDI notes can be added to the keymap
- - Octave shift and transpose
- - Virtual sustain, portamento, and modulation wheel
- - etc.
-*/
-//#define MIDI_ADVANCED
-
-/* override number of MIDI tone keycodes (each octave adds 12 keycodes and allocates 12 bytes) */
-//#define MIDI_TONE_KEYCODE_OCTAVES 2
diff --git a/layouts/community/ortho_5x12/rs/karabiner.json b/layouts/community/ortho_5x12/rs/karabiner.json
deleted file mode 100644
index f5214650ad..0000000000
--- a/layouts/community/ortho_5x12/rs/karabiner.json
+++ /dev/null
@@ -1,154 +0,0 @@
-{
- "title": "RS",
- "rules": [{
- "description": "CapsLock to Escape / Control Mod-Tap",
- "manipulators": [{
- "type": "basic",
- "from": {
- "key_code": "caps_lock",
- "modifiers": {
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "left_control"}],
- "to_if_alone": [{"key_code": "escape"}]
- }]
- },
- {
- "description": "Right-Shift / Enter Mod-Tap",
- "manipulators": [{
- "type": "basic",
- "from": {
- "key_code": "right_shift",
- "modifiers": {
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "right_shift"}],
- "to_if_alone": [{"key_code": "return_or_enter"}]
- }]
- },
- {
- "description": "Right-Command / Backspace Mod-Tap",
- "manipulators": [{
- "type": "basic",
- "from": {
- "key_code": "right_command",
- "modifiers": {
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "right_command"}],
- "to_if_alone": [{"key_code": "delete_or_backspace"}]
- }]
- },
- {
- "description": "Right-Command Accents",
- "manipulators": [
- {
- "type": "basic",
- "from": {
- "key_code": "a",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["left_shift", "right_shift"]
- }
- },
- "to": [
- {"key_code": "grave_accent_and_tilde", "modifiers": ["left_option"]},
- {"key_code": "a"}
- ]
- }]
- },
- {
- "description": "Right Command Navigation",
- "manipulators": [{
- "type": "basic",
- "from": {
- "key_code": "j",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "left_arrow"}]
- },
- {
- "type": "basic",
- "from": {
- "key_code": "k",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "down_arrow"}]
- },
- {
- "type": "basic",
- "from": {
- "key_code": "i",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "up_arrow"}]
- },
- {
- "type": "basic",
- "from": {
- "key_code": "l",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "right_arrow"}]
- },
- {
- "type": "basic",
- "from": {
- "key_code": "e",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "page_up"}]
- },
- {
- "type": "basic",
- "from": {
- "key_code": "d",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "page_down"}]
- },
- {
- "type": "basic",
- "from": {
- "key_code": "s",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "home"}]
- },
- {
- "type": "basic",
- "from": {
- "key_code": "f",
- "modifiers": {
- "mandatory": ["right_command"],
- "optional": ["any"]
- }
- },
- "to": [{"key_code": "end"}]
- }]
- }]
-}
diff --git a/layouts/community/ortho_5x12/rs/keymap.c b/layouts/community/ortho_5x12/rs/keymap.c
index e4e590669f..15cbabaac1 100644
--- a/layouts/community/ortho_5x12/rs/keymap.c
+++ b/layouts/community/ortho_5x12/rs/keymap.c
@@ -1,19 +1,5 @@
#include QMK_KEYBOARD_H
-
-enum layers {
- _QWERTY,
- _HYPER,
-};
-
-#define KC_ KC_TRNS
-
-#define KC_ESCC MT(MOD_LCTL, KC_ESC)
-#define KC_RST RESET
-#define KC_BSPH LT(_HYPER, KC_BSPC)
-#define KC_ENTS MT(MOD_LSFT, KC_ENT)
-// Brightness
-#define KC_BRUP KC_PAUS
-#define KC_BRDN KC_SLCK
+#include "rs.h"
// Used to create a keymap using only KC_ prefixed keys
#ifndef LAYOUT_kc
@@ -34,7 +20,6 @@ enum layers {
#endif
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
-
[_QWERTY] = LAYOUT_kc( \
// ,-----------------------------------------------------------------------------------.
GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , MINS ,
@@ -45,21 +30,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
// |------+------+------+------+------+------+------+------+------+------+------+------|
LSFT , Z , X , C , V , B , N , M , COMM , DOT , SLSH , ENTS ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , LCTL , LALT , LGUI , SPC , SPC , BSPC , BSPH , LEFT , DOWN , UP , RGHT
+ , , LCTL , LALT , LGUI , SPC , SPC , BCOD , FN , , LEFT , RGHT
// `---------------------------------------------------+-------------------------------'
- ), // |
- // |
- [_HYPER] = LAYOUT_kc( /* V */ \
+ ),
+ [_CODE] = LAYOUT_kc(
+ // ,-----------------------------------------------------------------------------------.
+ , , , , , , , , , , , ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE ,
+ // |------+------+------+------+------+------+------+------+------+------+------+------|
+ , , , , , DOT , , , , , ,
+ // `-----------------------------------------------------------------------------------'
+ ),
+ [_FN] = LAYOUT_kc(
// ,-----------------------------------------------------------------------------------.
- RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , LBRC , RBRC , ,
+ , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10 , F11 ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , , , PGUP , , , , , UP , LCBR , RCBR , BSLS ,
+ , , , , , , , , , , , ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , , HOME , PGDN , END , , MINS , LEFT , DOWN , RGHT , , PIPE ,
+ BLTG , BLUP , , , , BRMU , VOLU , , PGUP , , , ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , , , , , , , , , BRDN , BRUP , ,
+ BLTG , BLDN , , , RST , BRMD , VOLD , CTRA , PGDN , CTRE , , ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
- , , , , , , , , MUTE , VOLD , VOLU , MPLY
+ , , , , , , MUTE , , , , ,
// `-----------------------------------------------------------------------------------'
),
};
+
diff --git a/layouts/community/ortho_5x12/rs/readme.md b/layouts/community/ortho_5x12/rs/readme.md
index d75eefd5b9..d23ab66877 100644
--- a/layouts/community/ortho_5x12/rs/readme.md
+++ b/layouts/community/ortho_5x12/rs/readme.md
@@ -1,17 +1 @@
-# Code friendly 60% keymap
-
-I developped this keymap to make a better use of 60% ortho keyboards I use like the preonic of the iris. Instead of trying to mimic the Planck layout like the default preonic keymap, this keymap removes the raise and lower layers and offers a simpler hyper layer concept for a few missing sign keys and cursors / media keys.
-
-The important part for coders is that most important signs needed to code are available at their usual position on a full keyboard, without complex layer gymnastic. Access to [] and {} are available on the hyper layer at their usual emplacement.
-
-The right thumb is used for both backspace and hyper layer switching. On the hyper layer, in addition to some coding signs, you get the cursor keys arranged in cross, just under your right fingers, so you don't have to move your hand when navigating in code or command line. Other hand gets the home/end page up/down in a similar layout.
-
-Because you sometime have to use your internal keyboard when you use a macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the hyper layer / backspace on right command key etc.
-
-This keymap has been tested with those keyboards:
-- [Preonic](../../../../keyboards/preonic/)
-- [My preonic clone](../../../rs60/)
-
-Checkout an adaptation of this keymap for other keyboards:
-- [Iris/rs](../../../../keyboards/iris/keymaps/rs/keymap.c)
-- [ErgoTravel/rs](../../../../keyboards/ergotravel/keymaps/rs/keymap.c) \ No newline at end of file
+See [rs readme](../../../../users/rs/readme.md). \ No newline at end of file