1
0
Fork 0

layout(preonic): update to dudeofawesome's layout (#2507)

* 🎉 duplicate default Preonic keymap

*  add Workman layout

* 🚚 swap backspace and delete

*  enable hold enter for shift

* 🚚 swap media play and next

* 💄 use Planck startup sound

* 💄 add Workman layer sound

*  add numpad layer

* 💄 add new workman sound

* 📝 add README

* 🎨 fix layout formatting

* 📝 add image of numpad layer

* 📦 changing chibios submodule version

to match upstream/master's version

*  add caps lock key on adjust layer

*  reworking numpad layer to match a real numpad

*  add double tap to activate numpad

* 📝 fix layout comments

* 📝 update numpad layer render

*  adding operator keys to left hand on numpad

* 🎨 shorten numpad keycodes

* 🎨 remove redundant breaks

* 📝 update numpad layer render

* 🎨 fix indentation

* 🔧 add rules file

* 🔊 play sound when switching to numpad layer

* 🔨 use userspace sounds
This commit is contained in:
Louis Orleans 2018-03-16 13:22:33 -07:00 committed by Jack Humbert
parent 48321c3eee
commit f139c3db8d
5 changed files with 93 additions and 75 deletions

View file

@ -1,7 +1,8 @@
#ifndef CONFIG_USER_H #ifndef CONFIG_USER_H
#define CONFIG_USER_H #define CONFIG_USER_H
#include "config_common.h" #include "../../config.h"
#include "dudeofawesome.h"
#define TAPPING_TOGGLE 2 #define TAPPING_TOGGLE 2
@ -9,14 +10,6 @@
#define STARTUP_SONG SONG(PLANCK_SOUND) #define STARTUP_SONG SONG(PLANCK_SOUND)
// #define STARTUP_SONG SONG(NO_SOUND) // #define STARTUP_SONG SONG(NO_SOUND)
#define WORKMAN_SOUND \
E__NOTE(_GS7), \
ED_NOTE(_E7), \
S__NOTE(_REST), \
E__NOTE(_A6), \
S__NOTE(_REST), \
ED_NOTE(_GS6),
#define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \ #define DEFAULT_LAYER_SONGS { SONG(QWERTY_SOUND), \
SONG(WORKMAN_SOUND), \ SONG(WORKMAN_SOUND), \
SONG(COLEMAK_SOUND), \ SONG(COLEMAK_SOUND), \

View file

@ -218,25 +218,21 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
set_single_persistent_default_layer(_QWERTY); set_single_persistent_default_layer(_QWERTY);
} }
return false; return false;
break;
case WORKMAN: case WORKMAN:
if (record->event.pressed) { if (record->event.pressed) {
set_single_persistent_default_layer(_WORKMAN); set_single_persistent_default_layer(_WORKMAN);
} }
return false; return false;
break;
case COLEMAK: case COLEMAK:
if (record->event.pressed) { if (record->event.pressed) {
set_single_persistent_default_layer(_COLEMAK); set_single_persistent_default_layer(_COLEMAK);
} }
return false; return false;
break;
case DVORAK: case DVORAK:
if (record->event.pressed) { if (record->event.pressed) {
set_single_persistent_default_layer(_DVORAK); set_single_persistent_default_layer(_DVORAK);
} }
return false; return false;
break;
case LOWER: case LOWER:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_LOWER); layer_on(_LOWER);
@ -246,7 +242,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST); update_tri_layer(_LOWER, _RAISE, _ADJUST);
} }
return false; return false;
break;
case RAISE: case RAISE:
if (record->event.pressed) { if (record->event.pressed) {
layer_on(_RAISE); layer_on(_RAISE);
@ -256,7 +251,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
update_tri_layer(_LOWER, _RAISE, _ADJUST); update_tri_layer(_LOWER, _RAISE, _ADJUST);
} }
return false; return false;
break;
case BACKLIT: case BACKLIT:
if (record->event.pressed) { if (record->event.pressed) {
register_code(KC_RSFT); register_code(KC_RSFT);
@ -269,7 +263,27 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) {
PORTE |= (1<<6); PORTE |= (1<<6);
} }
return false; return false;
break;
} }
return true; return true;
}; };
bool numpadActive = false;
float tone_numpad_on[][2] = SONG(NUMPAD_ON_SOUND);
void matrix_scan_user (void) {
uint8_t layer = biton32(layer_state);
switch (layer) {
case _NUMPAD:
if (!numpadActive) {
numpadActive = true;
PLAY_SONG(tone_numpad_on);
}
break;
default:
if (numpadActive) {
numpadActive = false;
}
}
};

View file

@ -10,7 +10,7 @@
- Dvorak - Dvorak
- Colemak - Colemak
- Numpad layer - Numpad layer
![numpad layer](https://i.imgur.com/V5iGHZg.png) ![numpad layer](https://i.imgur.com/IH8sWmQ.png)
- Audio - Audio
## Building and flashing ## Building and flashing

View file

@ -0,0 +1,5 @@
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
MIDI_ENABLE = no # MIDI controls
AUDIO_ENABLE = yes # Audio output on port C6
UNICODE_ENABLE = no # Unicode
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight.

View file

@ -14,6 +14,12 @@
E__NOTE(_A6), \ E__NOTE(_A6), \
S__NOTE(_REST), \ S__NOTE(_REST), \
ED_NOTE(_GS6), ED_NOTE(_GS6),
#define NUMPAD_ON_SOUND \
E__NOTE(_C6), \
ED_NOTE(_BF5), \
S__NOTE(_C6), \
ED_NOTE(_BF5),
#endif #endif
#endif #endif