[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.
This commit is contained in:
Olivier Poitrey 2019-05-07 10:43:08 -07:00 committed by Drashna Jaelre
parent 3b13259942
commit 2d5c16dfd4
26 changed files with 525 additions and 354 deletions

View File

@ -11,11 +11,6 @@
extern keymap_config_t keymap_config;
#ifdef RGBLIGHT_ENABLE
//Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
#endif
extern uint8_t is_master;
// Each layer gets a name for readability, which is then used in the keymap matrix below.
@ -241,6 +236,7 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
void matrix_init_user(void) {
#ifdef RGBLIGHT_ENABLE
RGB_current_mode = rgblight_config.mode;
UPDATE_KEYMAP_STATUS();
#endif
//SSD1306 OLED init, make sure to add #define SSD1306OLED in config.h
#ifdef SSD1306OLED

View File

@ -0,0 +1,44 @@
/*
This is the c configuration file for the keymap
Copyright 2012 Jun Wako <wakojun@gmail.com>
Copyright 2015 Jack Humbert
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
//#define USE_MATRIX_I2C
/* Select hand configuration */
#define MASTER_LEFT
// #define MASTER_RIGHT
// #define EE_HANDS
#define SSD1306OLED
#define USE_SERIAL_PD2
#define TAPPING_FORCE_HOLD
#define TAPPING_TERM 300
#undef RGBLED_NUM
#define RGBLIGHT_ANIMATIONS
#define RGBLED_NUM 27
#define RGBLIGHT_LIMIT_VAL 120
#define RGBLIGHT_HUE_STEP 10
#define RGBLIGHT_SAT_STEP 17
#define RGBLIGHT_VAL_STEP 17

View File

@ -0,0 +1,39 @@
#include QMK_KEYBOARD_H
#include "rs.h"
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,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
LALT,LGUI,SPC , BSPC,CODE,FN
// `----+----+----' `+---+----+----'c
),
[_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,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
LTOG,LHUI,LSAI,LVAI,LRST,BRMU, VOLU, ,PGUP, , , ,
//|----+----+----+----+----+----+ |----+----+----+----+----+----|
LMOD,LHUD,LSAD,LVAD,RST ,BRMD, VOLD,CTRA,PGDN,CTRE, , ,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
, , , MUTE, ,
// `----+----+----' `----+----+----'
),
};

View File

@ -0,0 +1,104 @@
#ifdef SSD1306OLED
#include QMK_KEYBOARD_H
#include "ssd1306.h"
#ifdef PROTOCOL_LUFA
#include "lufa.h"
#include "split_util.h"
#endif
extern uint8_t is_master;
// When add source files to SRC in rules.mk, you can use functions.
const char *read_logo(void);
const char *read_keylog(void);
const char *read_keylogs(void);
void set_keylog(uint16_t keycode, keyrecord_t *record);
void matrix_scan_user(void) { iota_gfx_task(); }
typedef struct {
uint8_t state;
char name[8];
} LAYER_DISPLAY_NAME;
#define LAYER_DISPLAY_MAX 5
const LAYER_DISPLAY_NAME layer_display_name[LAYER_DISPLAY_MAX] = {
{0, "Base"},
{2, "Code"},
{4, "Fn"},
{6, "Fn+Code"},
{__UINT8_MAX__, "?"},
};
static uint8_t layer_name_idx;
static char layer_status_buf[24] = "Layer: Base\n";
#ifdef RGBLIGHT_ENABLE
// Following line allows macro to read current RGB settings
extern rgblight_config_t rgblight_config;
void update_keymap_status(void) {
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s RGB: %d\n",
layer_display_name[layer_name_idx].name, rgblight_config.mode);
}
#else
void update_keymap_status(void) {
snprintf(layer_status_buf, sizeof(layer_status_buf) - 1, "Layer:%s\n",
layer_display_name[layer_name_idx].name);
}
#endif
void matrix_init_user(void) {
iota_gfx_init(!has_usb()); // turns on the display
update_keymap_status();
}
// declared in users/rs/rs.c
void rgb_mod_changed_keymap(void) {
update_keymap_status();
}
// declared in users/rs/rs.c
void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) {
set_keylog(keycode, record);
}
uint32_t layer_state_set_user(uint32_t state) {
for (layer_name_idx = 0; layer_name_idx < LAYER_DISPLAY_MAX; ++layer_name_idx) {
if (state == 0 && layer_display_name[layer_name_idx].state == default_layer_state) {
break;
} else if (state != 0 && layer_display_name[layer_name_idx].state == state) {
break;
}
}
update_keymap_status();
return state;
}
static inline void render_keymap_status(struct CharacterMatrix *matrix) {
matrix_write(matrix, layer_status_buf);
}
void matrix_render_user(struct CharacterMatrix *matrix) {
if (is_master) {
render_keymap_status(matrix);
matrix_write_ln(matrix, read_keylog());
matrix_write_ln(matrix, read_keylogs());
} else {
matrix_write(matrix, read_logo());
}
}
void matrix_update(struct CharacterMatrix *dest, const struct CharacterMatrix *source) {
if (memcmp(dest->display, source->display, sizeof(dest->display))) {
memcpy(dest->display, source->display, sizeof(dest->display));
dest->dirty = true;
}
}
void iota_gfx_task_user(void) {
struct CharacterMatrix matrix;
matrix_clear(&matrix);
matrix_render_user(&matrix);
matrix_update(&display, &matrix);
}
#endif

View File

@ -0,0 +1,19 @@
# RS40: Code Friendly 40% Keymap
This keymap is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one.
Because I sometime have to use my internal keyboard I my macbook, a karabiner configuration is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc.
See [rs readme](../../../../users/rs/readme.md) for a list of other keyboards supported by this keymap.
## Base Layer
[![](http://poitr.us/moooMf+)](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=E&_x:8%3B&=I%3B&@_y:-0.87&x:2%3B&=W&_x:1%3B&=R&_x:6%3B&=U&_x:1%3B&=O%3B&@_y:-0.8799999999999999&x:5%3B&=T&_x:4%3B&=Y%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=Q&_x:12%3B&=P&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=D&_x:8%3B&=K%3B&@_y:-0.8700000000000001&x:2%3B&=S&_x:1%3B&=F&_x:6%3B&=J&_x:1%3B&=L%3B&@_y:-0.8799999999999999&x:5%3B&=G&_x:4%3B&=H%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465&a:5%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=A&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%22%0A'%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=C&_x:8&a:5%3B&=%3C%0A,%3B&@_y:-0.8700000000000001&x:2&a:7%3B&=X&_x:1%3B&=V&_x:6%3B&=M&_x:1&a:5%3B&=%3E%0A.%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=B&_x:4%3B&=N%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=Z&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=Space%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
## Code Layer
[![](http://poitr.us/GvljvC+)](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=%23&_x:8%3B&=*%3B&@_y:-0.87&x:2%3B&=%2F@&_x:1%3B&=$&_x:6&a:5%3B&=%3C%0A(&_x:1%3B&=%3E%0A)%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=%25&_x:4%3B&=%5E%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=Tab&_c=%236750f2&t=%2344b8b8%3B&=!&_x:12%3B&=!%2F=&_c=%233a1ee6&t=%23b84465&a:5%3B&=+%0A%2F=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=3&_x:8%3B&=↑%3B&@_y:-0.8700000000000001&x:2%3B&=2&_x:1%3B&=4&_x:6&a:5%3B&=%7B%0A%5B&_x:1%3B&=%7D%0A%5D%3B&@_y:-0.8799999999999999&x:5&a:7%3B&=5&_x:4&a:5%3B&=%2F_%0A-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Esc%0ACtrl&_c=%236750f2&t=%2344b8b8&a:7%3B&=1&_x:12&a:5%3B&=%2F:%0A%2F%3B&_c=%233a1ee6&t=%23b84465%3B&=%7C%0A%5C%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=8&_x:8%3B&=↓%3B&@_y:-0.8700000000000001&x:2%3B&=7&_x:1%3B&=9&_x:6%3B&=←&_x:1%3B&=→%3B&@_y:-0.8799999999999999&x:5%3B&=0&_x:4%3B&=%2F&%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=Shift&_c=%236750f2&t=%2344b8b8%3B&=6&_x:12&a:5%3B&=%3F%0A%2F%2F&_c=%233a1ee6&t=%23b84465&a:7%3B&=Enter%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=Alt%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=Cmd%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=.%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Back%20Space%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)
## Fn Layer
[![](http://poitr.us/OXwmBK+)](http://www.keyboard-layout-editor.com/##@_backcolor=%23d8c1f5&switchMount=cherry&pcb:false&plate:true%3B&@_x:3&c=%236750f2&t=%2344b8b8&a:7%3B&=F3&_x:8%3B&=F8%3B&@_y:-0.87&x:2%3B&=F2&_x:1%3B&=F4&_x:6%3B&=F7&_x:1%3B&=F9%3B&@_y:-0.8799999999999999&x:5%3B&=F5&_x:4%3B&=F6%3B&@_y:-0.87&c=%233a1ee6&t=%23b84465%3B&=&_c=%236750f2&t=%2344b8b8%3B&=F1&_x:12%3B&=F10&_c=%233a1ee6&t=%23b84465%3B&=F11%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value+&_x:8%3B&=Page%20Up%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat+&_x:1%3B&=RGB%20Reset&_x:6%3B&=&_x:1%3B&=%3B&@_y:-0.8799999999999999&x:5%3B&=Bright+&_x:4%3B&=Vol+%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Toggle&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue+&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.3799999999999999&x:3&c=%236750f2&t=%2344b8b8%3B&=RGB%20Value-&_x:8%3B&=Page%20Down%3B&@_y:-0.8700000000000001&x:2%3B&=RGB%20Sat-&_x:1%3B&=Reset&_x:6%3B&=Ctrl+A&_x:1%3B&=Ctrl+E%3B&@_y:-0.8799999999999999&x:5%3B&=Bright-&_x:4%3B&=Vol-%3B&@_y:-0.8700000000000001&c=%233a1ee6&t=%23b84465%3B&=RGB%20Mode&_c=%236750f2&t=%2344b8b8%3B&=RGB%20Hue-&_x:12%3B&=&_c=%233a1ee6&t=%23b84465%3B&=%3B&@_y:-0.17999999999999972&x:11.75%3B&=Fn%3B&@_ry:0.25&y:2.95&x:3.3%3B&=%3B&@_r:12&ry:1.75&y:0.5&x:4.8%3B&=%3B&@_r:35&rx:6.5&ry:4.25&y:-0.75&x:-0.75&c=%23d12424&t=%23ffffff&h:1.5%3B&=%3B&@_r:-35&rx:13&y:-2.75&x:-3.0999999999999996&h:1.5%3B&=Mute%3B&@_r:-12&rx:0&ry:0&y:5.55&x:9.55&c=%233a1ee6&t=%23b84465%3B&=Code)

View File

@ -0,0 +1,32 @@
# Build Options
# change to "no" to disable the options, or define them in the Makefile in
# the appropriate keymap folder that will get included automatically
#
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MOUSEKEY_ENABLE = no # Mouse keys(+4700)
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
CONSOLE_ENABLE = no # Console for debug(+400)
COMMAND_ENABLE = no # Commands for debug and configuration
NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = no # Audio output on port C6
UNICODE_ENABLE = no # Unicode
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
RGBLIGHT_ENABLE = yes # Enable WS2812 RGB underlight.
SWAP_HANDS_ENABLE = no # Enable one-hand typing
TAP_DANCE_ENABLE = no
BOOTLOADER = atmel-dfu
# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
# If you want to change the display of OLED, you need to change here
SRC += oled.c \
./lib/glcdfont.c \
./lib/rgb_state_reader.c \
./lib/layer_state_reader.c \
./lib/logo_reader.c \
./lib/keylogger.c \

View File

@ -22,7 +22,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |-----------------------------------------------------------------------------------------+
* | Shift | Z | X | C | V | B | N | M | , | . | / | | Up |Shift|
* |-----------------------------------------------------------------------------------------+
* | Ctrl | Alt | Gui | Space / _NL |Gui/_ML| Alt | Left| Down|Right|
* | Ctrl | Alt | Gui | Space |Gui/_ML| Alt | Left| Down|Right|
* `-----------------------------------------------------------------------------------------'
*/
[_BL] = LAYOUT_all(
@ -30,25 +30,25 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS,
LT(_FL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT,
KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_A, KC_UP, KC_RSFT,
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, LT(_NL, KC_SPC), KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
KC_LCTL, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_NO, LM(_ML, MOD_RGUI), KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT),
/* ,-----------------------------------------------------------------------------------------.
* | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Del |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | |PgUp | | | | | | |
* | | | | PgUp| | | | | Up | | | | | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | Left| Down| Up |Right| | | |
* | | |Home |PgDwn| End | | | Left| Down|Right| | | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | |PgDwn| | | | | | |
* | | | | | | | | | | | | | | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | | |
* `-----------------------------------------------------------------------------------------'
*/
[_FL] = LAYOUT_all(
_______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL,
_______, _______, _______, _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT, _______, _______, _______,
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_PGDN, _______, _______, _______, _______, _______, _______,
_______, _______, _______, KC_PGUP, _______, _______, _______, _______, KC_UP, _______, _______, _______, _______, _______,
_______, _______, KC_HOME, KC_PGDN, KC_END, _______, _______, KC_LEFT, KC_DOWN, KC_RIGHT, _______, _______, _______,
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/* ,-----------------------------------------------------------------------------------------.
@ -64,30 +64,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------------------------------'
*/
[_ML] = LAYOUT_all(
KC_MEDIA_EJECT, BR_DOWN, BR_UP, _______, _______, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
KC_MEDIA_EJECT, BR_DOWN, BR_UP, BL_TOGG, RGB_TOG, _______, _______, KC_MEDIA_PREV_TRACK, KC_MEDIA_PLAY_PAUSE, KC_MEDIA_NEXT_TRACK, KC_AUDIO_MUTE, KC_AUDIO_VOL_DOWN, KC_AUDIO_VOL_UP, KC_NO, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
/* ,-----------------------------------------------------------------------------------------.
* | | | | | | | | | % | ( | ) | < | > | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | * | 0 | 1 | 2 | 3 | | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | . | - | 4 | 5 | 6 | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | , | = | 7 | 8 | 9 | | |
* |-----------------------------------------------------------------------------------------+
* | | | | | | | | | |
* `-----------------------------------------------------------------------------------------'
*/
[_NL] = LAYOUT_all(
_______, _______, _______, _______, _______, _______, _______, _______, KC_PERCENT, KC_LEFT_PAREN, KC_RIGHT_PAREN, KC_LEFT_ANGLE_BRACKET, KC_RIGHT_ANGLE_BRACKET, KC_NO, _______,
_______, _______, _______, _______, _______, _______, _______, KC_ASTERISK, KC_0, KC_1, KC_2, KC_3, _______, RESET,
_______, _______, _______, _______, _______, _______, _______, KC_DOT, KC_MINS, KC_4, KC_5, KC_6, _______,
_______, KC_NO, _______, _______, _______, _______, _______, _______, KC_COMMA, KC_EQL, KC_7, KC_8, KC_9, _______, _______,
_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______),
_______, KC_NO, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_BRTG, BL_INC, _______,
_______, _______, _______, _______, _______, _______, _______, _______, RGB_MODE_REVERSE, BL_DEC, RGB_MODE_FORWARD),
};
bool process_record_user(uint16_t keycode, keyrecord_t *record) {

View File

@ -1,2 +1,2 @@
BACKLIGHT_ENABLE = no
RGBLIGHT_ENABLE = no
BACKLIGHT_ENABLE = yes
RGBLIGHT_ENABLE = yes

View File

@ -1,25 +1,7 @@
#include QMK_KEYBOARD_H
enum layers {
_QWERTY,
_HYPER,
_SIGN
};
#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_SIGN MO(_SIGN)
#define KC_RST RESET
// Brightness
#define KC_BRUP KC_PAUS
#define KC_BRDN KC_SLCK
#include "rs.h"
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_QWERTY] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
TAB , Q , W , E , R , T , GRV, BSLS, Y , U , I , O , P ,EQL ,
@ -28,32 +10,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
LSFT, Z , X , C , V , B , SPC, BSPC, N , M ,COMM,DOT ,SLSH,ENTS,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
SIGN, ,LCTL,LALT,LGUI, SPC, BSPC, HYPE,LEFT, UP ,DOWN,RIGHT
FN , ,LCTL,LALT,LGUI, SPC, BSPC, CODE,LEFT, UP ,DOWN,RIGHT
//`----+----+----+--+-+----/----/ \----\----+----+----+----+----'
),
[_HYPER] = LAYOUT_kc(
[_CODE] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
GRV , 1 , 2 , 3 , 4 , 5 , , , 6 , 7 , 8 , 9 , 0 , ,
GRV ,EXLM, AT ,HASH, DLR,PERC, , ,CIRC,LPLT,ASTR,RPGT,NEQL, ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, , ,PGUP, , , , , , , UP ,LBRC,RBRC,BSLS,
, 1 , 2 , 3 , 4 , 5 , , ,MINS,LBRC, UP ,RBRC, ,BSLS,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, ,HOME,PGDN,END , , , VOLU, ,LEFT,DOWN,RGHT, ,PIPE,
, 6 , 7 , 8 , 9 , 0 , DOT, ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
, , , , , , VOLD, ,MUTE, , ,
, , , , , , , , , , ,
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
),
[_SIGN] = LAYOUT_kc(
[_FN] = LAYOUT_kc(
//,----+----+----+----+----+----+----. ,----+----+----+----+----+----+----.
TILD,EXLM, AT ,HASH,DLR ,PERC, , ,CIRC,AMPR,ASTR,LBRC,RBRC, ,
, F1 , F2 , F3 , F4 , F5 , , , F6 , F7 , F8 , F9 , F10,F11 ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
RST , F1 , F2 , F3 , F4 , F5 , F6 , , , , ,LCBR,RCBR,PIPE,
, , , , , ,BRMU, , , ,PGUP, , , ,
//|----+----+----+----+----+----+----| |----+----+----+----+----+----+----|
, 1 , 2 , 3 , 4 , 5 , , BRUP, 6 , 7 , 8 , 9 , 0 , ,
, , , , , RST,BRMD, VOLU, ,CTRA,PGDN,CTRE, , ,
//|----+----+----+----+----+----+----. .----+----+----+----+----+----+----|
, , , , , , BRDN, , , , ,
, , , , , , VOLD,MUTE, , , ,
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
),
};

View File

@ -1,13 +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 is also available for other keyboards:
- [ortho_5x12/rs](../../../../layouts/community/ortho_5x12/rs/keymap.c)
- [Iris/rs](../../../iris/keymaps/rs/keymap.c)
See [rs readme](../../../../users/rs/readme.md).

View File

@ -35,4 +35,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#define RGBLIGHT_SLEEP
#define RGBLIGHT_HUE_STEP 1
#define RGBLIGHT_SAT_STEP 1
#define RGBLIGHT_VAL_STEP 1
#define RGBLIGHT_VAL_STEP 1

View File

@ -1,48 +1,45 @@
#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
#include "rs.h"
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,
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
LALT,LGUI,SPC , BSPC,CODE,FN
// `----+----+----' `+---+----+----'
), // |
// |
[_HYPER] = LAYOUT_kc( // V
),
[_CODE] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 ,LBRC,RBRC, ,
, , , , , , , , , , , ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
, , ,PGUP, ,BRUP, , , UP ,LCBR,RCBR,BSLS,
GRV ,EXLM, AT ,HASH, DLR,PERC, CIRC,LPLT,ASTR,RPGT,NEQL, ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
, ,HOME,PGDN,END ,BRDN, MINS,LEFT,DOWN,RGHT, ,PIPE,
, 1 , 2 , 3 , 4 , 5 , MINS,LBRC, UP ,RBRC, ,BSLS,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
, , , , , ,BLTG, VOLU, , , , , , ,
, 6 , 7 , 8 , 9 , 0 , , ,AMPR,LEFT,DOWN,RGHT, ,PIPE,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
, , , VOLD, ,MUTE
, , DOT, , ,
// `----+----+----' `----+----+----'
),
[_FN] = LAYOUT_kc(
//,----+----+----+----+----+----. ,----+----+----+----+----+----.
, F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , F9 , F10, F11,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
, , , , , , , , , , , ,
//|----+----+----+----+----+----| |----+----+----+----+----+----|
BLTG,BLUP, , , ,BRMU, , ,PGUP, , , ,
//|----+----+----+----+----+----+----. ,----|----+----+----+----+----+----|
,BLDN, , ,RST ,BRMD, , VOLU, ,CTRA,PGDN,CTRE, , ,
//`----+----+----+--+-+----+----+----/ \----+----+----+----+----+----+----'
, , , VOLD,MUTE,
// `----+----+----' `----+----+----'
),
};

View File

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

View File

@ -1 +1,2 @@
BACKLIGHT_ENABLE = yes
BOOTLOADER = atmel-dfu

View File

@ -0,0 +1 @@
#pragma once

View File

@ -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 , , , , ,
// `-----------------------------------------------------------------------------------'
),
};

View File

@ -0,0 +1 @@
See [rs readme](../../../../users/rs/readme.md).

View File

@ -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

View File

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

View File

@ -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(
// ,-----------------------------------------------------------------------------------.
RST , F1 , F2 , F3 , F4 , F5 , F6 , F7 , F8 , LBRC , RBRC , ,
, , , , , , , , , , , ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
, , , PGUP , , , , , UP , LCBR , RCBR , BSLS ,
GRV , EXLM , AT , HASH , DLR , PERC , CIRC , LPLT , ASTR , RPGT , NEQL , ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
, , HOME , PGDN , END , , MINS , LEFT , DOWN , RGHT , , PIPE ,
, 1 , 2 , 3 , 4 , 5 , MINS , LBRC , UP , RBRC , , BSLS ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
, , , , , , , , , BRDN , BRUP , ,
, 6 , 7 , 8 , 9 , 0 , AMPR , LEFT , DOWN , RGHT , , PIPE ,
// |------+------+------+------+------+------+------+------+------+------+------+------|
, , , , , , , , MUTE , VOLD , VOLU , MPLY
, , , , , 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 , , , , ,
// `-----------------------------------------------------------------------------------'
),
};

View File

@ -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)
See [rs readme](../../../../users/rs/readme.md).

30
users/rs/readme.md Normal file
View File

@ -0,0 +1,30 @@
# RS: Code Friendly 40% 60% Keymaps
The rs keymap collection is an evolution of my previous keymap optimized for coding with a 60% keyboards like the Iris. I tried to keep the simplicity of my previous keymap with all the keys necessary for coding on a single layer in addition to the base one. It work well with any 40% and 60% keyboard, split or not.
To build it, use:
make <keyboard>:rs
Example:
make keebio/iris:rs
make crkbd:rs
make planck:rs
make preonic:rs
make ergotravel:rs
make handwired/rs60:rs
Because I sometime have to use my internal keyboard I my macbook, a [karabiner configuration](karabiner.json) is also provided to get most of the features of this keyboard, including the code layer / backspace on right command key etc.
This set of keymaps have been tested with those keyboards:
- [Planck](../../keyboards/planck/)
- [Preonic](../../keyboards/preonic/)
- [My preonic clone](../../keyboards/handwired/rs60/)
This keymap in is also available for other keyboards:
- [Crkdb/rs](../../keyboards/crkbd/keymaps/rs/keymap.c)
- [Iris/rs](../../keyboards/keebio/iris/keymaps/rs/keymap.c)
- [Ergotravel/rs](../../keyboards/ergotravel/keymaps/rs/keymap.c)
- [ortho_5x12/rs](../../layouts/community/ortho_5x12/rs/keymap.c)
- [ortho_4x12/rs](../../layouts/community/ortho_4x12/rs/keymap.c)

74
users/rs/rs.c Normal file
View File

@ -0,0 +1,74 @@
#include "rs.h"
// process_record_user is like process_record_user for keymaps including this file.
__attribute__ ((weak))
bool process_record_keymap(uint16_t keycode, keyrecord_t *record) {
return true;
}
// rgb_mod_changed_keymap is called any time the RGB mod has been changed.
__attribute__ ((weak))
void rgb_mod_changed_keymap(void) {
}
// keylog_set_keymap is called for every key press.
__attribute__ ((weak))
void keylog_set_keymap(uint16_t keycode, keyrecord_t *record) {
}
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (record->event.pressed) {
keylog_set_keymap(keycode, record);
}
switch (keycode) {
case NEQL: // !=
if (record->event.pressed) {
SEND_STRING("!=");
}
return false;
case LPLT: // ( or < with shift
if (record->event.pressed) {
if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) {
// <
tap_code(KC_COMM); // shift is already registered
} else {
// (
register_mods(MOD_BIT(KC_LSFT));
tap_code(KC_9);
unregister_mods(MOD_BIT(KC_LSFT));
}
}
return false;
case RPGT: // ) or > with shift
if (record->event.pressed) {
if (get_mods() & (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT))) {
// <
tap_code(KC_DOT); // shift is already registered
} else {
// )
register_mods(MOD_BIT(KC_LSFT));
tap_code(KC_0);
unregister_mods(MOD_BIT(KC_LSFT));
}
}
return false;
#ifdef RGBLIGHT_ENABLE
case RGB_MOD:
if (record->event.pressed) {
rgblight_step();
rgb_mod_changed_keymap();
}
return false;
case RGBRST:
if (record->event.pressed) {
eeconfig_update_rgblight_default();
rgblight_enable();
rgb_mod_changed_keymap();
}
return false;
#endif
}
return process_record_keymap(keycode, record);
}

50
users/rs/rs.h Normal file
View File

@ -0,0 +1,50 @@
#pragma once
#include "quantum.h"
enum layers {
_QWERTY,
_CODE,
_FN,
};
enum custom_keycodes {
CODE = SAFE_RANGE,
FN,
LPLT,
RPGT,
NEQL,
#ifdef RGBLIGHT_ENABLE
RGBRST,
#endif
};
#define KC_ KC_TRNS
#define KC_ESCC MT(MOD_LCTL, KC_ESC)
#define KC_ENTS MT(MOD_LSFT, KC_ENT)
#define KC_LTGT LTGT // > or < with shift
#define KC_LPLT LPLT // ( or < with shift
#define KC_RPGT RPGT // ) or > with shift
#define KC_NEQL NEQL // !=
#define KC_CODE MO(_CODE)
#define KC_BCOD LT(_CODE, KC_BSPC)
#define KC_FN MO(_FN)
#define KC_RST RESET
#define KC_CTRA LCTL(KC_A)
#define KC_CTRE LCTL(KC_E)
#define KC_BLTG BL_TOGG
#define KC_BLUP BL_INC
#define KC_BLDN BL_DEC
#define KC_BLBR BL_BRTG
#ifdef RGBLIGHT_ENABLE
#define KC_LRST RGBRST
#define KC_LTOG RGB_TOG
#define KC_LHUI RGB_HUI
#define KC_LHUD RGB_HUD
#define KC_LSAI RGB_SAI
#define KC_LSAD RGB_SAD
#define KC_LVAI RGB_VAI
#define KC_LVAD RGB_VAD
#define KC_LMOD RGB_MOD
#endif

1
users/rs/rules.mk Normal file
View File

@ -0,0 +1 @@
SRC += rs.c