1
0
Fork 0

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.
This commit is contained in:
Olivier Poitrey 2019-01-25 12:57:10 -08:00 committed by Drashna Jaelre
parent 3542e573c8
commit e611433cb5
20 changed files with 1030 additions and 0 deletions

View file

@ -0,0 +1,38 @@
/*
Copyright 2017 Danny Nguyen <danny@hexwire.com>
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 2 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
/* Use I2C or Serial, not both */
#define USE_SERIAL
// #define USE_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#define TAPPING_TERM 150
#undef RGBLED_NUM
#define RGBLED_NUM 6
#define RGBLIGHT_SLEEP
#define RGBLIGHT_HUE_STEP 1
#define RGBLIGHT_SAT_STEP 1
#define RGBLIGHT_VAL_STEP 1

View file

@ -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"}]
}]
}]
}

View file

@ -0,0 +1,48 @@
#include QMK_KEYBOARD_H
enum layers {
_QWERTY,
_HYPER,
};
#define KC_ KC_TRNS
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
#define KC_HYPE MO(_HYPER)
#define KC_RST RESET
// Brightness
#define KC_BRUP KC_PAUS
#define KC_BRDN KC_SLCK
#define KC_BLTG BL_TOGG
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 ,SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
LALT,LGUI,SPC, BSPC,HYPE,ENT
// `----+----+----' `+---+----+----'
), // |
// |
[_HYPER] = LAYOUT_kc( // V
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 ,LBRC,RBRC, ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
, , ,PGUP, ,BRUP, , , UP ,LCBR,RCBR,BSLS,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
, ,HOME,PGDN,END ,BRDN, MINS,LEFT,DOWN,RGHT, ,PIPE,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
, , , , , ,BLTG, VOLU, , , , , , ,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
, , , VOLD, ,MUTE
// `----+----+----' `----+----+----'
),
};

View file

@ -0,0 +1,13 @@
# 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 is also available for other keyboards:
- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c)
- [ErgoTravel/rs](../../../ergotravel/keymaps/rs/keymap.c)

View file

@ -0,0 +1 @@
BACKLIGHT_ENABLE = yes