[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:
committed by
Drashna Jaelre
parent
3b13259942
commit
2d5c16dfd4
@@ -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
|
||||
|
44
keyboards/crkbd/keymaps/rs/config.h
Normal file
44
keyboards/crkbd/keymaps/rs/config.h
Normal 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
|
39
keyboards/crkbd/keymaps/rs/keymap.c
Normal file
39
keyboards/crkbd/keymaps/rs/keymap.c
Normal 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, ,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
};
|
||||
|
104
keyboards/crkbd/keymaps/rs/oled.c
Normal file
104
keyboards/crkbd/keymaps/rs/oled.c
Normal 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
|
19
keyboards/crkbd/keymaps/rs/readme.md
Normal file
19
keyboards/crkbd/keymaps/rs/readme.md
Normal 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://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://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://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)
|
32
keyboards/crkbd/keymaps/rs/rules.mk
Normal file
32
keyboards/crkbd/keymaps/rs/rules.mk
Normal 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 \
|
@@ -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) {
|
||||
|
@@ -1,2 +1,2 @@
|
||||
BACKLIGHT_ENABLE = no
|
||||
RGBLIGHT_ENABLE = no
|
||||
BACKLIGHT_ENABLE = yes
|
||||
RGBLIGHT_ENABLE = yes
|
@@ -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, , , ,
|
||||
//`----+----+----+----+----/----/ \----\----+----+----+----+----'
|
||||
),
|
||||
};
|
@@ -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).
|
@@ -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
|
||||
|
@@ -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,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,
|
||||
// `----+----+----' `----+----+----'
|
||||
),
|
||||
};
|
||||
|
||||
|
@@ -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).
|
@@ -1 +1,2 @@
|
||||
BACKLIGHT_ENABLE = yes
|
||||
BOOTLOADER = atmel-dfu
|
||||
|
Reference in New Issue
Block a user