summaryrefslogtreecommitdiffstats
path: root/keyboards/preonic
diff options
context:
space:
mode:
authorjacwib <jacwib@users.noreply.github.com>2016-10-23 15:57:36 +0200
committerGitHub <noreply@github.com>2016-10-23 15:57:36 +0200
commitb7611d5037629334183dbab34b39bc35d157316f (patch)
treeb48d677402c110475bed3ab83fb3775cb16c3179 /keyboards/preonic
parentdbcbd8ee3c699b37e0326a58c28503ee156c63cf (diff)
1.2 update
Diffstat (limited to 'keyboards/preonic')
-rw-r--r--keyboards/preonic/keymaps/jacwib/config.h1
-rw-r--r--keyboards/preonic/keymaps/jacwib/keymap.c116
-rw-r--r--keyboards/preonic/keymaps/jacwib/readme.md8
3 files changed, 105 insertions, 20 deletions
diff --git a/keyboards/preonic/keymaps/jacwib/config.h b/keyboards/preonic/keymaps/jacwib/config.h
index 23e9e0ed28..b988831207 100644
--- a/keyboards/preonic/keymaps/jacwib/config.h
+++ b/keyboards/preonic/keymaps/jacwib/config.h
@@ -4,5 +4,6 @@
#include "../../config.h"
#define FORCE_NKRO 1
+#define PREVENT_STUCK_MODIFIERS
#endif
diff --git a/keyboards/preonic/keymaps/jacwib/keymap.c b/keyboards/preonic/keymaps/jacwib/keymap.c
index 9f64b90654..72ccc86cd2 100644
--- a/keyboards/preonic/keymaps/jacwib/keymap.c
+++ b/keyboards/preonic/keymaps/jacwib/keymap.c
@@ -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
@@ -91,6 +96,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{_______, _______, _______, _______, _______, 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)
* ,-----------------------------------------------------------------------------------.
* | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 |
@@ -108,7 +176,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
{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, _______, _______, _______, _______, AG_SWAP, AG_NORM, _______, _______, 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) {
+ 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 {
+ layer_off(_MLOWER);
+ update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
+ }
+ return false;
+ break;
+ case MRAISE:
if (record->event.pressed) {
- register_code(KC_RSFT);
- #ifdef BACKLIGHT_ENABLE
- backlight_step();
- #endif
+ layer_on(_MRAISE);
+ update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
} else {
- unregister_code(KC_RSFT);
+ layer_off(_MRAISE);
+ update_tri_layer(_MLOWER, _MRAISE, _ADJUST);
}
return false;
break;
diff --git a/keyboards/preonic/keymaps/jacwib/readme.md b/keyboards/preonic/keymaps/jacwib/readme.md
index 229fa061da..8658d6cdd7 100644
--- a/keyboards/preonic/keymaps/jacwib/readme.md
+++ b/keyboards/preonic/keymaps/jacwib/readme.md
@@ -6,4 +6,10 @@ Version 1.1:
Added PgUp and PgDn keys.
-Also added "Mac mode". Unsure if it works. Will test asap.
+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)