diff options
author | Olivier Poitrey <rs@rhapsodyk.net> | 2019-01-25 12:57:10 -0800 |
---|---|---|
committer | Drashna Jaelre <drashna@live.com> | 2019-01-25 12:57:10 -0800 |
commit | e611433cb5a479d84b37088e64da01b556f314fa (patch) | |
tree | abebed05c6dc72f99ed2e9927afcf4a3b52256fe /layouts/community/ortho_5x12 | |
parent | 3542e573c8ee464f62fc5e9a0f618d3a244048c0 (diff) |
rs: code friendly keymap for preonic, iris and my preonic clone (#4303)
I worked on those keymap to simplify the use of 60% keyboards for
coders. Instead of trying to mimic planck, this keymap remove
raise/lower layer complexity and keep some important sign keys for coder
in the upper right side pretty much the same way as they are on a full
keyboard.
A karabiner configuration is also provided to mimic most of the keymap
features on the macbook internal keyboard for when you are forced to use
it.
Diffstat (limited to 'layouts/community/ortho_5x12')
-rw-r--r-- | layouts/community/ortho_5x12/rs/config.h | 35 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/rs/karabiner.json | 154 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/rs/keymap.c | 63 | ||||
-rw-r--r-- | layouts/community/ortho_5x12/rs/readme.md | 17 |
4 files changed, 269 insertions, 0 deletions
diff --git a/layouts/community/ortho_5x12/rs/config.h b/layouts/community/ortho_5x12/rs/config.h new file mode 100644 index 0000000000..02076e8728 --- /dev/null +++ b/layouts/community/ortho_5x12/rs/config.h @@ -0,0 +1,35 @@ +#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 new file mode 100644 index 0000000000..f5214650ad --- /dev/null +++ b/layouts/community/ortho_5x12/rs/karabiner.json @@ -0,0 +1,154 @@ +{ + "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 new file mode 100644 index 0000000000..f33dcc2536 --- /dev/null +++ b/layouts/community/ortho_5x12/rs/keymap.c @@ -0,0 +1,63 @@ +#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 + +// 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, \ + k40, k41, k42, k43, k44, k45, k46, k47, k48, k49, k4a, k4b \ + ) \ + LAYOUT_ortho_5x12( \ + 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, \ + KC_##k40, KC_##k41, KC_##k42, KC_##k43, KC_##k44, KC_##k45, KC_##k46, KC_##k47, KC_##k48, KC_##k49, KC_##k4a, KC_##k4b \ + ) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + [_QWERTY] = LAYOUT_kc( \ + // ,-----------------------------------------------------------------------------------. + GRV , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9 , 0 , MINS , + // |------+------+------+------+------+------+------+------+------+------+------+------| + 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 , BSPC , BSPH , LEFT , DOWN , UP , RGHT + // `---------------------------------------------------+-------------------------------' + ), // | + // | + [_HYPER] = LAYOUT_kc( /* V */ \ + // ,-----------------------------------------------------------------------------------. + RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , LBRC , RBRC , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , PGUP , , , , , UP , LCBR , RCBR , BSLS , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , HOME , PGDN , END , , MINS , LEFT , DOWN , RGHT , , PIPE , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , , , , , , , BRDN , BRUP , , + // |------+------+------+------+------+------+------+------+------+------+------+------| + , , , , , , , , MUTE , VOLD , VOLU , MPLY + // `-----------------------------------------------------------------------------------' + ), +}; diff --git a/layouts/community/ortho_5x12/rs/readme.md b/layouts/community/ortho_5x12/rs/readme.md new file mode 100644 index 0000000000..d75eefd5b9 --- /dev/null +++ b/layouts/community/ortho_5x12/rs/readme.md @@ -0,0 +1,17 @@ +# 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 |