mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-12-28 12:09:16 +06:00
Merge pull request #841 from jacwib/master
Update jacwib keymap to version 1.2
This commit is contained in:
commit
3b34cf7e6c
@ -4,5 +4,6 @@
|
||||
#include "../../config.h"
|
||||
|
||||
#define FORCE_NKRO 1
|
||||
#define PREVENT_STUCK_MODIFIERS
|
||||
|
||||
#endif
|
||||
|
@ -13,13 +13,18 @@
|
||||
#define _QWERTY 0
|
||||
#define _LOWER 3
|
||||
#define _RAISE 4
|
||||
#define _MQWERTY 5
|
||||
#define _MLOWER 8
|
||||
#define _MRAISE 9
|
||||
#define _ADJUST 16
|
||||
|
||||
enum preonic_keycodes {
|
||||
QWERTY = SAFE_RANGE,
|
||||
LOWER,
|
||||
RAISE,
|
||||
BACKLIT
|
||||
MQWERTY,
|
||||
MLOWER,
|
||||
MRAISE
|
||||
};
|
||||
|
||||
// Fillers to make layering more clear
|
||||
@ -38,7 +43,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| < | Z | X | C | V | B | N | M | . | , | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | GUI | Alt |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
|
||||
* | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_QWERTY] = {
|
||||
@ -46,7 +51,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },
|
||||
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},
|
||||
{KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},
|
||||
{KC_LCTL, KC_LGUI, KC_LALT, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
{KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, LOWER, KC_SPC, KC_ENT, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Lower
|
||||
@ -59,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | |VolDwn| | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | |Bspc | | | | | |
|
||||
* | | | | | | |Bspc | | |PgDn |PgUp | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_LOWER] = {
|
||||
@ -67,7 +72,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},
|
||||
{_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)},
|
||||
{_______, NO_PIPE, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______}
|
||||
{_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______}
|
||||
},
|
||||
|
||||
/* Raise
|
||||
@ -76,11 +81,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | |Mouse^| | | | |ScrlUp| | | ^ |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | " |
|
||||
* | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | > | | | | | | |ScrlDown| : | ; | _ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | |Bspc | | | | | | |
|
||||
* | | | | | |Bspc | | | | PgDn | PgUp | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_RAISE] = {
|
||||
@ -88,7 +93,70 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
{_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},
|
||||
{_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},
|
||||
{_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},
|
||||
{_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, _______, _______, _______}
|
||||
{_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______}
|
||||
},
|
||||
|
||||
/* Mac Qwerty
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | + | Bksp |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Esc | Q | W | E | R | T | Y | U | I | O | P | Å |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | Tab | A | S | D | F | G | H | J | K | L | Ö | Ä |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | Shift| < | Z | X | C | V | B | N | M | . | , | - |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | Ctrl | Alt | GUI |AltGr |Lower | Space| Enter|Raise | Left | Down | Up |Right |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MQWERTY] = {
|
||||
{KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, NO_PLUS, KC_BSPC},
|
||||
{KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AM },
|
||||
{KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, NO_AE, NO_OSLH},
|
||||
{KC_LSFT, NO_LESS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_DOT, KC_COMM, NO_MINS},
|
||||
{KC_LCTL, KC_LALT, KC_LGUI, NO_ALGR, MLOWER, KC_SPC, KC_ENT, MRAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
|
||||
},
|
||||
|
||||
/* Mac Lower
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | | @ | £ | $ | | | { | [ | ] | } | \ | Del |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | |VolUp | | | ~ |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | |LastS |PauseP|NextS | | * |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | | | | | | | | |VolDwn| | | |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | |Bspc | | |PgDn |PgUp | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MLOWER] = {
|
||||
{_______, NO_AT, NO_PND, NO_DLR, _______, _______, LSFT(LALT(KC_8)), NO_LBRC, NO_RBRC, LSFT(LALT(KC_9)), LSFT(LALT(KC_7)), KC_DEL},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, KC_VOLU, _______, _______, NO_TILD},
|
||||
{_______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MPLY, KC_MNXT, _______, LSFT(KC_BSLS)},
|
||||
{_______, NO_LBRC, _______, _______, _______, _______, _______, _______, KC_VOLD, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, KC_BSPC, _______, _______, KC_PGDN, KC_PGUP, _______}
|
||||
},
|
||||
|
||||
/* Mac Raise
|
||||
* ,-----------------------------------------------------------------------------------.
|
||||
* | ! | " | # | ¤ | % | & | / | ( | ) | = | ? | Ins |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | |Mouse^| | | | |ScrlUp| | | ^ |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | |Mouse<|MouseV|Mouse>| | |MLC |MMC |MRC | ' | ¨ |
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | | > | | | | | | |ScrlDown| : | ; | _ |
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | |Bspc | | | | PgDn | PgUp | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_MRAISE] = {
|
||||
{LSFT(KC_1),NO_QUO2,LSFT(KC_3), NO_BULT,LSFT(KC_5), NO_AMPR, NO_SLSH, NO_LPRN, NO_RPRN, NO_EQL, NO_QUES, KC_INS},
|
||||
{_______, _______, _______, KC_MS_U, _______, _______, _______, _______, KC_WH_U, _______, _______, NO_CIRC},
|
||||
{_______, _______, KC_MS_L, KC_MS_D, KC_MS_R, _______, _______, KC_BTN1, KC_BTN3, KC_BTN2, NO_APOS, NO_QUOT},
|
||||
{_______, NO_GRTR, _______, _______, _______, _______, _______, _______, KC_WH_D, NO_COLN, NO_SCLN, NO_UNDS},
|
||||
{_______, _______, _______, _______, _______, KC_BSPC, _______, _______, _______, KC_PGDN, KC_PGUP, _______}
|
||||
},
|
||||
|
||||
/* Adjust (Lower + Raise)
|
||||
@ -97,18 +165,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | Reset| | | | | | | | |
|
||||
* |------+------+------+------+------+-------------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |Rsft |
|
||||
* | | | | | | | | | | | |Rshift|
|
||||
* |------+------+------+------+------+------|------+------+------+------+------+------|
|
||||
* | |MusOn |MusOff| | | | | | | | | Reset|
|
||||
* | |MusOn |MusOff| | | | |NrmMode|MacMode| | | Reset|
|
||||
* |------+------+------+------+------+------+------+------+------+------+------+------|
|
||||
* | | | | | | | | | | | |
|
||||
* | | | | | | | | | | | | |
|
||||
* `-----------------------------------------------------------------------------------'
|
||||
*/
|
||||
[_ADJUST] = {
|
||||
{KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12},
|
||||
{_______, _______, _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______},
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_RSFT},
|
||||
{_______, MU_ON, MU_OFF, _______, _______, _______, _______, _______, _______, _______, _______, RESET },
|
||||
{_______, MU_ON, MU_OFF, _______, _______, _______, _______, TO(0), TO(5), _______, _______, RESET },
|
||||
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______}
|
||||
}
|
||||
|
||||
@ -117,14 +185,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
#ifdef AUDIO_ENABLE
|
||||
float tone_startup[][2] = {
|
||||
{NOTE_B5, 20},
|
||||
{NOTE_B6, 8},
|
||||
{NOTE_DS6, 20},
|
||||
{NOTE_B6, 8}
|
||||
{NOTE_D5, 8},
|
||||
{NOTE_E6, 8},
|
||||
{NOTE_D6, 8},
|
||||
{NOTE_E5, 8}
|
||||
};
|
||||
|
||||
float tone_qwerty[][2] = SONG(QWERTY_SOUND);
|
||||
|
||||
float tone_goodbye[][2] = SONG(GOODBYE_SOUND);
|
||||
|
||||
float music_scale[][2] = SONG(MUSIC_SCALE_SOUND);
|
||||
@ -139,9 +205,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
switch (keycode) {
|
||||
case QWERTY:
|
||||
if (record->event.pressed) {
|
||||
#ifdef AUDIO_ENABLE
|
||||
PLAY_NOTE_ARRAY(tone_qwerty, false, 0);
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_QWERTY);
|
||||
}
|
||||
return false;
|
||||
@ -166,14 +229,29 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case BACKLIT:
|
||||
case MQWERTY:
|
||||
if (record->event.pressed) {
|
||||
register_code(KC_RSFT);
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
backlight_step();
|
||||
#endif
|
||||
persistant_default_layer_set(1UL<<_MQWERTY);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MLOWER:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MLOWER);
|
||||
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
|
||||
} else {
|
||||
unregister_code(KC_RSFT);
|
||||
layer_off(_MLOWER);
|
||||
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case MRAISE:
|
||||
if (record->event.pressed) {
|
||||
layer_on(_MRAISE);
|
||||
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
|
||||
} else {
|
||||
layer_off(_MRAISE);
|
||||
update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
|
@ -1,3 +1,15 @@
|
||||
# Jacwib's preonic keymap.
|
||||
|
||||
Designed for use with a swedish language.
|
||||
|
||||
Version 1.1:
|
||||
|
||||
Added PgUp and PgDn keys.
|
||||
|
||||
Also added "Mac mode". Unsure if it even works. Might however be able to test soon.
|
||||
|
||||
Version 1.2:
|
||||
|
||||
Changed around alt and super keys.
|
||||
|
||||
Made "Mac mode" function, and tested it! (It works)
|
||||
|
Loading…
Reference in New Issue
Block a user