[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.pull/5810/head
parent
3b13259942
commit
2d5c16dfd4
@ -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
|
@ -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, ,
|
||||||
|
// `----+----+----' `----+----+----'
|
||||||
|
),
|
||||||
|
};
|
||||||
|
|
@ -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
|
@ -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)
|
@ -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 \
|
@ -1,2 +1,2 @@
|
|||||||
BACKLIGHT_ENABLE = no
|
BACKLIGHT_ENABLE = yes
|
||||||
RGBLIGHT_ENABLE = no
|
RGBLIGHT_ENABLE = yes
|
@ -1,13 +1 @@
|
|||||||
# Code friendly 60% keymap
|
See [rs readme](../../../../users/rs/readme.md).
|
||||||
|
|
||||||
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)
|
|
@ -1,13 +1 @@
|
|||||||
# Code friendly 60% keymap
|
See [rs readme](../../../../users/rs/readme.md).
|
||||||
|
|
||||||
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)
|
|
@ -1 +1,2 @@
|
|||||||
BACKLIGHT_ENABLE = yes
|
BACKLIGHT_ENABLE = yes
|
||||||
|
BOOTLOADER = atmel-dfu
|
||||||
|
@ -0,0 +1 @@
|
|||||||
|
#pragma once
|
@ -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 , , , , ,
|
||||||
|
// `-----------------------------------------------------------------------------------'
|
||||||
|
),
|
||||||
|
};
|
@ -0,0 +1 @@
|
|||||||
|
See [rs readme](../../../../users/rs/readme.md).
|
@ -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"}]
|
|
||||||
}]
|
|
||||||
}]
|
|
||||||
}
|
|
@ -1,17 +1 @@
|
|||||||
# Code friendly 60% keymap
|
See [rs readme](../../../../users/rs/readme.md).
|
||||||
|
|
||||||
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)
|
|
@ -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);
|
||||||
|
}
|
@ -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
|
@ -0,0 +1 @@
|
|||||||
|
SRC += rs.c
|
Loading…
Reference in new issue